summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2022-07-04 14:45:13 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-13 09:07:43 +0000
commit6d74ce8a95a3a0ed8adb41bde3172f5d7db96f64 (patch)
tree3fd6a8f2149b06f3512e31d75d34dbba3c5868fc /firmware
parent4756206b07f2250155c9c4c1d75577281ea111f5 (diff)
downloadvboot-6d74ce8a95a3a0ed8adb41bde3172f5d7db96f64.tar.gz
2lib/2auxfw_sync: Request recovery for missing auxfw
When the hash file of auxfw is not found in the CBFS, VB2_ERROR_UNKNOWN will be returned from vb2ex_auxfw_check(), causing the device to enter reboot loop. Similar to how we handle missing ecrw.hash, vb2api_fail() should be called, so that the device will try to boot from the other slot, and if the hash is still missing, recovery will be triggered. Call vb2api_fail() from vb2api_auxfw_sync() using the 3-argument form of VB2_TRY(). Add a unit test to prevent regression. BUG=b:237745301 TEST=make run2tests TEST=emerge-corsola libpayload BRANCH=none Change-Id: I789c63b10201bd1852bc087199ec7b226ec85ba8 Signed-off-by: Yu-Ping Wu <yupingso@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3742863 Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/2lib/2auxfw_sync.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/2lib/2auxfw_sync.c b/firmware/2lib/2auxfw_sync.c
index a60165c1..76ad7226 100644
--- a/firmware/2lib/2auxfw_sync.c
+++ b/firmware/2lib/2auxfw_sync.c
@@ -54,7 +54,8 @@ vb2_error_t vb2api_auxfw_sync(struct vb2_context *ctx)
enum vb2_auxfw_update_severity fw_update = VB2_AUXFW_NO_UPDATE;
/* Check for update severity */
- VB2_TRY(auxfw_sync_check_update(ctx, &fw_update));
+ VB2_TRY(auxfw_sync_check_update(ctx, &fw_update), ctx,
+ VB2_RECOVERY_AUXFW_UPDATE);
if (fw_update > VB2_AUXFW_NO_UPDATE) {
VB2_DEBUG("Updating auxfw\n");