Attention is currently required from: Aarya, Alexander Goncharov.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/78984?usp=email )
The change is no longer submittable: All-Comments-Resolved is unsatisfied now.
Change subject: erasure_layout: Fix unaligned region end offset by 1 ......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS1:
The open question here is whether anything is needed for start region branch. […]
I did more investigation to understand why no fix is needed for the case when start of the region is extended, and yes it seems no fix is needed for start region.
The reason is that the functions used to handle the extension of the region boundaries, ours `read_flash` and not ours `memcpy`, they both are "start-inclusive". Now, for both start and end boundaries extension, diff is calculated correctly. But then, there is the code which handles the extended area, this area is outside of the initial layout. When start boundary is extended, the code works because `read_flash` and `memcpy` start from the first byte of extended area and go through its length. However, when end boundary is extended, we don't need to start from the last byte of the initial region, we need to start from the first byte after the initial region. Therefore +1 is needed for the end boundary processing.
Patchset:
PS2: After some investigation I came to conclusion that no fix is needed for start boundary extension (see my other comment). So I won't be adding more to this patch, unless there are other comments of course.
Joursoir, is it possible for you to test the patch on the images that you initially found the bug in ticket 494? It would be great, since you initially reported the bug, so that you can confirm it is fixed.