Merge branch 'akpm' (patches from Andrew)
[sfrench/cifs-2.6.git] / lib / Kconfig.debug
index b84c2462fe8d9ec90d93622587e09d89462a0ed6..cfe3b092c31da3a77def3ae78e2cfa6020e3ac48 100644 (file)
@@ -339,14 +339,22 @@ config DEBUG_INFO_BTF
        depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
        depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
        depends on BPF_SYSCALL
-       depends on !DEBUG_INFO_DWARF5
+       depends on !DEBUG_INFO_DWARF5 || PAHOLE_VERSION >= 121
        help
          Generate deduplicated BTF type information from DWARF debug info.
          Turning this on expects presence of pahole tool, which will convert
          DWARF type info into equivalent deduplicated BTF type info.
 
 config PAHOLE_HAS_SPLIT_BTF
-       def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119")
+       def_bool PAHOLE_VERSION >= 119
+
+config PAHOLE_HAS_BTF_TAG
+       def_bool PAHOLE_VERSION >= 123
+       depends on CC_IS_CLANG
+       help
+         Decide whether pahole emits btf_tag attributes (btf_type_tag and
+         btf_decl_tag) or not. Currently only clang compiler implements
+         these attributes, so make the config depend on CC_IS_CLANG.
 
 config DEBUG_INFO_BTF_MODULES
        def_bool y
@@ -354,6 +362,16 @@ config DEBUG_INFO_BTF_MODULES
        help
          Generate compact split BTF type information for kernel modules.
 
+config MODULE_ALLOW_BTF_MISMATCH
+       bool "Allow loading modules with non-matching BTF type info"
+       depends on DEBUG_INFO_BTF_MODULES
+       help
+         For modules whose split BTF does not match vmlinux, load without
+         BTF rather than refusing to load. The default behavior with
+         module BTF enabled is to reject modules with such mismatches;
+         this option will still load module BTF where possible but ignore
+         it when a mismatch is found.
+
 config GDB_SCRIPTS
        bool "Provide GDB scripts for kernel debugging"
        help
@@ -2110,6 +2128,18 @@ config KPROBES_SANITY_TEST
 
          Say N if you are unsure.
 
+config FPROBE_SANITY_TEST
+       bool "Self test for fprobe"
+       depends on DEBUG_KERNEL
+       depends on FPROBE
+       depends on KUNIT=y
+       help
+         This option will enable testing the fprobe when the system boot.
+         A series of tests are made to verify that the fprobe is functioning
+         properly.
+
+         Say N if you are unsure.
+
 config BACKTRACE_SELF_TEST
        tristate "Self test for the backtrace code"
        depends on DEBUG_KERNEL
@@ -2224,9 +2254,6 @@ config TEST_UUID
 config TEST_XARRAY
        tristate "Test the XArray code at runtime"
 
-config TEST_OVERFLOW
-       tristate "Test check_*_overflow() functions at runtime"
-
 config TEST_RHASHTABLE
        tristate "Perform selftest on resizable hash table"
        help
@@ -2511,6 +2538,30 @@ config MEMCPY_KUNIT_TEST
 
          If unsure, say N.
 
+config OVERFLOW_KUNIT_TEST
+       tristate "Test check_*_overflow() functions at runtime" if !KUNIT_ALL_TESTS
+       depends on KUNIT
+       default KUNIT_ALL_TESTS
+       help
+         Builds unit tests for the check_*_overflow(), size_*(), allocation, and
+         related functions.
+
+         For more information on KUnit and unit tests in general please refer
+         to the KUnit documentation in Documentation/dev-tools/kunit/.
+
+         If unsure, say N.
+
+config STACKINIT_KUNIT_TEST
+       tristate "Test level of stack variable initialization" if !KUNIT_ALL_TESTS
+       depends on KUNIT
+       default KUNIT_ALL_TESTS
+       help
+         Test if the kernel is zero-initializing stack variables and
+         padding. Coverage is controlled by compiler flags,
+         CONFIG_INIT_STACK_ALL_PATTERN, CONFIG_INIT_STACK_ALL_ZERO,
+         CONFIG_GCC_PLUGIN_STRUCTLEAK, CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF,
+         or CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL.
+
 config TEST_UDELAY
        tristate "udelay test driver"
        help
@@ -2602,17 +2653,6 @@ config TEST_OBJAGG
          Enable this option to test object aggregation manager on boot
          (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.
-
 config TEST_MEMINIT
        tristate "Test heap/page initialization"
        help