diff options
author | Florian Mayer <fmayer@google.com> | 2022-11-04 15:48:33 -0700 |
---|---|---|
committer | Florian Mayer <fmayer@google.com> | 2022-11-04 17:35:11 -0700 |
commit | 54835d3b88c0df86044b569876d45cc476b0d9d8 (patch) | |
tree | 8c73a8d9cc3d08ded85fc4863e9a036b38397f80 /mtectrl | |
parent | 6ef0007f507bd48c19c0446fbe22db077965bdb5 (diff) | |
download | extras-54835d3b88c0df86044b569876d45cc476b0d9d8.tar.gz |
Initialize arm64.memtag.bootctl in early-init
Now it actually runs before adbd starts.
Also no longer sync back the force override into the property. That
ended up causing more trouble than it's worth, it's okay to wait for
next reboot for that to happen. Any UI needs to check the override
separately anyway to properly display to the user.
Test: multiple runs of `atest mtectrl_end_to_end_test` from
https://r.android.com/2272571
Change-Id: I179ac0ef5540e183aa1ddd59d2d6b2fe84b5c591
Diffstat (limited to 'mtectrl')
-rw-r--r-- | mtectrl/mtectrl.rc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mtectrl/mtectrl.rc b/mtectrl/mtectrl.rc index 06413766..a92d72ae 100644 --- a/mtectrl/mtectrl.rc +++ b/mtectrl/mtectrl.rc @@ -13,12 +13,14 @@ # limitations under the License. on property:arm64.memtag.bootctl=* - exec -- /system/bin/mtectrl -s arm64.memtag.bootctl ${arm64.memtag.bootctl:-none} ${persist.device_config.memory_safety_native.bootloader_override:-default} + exec -- /system/bin/mtectrl ${arm64.memtag.bootctl:-none} ${persist.device_config.memory_safety_native.bootloader_override:-default} on property:persist.device_config.memory_safety_native.bootloader_override=* - exec -- /system/bin/mtectrl -s arm64.memtag.bootctl ${arm64.memtag.bootctl:-none} ${persist.device_config.memory_safety_native.bootloader_override:-default} + exec -- /system/bin/mtectrl ${arm64.memtag.bootctl:-none} ${persist.device_config.memory_safety_native.bootloader_override:-default} -on init && property:ro.arm64.memtag.bootctl_supported=1 +# adbd gets initialized in init, so run before that. this makes sure that the +# user does not change the value before we initialize it +on early-init && property:ro.arm64.memtag.bootctl_supported=1 exec -- /system/bin/mtectrl -s arm64.memtag.bootctl on shutdown && property:ro.arm64.memtag.bootctl_supported=1 |