[Skiboot] [PATCH 0/9] Clean up issues with opal-gard

Andrew Jeffery andrew at aj.id.au
Thu Oct 3 15:53:33 AEST 2019


Hello,

This series fixes two corruption issues that are exposed by opal-gard:

* A broken offset calculation when clearing specific records in patch 1
* Broken writes of unaligned data to ECC protected partitions in patches 2-9

Patches 2-8 are cleanups that help remove noise from the actual fix contained
in patch 9.

Regression tests are introduced for both corruption cases.

The fixes need to go to skiboot stable, but I'm wondering whether we want to
squash patches 2-9 together for that? Not sure. Will follow that up after some
feedback.

Please review!

Andrew

Andrew Jeffery (9):
  gard: Fix data corruption when clearing single records
  blocklevel: smart_write: Terminate line for debug output in no-change
    case
  blocklevel: smart_write: Rename write buffer
  blocklevel: smart_write: Rename size variable for clarity
  blocklevel: smart_write: Avoid indirectly testing formal parameters
  blocklevel: smart_write: Deny writes intersecting ECC protected
    regions
  blocklevel: smart_write: Avoid reuse of formal parameters
  blocklevel: smart_write: Tidy local variable declarations
  blocklevel: smart_write: Fix unaligned writes to ECC partitions

 external/gard/gard.c                          |  2 +-
 .../gard/test/results/10-clear-single.err     |  0
 .../gard/test/results/10-clear-single.out     |  7 ++
 external/gard/test/results/11-clear-first.err |  0
 external/gard/test/results/11-clear-first.out | 13 +++
 external/gard/test/tests/10-clear-single      | 23 +++++
 external/gard/test/tests/11-clear-first       | 26 ++++++
 libflash/blocklevel.c                         | 88 ++++++++++++++-----
 8 files changed, 134 insertions(+), 25 deletions(-)
 create mode 100644 external/gard/test/results/10-clear-single.err
 create mode 100644 external/gard/test/results/10-clear-single.out
 create mode 100644 external/gard/test/results/11-clear-first.err
 create mode 100644 external/gard/test/results/11-clear-first.out
 create mode 100644 external/gard/test/tests/10-clear-single
 create mode 100644 external/gard/test/tests/11-clear-first

-- 
2.20.1



More information about the Skiboot mailing list