Enable MTE in -eng builds on zuma 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 on zuma
builds.

Co-authored-by: Evgenii Stepanov <eugenis@google.com>
Test: Device boots and no MTE crashes
Test: sanitizer-status mte
Bug: 316398899
Change-Id: Iff5ab9d7031d8b97bf762d85f6760a092631e121
This commit is contained in:
Nick Kralevich 2024-10-10 16:14:20 -07:00
parent bb0ccb1c08
commit 2676f4bf00
3 changed files with 35 additions and 2 deletions

View file

@ -38,9 +38,17 @@ BOARD_KERNEL_CMDLINE += rcupdate.rcu_expedited=1 rcu_nocbs=all rcutree.enable_rc
BOARD_KERNEL_CMDLINE += swiotlb=1024
BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem
BOARD_KERNEL_CMDLINE += sysctl.kernel.sched_pelt_multiplier=4
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
BOARD_KERNEL_CMDLINE += kasan=off
BOARD_KERNEL_CMDLINE += bootloader.pixel.MTE_FORCE_ON
ifeq ($(filter memtag_heap,$(SANITIZE_TARGET)),)
SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) memtag_heap)
endif
endif
endif
BOARD_BOOTCONFIG += androidboot.boot_devices=13200000.ufs
TARGET_NO_BOOTLOADER := true