Attention is currently required from: Evan Benn.
Hsuan-ting Chen has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/79304?usp=email )
Change subject: flashrom_tester: Fix partial_lock_test on libflashrom ......................................................................
Patch Set 2:
(5 comments)
Patchset:
PS1: Thanks for the prompt code review!
I think this fix is fine in the mean time, but obviously the write itself should fail if it is being prevented due to write protect, not the verify.
I can confirm that this is the current ChromeOS behavior. I tested it by: * Disable HWWP * Enable SWWP * Enable HWWP * Write all zero to GBB with `flashrom -p internal -i GBB -w GBB.zero.bin` and expect a fail * Write again with `-n`: `flashrom -p internal -i GBB -w GBB.zero.bin -n` and expect a success * Check that GBB was not changed
Did this regress at some point?
I cannot tell when this behavior changed, but the current behavior in ChromeOS is that "Write without verification will not fail."
I remember there were differences here between chromeos and upstream flashrom, have those diverged more or are in sync now?
I'll have a look. I can't observe any for now.
---
However, regardless of the behavior, it makes more sense to run libflashrom and the flashrom binary with exactly the same flags.
File util/flashrom_tester/flashrom/src/cmd.rs:
https://review.coreboot.org/c/flashrom/+/79304/comment/43a65e1d_e9d824d6 : PS1, Line 299: // flashrom cli has its own default flags.
`flashrom cli sets these flags by default`
Done
File util/flashrom_tester/flashrom/src/flashromlib.rs:
https://review.coreboot.org/c/flashrom/+/79304/comment/70affd63_2d97f9f8 : PS1, Line 200: .flag_set(FlashromFlag::FlashromFlagSkipUnreadableRegions, true);
I don't see these last two being set in cli_classic. […]
Those should be CrOS only default value. Let me remove them (and land only in CrOS repo: [CL](https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+...))
File util/flashrom_tester/flashrom/src/lib.rs:
https://review.coreboot.org/c/flashrom/+/79304/comment/cf91d477_8100c483 : PS1, Line 166: /// Set default flashrom flag if necessary.
`Set flags to the defaults used by the flashrom cli`
Done
File util/flashrom_tester/src/tester.rs:
https://review.coreboot.org/c/flashrom/+/79304/comment/91aef8a9_deee5e9e : PS1, Line 87: info!("Setup default flashrom flag(s)");
I don't think this is a necessary log
Done