diff options
author | Edward O'Callaghan <quasisec@google.com> | 2023-01-20 12:54:13 +1100 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-22 02:42:12 +0000 |
commit | 1a1cb5c9a38030a5868e2aaad295c68432c680fd (patch) | |
tree | a76e21ce28bed83c28e478dce16e087ff885007d | |
parent | d79d098356e1d07a46eb3d7a2f3ed9cd64e4576c (diff) | |
download | vboot-1a1cb5c9a38030a5868e2aaad295c68432c680fd.tar.gz |
futility/flashrom_drv: Add new skip perm flags to read pathstabilize-15329.59.Bstabilize-15329.44.Brelease-R111-15329.B
flashrom now respects region permissions rather than ignoring
exit codes. While downstreaming this support we require these
flags to be set to ensure no change in behavior for futility.
It turns out chromeos-firmware-updater will fail on the read
path with,
```
[..]
read_flash: cannot read inside Management Engine region
(0x001000..0x1fffff).
Read operation failed!
ERROR: do_update: Cannot load system active firmware.
```
without skipping regions that cannot actually be read.
BUG=b:260440773
BRANCH=none
TEST=builds
Change-Id: I45a5b81837988fab18b1c392415dffe55ad49822
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4181583
Reviewed-by: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
-rw-r--r-- | host/lib/flashrom_drv.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/host/lib/flashrom_drv.c b/host/lib/flashrom_drv.c index 60cabc04..a9889cc9 100644 --- a/host/lib/flashrom_drv.c +++ b/host/lib/flashrom_drv.c @@ -77,6 +77,8 @@ static int flashrom_read_image_impl(struct firmware_image *image, len = flashrom_flash_getsize(flashctx); + flashrom_flag_set(flashctx, FLASHROM_FLAG_SKIP_UNREADABLE_REGIONS, true); + if (region) { r = flashrom_layout_read_fmap_from_buffer( &layout, flashctx, (const uint8_t *)image->data, |