From de6fd435752d88999bde37e64695143d2d71658d Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 18 Mar 2021 13:41:32 +0100 Subject: [PATCH] ANDROID: GKI: enable KFENCE by setting the sample interval to 500ms This change effectively enables KFENCE in GKI kernels with a sample interval of 500ms. It is still possible to disable KFENCE at boot time using kfence.sample_interval=0. Bug: 176228452 Test: kernel builds, device boots normally Test: TreeHugger Signed-off-by: Alexander Potapenko Change-Id: I69cb0fc8fdebba36c9166b275ad245240314d811 --- arch/arm64/configs/gki_defconfig | 2 +- arch/x86/configs/gki_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/configs/gki_defconfig b/arch/arm64/configs/gki_defconfig index 924d82de663c..b5997fd29c6b 100644 --- a/arch/arm64/configs/gki_defconfig +++ b/arch/arm64/configs/gki_defconfig @@ -603,7 +603,7 @@ CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_KFENCE=y -CONFIG_KFENCE_SAMPLE_INTERVAL=0 +CONFIG_KFENCE_SAMPLE_INTERVAL=500 CONFIG_SOFTLOCKUP_DETECTOR=y # CONFIG_DETECT_HUNG_TASK is not set CONFIG_PANIC_ON_OOPS=y diff --git a/arch/x86/configs/gki_defconfig b/arch/x86/configs/gki_defconfig index 6bbe5d007b5b..654a83148e27 100644 --- a/arch/x86/configs/gki_defconfig +++ b/arch/x86/configs/gki_defconfig @@ -534,7 +534,7 @@ CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_STACK_USAGE=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_KFENCE=y -CONFIG_KFENCE_SAMPLE_INTERVAL=0 +CONFIG_KFENCE_SAMPLE_INTERVAL=500 CONFIG_SOFTLOCKUP_DETECTOR=y # CONFIG_DETECT_HUNG_TASK is not set CONFIG_PANIC_ON_OOPS=y