Kconfig.debug (818b26588994d9d95743fca0a427f08ec6c1c41d) | Kconfig.debug (9dbbc3b9d09d6deba9f3b9e1d5b355032ed46a75) |
---|---|
1# SPDX-License-Identifier: GPL-2.0-only 2menu "Kernel hacking" 3 4menu "printk and dmesg options" 5 6config PRINTK_TIME 7 bool "Show timing information on printks" 8 depends on PRINTK --- 270 unchanged lines hidden (view full) --- 279 Generate DWARF v4 debug info. This requires gcc 4.5+ and gdb 7.0+. 280 281 If you have consumers of DWARF debug info that are not ready for 282 newer revisions of DWARF, you may wish to choose this or have your 283 config select this. 284 285config DEBUG_INFO_DWARF5 286 bool "Generate DWARF Version 5 debuginfo" | 1# SPDX-License-Identifier: GPL-2.0-only 2menu "Kernel hacking" 3 4menu "printk and dmesg options" 5 6config PRINTK_TIME 7 bool "Show timing information on printks" 8 depends on PRINTK --- 270 unchanged lines hidden (view full) --- 279 Generate DWARF v4 debug info. This requires gcc 4.5+ and gdb 7.0+. 280 281 If you have consumers of DWARF debug info that are not ready for 282 newer revisions of DWARF, you may wish to choose this or have your 283 config select this. 284 285config DEBUG_INFO_DWARF5 286 bool "Generate DWARF Version 5 debuginfo" |
287 depends on GCC_VERSION >= 50000 || CC_IS_CLANG 288 depends on CC_IS_GCC || $(success,$(srctree)/scripts/test_dwarf5_support.sh $(CC) $(CLANG_FLAGS)) | 287 depends on GCC_VERSION >= 50000 || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502))) |
289 depends on !DEBUG_INFO_BTF 290 help 291 Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc 292 5.0+ accepts the -gdwarf-5 flag but only had partial support for some 293 draft features until 7.0), and gdb 8.0+. 294 295 Changes to the structure of debug info in Version 5 allow for around 296 15-18% savings in resulting image and debug info section sizes as --- 12 unchanged lines hidden (view full) --- 309 help 310 Generate deduplicated BTF type information from DWARF debug info. 311 Turning this on expects presence of pahole tool, which will convert 312 DWARF type info into equivalent deduplicated BTF type info. 313 314config PAHOLE_HAS_SPLIT_BTF 315 def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119") 316 | 288 depends on !DEBUG_INFO_BTF 289 help 290 Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc 291 5.0+ accepts the -gdwarf-5 flag but only had partial support for some 292 draft features until 7.0), and gdb 8.0+. 293 294 Changes to the structure of debug info in Version 5 allow for around 295 15-18% savings in resulting image and debug info section sizes as --- 12 unchanged lines hidden (view full) --- 308 help 309 Generate deduplicated BTF type information from DWARF debug info. 310 Turning this on expects presence of pahole tool, which will convert 311 DWARF type info into equivalent deduplicated BTF type info. 312 313config PAHOLE_HAS_SPLIT_BTF 314 def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119") 315 |
316config PAHOLE_HAS_ZEROSIZE_PERCPU_SUPPORT 317 def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "122") 318 |
|
317config DEBUG_INFO_BTF_MODULES 318 def_bool y 319 depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF 320 help 321 Generate compact split BTF type information for kernel modules. 322 323config GDB_SCRIPTS 324 bool "Provide GDB scripts for kernel debugging" --- 119 unchanged lines hidden (view full) --- 444 For more information, see 445 tools/objtool/Documentation/stack-validation.txt. 446 447config VMLINUX_VALIDATION 448 bool 449 depends on STACK_VALIDATION && DEBUG_ENTRY && !PARAVIRT 450 default y 451 | 319config DEBUG_INFO_BTF_MODULES 320 def_bool y 321 depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF 322 help 323 Generate compact split BTF type information for kernel modules. 324 325config GDB_SCRIPTS 326 bool "Provide GDB scripts for kernel debugging" --- 119 unchanged lines hidden (view full) --- 446 For more information, see 447 tools/objtool/Documentation/stack-validation.txt. 448 449config VMLINUX_VALIDATION 450 bool 451 depends on STACK_VALIDATION && DEBUG_ENTRY && !PARAVIRT 452 default y 453 |
454config VMLINUX_MAP 455 bool "Generate vmlinux.map file when linking" 456 depends on EXPERT 457 help 458 Selecting this option will pass "-Map=vmlinux.map" to ld 459 when linking vmlinux. That file can be useful for verifying 460 and debugging magic section games, and for seeing which 461 pieces of code get eliminated with 462 CONFIG_LD_DEAD_CODE_DATA_ELIMINATION. 463 |
|
452config DEBUG_FORCE_WEAK_PER_CPU 453 bool "Force weak per-cpu definitions" 454 depends on DEBUG_KERNEL 455 help 456 s390 and alpha require percpu variables in modules to be 457 defined weak to work around addressing range issue which 458 puts the following two restrictions on percpu variable 459 definitions. --- 805 unchanged lines hidden (view full) --- 1265 Enable the raw_spinlock vs. spinlock nesting checks which ensure 1266 that the lock nesting rules for PREEMPT_RT enabled kernels are 1267 not violated. 1268 1269 NOTE: There are known nesting problems. So if you enable this 1270 option expect lockdep splats until these problems have been fully 1271 addressed which is work in progress. This config switch allows to 1272 identify and analyze these problems. It will be removed and the | 464config DEBUG_FORCE_WEAK_PER_CPU 465 bool "Force weak per-cpu definitions" 466 depends on DEBUG_KERNEL 467 help 468 s390 and alpha require percpu variables in modules to be 469 defined weak to work around addressing range issue which 470 puts the following two restrictions on percpu variable 471 definitions. --- 805 unchanged lines hidden (view full) --- 1277 Enable the raw_spinlock vs. spinlock nesting checks which ensure 1278 that the lock nesting rules for PREEMPT_RT enabled kernels are 1279 not violated. 1280 1281 NOTE: There are known nesting problems. So if you enable this 1282 option expect lockdep splats until these problems have been fully 1283 addressed which is work in progress. This config switch allows to 1284 identify and analyze these problems. It will be removed and the |
1273 check permanentely enabled once the main issues have been fixed. | 1285 check permanently enabled once the main issues have been fixed. |
1274 1275 If unsure, select N. 1276 1277config LOCK_STAT 1278 bool "Lock usage statistics" 1279 depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT 1280 select LOCKDEP 1281 select DEBUG_SPINLOCK --- 76 unchanged lines hidden (view full) --- 1358 vfree(), etc.), whether a live lock is incorrectly reinitialized via 1359 spin_lock_init()/mutex_init()/etc., or whether there is any lock 1360 held during task exit. 1361 1362config LOCKDEP 1363 bool 1364 depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT 1365 select STACKTRACE | 1286 1287 If unsure, select N. 1288 1289config LOCK_STAT 1290 bool "Lock usage statistics" 1291 depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT 1292 select LOCKDEP 1293 select DEBUG_SPINLOCK --- 76 unchanged lines hidden (view full) --- 1370 vfree(), etc.), whether a live lock is incorrectly reinitialized via 1371 spin_lock_init()/mutex_init()/etc., or whether there is any lock 1372 held during task exit. 1373 1374config LOCKDEP 1375 bool 1376 depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT 1377 select STACKTRACE |
1366 depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86 | |
1367 select KALLSYMS 1368 select KALLSYMS_ALL 1369 1370config LOCKDEP_SMALL 1371 bool 1372 | 1378 select KALLSYMS 1379 select KALLSYMS_ALL 1380 1381config LOCKDEP_SMALL 1382 bool 1383 |
1384config LOCKDEP_BITS 1385 int "Bitsize for MAX_LOCKDEP_ENTRIES" 1386 depends on LOCKDEP && !LOCKDEP_SMALL 1387 range 10 30 1388 default 15 1389 help 1390 Try increasing this value if you hit "BUG: MAX_LOCKDEP_ENTRIES too low!" message. 1391 1392config LOCKDEP_CHAINS_BITS 1393 int "Bitsize for MAX_LOCKDEP_CHAINS" 1394 depends on LOCKDEP && !LOCKDEP_SMALL 1395 range 10 30 1396 default 16 1397 help 1398 Try increasing this value if you hit "BUG: MAX_LOCKDEP_CHAINS too low!" message. 1399 1400config LOCKDEP_STACK_TRACE_BITS 1401 int "Bitsize for MAX_STACK_TRACE_ENTRIES" 1402 depends on LOCKDEP && !LOCKDEP_SMALL 1403 range 10 30 1404 default 19 1405 help 1406 Try increasing this value if you hit "BUG: MAX_STACK_TRACE_ENTRIES too low!" message. 1407 1408config LOCKDEP_STACK_TRACE_HASH_BITS 1409 int "Bitsize for STACK_TRACE_HASH_SIZE" 1410 depends on LOCKDEP && !LOCKDEP_SMALL 1411 range 10 30 1412 default 14 1413 help 1414 Try increasing this value if you need large MAX_STACK_TRACE_ENTRIES. 1415 1416config LOCKDEP_CIRCULAR_QUEUE_BITS 1417 int "Bitsize for elements in circular_queue struct" 1418 depends on LOCKDEP 1419 range 10 30 1420 default 12 1421 help 1422 Try increasing this value if you hit "lockdep bfs error:-1" warning due to __cq_enqueue() failure. 1423 |
|
1373config DEBUG_LOCKDEP 1374 bool "Lock dependency engine debugging" 1375 depends on DEBUG_KERNEL && LOCKDEP 1376 select DEBUG_IRQFLAGS 1377 help 1378 If you say Y here, the lock dependency engine will do 1379 additional runtime checks to debug itself, at the price 1380 of more runtime overhead. --- 11 unchanged lines hidden (view full) --- 1392 1393config DEBUG_LOCKING_API_SELFTESTS 1394 bool "Locking API boot-time self-tests" 1395 depends on DEBUG_KERNEL 1396 help 1397 Say Y here if you want the kernel to run a short self-test during 1398 bootup. The self-test checks whether common types of locking bugs 1399 are detected by debugging mechanisms or not. (if you disable | 1424config DEBUG_LOCKDEP 1425 bool "Lock dependency engine debugging" 1426 depends on DEBUG_KERNEL && LOCKDEP 1427 select DEBUG_IRQFLAGS 1428 help 1429 If you say Y here, the lock dependency engine will do 1430 additional runtime checks to debug itself, at the price 1431 of more runtime overhead. --- 11 unchanged lines hidden (view full) --- 1443 1444config DEBUG_LOCKING_API_SELFTESTS 1445 bool "Locking API boot-time self-tests" 1446 depends on DEBUG_KERNEL 1447 help 1448 Say Y here if you want the kernel to run a short self-test during 1449 bootup. The self-test checks whether common types of locking bugs 1450 are detected by debugging mechanisms or not. (if you disable |
1400 lock debugging then those bugs wont be detected of course.) | 1451 lock debugging then those bugs won't be detected of course.) |
1401 The following locking APIs are covered: spinlocks, rwlocks, 1402 mutexes and rwsems. 1403 1404config LOCK_TORTURE_TEST 1405 tristate "torture tests for locking" 1406 depends on DEBUG_KERNEL 1407 select TORTURE_TEST 1408 help --- 256 unchanged lines hidden (view full) --- 1665 depends on DEBUG_KERNEL 1666 depends on STACKTRACE_SUPPORT 1667 depends on PROC_FS 1668 depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86 1669 select KALLSYMS 1670 select KALLSYMS_ALL 1671 select STACKTRACE 1672 select SCHEDSTATS | 1452 The following locking APIs are covered: spinlocks, rwlocks, 1453 mutexes and rwsems. 1454 1455config LOCK_TORTURE_TEST 1456 tristate "torture tests for locking" 1457 depends on DEBUG_KERNEL 1458 select TORTURE_TEST 1459 help --- 256 unchanged lines hidden (view full) --- 1716 depends on DEBUG_KERNEL 1717 depends on STACKTRACE_SUPPORT 1718 depends on PROC_FS 1719 depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86 1720 select KALLSYMS 1721 select KALLSYMS_ALL 1722 select STACKTRACE 1723 select SCHEDSTATS |
1673 select SCHED_DEBUG | |
1674 help 1675 Enable this option if you want to use the LatencyTOP tool 1676 to find out which userspace is blocking on what kernel operations. 1677 1678source "kernel/trace/Kconfig" 1679 1680config PROVIDE_OHCI1394_DMA_INIT 1681 bool "Remote debugging over FireWire early on boot" --- 191 unchanged lines hidden (view full) --- 1873 bool "Fault-injection capability for faking disk interrupts" 1874 depends on FAULT_INJECTION && BLOCK 1875 help 1876 Provide fault-injection capability on end IO handling. This 1877 will make the block layer "forget" an interrupt as configured, 1878 thus exercising the error handling. 1879 1880 Only works with drivers that use the generic timeout handling, | 1724 help 1725 Enable this option if you want to use the LatencyTOP tool 1726 to find out which userspace is blocking on what kernel operations. 1727 1728source "kernel/trace/Kconfig" 1729 1730config PROVIDE_OHCI1394_DMA_INIT 1731 bool "Remote debugging over FireWire early on boot" --- 191 unchanged lines hidden (view full) --- 1923 bool "Fault-injection capability for faking disk interrupts" 1924 depends on FAULT_INJECTION && BLOCK 1925 help 1926 Provide fault-injection capability on end IO handling. This 1927 will make the block layer "forget" an interrupt as configured, 1928 thus exercising the error handling. 1929 1930 Only works with drivers that use the generic timeout handling, |
1881 for others it wont do anything. | 1931 for others it won't do anything. |
1882 1883config FAIL_FUTEX 1884 bool "Fault-injection capability for futexes" 1885 select DEBUG_FS 1886 depends on FAULT_INJECTION && FUTEX 1887 help 1888 Provide fault-injection capability for futexes. 1889 --- 104 unchanged lines hidden (view full) --- 1994 If you don't need it: say N 1995 Choose M here to compile this code as a module. The module will be 1996 called lkdtm. 1997 1998 Documentation on how to use the module can be found in 1999 Documentation/fault-injection/provoke-crashes.rst 2000 2001config TEST_LIST_SORT | 1932 1933config FAIL_FUTEX 1934 bool "Fault-injection capability for futexes" 1935 select DEBUG_FS 1936 depends on FAULT_INJECTION && FUTEX 1937 help 1938 Provide fault-injection capability for futexes. 1939 --- 104 unchanged lines hidden (view full) --- 2044 If you don't need it: say N 2045 Choose M here to compile this code as a module. The module will be 2046 called lkdtm. 2047 2048 Documentation on how to use the module can be found in 2049 Documentation/fault-injection/provoke-crashes.rst 2050 2051config TEST_LIST_SORT |
2002 tristate "Linked list sorting test" 2003 depends on DEBUG_KERNEL || m | 2052 tristate "Linked list sorting test" if !KUNIT_ALL_TESTS 2053 depends on KUNIT 2054 default KUNIT_ALL_TESTS |
2004 help 2005 Enable this to turn on 'list_sort()' function test. This test is 2006 executed only once during system boot (so affects only boot time), 2007 or at module load time. 2008 2009 If unsure, say N. 2010 2011config TEST_MIN_HEAP --- 10 unchanged lines hidden (view full) --- 2022 tristate "Array-based sort test" 2023 depends on DEBUG_KERNEL || m 2024 help 2025 This option enables the self-test function of 'sort()' at boot, 2026 or at module load time. 2027 2028 If unsure, say N. 2029 | 2055 help 2056 Enable this to turn on 'list_sort()' function test. This test is 2057 executed only once during system boot (so affects only boot time), 2058 or at module load time. 2059 2060 If unsure, say N. 2061 2062config TEST_MIN_HEAP --- 10 unchanged lines hidden (view full) --- 2073 tristate "Array-based sort test" 2074 depends on DEBUG_KERNEL || m 2075 help 2076 This option enables the self-test function of 'sort()' at boot, 2077 or at module load time. 2078 2079 If unsure, say N. 2080 |
2081config TEST_DIV64 2082 tristate "64bit/32bit division and modulo test" 2083 depends on DEBUG_KERNEL || m 2084 help 2085 Enable this to turn on 'do_div()' function test. This test is 2086 executed only once during system boot (so affects only boot time), 2087 or at module load time. 2088 2089 If unsure, say N. 2090 |
|
2030config KPROBES_SANITY_TEST 2031 bool "Kprobes sanity tests" 2032 depends on DEBUG_KERNEL 2033 depends on KPROBES 2034 help 2035 This option provides for testing basic kprobes functionality on 2036 boot. Samples of kprobe and kretprobe are inserted and 2037 verified for functionality. --- 80 unchanged lines hidden (view full) --- 2118 tristate "Test strscpy*() family of functions at runtime" 2119 2120config TEST_KSTRTOX 2121 tristate "Test kstrto*() family of functions at runtime" 2122 2123config TEST_PRINTF 2124 tristate "Test printf() family of functions at runtime" 2125 | 2091config KPROBES_SANITY_TEST 2092 bool "Kprobes sanity tests" 2093 depends on DEBUG_KERNEL 2094 depends on KPROBES 2095 help 2096 This option provides for testing basic kprobes functionality on 2097 boot. Samples of kprobe and kretprobe are inserted and 2098 verified for functionality. --- 80 unchanged lines hidden (view full) --- 2179 tristate "Test strscpy*() family of functions at runtime" 2180 2181config TEST_KSTRTOX 2182 tristate "Test kstrto*() family of functions at runtime" 2183 2184config TEST_PRINTF 2185 tristate "Test printf() family of functions at runtime" 2186 |
2187config TEST_SCANF 2188 tristate "Test scanf() family of functions at runtime" 2189 |
|
2126config TEST_BITMAP 2127 tristate "Test bitmap_*() family of functions at runtime" 2128 help 2129 Enable this option to test the bitmap functions at boot. 2130 2131 If unsure, say N. 2132 2133config TEST_UUID --- 232 unchanged lines hidden (view full) --- 2366 help 2367 This builds the bits unit test. 2368 Tests the logic of macros defined in bits.h. 2369 For more information on KUnit and unit tests in general please refer 2370 to the KUnit documentation in Documentation/dev-tools/kunit/. 2371 2372 If unsure, say N. 2373 | 2190config TEST_BITMAP 2191 tristate "Test bitmap_*() family of functions at runtime" 2192 help 2193 Enable this option to test the bitmap functions at boot. 2194 2195 If unsure, say N. 2196 2197config TEST_UUID --- 232 unchanged lines hidden (view full) --- 2430 help 2431 This builds the bits unit test. 2432 Tests the logic of macros defined in bits.h. 2433 For more information on KUnit and unit tests in general please refer 2434 to the KUnit documentation in Documentation/dev-tools/kunit/. 2435 2436 If unsure, say N. 2437 |
2438config SLUB_KUNIT_TEST 2439 tristate "KUnit test for SLUB cache error detection" if !KUNIT_ALL_TESTS 2440 depends on SLUB_DEBUG && KUNIT 2441 default KUNIT_ALL_TESTS 2442 help 2443 This builds SLUB allocator unit test. 2444 Tests SLUB cache debugging functionality. 2445 For more information on KUnit and unit tests in general please refer 2446 to the KUnit documentation in Documentation/dev-tools/kunit/. 2447 2448 If unsure, say N. 2449 2450config RATIONAL_KUNIT_TEST 2451 tristate "KUnit test for rational.c" if !KUNIT_ALL_TESTS 2452 depends on KUNIT 2453 select RATIONAL 2454 default KUNIT_ALL_TESTS 2455 help 2456 This builds the rational math unit test. 2457 For more information on KUnit and unit tests in general please refer 2458 to the KUnit documentation in Documentation/dev-tools/kunit/. 2459 2460 If unsure, say N. 2461 |
|
2374config TEST_UDELAY 2375 tristate "udelay test driver" 2376 help 2377 This builds the "udelay_test" module that helps to make sure 2378 that udelay() is working properly. 2379 2380 If unsure, say N. 2381 --- 126 unchanged lines hidden (view full) --- 2508 help 2509 Enable this option to add /sys/kernel/debug/selftest_helpers/test_fpu 2510 which will trigger a sequence of floating point operations. This is used 2511 for self-testing floating point control register setting in 2512 kernel_fpu_begin(). 2513 2514 If unsure, say N. 2515 | 2462config TEST_UDELAY 2463 tristate "udelay test driver" 2464 help 2465 This builds the "udelay_test" module that helps to make sure 2466 that udelay() is working properly. 2467 2468 If unsure, say N. 2469 --- 126 unchanged lines hidden (view full) --- 2596 help 2597 Enable this option to add /sys/kernel/debug/selftest_helpers/test_fpu 2598 which will trigger a sequence of floating point operations. This is used 2599 for self-testing floating point control register setting in 2600 kernel_fpu_begin(). 2601 2602 If unsure, say N. 2603 |
2604config TEST_CLOCKSOURCE_WATCHDOG 2605 tristate "Test clocksource watchdog in kernel space" 2606 depends on CLOCKSOURCE_WATCHDOG 2607 help 2608 Enable this option to create a kernel module that will trigger 2609 a test of the clocksource watchdog. This module may be loaded 2610 via modprobe or insmod in which case it will run upon being 2611 loaded, or it may be built in, in which case it will run 2612 shortly after boot. 2613 2614 If unsure, say N. 2615 |
|
2516endif # RUNTIME_TESTING_MENU 2517 | 2616endif # RUNTIME_TESTING_MENU 2617 |
2618config ARCH_USE_MEMTEST 2619 bool 2620 help 2621 An architecture should select this when it uses early_memtest() 2622 during boot process. 2623 |
|
2518config MEMTEST 2519 bool "Memtest" | 2624config MEMTEST 2625 bool "Memtest" |
2626 depends on ARCH_USE_MEMTEST |
|
2520 help 2521 This option adds a kernel parameter 'memtest', which allows memtest | 2627 help 2628 This option adds a kernel parameter 'memtest', which allows memtest |
2522 to be set. | 2629 to be set and executed. |
2523 memtest=0, mean disabled; -- default 2524 memtest=1, mean do 1 test pattern; 2525 ... 2526 memtest=17, mean do 17 test patterns. 2527 If you are unsure how to answer this question, answer N. 2528 2529 2530 --- 12 unchanged lines hidden --- | 2630 memtest=0, mean disabled; -- default 2631 memtest=1, mean do 1 test pattern; 2632 ... 2633 memtest=17, mean do 17 test patterns. 2634 If you are unsure how to answer this question, answer N. 2635 2636 2637 --- 12 unchanged lines hidden --- |