Attention is currently required from: Aarya, Alexander Goncharov, Sam McNally.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/77747?usp=email )
Change subject: erasure_layout: Fix double invocation of erasers ......................................................................
Patch Set 3:
(1 comment)
Patchset:
PS2: I did some more investigation and traced when this double-erase started:
initial logic which erased everything once is here: https://review.coreboot.org/c/flashrom/+/66104/67 (that's around end of last year) line flashrom.c#1174
and here second invocation was added: https://review.coreboot.org/c/flashrom/+/66104/95..96 the code moved to a separate file, so two invocations are at: erasure_layout.c#314 and #322
At head the two invocations are at erasure_layout.c#331 and #342
Now in my patch here I wrapped second invocation into a conditional, so that it is not invoked always, but only if something left to erase. I don't know whether it is a realistic scenario, and that's what you were saying:
ideally there should nothing be left once the above loop at line 309 finishes