From 9ff55496708619fd94043507b0204c4789c000c7 Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Thu, 13 Jul 2023 11:01:16 -0700 Subject: [PATCH] Add flag whether MTE state was forced This will be used by mtectrl to remember whether the MTE state was overriden using the force_on / force_off flags or set by the user. We need that information when the force_on / force_off flag is reset. Bug: 291106070 Change-Id: I6178f0b88b718e96e5c8ee39113848f422e5fb6d --- .../include/bootloader_message/bootloader_message.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bootloader_message/include/bootloader_message/bootloader_message.h b/bootloader_message/include/bootloader_message/bootloader_message.h index 8fba101a..8d0c1325 100644 --- a/bootloader_message/include/bootloader_message/bootloader_message.h +++ b/bootloader_message/include/bootloader_message/bootloader_message.h @@ -110,6 +110,11 @@ struct misc_memtag_message { #define MISC_MEMTAG_MODE_MEMTAG_KERNEL 0x4 #define MISC_MEMTAG_MODE_MEMTAG_KERNEL_ONCE 0x8 #define MISC_MEMTAG_MODE_MEMTAG_OFF 0x10 +// This is set when the state was overridden forcibly. This does not need to be +// interpreted by the bootloader but is only for bookkeeping purposes so +// userspace knows what to do when the override is undone. +// See system/extras/mtectrl in AOSP for more information. +#define MISC_MEMTAG_MODE_FORCED 0x20 #if (__STDC_VERSION__ >= 201112L) || defined(__cplusplus) static_assert(sizeof(struct misc_virtual_ab_message) == 64,