summaryrefslogtreecommitdiff
path: root/mtectrl
AgeCommit message (Collapse)Author
2024-01-09Do not apply mtectrl state on shutdown if it hadn't been loadedFlorian Mayer
This would reset the MTE state for incomplete boots Test: MemtagBootctlTest Change-Id: I2b5f2afd55ea85fa59a11baa79e2c96b07897da6
2023-12-15Gate all bootloader override logic behind bootctl_supported=1.Evgenii Stepanov
Fixes potential deadlock during boot on fullmte devices. Bug: 311331983 Test: in a fullmte build setprop persist.device_config.runtime_native_boot.bootloader_override force_on reboot Change-Id: I5a4e13bb5d99373fc05a542b49557b0102b70df2
2023-09-28Merge "Run mtectrl later in boot sequence" into main am: fd6ea7e04e am: ↵Florian Mayer
c1049f19e1 am: fbacc17696 Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2765456 Change-Id: I402b4a713a3f7a0972c13f3cf34766ca260e49d5 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-09-27Run mtectrl later in boot sequenceFlorian Mayer
If we run it too early, we fail to run the first time after a factory reset, because /metadata isn't set up properly yet. Test: factory reset and dmesg Bug: 302188718 Change-Id: I35fc8e992d98bd1126bb6c7673d9561b6c9c32e8
2023-07-18Merge "Add more tests for mtectrl override" into main am: bd015a64bd am: ↵Treehugger Robot
624ed706f8 am: dc4fc54c71 Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2657931 Change-Id: I97369292b4a0bda965de93536a3baaee31c5e934 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-15Merge "Properly handle unsetting of override" into main am: 24698eaa79 am: ↵Florian Mayer
d649c3e6b5 am: cb11192484 Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2657256 Change-Id: Iff1a499175e6420ed25edc20974d32cf49afc2d0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-14Add more tests for mtectrl overrideFlorian Mayer
Bug: 291106070 Change-Id: I9a57fe9443e6b74160be294bd2421160819256a2
2023-07-14Properly handle unsetting of overrideFlorian Mayer
When the override went from force_on -> default, we would keep the memtag setting on, even if the user hadn't manually turned it on. Bug: 291106070 Test: atest mtectrl_test Change-Id: I67e357d20e1c8ce2608b92a55e7b3d295b9ea87d
2023-06-30Merge "async read of mtectrl state" am: 020047609e am: 091eaef52b am: ↵Florian Mayer
6efcfd16fa am: e15a85bdbd Original change: https://android-review.googlesource.com/c/platform/system/extras/+/2645427 Change-Id: I4aabfcbcb365fc44cd8aa3b222c3cf05be3b7fb2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-29async read of mtectrl stateFlorian Mayer
Bug: 283177478 Test: atest --no-bazel-mode mtectrl_test Change-Id: I38dd2a4b7650c880fc244b048d9430d05f371f42
2023-05-01[MTE] Bootloader override enables permissive mode.Evgenii Stepanov
Move droidfood/dogfood users on the mte bootloader override experiment to permissive MTE mode to reduce the reliability impact while still collecting crash reports and perf/power data. Bug: 280343521 Test: getprop persist.sys.mte.permissive returns 1 Change-Id: I6db6c3c79a9fa8b15c896a2b4c8ed8f42eab6f1a
2023-03-23Move bootloader_override propertyFlorian Mayer
Bug: 274953227 Change-Id: I5ad4496a5624014974b0d7b7228ab11f6f3c7a38
2023-01-31Use bootloader_override from boot namespaceFlorian Mayer
Bug: 267234468 Change-Id: I681a1f5f7749b0aa92b93ef118c0e4cbbaaeaf4a
2022-11-07Add end to end test for mtectrl.Florian Mayer
Bug: 255628885 Change-Id: Ie03b40b8702fa45ea9f8ba2d022975d5cc9024dd
2022-11-04Initialize arm64.memtag.bootctl in early-initFlorian Mayer
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
2022-11-01[mtectrl] Add more commentsFlorian Mayer
Change-Id: I2f775f7e784301678b22fb92a7c29156d4c9d65c
2022-10-31[mtectrl] properly handle FD for -tFlorian Mayer
Without this would not properly close the fd before the program terminates. Change-Id: I3cc811226af88d28ba2eee9e89fa09375724e14c
2022-10-29Merge "[MTE] check whether unexpected bits are set in memtag_mode"Florian Mayer
2022-10-29Merge "Run mtectrl_test in hwasan-presubmit"Treehugger Robot
2022-10-28Merge "[mtectrl] Move TEST_MAPPING to correct directory"Treehugger Robot
2022-10-28[MTE] check whether unexpected bits are set in memtag_modeFlorian Mayer
Change-Id: I410c547cd572a7c726229710702f599f4c6303e9
2022-10-28Run mtectrl_test in hwasan-presubmitFlorian Mayer
Change-Id: I9ba34af1110ca612943bf4fe15abb56b54542d59
2022-10-28Merge "[MTE] add another case to mtectrl_test"Florian Mayer
2022-10-28[mtectrl] resolve race with rebootFlorian Mayer
without this change, setprop "arm64.memtag.bootctl" [...] && reboot was racy, because it was not guaranteed that the change was applied before rebooting. we still immediately apply the changes as well, just in case there is a thermal shutdown, which does not run triggers. Bug: 256042002 Test: reboot and look at logcat Change-Id: I9a057d4dc2e18a10f026b641f693699ae617e8ec
2022-10-25[mtectrl] Move TEST_MAPPING to correct directoryFlorian Mayer
Change-Id: I43e89878e336a7f6f4c655b2cac1ede0cc885aa0
2022-10-25[MTE] add another case to mtectrl_testFlorian Mayer
make sure we don't try to read invalid messages into the property. Change-Id: I27a4b3ba4a948435866f80b303e36e8f44872a0c
2022-10-05[MTE] only read memtag state on devices that support itFlorian Mayer
Bug: 250762232 Change-Id: I06c80878fc34b8227b80641cad7d7951aa6a7de3
2022-10-03Merge changes from topic "mtectrlsync"Florian Mayer
* changes: [MTE] add test for mtectrl [MTE] Keep property and misc partition state synced
2022-09-28[MTE] add test for mtectrlFlorian Mayer
Bug: 245624194 Test: atest --no-bazel-mode mtectrl_test Change-Id: I9f6920a1154d33b58fa3f62f809f54dce1e4448d
2022-09-28[MTE] Keep property and misc partition state syncedFlorian Mayer
Bug: 245624194 Test: $ adb shell mtectrl memtag default $ adb shell mtectrl -s sys.testprop $ adb shell getprop sys.testprop memtag $ adb shell mtectrl memtag,memtag-kernel default $ adb shell mtectrl -s sys.testprop $ adb shell getprop sys.testprop memtag,memtag-kernel $ adb shell mtectrl -s sys.testprop memtag default $ adb shell getprop sys.testprop memtag Test: boot and check arm64.memtag.bootctl Test: flame:/ $ setprop arm64.memtag.bootctl memtag flame:/ $ getprop arm64.memtag.bootctl memtag flame:/ $ setprop persist.device_config.memory_safety_native.bootloader_override force_off flame:/ $ getprop arm64.memtag.bootctl memtag-off Change-Id: Iac5fb49a10631a7f3300bedc477a2cfc1f583639
2022-09-27Add symlink for clang-format for mtectrl.Florian Mayer
Change-Id: I2a6a76ebf0ab69501288211c0eb2a3451350b5dc
2022-08-01[MTE] Support device_config override in mtectrl.Florian Mayer
Bug: 235129567 Change-Id: I1afde08dfb6a9c8b8127bf84daebd8f88a865741
2022-06-15Allow to turn off MTE from userspace.Florian Mayer
Change-Id: Iee6ab74a7526b0a988ab7969fa3e83d5ea9474cf
2022-05-06Fix mtectrl usage message.Florian Mayer
Bug: 206895651 Change-Id: I45aa16434276ce95fb6b9a817d0dd9f81ceb9ff9
2022-01-27[LSC] Add LOCAL_LICENSE_KINDS to system/extrasBob Badour
Added SPDX-license-identifier-Apache-2.0 to: mtectrl/Android.bp Bug: 68860345 Bug: 151177513 Bug: 151953481 Test: m all Change-Id: Ie75712660ffee2331194f09dbd2832df143ea021
2022-01-19Add command line tool to control MTE boot state.Florian Mayer
Change-Id: I24271eb642a2a908fe6053a14b48d0780d5ad3a0