Fix kasan logic
The command line "kasan=off" should be unconditionally set when we're compiling for a normal (non-_fullmte) build. The current logic sets "kasan=off" for a normal ENG build only, which is insufficent. Test: _fullmte userdebug/eng: "sanitizer-status mte" shows MTE enabled. Test: _fullmte userdebug/eng: "kasan=off" IS NOT present in /proc/cmdline Test: !_fullmte userdebug: "sanitizer-status mte" shows MTE disabled. Test: !_fullmte eng: "sanitizer-status mte" shows MTE enabled Test: !_fullmte userdebug/eng: "kasan=off" IS present in /proc/cmdline Change-Id: Idd61747156daa135e919ce71fd63bfab1f4d9239 Bug: 381940217 Flag: EXEMPT bugfix
This commit is contained in:
parent
636fa6327c
commit
bc9e47d93b
1 changed files with 7 additions and 1 deletions
|
@ -41,9 +41,15 @@ BOARD_KERNEL_CMDLINE += swiotlb=noforce
|
|||
BOARD_KERNEL_CMDLINE += disable_dma32=on
|
||||
BOARD_KERNEL_CMDLINE += sysctl.kernel.sched_pelt_multiplier=4
|
||||
|
||||
# Normal (non-_fullmte) builds should disable kasan
|
||||
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
|
||||
ifneq (,$(filter eng,$(TARGET_BUILD_VARIANT)))
|
||||
BOARD_KERNEL_CMDLINE += kasan=off
|
||||
endif
|
||||
|
||||
# Enable a limited subset of MTE for "normal" (non-_fullmte) eng builds.
|
||||
# Don't touch any settings for _fullmte builds. They are set somewhere else.
|
||||
ifeq (,$(filter %_fullmte,$(TARGET_PRODUCT)))
|
||||
ifeq ($(TARGET_BUILD_VARIANT),eng)
|
||||
BOARD_KERNEL_CMDLINE += bootloader.pixel.MTE_FORCE_ON
|
||||
ifeq ($(filter memtag_heap,$(SANITIZE_TARGET)),)
|
||||
SANITIZE_TARGET := $(strip $(SANITIZE_TARGET) memtag_heap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue