From 705c2f2a6e4e36c42aa639436678f674b7e6b7f5 Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Mon, 29 Aug 2022 16:26:57 -0700 Subject: [PATCH] Set arm64.memtag.bootctl_supported on non-fullmte products. This will enable the "Reboot with MTE" developer options button as described in https://source.android.com/docs/security/memory-safety/bootloader-support Bug: 242244112 Test: * all _fullmte products define arm64.memtag.bootctl_supported. * other products do not define arm64.memtag.bootctl_supported. * non-fullmte products support "Reboot with MTE" flow as per the link above. Change-Id: Ic0e301755fb6745be55b2fb502b530495bef4ca0 --- device-common.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/device-common.mk b/device-common.mk index 925d30d2..54b538c4 100644 --- a/device-common.mk +++ b/device-common.mk @@ -42,3 +42,10 @@ PRODUCT_PRODUCT_PROPERTIES += \ # ZramWriteback -include hardware/google/pixel/mm/device_gki.mk + +# Indicate that the bootloader supports the MTE developer option switch +# (MISC_MEMTAG_MODE_MEMTAG_ONCE), with the exception of _fullmte products that +# force enable MTE. +ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT))) +PRODUCT_PRODUCT_PROPERTIES += ro.arm64.memtag.bootctl_supported=1 +endif