summaryrefslogtreecommitdiffstats
path: root/lib/Kconfig.debug
diff options
context:
space:
mode:
authorLinus Torvalds2019-03-09 18:06:15 +0100
committerLinus Torvalds2019-03-09 18:06:15 +0100
commit2bb995405fe52dd893db57456556e8dc4fce35a7 (patch)
tree205f798be891b8ede69ea83deb1156ad5d4f2cf5 /lib/Kconfig.debug
parentMerge tag 'pstore-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff)
parentlib: Introduce test_stackinit module (diff)
downloadkernel-qcow2-linux-2bb995405fe52dd893db57456556e8dc4fce35a7.tar.gz
kernel-qcow2-linux-2bb995405fe52dd893db57456556e8dc4fce35a7.tar.xz
kernel-qcow2-linux-2bb995405fe52dd893db57456556e8dc4fce35a7.zip
Merge tag 'gcc-plugins-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull gcc-plugins updates from Kees Cook: "This adds additional type coverage to the existing structleak plugin and adds a large set of selftests to help evaluate stack variable zero-initialization coverage. That can be used to test whatever instrumentation might be performing zero-initialization: either with the structleak plugin or with Clang's coming "-ftrivial-auto-var-init=zero" option. Summary: - Add scalar and array initialization coverage - Refactor Kconfig to make options more clear - Add self-test module for testing automatic initialization" * tag 'gcc-plugins-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: lib: Introduce test_stackinit module gcc-plugins: structleak: Generalize to all variable types
Diffstat (limited to 'lib/Kconfig.debug')
-rw-r--r--lib/Kconfig.debug10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index d765d36f8737..e718487c97c3 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2016,6 +2016,16 @@ config TEST_OBJAGG
(or module load).
+config TEST_STACKINIT
+ tristate "Test level of stack variable initialization"
+ help
+ Test if the kernel is zero-initializing stack variables and
+ padding. Coverage is controlled by compiler flags,
+ CONFIG_GCC_PLUGIN_STRUCTLEAK, CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF,
+ or CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL.
+
+ If unsure, say N.
+
endif # RUNTIME_TESTING_MENU
config MEMTEST