From e77a68f67fe22c13e8cb982c4e8b399974632dff Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Mon, 23 May 2016 13:10:23 +0200 Subject: slot_metadata: add verity_corrupted field In rootfs context, the verity mode must be supplied by the bootloader to the kernel. This patch creates a new verity_corrupted field in the slot metadata structure to remind that this slot is corrupted from a dm-verity point of view. If the bootloader receives the "dm-verity device corrupted" reboot target, it should set this bit to 1. If this bit value is 1, the bootloader should set the veritymode to "eio". Change-Id: I9335a39d7d009200318c58c53a3139d542788a9b Signed-off-by: Jeremy Compostella --- bootloader.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootloader.h b/bootloader.h index 92c74f078..de5351851 100644 --- a/bootloader.h +++ b/bootloader.h @@ -74,8 +74,11 @@ struct slot_metadata { uint8_t tries_remaining : 3; // 1 if this slot has booted successfully, 0 otherwise. uint8_t successful_boot : 1; + // 1 if this slot is corrupted from a dm-verity corruption, 0 + // otherwise. + uint8_t verity_corrupted : 1; // Reserved for further use. - uint8_t reserved; + uint8_t reserved : 7; } __attribute__((packed)); /* Bootloader Control AB -- cgit v1.2.3