summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-06-10 17:37:37 +0800
committerFurquan Shaikh <furquan@google.com>2019-06-12 05:45:10 +0000
commitba50e4885fd68579ec76a149d28b0b9605381d7e (patch)
treec12344b646d49e1f098eda76c3c2e6841ee65a90
parentb5bea526ec80c0aeccd78a0ece6ac091aa512b54 (diff)
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>
-rw-r--r--src/security/vboot/vboot_logic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/security/vboot/vboot_logic.c b/src/security/vboot/vboot_logic.c
index 626310010c..7b98be28e4 100644
--- a/src/security/vboot/vboot_logic.c
+++ b/src/security/vboot/vboot_logic.c
@@ -364,8 +364,7 @@ void verstage_main(void)
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 @@ void verstage_main(void)
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);
}