From: Josh Poimboeuf <jpoimboe(a)redhat.com>
redhat/configs: Enable CONFIG_GCC_PLUGIN_STACKLEAK for Fedora and ARK
CONFIG_GCC_PLUGIN_STACKLEAK poisons the kernel stack before returning
from syscalls. In our internal testing, it had no measurable
performance impact.
Enable it for Fedora and ARK.
Bugzilla: f06c5863a913cdc4aaa09cad23f9ba551b6dcf8c
Signed-off-by: Josh Poimboeuf <jpoimboe(a)redhat.com>
diff a/redhat/configs/common/generic/CONFIG_GCC_PLUGIN_STACKLEAK
b/redhat/configs/common/generic/CONFIG_GCC_PLUGIN_STACKLEAK
--- a/redhat/configs/common/generic/CONFIG_GCC_PLUGIN_STACKLEAK
+++ b/redhat/configs/common/generic/CONFIG_GCC_PLUGIN_STACKLEAK
@@ -1 +1 @@
-# CONFIG_GCC_PLUGIN_STACKLEAK is not set
+CONFIG_GCC_PLUGIN_STACKLEAK=y
diff a/redhat/configs/common/generic/CONFIG_STACKLEAK_METRICS
b/redhat/configs/common/generic/CONFIG_STACKLEAK_METRICS
--- /dev/null
+++ b/redhat/configs/common/generic/CONFIG_STACKLEAK_METRICS
@@ -0,0 +1 @@
+# CONFIG_STACKLEAK_METRICS is not set
diff a/redhat/configs/fedora/generic/CONFIG_STACKLEAK_RUNTIME_DISABLE
b/redhat/configs/common/generic/CONFIG_STACKLEAK_RUNTIME_DISABLE
--- a/redhat/configs/fedora/generic/CONFIG_STACKLEAK_RUNTIME_DISABLE
+++ b/redhat/configs/common/generic/CONFIG_STACKLEAK_RUNTIME_DISABLE
diff a/redhat/configs/fedora/generic/CONFIG_STACKLEAK_TRACK_MIN_SIZE
b/redhat/configs/common/generic/CONFIG_STACKLEAK_TRACK_MIN_SIZE
--- a/redhat/configs/fedora/generic/CONFIG_STACKLEAK_TRACK_MIN_SIZE
+++ b/redhat/configs/common/generic/CONFIG_STACKLEAK_TRACK_MIN_SIZE
diff a/redhat/configs/fedora/generic/CONFIG_STACKLEAK_METRICS
b/redhat/configs/fedora/generic/CONFIG_STACKLEAK_METRICS
--- a/redhat/configs/fedora/generic/CONFIG_STACKLEAK_METRICS
+++ /dev/null
@@ -1 +0,0 @@
-CONFIG_STACKLEAK_METRICS=y
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/961