diff mbox series

[SRU,Jammy:linux-intel-iotg,v2,1/1] UBUNTU: [Config] disable KFENCE

Message ID 20220511024935.187039-2-jianhui.lee@canonical.com
State New
Headers show
Series disable KFENCE due to kernel panic | expand

Commit Message

Jian Hui Lee May 11, 2022, 2:49 a.m. UTC
From: Wen-chien Jesse Sung <jesse.sung@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1946001

Disable KFENCE as a workaround to prevent potential kernel panics that
seem to happen in nested KVM environments (e.g., systemd autopackage
test).

Disabling this feature also allows to remove the overhead of the
periodic sampling performed by KFENCE. The regression potential is that
we may receive memory corruption bug reports (that were previously
detected explicitly by KFENCE), but in such case we have always the
option to provide a test kernel with KASAN enabled, that provides a
better coverage for this kind of bugs.

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
(cherry picked from commit 14c6596e47be5f17749172710ff6a850958e139d linux-intel-5.13)
Signed-off-by: Jian Hui Lee <jianhui.lee@canonical.com>
---
 debian.intel-iotg/config/annotations          | 8 ++++++++
 debian.intel-iotg/config/config.common.ubuntu | 6 +-----
 2 files changed, 9 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/debian.intel-iotg/config/annotations b/debian.intel-iotg/config/annotations
index a995a8abfd50..d5bf07ddd3e5 100644
--- a/debian.intel-iotg/config/annotations
+++ b/debian.intel-iotg/config/annotations
@@ -16,3 +16,11 @@  CONFIG_TEST_DIV64 policy<{'amd64': 'n'}>
 
 CONFIG_SYSFB_SIMPLEFB policy<{'amd64': 'n', 'arm64': 'y', 'armhf': 'y'}>
 
+# Menu: Kernel hacking >> Memory Debugging >> KFENCE: low-overhead sampling-based memory safety error detector
+CONFIG_KFENCE                                   policy<{'amd64': 'n', 'arm64': 'n'}>
+CONFIG_KFENCE_STATIC_KEYS                       policy<{'amd64': '-', 'arm64': '-'}>
+CONFIG_KFENCE_SAMPLE_INTERVAL                   policy<{'amd64': '-', 'arm64': '-'}>
+CONFIG_KFENCE_NUM_OBJECTS                       policy<{'amd64': '-', 'arm64': '-'}>
+CONFIG_KFENCE_STRESS_TEST_FAULTS                policy<{'amd64': '-', 'arm64': '-'}>
+#
+CONFIG_KFENCE                                   mark<ENFORCED> note<LP:1946001>
diff --git a/debian.intel-iotg/config/config.common.ubuntu b/debian.intel-iotg/config/config.common.ubuntu
index 7e289924beb1..02a3e58e793c 100644
--- a/debian.intel-iotg/config/config.common.ubuntu
+++ b/debian.intel-iotg/config/config.common.ubuntu
@@ -4004,11 +4004,7 @@  CONFIG_KEYS=y
 CONFIG_KEYS_REQUEST_CACHE=y
 CONFIG_KEY_DH_OPERATIONS=y
 CONFIG_KEY_NOTIFICATIONS=y
-CONFIG_KFENCE=y
-CONFIG_KFENCE_NUM_OBJECTS=255
-CONFIG_KFENCE_SAMPLE_INTERVAL=0
-# CONFIG_KFENCE_STATIC_KEYS is not set
-CONFIG_KFENCE_STRESS_TEST_FAULTS=0
+# CONFIG_KFENCE is not set
 CONFIG_KGDB=y
 CONFIG_KGDB_HONOUR_BLOCKLIST=y
 CONFIG_KGDB_KDB=y