Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'akpm' (patches from Andrew)

Merge misc Kconfig updates from Andrew Morton:
"A number of changes to Kconfig files under lib/ from Changbin Du and
Krzysztof Kozlowski"

* emailed patches from Andrew Morton <akpm@linux-foundation.org>:
lib/: fix Kconfig indentation
kernel-hacking: move DEBUG_FS to 'Generic Kernel Debugging Instruments'
kernel-hacking: move DEBUG_BUGVERBOSE to 'printk and dmesg options'
kernel-hacking: create a submenu for scheduler debugging options
kernel-hacking: move SCHED_STACK_END_CHECK after DEBUG_STACK_USAGE
kernel-hacking: move Oops into 'Lockups and Hangs'
kernel-hacking: move kernel testing and coverage options to same submenu
kernel-hacking: group kernel data structures debugging together
kernel-hacking: create submenu for arch special debugging options
kernel-hacking: group sysrq/kgdb/ubsan into 'Generic Kernel Debugging Instruments'

+201 -180
+1 -1
lib/Kconfig
··· 572 572 Enable fast lookup object identifier registry. 573 573 574 574 config UCS2_STRING 575 - tristate 575 + tristate 576 576 577 577 # 578 578 # generic vdso
+196 -175
lib/Kconfig.debug
··· 128 128 lineno : line number of the debug statement 129 129 module : module that contains the debug statement 130 130 function : function that contains the debug statement 131 - flags : '=p' means the line is turned 'on' for printing 132 - format : the format used for the debug statement 131 + flags : '=p' means the line is turned 'on' for printing 132 + format : the format used for the debug statement 133 133 134 134 From a live system: 135 135 ··· 173 173 of the number 28. It makes the kernel image slightly larger 174 174 (about 3KB), but can make the kernel logs easier to read. 175 175 176 + config DEBUG_BUGVERBOSE 177 + bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT 178 + depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE) 179 + default y 180 + help 181 + Say Y here to make BUG() panics output the file name and line number 182 + of the BUG call as well as the EIP and oops trace. This aids 183 + debugging but costs about 70-100K of memory. 184 + 176 185 endmenu # "printk and dmesg options" 177 186 178 187 menu "Compile-time checks and compiler options" ··· 190 181 bool "Compile the kernel with debug info" 191 182 depends on DEBUG_KERNEL && !COMPILE_TEST 192 183 help 193 - If you say Y here the resulting kernel image will include 184 + If you say Y here the resulting kernel image will include 194 185 debugging info resulting in a larger kernel image. 195 186 This adds debug symbols to the kernel and modules (gcc -g), and 196 187 is needed if you intend to use kernel crashdump or binary object ··· 287 278 get_wchan() and suchlike. 288 279 289 280 config READABLE_ASM 290 - bool "Generate readable assembler code" 291 - depends on DEBUG_KERNEL 292 - help 293 - Disable some compiler optimizations that tend to generate human unreadable 294 - assembler output. This may make the kernel slightly slower, but it helps 295 - to keep kernel developers who have to stare a lot at assembler listings 296 - sane. 297 - 298 - config DEBUG_FS 299 - bool "Debug Filesystem" 281 + bool "Generate readable assembler code" 282 + depends on DEBUG_KERNEL 300 283 help 301 - debugfs is a virtual file system that kernel developers use to put 302 - debugging files into. Enable this option to be able to read and 303 - write to these files. 304 - 305 - For detailed documentation on the debugfs API, see 306 - Documentation/filesystems/. 307 - 308 - If unsure, say N. 284 + Disable some compiler optimizations that tend to generate human unreadable 285 + assembler output. This may make the kernel slightly slower, but it helps 286 + to keep kernel developers who have to stare a lot at assembler listings 287 + sane. 309 288 310 289 config HEADERS_INSTALL 311 290 bool "Install uapi headers to usr/include" ··· 396 399 397 400 endmenu # "Compiler options" 398 401 402 + menu "Generic Kernel Debugging Instruments" 403 + 399 404 config MAGIC_SYSRQ 400 405 bool "Magic SysRq key" 401 406 depends on !UML ··· 430 431 generate some garbage that can lead to spurious false sysrq detects. 431 432 This option allows you to decide whether you want to enable the 432 433 magic SysRq key. 434 + 435 + config DEBUG_FS 436 + bool "Debug Filesystem" 437 + help 438 + debugfs is a virtual file system that kernel developers use to put 439 + debugging files into. Enable this option to be able to read and 440 + write to these files. 441 + 442 + For detailed documentation on the debugfs API, see 443 + Documentation/filesystems/. 444 + 445 + If unsure, say N. 446 + 447 + source "lib/Kconfig.kgdb" 448 + 449 + source "lib/Kconfig.ubsan" 450 + 451 + endmenu 433 452 434 453 config DEBUG_KERNEL 435 454 bool "Kernel debugging" ··· 523 506 524 507 config DEBUG_OBJECTS_ENABLE_DEFAULT 525 508 int "debug_objects bootup default value (0-1)" 526 - range 0 1 527 - default "1" 528 - depends on DEBUG_OBJECTS 529 - help 530 - Debug objects boot parameter default value 509 + range 0 1 510 + default "1" 511 + depends on DEBUG_OBJECTS 512 + help 513 + Debug objects boot parameter default value 531 514 532 515 config DEBUG_SLAB 533 516 bool "Debug slab memory allocations" ··· 641 624 642 625 This option will slow down process creation somewhat. 643 626 627 + config SCHED_STACK_END_CHECK 628 + bool "Detect stack corruption on calls to schedule()" 629 + depends on DEBUG_KERNEL 630 + default n 631 + help 632 + This option checks for a stack overrun on calls to schedule(). 633 + If the stack end location is found to be over written always panic as 634 + the content of the corrupted region can no longer be trusted. 635 + This is to ensure no erroneous behaviour occurs which could result in 636 + data corruption or a sporadic crash at a later stage once the region 637 + is examined. The runtime overhead introduced is minimal. 638 + 644 639 config DEBUG_VM 645 640 bool "Debug VM" 646 641 depends on DEBUG_KERNEL 647 642 help 648 643 Enable this to turn on extended checks in the virtual-memory system 649 - that may impact performance. 644 + that may impact performance. 650 645 651 646 If unsure, say N. 652 647 ··· 785 756 786 757 endmenu # "Memory Debugging" 787 758 788 - config ARCH_HAS_KCOV 789 - bool 790 - help 791 - An architecture should select this when it can successfully 792 - build and run with CONFIG_KCOV. This typically requires 793 - disabling instrumentation for some early boot code. 794 - 795 - config CC_HAS_SANCOV_TRACE_PC 796 - def_bool $(cc-option,-fsanitize-coverage=trace-pc) 797 - 798 - config KCOV 799 - bool "Code coverage for fuzzing" 800 - depends on ARCH_HAS_KCOV 801 - depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS 802 - select DEBUG_FS 803 - select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC 804 - help 805 - KCOV exposes kernel code coverage information in a form suitable 806 - for coverage-guided fuzzing (randomized testing). 807 - 808 - If RANDOMIZE_BASE is enabled, PC values will not be stable across 809 - different machines and across reboots. If you need stable PC values, 810 - disable RANDOMIZE_BASE. 811 - 812 - For more details, see Documentation/dev-tools/kcov.rst. 813 - 814 - config KCOV_ENABLE_COMPARISONS 815 - bool "Enable comparison operands collection by KCOV" 816 - depends on KCOV 817 - depends on $(cc-option,-fsanitize-coverage=trace-cmp) 818 - help 819 - KCOV also exposes operands of every comparison in the instrumented 820 - code along with operand sizes and PCs of the comparison instructions. 821 - These operands can be used by fuzzing engines to improve the quality 822 - of fuzzing coverage. 823 - 824 - config KCOV_INSTRUMENT_ALL 825 - bool "Instrument all code by default" 826 - depends on KCOV 827 - default y 828 - help 829 - If you are doing generic system call fuzzing (like e.g. syzkaller), 830 - then you will want to instrument the whole kernel and you should 831 - say y here. If you are doing more targeted fuzzing (like e.g. 832 - filesystem fuzzing with AFL) then you will want to enable coverage 833 - for more specific subsets of files, and should say n here. 834 - 835 759 config DEBUG_SHIRQ 836 760 bool "Debug shared IRQ handlers" 837 761 depends on DEBUG_KERNEL ··· 794 812 Drivers ought to be able to handle interrupts coming in at those 795 813 points; some don't and need to be caught. 796 814 797 - menu "Debug Lockups and Hangs" 815 + menu "Debug Oops, Lockups and Hangs" 816 + 817 + config PANIC_ON_OOPS 818 + bool "Panic on Oops" 819 + help 820 + Say Y here to enable the kernel to panic when it oopses. This 821 + has the same effect as setting oops=panic on the kernel command 822 + line. 823 + 824 + This feature is useful to ensure that the kernel does not do 825 + anything erroneous after an oops which could result in data 826 + corruption or other issues. 827 + 828 + Say N if unsure. 829 + 830 + config PANIC_ON_OOPS_VALUE 831 + int 832 + range 0 1 833 + default 0 if !PANIC_ON_OOPS 834 + default 1 if PANIC_ON_OOPS 835 + 836 + config PANIC_TIMEOUT 837 + int "panic timeout" 838 + default 0 839 + help 840 + Set the timeout value (in seconds) until a reboot occurs when the 841 + the kernel panics. If n = 0, then we wait forever. A timeout 842 + value n > 0 will wait n seconds before rebooting, while a timeout 843 + value n < 0 will reboot immediately. 798 844 799 845 config LOCKUP_DETECTOR 800 846 bool ··· 980 970 981 971 endmenu # "Debug lockups and hangs" 982 972 983 - config PANIC_ON_OOPS 984 - bool "Panic on Oops" 985 - help 986 - Say Y here to enable the kernel to panic when it oopses. This 987 - has the same effect as setting oops=panic on the kernel command 988 - line. 989 - 990 - This feature is useful to ensure that the kernel does not do 991 - anything erroneous after an oops which could result in data 992 - corruption or other issues. 993 - 994 - Say N if unsure. 995 - 996 - config PANIC_ON_OOPS_VALUE 997 - int 998 - range 0 1 999 - default 0 if !PANIC_ON_OOPS 1000 - default 1 if PANIC_ON_OOPS 1001 - 1002 - config PANIC_TIMEOUT 1003 - int "panic timeout" 1004 - default 0 1005 - help 1006 - Set the timeout value (in seconds) until a reboot occurs when the 1007 - the kernel panics. If n = 0, then we wait forever. A timeout 1008 - value n > 0 will wait n seconds before rebooting, while a timeout 1009 - value n < 0 will reboot immediately. 973 + menu "Scheduler Debugging" 1010 974 1011 975 config SCHED_DEBUG 1012 976 bool "Collect scheduler debugging info" ··· 1008 1024 application, you can say N to avoid the very slight overhead 1009 1025 this adds. 1010 1026 1011 - config SCHED_STACK_END_CHECK 1012 - bool "Detect stack corruption on calls to schedule()" 1013 - depends on DEBUG_KERNEL 1014 - default n 1015 - help 1016 - This option checks for a stack overrun on calls to schedule(). 1017 - If the stack end location is found to be over written always panic as 1018 - the content of the corrupted region can no longer be trusted. 1019 - This is to ensure no erroneous behaviour occurs which could result in 1020 - data corruption or a sporadic crash at a later stage once the region 1021 - is examined. The runtime overhead introduced is minimal. 1027 + endmenu 1022 1028 1023 1029 config DEBUG_TIMEKEEPING 1024 1030 bool "Enable extra timekeeping sanity checking" ··· 1312 1338 config HAVE_DEBUG_BUGVERBOSE 1313 1339 bool 1314 1340 1315 - config DEBUG_BUGVERBOSE 1316 - bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT 1317 - depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE) 1318 - default y 1319 - help 1320 - Say Y here to make BUG() panics output the file name and line number 1321 - of the BUG call as well as the EIP and oops trace. This aids 1322 - debugging but costs about 70-100K of memory. 1341 + menu "Debug kernel data structures" 1323 1342 1324 1343 config DEBUG_LIST 1325 1344 bool "Debug linked list manipulation" ··· 1353 1386 This is a relatively cheap check but if you care about maximum 1354 1387 performance, say N. 1355 1388 1389 + config BUG_ON_DATA_CORRUPTION 1390 + bool "Trigger a BUG when data corruption is detected" 1391 + select DEBUG_LIST 1392 + help 1393 + Select this option if the kernel should BUG when it encounters 1394 + data corruption in kernel memory structures when they get checked 1395 + for validity. 1396 + 1397 + If unsure, say N. 1398 + 1399 + endmenu 1400 + 1356 1401 config DEBUG_CREDENTIALS 1357 1402 bool "Debug credential management" 1358 1403 depends on DEBUG_KERNEL ··· 1398 1419 be impacted. 1399 1420 1400 1421 config DEBUG_BLOCK_EXT_DEVT 1401 - bool "Force extended block device numbers and spread them" 1422 + bool "Force extended block device numbers and spread them" 1402 1423 depends on DEBUG_KERNEL 1403 1424 depends on BLOCK 1404 1425 default n ··· 1436 1457 restarted at arbitrary points yet. 1437 1458 1438 1459 Say N if your are unsure. 1460 + 1461 + config LATENCYTOP 1462 + bool "Latency measuring infrastructure" 1463 + depends on DEBUG_KERNEL 1464 + depends on STACKTRACE_SUPPORT 1465 + depends on PROC_FS 1466 + select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86 1467 + select KALLSYMS 1468 + select KALLSYMS_ALL 1469 + select STACKTRACE 1470 + select SCHEDSTATS 1471 + select SCHED_DEBUG 1472 + help 1473 + Enable this option if you want to use the LatencyTOP tool 1474 + to find out which userspace is blocking on what kernel operations. 1475 + 1476 + source "kernel/trace/Kconfig" 1477 + 1478 + config PROVIDE_OHCI1394_DMA_INIT 1479 + bool "Remote debugging over FireWire early on boot" 1480 + depends on PCI && X86 1481 + help 1482 + If you want to debug problems which hang or crash the kernel early 1483 + on boot and the crashing machine has a FireWire port, you can use 1484 + this feature to remotely access the memory of the crashed machine 1485 + over FireWire. This employs remote DMA as part of the OHCI1394 1486 + specification which is now the standard for FireWire controllers. 1487 + 1488 + With remote DMA, you can monitor the printk buffer remotely using 1489 + firescope and access all memory below 4GB using fireproxy from gdb. 1490 + Even controlling a kernel debugger is possible using remote DMA. 1491 + 1492 + Usage: 1493 + 1494 + If ohci1394_dma=early is used as boot parameter, it will initialize 1495 + all OHCI1394 controllers which are found in the PCI config space. 1496 + 1497 + As all changes to the FireWire bus such as enabling and disabling 1498 + devices cause a bus reset and thereby disable remote DMA for all 1499 + devices, be sure to have the cable plugged and FireWire enabled on 1500 + the debugging host before booting the debug target for debugging. 1501 + 1502 + This code (~1k) is freed after boot. By then, the firewire stack 1503 + in charge of the OHCI-1394 controllers should be used instead. 1504 + 1505 + See Documentation/debugging-via-ohci1394.txt for more information. 1506 + 1507 + source "lib/kunit/Kconfig" 1439 1508 1440 1509 config NOTIFIER_ERROR_INJECTION 1441 1510 tristate "Notifier error injection" ··· 1643 1616 help 1644 1617 Provide stacktrace filter for fault-injection capabilities 1645 1618 1646 - config LATENCYTOP 1647 - bool "Latency measuring infrastructure" 1648 - depends on DEBUG_KERNEL 1649 - depends on STACKTRACE_SUPPORT 1650 - depends on PROC_FS 1651 - select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM && !ARC && !X86 1652 - select KALLSYMS 1653 - select KALLSYMS_ALL 1654 - select STACKTRACE 1655 - select SCHEDSTATS 1656 - select SCHED_DEBUG 1619 + endmenu # "Kernel Testing and Coverage" 1620 + 1621 + menu "Kernel Testing and Coverage" 1622 + 1623 + config ARCH_HAS_KCOV 1624 + bool 1657 1625 help 1658 - Enable this option if you want to use the LatencyTOP tool 1659 - to find out which userspace is blocking on what kernel operations. 1626 + An architecture should select this when it can successfully 1627 + build and run with CONFIG_KCOV. This typically requires 1628 + disabling instrumentation for some early boot code. 1660 1629 1661 - source "kernel/trace/Kconfig" 1630 + config CC_HAS_SANCOV_TRACE_PC 1631 + def_bool $(cc-option,-fsanitize-coverage=trace-pc) 1662 1632 1663 - config PROVIDE_OHCI1394_DMA_INIT 1664 - bool "Remote debugging over FireWire early on boot" 1665 - depends on PCI && X86 1633 + 1634 + config KCOV 1635 + bool "Code coverage for fuzzing" 1636 + depends on ARCH_HAS_KCOV 1637 + depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS 1638 + select DEBUG_FS 1639 + select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC 1666 1640 help 1667 - If you want to debug problems which hang or crash the kernel early 1668 - on boot and the crashing machine has a FireWire port, you can use 1669 - this feature to remotely access the memory of the crashed machine 1670 - over FireWire. This employs remote DMA as part of the OHCI1394 1671 - specification which is now the standard for FireWire controllers. 1641 + KCOV exposes kernel code coverage information in a form suitable 1642 + for coverage-guided fuzzing (randomized testing). 1672 1643 1673 - With remote DMA, you can monitor the printk buffer remotely using 1674 - firescope and access all memory below 4GB using fireproxy from gdb. 1675 - Even controlling a kernel debugger is possible using remote DMA. 1644 + If RANDOMIZE_BASE is enabled, PC values will not be stable across 1645 + different machines and across reboots. If you need stable PC values, 1646 + disable RANDOMIZE_BASE. 1676 1647 1677 - Usage: 1648 + For more details, see Documentation/dev-tools/kcov.rst. 1678 1649 1679 - If ohci1394_dma=early is used as boot parameter, it will initialize 1680 - all OHCI1394 controllers which are found in the PCI config space. 1650 + config KCOV_ENABLE_COMPARISONS 1651 + bool "Enable comparison operands collection by KCOV" 1652 + depends on KCOV 1653 + depends on $(cc-option,-fsanitize-coverage=trace-cmp) 1654 + help 1655 + KCOV also exposes operands of every comparison in the instrumented 1656 + code along with operand sizes and PCs of the comparison instructions. 1657 + These operands can be used by fuzzing engines to improve the quality 1658 + of fuzzing coverage. 1681 1659 1682 - As all changes to the FireWire bus such as enabling and disabling 1683 - devices cause a bus reset and thereby disable remote DMA for all 1684 - devices, be sure to have the cable plugged and FireWire enabled on 1685 - the debugging host before booting the debug target for debugging. 1686 - 1687 - This code (~1k) is freed after boot. By then, the firewire stack 1688 - in charge of the OHCI-1394 controllers should be used instead. 1689 - 1690 - See Documentation/debugging-via-ohci1394.txt for more information. 1691 - 1692 - source "lib/kunit/Kconfig" 1660 + config KCOV_INSTRUMENT_ALL 1661 + bool "Instrument all code by default" 1662 + depends on KCOV 1663 + default y 1664 + help 1665 + If you are doing generic system call fuzzing (like e.g. syzkaller), 1666 + then you will want to instrument the whole kernel and you should 1667 + say y here. If you are doing more targeted fuzzing (like e.g. 1668 + filesystem fuzzing with AFL) then you will want to enable coverage 1669 + for more specific subsets of files, and should say n here. 1693 1670 1694 1671 menuconfig RUNTIME_TESTING_MENU 1695 1672 bool "Runtime Testing" ··· 2130 2099 memtest=17, mean do 17 test patterns. 2131 2100 If you are unsure how to answer this question, answer N. 2132 2101 2133 - config BUG_ON_DATA_CORRUPTION 2134 - bool "Trigger a BUG when data corruption is detected" 2135 - select DEBUG_LIST 2136 - help 2137 - Select this option if the kernel should BUG when it encounters 2138 - data corruption in kernel memory structures when they get checked 2139 - for validity. 2140 - 2141 - If unsure, say N. 2142 - 2143 2102 source "samples/Kconfig" 2144 - 2145 - source "lib/Kconfig.kgdb" 2146 - 2147 - source "lib/Kconfig.ubsan" 2148 2103 2149 2104 config ARCH_HAS_DEVMEM_IS_ALLOWED 2150 2105 bool ··· 2171 2154 2172 2155 If in doubt, say Y. 2173 2156 2157 + menu "$(SRCARCH) Debugging" 2158 + 2174 2159 source "arch/$(SRCARCH)/Kconfig.debug" 2160 + 2161 + endmenu 2175 2162 2176 2163 config HYPERV_TESTING 2177 2164 bool "Microsoft Hyper-V driver testing"
+4 -4
lib/Kconfig.kgdb
··· 64 64 depends on X86 || MIPS 65 65 default n 66 66 help 67 - This will add an extra call back to kgdb for the breakpoint 68 - exception handler which will allow kgdb to step through a 69 - notify handler. 67 + This will add an extra call back to kgdb for the breakpoint 68 + exception handler which will allow kgdb to step through a 69 + notify handler. 70 70 71 71 config KGDB_KDB 72 72 bool "KGDB_KDB: include kdb frontend for kgdb" ··· 96 96 97 97 The config option merely sets the default at boot time. Both 98 98 issuing 'echo X > /sys/module/kdb/parameters/cmd_enable' or 99 - setting with kdb.cmd_enable=X kernel command line option will 99 + setting with kdb.cmd_enable=X kernel command line option will 100 100 override the default settings. 101 101 102 102 config KDB_KEYBOARD