Furquan Shaikh has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33358 )
Change subject: vboot: recovery path should finalize work context ......................................................................
vboot: recovery path should finalize work context
Recovery path should finalize work context, and trim vboot_working_data buffer_size. Otherwise, depthcharge ingests the full 12 KB workbuf in recovery path.
BUG=chromium:972528, b:134893812 TEST=Build with vboot_reference CL:1584488. Check that USB disks are properly verified in recovery path. BRANCH=none
Change-Id: Icf2600d2eb5d846a26aec35a153946dd2f7f128c Signed-off-by: Joel Kitching kitching@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/33358 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Hung-Te Lin hungte@chromium.org Reviewed-by: Julius Werner jwerner@chromium.org --- M src/security/vboot/vboot_logic.c 1 file changed, 3 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved Hung-Te Lin: Looks good to me, approved
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c index 6263100..7b98be2 100644 --- a/src/security/vboot/vboot_logic.c +++ b/src/security/vboot/vboot_logic.c @@ -364,8 +364,7 @@ printk(BIOS_INFO, "Recovery requested (%x)\n", rv); save_if_needed(&ctx); extend_pcrs(&ctx); /* ignore failures */ - timestamp_add_now(TS_END_VBOOT); - return; + goto verstage_main_exit; }
printk(BIOS_INFO, "Reboot requested (%x)\n", rv); @@ -447,6 +446,8 @@
printk(BIOS_INFO, "Slot %c is selected\n", is_slot_a(&ctx) ? 'A' : 'B'); vboot_set_selected_region(region_device_region(&fw_main)); + + verstage_main_exit: vboot_finalize_work_context(&ctx); timestamp_add_now(TS_END_VBOOT); }