summaryrefslogtreecommitdiff
path: root/mtectrl
diff options
context:
space:
mode:
authorFlorian Mayer <fmayer@google.com>2024-01-09 02:27:42 +0000
committerFlorian Mayer <fmayer@google.com>2024-01-09 20:48:57 +0000
commit2052b3df05f9dc2533485c2446a6fe8f1f98d5ea (patch)
tree73c852bdc378f1ead212e3d76f5182ac87d6905b /mtectrl
parentc88f7159b5c5af8765256767d00389216856a52f (diff)
downloadextras-2052b3df05f9dc2533485c2446a6fe8f1f98d5ea.tar.gz
Do not apply mtectrl state on shutdown if it hadn't been loaded
This would reset the MTE state for incomplete boots Test: MemtagBootctlTest Change-Id: I2b5f2afd55ea85fa59a11baa79e2c96b07897da6
Diffstat (limited to 'mtectrl')
-rw-r--r--mtectrl/mtectrl.rc2
1 files changed, 1 insertions, 1 deletions
diff --git a/mtectrl/mtectrl.rc b/mtectrl/mtectrl.rc
index 9f5a31c9..3d03d0b8 100644
--- a/mtectrl/mtectrl.rc
+++ b/mtectrl/mtectrl.rc
@@ -25,7 +25,7 @@ on property:persist.device_config.runtime_native_boot.bootloader_override=* && p
on early-boot && property:ro.arm64.memtag.bootctl_supported=1
exec_background -- /system/bin/mtectrl -s arm64.memtag.bootctl -f arm64.memtag.bootctl_loaded
-on shutdown && property:ro.arm64.memtag.bootctl_supported=1
+on shutdown && property:ro.arm64.memtag.bootctl_supported=1 && property:arm64.memtag.bootctl_loaded=*
# This doesn't use wait_for_prop to not stall the shutdown.
exec -- /system/bin/mtectrl ${arm64.memtag.bootctl:-none} ${persist.device_config.runtime_native_boot.bootloader_override:-default}