Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fe7b0ac authored by David Zeuthen's avatar David Zeuthen Committed by Alistair Strachan
Browse files

ANDROID: AVB error handler to invalidate vbmeta partition.



If androidboot.vbmeta.invalidate_on_error is 'yes' and
androidboot.vbmeta.device is set and points to a device with vbmeta
magic, this header will be overwritten upon an irrecoverable dm-verity
error. The side-effect of this is that the slot will fail to verify on
next reboot, effectively triggering the boot loader to fallback to
another slot. This work both if the vbmeta struct is at the start of a
partition or if there's an AVB footer at the end.

This code is based on drivers/md/dm-verity-chromeos.c from ChromiumOS.

Bug: 31622239
Bug: 120445368
Test: Manually tested (other arch).
Signed-off-by: default avatarDavid Zeuthen <zeuthen@google.com>
[astrachan: re-diffed against a kernel without dm-android-verity]
Change-Id: I571b5a75461da38ad832a9bea33c298bef859e26
Signed-off-by: default avatarAlistair Strachan <astrachan@google.com>
parent 3d90157d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment