Enable MTE in -eng builds on zumapro devices.

MTE is a low overhead tool which enables detection of memory
safety bugs in interactive workloads. See
https://source.android.com/docs/security/test/memory-safety/arm-mte
for background and information.

This change enables MTE by default on -eng builds. See
go/mte-eng for more information.

Co-authored-by: Evgenii Stepanov <eugenis@google.com>
Test: Device boots and no MTE crashes
Bug: 316398899
Flag: EXEMPT only affects eng builds, not shipping code
Change-Id: I8be52af4f0349907651ae661972c85ea46e2aa72
This commit is contained in:
Nick Kralevich 2024-10-25 16:10:03 -07:00
parent 26f64c74a7
commit 2bf5d31904
3 changed files with 33 additions and 2 deletions

14
conf/init.eng.memtag.rc Normal file
View file

@ -0,0 +1,14 @@
# MTE in -eng build: all cores in Sync mode
on init
# Per-core mode overrides.
# Little Cores: sync
write /sys/devices/system/cpu/cpu0/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu1/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu2/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu3/mte_tcf_preferred sync
# Mid Cores: sync
write /sys/devices/system/cpu/cpu4/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu5/mte_tcf_preferred sync
write /sys/devices/system/cpu/cpu6/mte_tcf_preferred sync
# Big Core: sync
write /sys/devices/system/cpu/cpu7/mte_tcf_preferred sync