Merge tag 'mm-nonmm-stable-2023-02-20-15-29' of git://git.kernel.org/pub/scm/linux...
[linux-block.git] / lib / Kconfig.debug
index a97aca81db2485dce154e295c13e0b62ad1a8011..c8b379e2e9adc14f0a79dbb2b97497a356a2c6e5 100644 (file)
@@ -389,6 +389,15 @@ config PAHOLE_HAS_BTF_TAG
          btf_decl_tag) or not. Currently only clang compiler implements
          these attributes, so make the config depend on CC_IS_CLANG.
 
+config PAHOLE_HAS_LANG_EXCLUDE
+       def_bool PAHOLE_VERSION >= 124
+       help
+         Support for the --lang_exclude flag which makes pahole exclude
+         compilation units from the supplied language. Used in Kbuild to
+         omit Rust CUs which are not supported in version 1.24 of pahole,
+         otherwise it would emit malformed kernel and module binaries when
+         using DEBUG_INFO_BTF_MODULES.
+
 config DEBUG_INFO_BTF_MODULES
        def_bool y
        depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
@@ -743,76 +752,6 @@ config SHRINKER_DEBUG
          visibility into the kernel memory shrinkers subsystem.
          Disable it to avoid an extra memory footprint.
 
-config HAVE_DEBUG_KMEMLEAK
-       bool
-
-config DEBUG_KMEMLEAK
-       bool "Kernel memory leak detector"
-       depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
-       select DEBUG_FS
-       select STACKTRACE if STACKTRACE_SUPPORT
-       select KALLSYMS
-       select CRC32
-       select STACKDEPOT
-       help
-         Say Y here if you want to enable the memory leak
-         detector. The memory allocation/freeing is traced in a way
-         similar to the Boehm's conservative garbage collector, the
-         difference being that the orphan objects are not freed but
-         only shown in /sys/kernel/debug/kmemleak. Enabling this
-         feature will introduce an overhead to memory
-         allocations. See Documentation/dev-tools/kmemleak.rst for more
-         details.
-
-         Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
-         of finding leaks due to the slab objects poisoning.
-
-         In order to access the kmemleak file, debugfs needs to be
-         mounted (usually at /sys/kernel/debug).
-
-config DEBUG_KMEMLEAK_MEM_POOL_SIZE
-       int "Kmemleak memory pool size"
-       depends on DEBUG_KMEMLEAK
-       range 200 1000000
-       default 16000
-       help
-         Kmemleak must track all the memory allocations to avoid
-         reporting false positives. Since memory may be allocated or
-         freed before kmemleak is fully initialised, use a static pool
-         of metadata objects to track such callbacks. After kmemleak is
-         fully initialised, this memory pool acts as an emergency one
-         if slab allocations fail.
-
-config DEBUG_KMEMLEAK_TEST
-       tristate "Simple test for the kernel memory leak detector"
-       depends on DEBUG_KMEMLEAK && m
-       help
-         This option enables a module that explicitly leaks memory.
-
-         If unsure, say N.
-
-config DEBUG_KMEMLEAK_DEFAULT_OFF
-       bool "Default kmemleak to off"
-       depends on DEBUG_KMEMLEAK
-       help
-         Say Y here to disable kmemleak by default. It can then be enabled
-         on the command line via kmemleak=on.
-
-config DEBUG_KMEMLEAK_AUTO_SCAN
-       bool "Enable kmemleak auto scan thread on boot up"
-       default y
-       depends on DEBUG_KMEMLEAK
-       help
-         Depending on the cpu, kmemleak scan may be cpu intensive and can
-         stall user tasks at times. This option enables/disables automatic
-         kmemleak scan at boot up.
-
-         Say N here to disable kmemleak auto scan thread to stop automatic
-         scanning. Disabling this option disables automatic reporting of
-         memory leaks.
-
-         If unsure, say Y.
-
 config DEBUG_STACK_USAGE
        bool "Stack utilization instrumentation"
        depends on DEBUG_KERNEL && !IA64
@@ -1207,7 +1146,7 @@ config SCHED_DEBUG
        depends on DEBUG_KERNEL && PROC_FS
        default y
        help
-         If you say Y here, the /proc/sched_debug file will be provided
+         If you say Y here, the /sys/kernel/debug/sched file will be provided
          that can help debug the scheduler. The runtime overhead of this
          option is minimal.
 
@@ -1555,6 +1494,17 @@ config TRACE_IRQFLAGS_NMI
        depends on TRACE_IRQFLAGS
        depends on TRACE_IRQFLAGS_NMI_SUPPORT
 
+config NMI_CHECK_CPU
+       bool "Debugging for CPUs failing to respond to backtrace requests"
+       depends on DEBUG_KERNEL
+       depends on X86
+       default n
+       help
+         Enables debug prints when a CPU fails to respond to a given
+         backtrace NMI.  These prints provide some reasons why a CPU
+         might legitimately be failing to respond, for example, if it
+         is offline of if ignore_nmis is set.
+
 config DEBUG_IRQFLAGS
        bool "Debug IRQ flag manipulation"
        help
@@ -1920,7 +1870,7 @@ config FUNCTION_ERROR_INJECTION
        help
          Add fault injections into various functions that are annotated with
          ALLOW_ERROR_INJECTION() in the kernel. BPF may also modify the return
-         value of theses functions. This is useful to test error paths of code.
+         value of these functions. This is useful to test error paths of code.
 
          If unsure, say N
 
@@ -2534,6 +2484,19 @@ config LIST_KUNIT_TEST
 
          If unsure, say N.
 
+config HASHTABLE_KUNIT_TEST
+       tristate "KUnit Test for Kernel Hashtable structures" if !KUNIT_ALL_TESTS
+       depends on KUNIT
+       default KUNIT_ALL_TESTS
+       help
+         This builds the hashtable KUnit test suite.
+         It tests the basic functionality of the API defined in
+         include/linux/hashtable.h. 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 LINEAR_RANGES_TEST
        tristate "KUnit test for linear_ranges"
        depends on KUNIT
@@ -2604,6 +2567,15 @@ config MEMCPY_KUNIT_TEST
 
          If unsure, say N.
 
+config MEMCPY_SLOW_KUNIT_TEST
+       bool "Include exhaustive memcpy tests"
+       depends on MEMCPY_KUNIT_TEST
+       default y
+       help
+         Some memcpy tests are quite exhaustive in checking for overlaps
+         and bit ranges. These can be very slow, so they are split out
+         as a separate config, in case they need to be disabled.
+
 config IS_SIGNED_TYPE_KUNIT_TEST
        tristate "Test is_signed_type() macro" if !KUNIT_ALL_TESTS
        depends on KUNIT
@@ -2910,6 +2882,4 @@ config RUST_BUILD_ASSERT_ALLOW
 
 endmenu # "Rust"
 
-source "Documentation/Kconfig"
-
 endmenu # Kernel hacking