Merge tag 'kvm-s390-master-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-starfive.git] / lib / Kconfig.debug
index d679851..fa307f9 100644 (file)
@@ -355,6 +355,11 @@ endchoice # "Compressed Debug information"
 config DEBUG_INFO_SPLIT
        bool "Produce split debuginfo in .dwo files"
        depends on $(cc-option,-gsplit-dwarf)
+       # RISC-V linker relaxation + -gsplit-dwarf has issues with LLVM and GCC
+       # prior to 12.x:
+       # https://github.com/llvm/llvm-project/issues/56642
+       # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99090
+       depends on !RISCV || GCC_VERSION >= 120000
        help
          Generate debug info into separate .dwo files. This significantly
          reduces the build directory size for builds with DEBUG_INFO,
@@ -502,7 +507,7 @@ config SECTION_MISMATCH_WARN_ONLY
 
 config DEBUG_FORCE_FUNCTION_ALIGN_64B
        bool "Force all function address 64B aligned"
-       depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || S390)
+       depends on EXPERT && (X86_64 || ARM64 || PPC32 || PPC64 || ARC || RISCV || S390)
        select FUNCTION_ALIGNMENT_64B
        help
          There are cases that a commit from one domain changes the function
@@ -1673,10 +1678,15 @@ menu "Debug kernel data structures"
 
 config DEBUG_LIST
        bool "Debug linked list manipulation"
-       depends on DEBUG_KERNEL || BUG_ON_DATA_CORRUPTION
+       depends on DEBUG_KERNEL
+       select LIST_HARDENED
        help
-         Enable this to turn on extended checks in the linked-list
-         walking routines.
+         Enable this to turn on extended checks in the linked-list walking
+         routines.
+
+         This option trades better quality error reports for performance, and
+         is more suitable for kernel debugging. If you care about performance,
+         you should only enable CONFIG_LIST_HARDENED instead.
 
          If unsure, say N.
 
@@ -1710,16 +1720,6 @@ config DEBUG_NOTIFIERS
          This is a relatively cheap check but if you care about maximum
          performance, say N.
 
-config BUG_ON_DATA_CORRUPTION
-       bool "Trigger a BUG when data corruption is detected"
-       select DEBUG_LIST
-       help
-         Select this option if the kernel should BUG when it encounters
-         data corruption in kernel memory structures when they get checked
-         for validity.
-
-         If unsure, say N.
-
 config DEBUG_MAPLE_TREE
        bool "Debug maple trees"
        depends on DEBUG_KERNEL
@@ -2237,6 +2237,17 @@ config TEST_DIV64
 
          If unsure, say N.
 
+config TEST_IOV_ITER
+       tristate "Test iov_iter operation" if !KUNIT_ALL_TESTS
+       depends on KUNIT
+       default KUNIT_ALL_TESTS
+       help
+         Enable this to turn on testing of the operation of the I/O iterator
+         (iov_iter). This test is executed only once during system boot (so
+         affects only boot time), or at module load time.
+
+         If unsure, say N.
+
 config KPROBES_SANITY_TEST
        tristate "Kprobes sanity tests" if !KUNIT_ALL_TESTS
        depends on DEBUG_KERNEL
@@ -2701,6 +2712,9 @@ config MEMCPY_SLOW_KUNIT_TEST
          and bit ranges. These can be very slow, so they are split out
          as a separate config, in case they need to be disabled.
 
+         Note this config option will be replaced by the use of KUnit test
+         attributes.
+
 config IS_SIGNED_TYPE_KUNIT_TEST
        tristate "Test is_signed_type() macro" if !KUNIT_ALL_TESTS
        depends on KUNIT
@@ -3010,6 +3024,19 @@ config RUST_BUILD_ASSERT_ALLOW
 
          If unsure, say N.
 
+config RUST_KERNEL_DOCTESTS
+       bool "Doctests for the `kernel` crate" if !KUNIT_ALL_TESTS
+       depends on RUST && KUNIT=y
+       default KUNIT_ALL_TESTS
+       help
+         This builds the documentation tests of the `kernel` crate
+         as KUnit tests.
+
+         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.
+
 endmenu # "Rust"
 
 endmenu # Kernel hacking