ec8f24b7faaf3 (Thomas Gleixner 2019-05-19 13:07:45 +0100 1) # SPDX-License-Identifier: GPL-2.0-only
06ec64b84c357 (Christoph Hellwig 2018-07-31 13:39:31 +0200 2) menu "Kernel hacking"
06ec64b84c357 (Christoph Hellwig 2018-07-31 13:39:31 +0200 3)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 4) menu "printk and dmesg options"
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 5)
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 6) config PRINTK_TIME
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 7) bool "Show timing information on printks"
d3b8b6e5f2003 (Randy Dunlap 2006-12-06 20:36:38 -0800 8) depends on PRINTK
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 9) help
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 10) Selecting this option causes time stamps of the printk()
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 11) messages to be added to the output of the syslog() system
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 12) call and at the console.
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 13)
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 14) The timestamp is always recorded internally, and exported
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 15) to /dev/kmsg. This flag just specifies if the timestamp should
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 16) be included, not that the timestamp is recorded.
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 17)
649e6ee33f73b (Kay Sievers 2012-05-10 04:30:45 +0200 18) The behavior is also controlled by the kernel command line
8c27ceff3604b (Mauro Carvalho Chehab 2016-10-18 10:12:27 -0200 19) parameter printk.time=1. See Documentation/admin-guide/kernel-parameters.rst
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 20)
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 21) config PRINTK_CALLER
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 22) bool "Show caller information on printks"
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 23) depends on PRINTK
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 24) help
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 25) Selecting this option causes printk() to add a caller "thread id" (if
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 26) in task context) or a caller "processor id" (if not in task context)
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 27) to every message.
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 28)
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 29) This option is intended for environments where multiple threads
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 30) concurrently call printk() for many times, for it is difficult to
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 31) interpret without knowing where these lines (or sometimes individual
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 32) line which was divided into multiple lines due to race) came from.
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 33)
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 34) Since toggling after boot makes the code racy, currently there is
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 35) no option to enable/disable at the kernel command line parameter or
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 36) sysfs interface.
15ff2069cb7f9 (Tetsuo Handa 2018-12-18 06:05:04 +0900 37)
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 38) config CONSOLE_LOGLEVEL_DEFAULT
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 39) int "Default console loglevel (1-15)"
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 40) range 1 15
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 41) default "7"
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 42) help
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 43) Default loglevel to determine what will be printed on the console.
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 44)
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 45) Setting a default here is equivalent to passing in loglevel=<x> in
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 46) the kernel bootargs. loglevel=<x> continues to override whatever
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 47) value is specified here as well.
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 48)
50f4d9bda9f85 (Borislav Petkov 2016-12-19 16:23:15 -0800 49) Note: This does not affect the log level of un-prefixed printk()
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 50) usage in the kernel. That is controlled by the MESSAGE_LOGLEVEL_DEFAULT
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 51) option.
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 52)
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 53) config CONSOLE_LOGLEVEL_QUIET
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 54) int "quiet console loglevel (1-15)"
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 55) range 1 15
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 56) default "4"
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 57) help
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 58) loglevel to use when "quiet" is passed on the kernel commandline.
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 59)
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 60) When "quiet" is passed on the kernel commandline this loglevel
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 61) will be used as the loglevel. IOW passing "quiet" will be the
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 62) equivalent of passing "loglevel=<CONSOLE_LOGLEVEL_QUIET>"
22eceb8bf3e8f (Hans de Goede 2018-06-19 13:57:26 +0200 63)
42a9dc0b3d0f7 (Alex Elder 2014-08-06 16:09:01 -0700 64) config MESSAGE_LOGLEVEL_DEFAULT
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 65) int "Default message log level (1-7)"
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 66) range 1 7
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 67) default "4"
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 68) help
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 69) Default log level for printk statements with no specified priority.
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 70)
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 71) This was hard-coded to KERN_WARNING since at least 2.6.10 but folks
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 72) that are auditing their logs closely may want to set it to a lower
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 73) priority.
5af5bcb8d37f9 (Mandeep Singh Baines 2011-03-22 16:34:23 -0700 74)
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 75) Note: This does not affect what message level gets printed on the console
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 76) by default. To change that, use loglevel=<x> in the kernel bootargs,
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 77) or pick a different CONSOLE_LOGLEVEL_DEFAULT configuration value.
a8cfdc68f6cfc (Olof Johansson 2016-12-12 16:45:56 -0800 78)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 79) config BOOT_PRINTK_DELAY
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 80) bool "Delay each boot printk message by N milliseconds"
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 81) depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 82) help
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 83) This build option allows you to read kernel boot messages
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 84) by inserting a short delay after each one. The delay is
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 85) specified in milliseconds on the kernel command line,
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 86) using "boot_delay=N".
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 87)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 88) It is likely that you would also need to use "lpj=M" to preset
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 89) the "loops per jiffie" value.
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 90) See a previous boot log for the "lpj" value to use for your
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 91) system, and then set "lpj=M" before setting "boot_delay=N".
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 92) NOTE: Using this option may adversely affect SMP systems.
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 93) I.e., processors other than the first one may not boot up.
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 94) BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 95) what it believes to be lockup conditions.
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 96)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 97) config DYNAMIC_DEBUG
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 98) bool "Enable dynamic printk() support"
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 99) default n
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 100) depends on PRINTK
239a5791ffd55 (Greg Kroah-Hartman 2020-02-10 13:11:42 -0800 101) depends on (DEBUG_FS || PROC_FS)
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 102) select DYNAMIC_DEBUG_CORE
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 103) help
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 104)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 105) Compiles debug level messages into the kernel, which would not
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 106) otherwise be available at runtime. These messages can then be
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 107) enabled/disabled based on various levels of scope - per source file,
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 108) function, module, format string, and line number. This mechanism
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 109) implicitly compiles in all pr_debug() and dev_dbg() calls, which
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 110) enlarges the kernel text size by about 2%.
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 111)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 112) If a source file is compiled with DEBUG flag set, any
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 113) pr_debug() calls in it are enabled by default, but can be
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 114) disabled at runtime as below. Note that DEBUG flag is
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 115) turned on by many CONFIG_*DEBUG* options.
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 116)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 117) Usage:
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 118)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 119) Dynamic debugging is controlled via the 'dynamic_debug/control' file,
239a5791ffd55 (Greg Kroah-Hartman 2020-02-10 13:11:42 -0800 120) which is contained in the 'debugfs' filesystem or procfs.
239a5791ffd55 (Greg Kroah-Hartman 2020-02-10 13:11:42 -0800 121) Thus, the debugfs or procfs filesystem must first be mounted before
239a5791ffd55 (Greg Kroah-Hartman 2020-02-10 13:11:42 -0800 122) making use of this feature.
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 123) We refer the control file as: <debugfs>/dynamic_debug/control. This
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 124) file contains a list of the debug statements that can be enabled. The
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 125) format for each line of the file is:
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 126)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 127) filename:lineno [module]function flags format
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 128)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 129) filename : source file of the debug statement
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 130) lineno : line number of the debug statement
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 131) module : module that contains the debug statement
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 132) function : function that contains the debug statement
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 133) flags : '=p' means the line is turned 'on' for printing
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 134) format : the format used for the debug statement
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 135)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 136) From a live system:
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 137)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 138) nullarbor:~ # cat <debugfs>/dynamic_debug/control
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 139) # filename:lineno [module]function flags format
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 140) fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 141) fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 142) fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 143)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 144) Example usage:
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 145)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 146) // enable the message at line 1603 of file svcsock.c
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 147) nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 148) <debugfs>/dynamic_debug/control
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 149)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 150) // enable all the messages in file svcsock.c
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 151) nullarbor:~ # echo -n 'file svcsock.c +p' >
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 152) <debugfs>/dynamic_debug/control
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 153)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 154) // enable all the messages in the NFS server module
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 155) nullarbor:~ # echo -n 'module nfsd +p' >
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 156) <debugfs>/dynamic_debug/control
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 157)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 158) // enable all 12 messages in the function svc_process()
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 159) nullarbor:~ # echo -n 'func svc_process +p' >
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 160) <debugfs>/dynamic_debug/control
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 161)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 162) // disable all 12 messages in the function svc_process()
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 163) nullarbor:~ # echo -n 'func svc_process -p' >
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 164) <debugfs>/dynamic_debug/control
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 165)
f8998c226587f (Hans Holmberg 2017-03-16 09:37:32 +0100 166) See Documentation/admin-guide/dynamic-debug-howto.rst for additional
f8998c226587f (Hans Holmberg 2017-03-16 09:37:32 +0100 167) information.
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 168)
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 169) config DYNAMIC_DEBUG_CORE
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 170) bool "Enable core function of dynamic debug support"
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 171) depends on PRINTK
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 172) depends on (DEBUG_FS || PROC_FS)
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 173) help
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 174) Enable core functional support of dynamic debug. It is useful
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 175) when you want to tie dynamic debug to your kernel modules with
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 176) DYNAMIC_DEBUG_MODULE defined for each of them, especially for
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 177) the case of embedded system where the kernel image size is
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 178) sensitive for people.
ceabef7dd7172 (Orson Zhai 2020-06-07 21:40:14 -0700 179)
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 180) config SYMBOLIC_ERRNAME
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 181) bool "Support symbolic error names in printf"
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 182) default y if PRINTK
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 183) help
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 184) If you say Y here, the kernel's printf implementation will
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 185) be able to print symbolic error names such as ENOSPC instead
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 186) of the number 28. It makes the kernel image slightly larger
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 187) (about 3KB), but can make the kernel logs easier to read.
57f5677e535ba (Rasmus Villemoes 2019-10-15 21:07:05 +0200 188)
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 189) config DEBUG_BUGVERBOSE
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 190) bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 191) depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE)
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 192) default y
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 193) help
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 194) Say Y here to make BUG() panics output the file name and line number
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 195) of the BUG call as well as the EIP and oops trace. This aids
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 196) debugging but costs about 70-100K of memory.
2b05bb75d1745 (Changbin Du 2019-12-06 17:04:03 -0800 197)
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 198) endmenu # "printk and dmesg options"
604ff0dceb2ac (Dave Hansen 2013-07-01 13:04:49 -0700 199)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 200) menu "Compile-time checks and compiler options"
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 201)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 202) config DEBUG_INFO
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 203) bool "Compile the kernel with debug info"
12b13835a0a8b (Linus Torvalds 2014-02-04 12:20:01 -0800 204) depends on DEBUG_KERNEL && !COMPILE_TEST
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 205) help
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 206) If you say Y here the resulting kernel image will include
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 207) debugging info resulting in a larger kernel image.
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 208) This adds debug symbols to the kernel and modules (gcc -g), and
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 209) is needed if you intend to use kernel crashdump or binary object
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 210) tools like crash, kgdb, LKCD, gdb, etc on the kernel.
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 211) Say Y here only if you plan to debug the kernel.
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 212)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 213) If unsure, say N.
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 214)
695afd3d7d58e (Sedat Dilek 2020-08-16 14:32:44 +0200 215) if DEBUG_INFO
695afd3d7d58e (Sedat Dilek 2020-08-16 14:32:44 +0200 216)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 217) config DEBUG_INFO_REDUCED
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 218) bool "Reduce debugging information"
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 219) help
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 220) If you say Y here gcc is instructed to generate less debugging
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 221) information for structure types. This means that tools that
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 222) need full debugging information (like kgdb or systemtap) won't
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 223) be happy. But if you merely need debugging information to
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 224) resolve line numbers there is no loss. Advantage is that
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 225) build directory object sizes shrink dramatically over a full
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 226) DEBUG_INFO build and compile times are reduced too.
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 227) Only works with newer gcc versions.
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 228)
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 229) config DEBUG_INFO_COMPRESSED
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 230) bool "Compressed debugging information"
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 231) depends on $(cc-option,-gz=zlib)
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 232) depends on $(ld-option,--compress-debug-sections=zlib)
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 233) help
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 234) Compress the debug information using zlib. Requires GCC 5.0+ or Clang
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 235) 5.0+, binutils 2.26+, and zlib.
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 236)
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 237) Users of dpkg-deb via scripts/package/builddeb may find an increase in
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 238) size of their debug .deb packages with this config set, due to the
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 239) debug info being compressed with zlib, then the object files being
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 240) recompressed with a different compression scheme. But this is still
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 241) preferable to setting $KDEB_COMPRESS to "none" which would be even
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 242) larger.
10e68b02c861c (Nick Desaulniers 2020-05-26 10:18:29 -0700 243)
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 244) config DEBUG_INFO_SPLIT
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 245) bool "Produce split debuginfo in .dwo files"
9d9374440072e (Masahiro Yamada 2019-02-22 16:56:09 +0900 246) depends on $(cc-option,-gsplit-dwarf)
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 247) help
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 248) Generate debug info into separate .dwo files. This significantly
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 249) reduces the build directory size for builds with DEBUG_INFO,
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 250) because it stores the information only once on disk in .dwo
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 251) files instead of multiple times in object files and executables.
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 252) In addition the debug information is also compressed.
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 253)
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 254) Requires recent gcc (4.7+) and recent gdb/binutils.
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 255) Any tool that packages or reads debug information would need
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 256) to know about the .dwo files and include them.
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 257) Incompatible with older versions of ccache.
866ced950bcd5 (Andi Kleen 2014-07-30 20:50:18 +0200 258)
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 259) choice
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 260) prompt "DWARF version"
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 261) help
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 262) Which version of DWARF debug info to emit.
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 263)
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 264) config DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 265) bool "Rely on the toolchain's implicit default DWARF version"
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 266) help
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 267) The implicit default version of DWARF debug info produced by a
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 268) toolchain changes over time.
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 269)
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 270) This can break consumers of the debug info that haven't upgraded to
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 271) support newer revisions, and prevent testing newer versions, but
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 272) those should be less common scenarios.
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 273)
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 274) If unsure, say Y.
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 275)
bfaf2dd3509bc (Andi Kleen 2014-07-30 20:50:19 +0200 276) config DEBUG_INFO_DWARF4
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 277) bool "Generate DWARF Version 4 debuginfo"
bfaf2dd3509bc (Andi Kleen 2014-07-30 20:50:19 +0200 278) help
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 279) Generate DWARF v4 debug info. This requires gcc 4.5+ and gdb 7.0+.
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 280)
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 281) If you have consumers of DWARF debug info that are not ready for
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 282) newer revisions of DWARF, you may wish to choose this or have your
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 283) config select this.
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 284)
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 285) config DEBUG_INFO_DWARF5
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 286) bool "Generate DWARF Version 5 debuginfo"
2e98815794fb5 (Masahiro Yamada 2021-03-16 01:12:57 +0900 287) depends on GCC_VERSION >= 50000 || (CC_IS_CLANG && (AS_IS_LLVM || (AS_IS_GNU && AS_VERSION >= 23502)))
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 288) depends on !DEBUG_INFO_BTF
bfaf2dd3509bc (Andi Kleen 2014-07-30 20:50:19 +0200 289) help
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 290) Generate DWARF v5 debug info. Requires binutils 2.35.2, gcc 5.0+ (gcc
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 291) 5.0+ accepts the -gdwarf-5 flag but only had partial support for some
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 292) draft features until 7.0), and gdb 8.0+.
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 293)
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 294) Changes to the structure of debug info in Version 5 allow for around
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 295) 15-18% savings in resulting image and debug info section sizes as
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 296) compared to DWARF Version 4. DWARF Version 5 standardizes previous
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 297) extensions such as accelerators for symbol indexing and the format
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 298) for fission (.dwo/.dwp) files. Users may not want to select this
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 299) config if they rely on tooling that has not yet been updated to
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 300) support DWARF Version 5.
98cd6f521f101 (Nick Desaulniers 2021-02-05 12:22:20 -0800 301)
a66049e2cf0ef (Nick Desaulniers 2021-02-05 12:22:19 -0800 302) endchoice # "DWARF version"
bfaf2dd3509bc (Andi Kleen 2014-07-30 20:50:19 +0200 303)
e83b9f55448af (Andrii Nakryiko 2019-04-02 09:49:50 -0700 304) config DEBUG_INFO_BTF
e83b9f55448af (Andrii Nakryiko 2019-04-02 09:49:50 -0700 305) bool "Generate BTF typeinfo"
7d32e69310d67 (Slava Bacherikov 2020-04-02 23:41:39 +0300 306) depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
7d32e69310d67 (Slava Bacherikov 2020-04-02 23:41:39 +0300 307) depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
e83b9f55448af (Andrii Nakryiko 2019-04-02 09:49:50 -0700 308) help
e83b9f55448af (Andrii Nakryiko 2019-04-02 09:49:50 -0700 309) Generate deduplicated BTF type information from DWARF debug info.
e83b9f55448af (Andrii Nakryiko 2019-04-02 09:49:50 -0700 310) Turning this on expects presence of pahole tool, which will convert
e83b9f55448af (Andrii Nakryiko 2019-04-02 09:49:50 -0700 311) DWARF type info into equivalent deduplicated BTF type info.
e83b9f55448af (Andrii Nakryiko 2019-04-02 09:49:50 -0700 312)
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 313) config PAHOLE_HAS_SPLIT_BTF
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 314) def_bool $(success, test `$(PAHOLE) --version | sed -E 's/v([0-9]+)\.([0-9]+)/\1\2/'` -ge "119")
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 315)
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 316) config DEBUG_INFO_BTF_MODULES
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 317) def_bool y
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 318) depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 319) help
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 320) Generate compact split BTF type information for kernel modules.
5f9ae91f7c0db (Andrii Nakryiko 2020-11-09 17:19:30 -0800 321)
3ee7b3fa2cd01 (Jan Kiszka 2015-02-17 13:46:36 -0800 322) config GDB_SCRIPTS
3ee7b3fa2cd01 (Jan Kiszka 2015-02-17 13:46:36 -0800 323) bool "Provide GDB scripts for kernel debugging"
3ee7b3fa2cd01 (Jan Kiszka 2015-02-17 13:46:36 -0800 324) help
3ee7b3fa2cd01 (Jan Kiszka 2015-02-17 13:46:36 -0800 325) This creates the required links to GDB helper scripts in the
3ee7b3fa2cd01 (Jan Kiszka 2015-02-17 13:46:36 -0800 326) build directory. If you load vmlinux into gdb, the helper
3ee7b3fa2cd01 (Jan Kiszka 2015-02-17 13:46:36 -0800 327) scripts will be automatically imported by gdb as well, and
3ee7b3fa2cd01 (Jan Kiszka 2015-02-17 13:46:36 -0800 328) additional functions are available to analyze a Linux kernel
700199b0c192c (Andreas Platschek 2016-12-14 15:05:40 -0800 329) instance. See Documentation/dev-tools/gdb-kernel-debugging.rst
700199b0c192c (Andreas Platschek 2016-12-14 15:05:40 -0800 330) for further details.
3ee7b3fa2cd01 (Jan Kiszka 2015-02-17 13:46:36 -0800 331)
695afd3d7d58e (Sedat Dilek 2020-08-16 14:32:44 +0200 332) endif # DEBUG_INFO
695afd3d7d58e (Sedat Dilek 2020-08-16 14:32:44 +0200 333)
35bb5b1e0e84c (Andi Kleen 2008-02-22 15:15:03 +0100 334) config FRAME_WARN
a83e4ca26af8f (Masahiro Yamada 2020-02-17 00:19:36 +0900 335) int "Warn for stack frames larger than"
35bb5b1e0e84c (Andi Kleen 2008-02-22 15:15:03 +0100 336) range 0 8192
0e07f663c9015 (Kees Cook 2016-10-27 17:46:41 -0700 337) default 2048 if GCC_PLUGIN_LATENT_ENTROPY
432654df90f2a (Helge Deller 2017-09-11 21:41:43 +0200 338) default 1280 if (!64BIT && PARISC)
432654df90f2a (Helge Deller 2017-09-11 21:41:43 +0200 339) default 1024 if (!64BIT && !PARISC)
35bb5b1e0e84c (Andi Kleen 2008-02-22 15:15:03 +0100 340) default 2048 if 64BIT
35bb5b1e0e84c (Andi Kleen 2008-02-22 15:15:03 +0100 341) help
35bb5b1e0e84c (Andi Kleen 2008-02-22 15:15:03 +0100 342) Tell gcc to warn at build time for stack frames larger than this.
35bb5b1e0e84c (Andi Kleen 2008-02-22 15:15:03 +0100 343) Setting this too low will cause a lot of warnings.
35bb5b1e0e84c (Andi Kleen 2008-02-22 15:15:03 +0100 344) Setting it to 0 disables the warning.
35bb5b1e0e84c (Andi Kleen 2008-02-22 15:15:03 +0100 345)
99657c7857fd4 (Randy Dunlap 2009-09-18 12:49:22 -0700 346) config STRIP_ASM_SYMS
99657c7857fd4 (Randy Dunlap 2009-09-18 12:49:22 -0700 347) bool "Strip assembler-generated symbols during link"
99657c7857fd4 (Randy Dunlap 2009-09-18 12:49:22 -0700 348) default n
99657c7857fd4 (Randy Dunlap 2009-09-18 12:49:22 -0700 349) help
99657c7857fd4 (Randy Dunlap 2009-09-18 12:49:22 -0700 350) Strip internal assembler-generated symbols during a link (symbols
99657c7857fd4 (Randy Dunlap 2009-09-18 12:49:22 -0700 351) that look like '.Lxxx') so they don't pollute the output of
99657c7857fd4 (Randy Dunlap 2009-09-18 12:49:22 -0700 352) get_wchan() and suchlike.
99657c7857fd4 (Randy Dunlap 2009-09-18 12:49:22 -0700 353)
1873e870fd63e (Andi Kleen 2012-03-28 11:51:18 -0700 354) config READABLE_ASM
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 355) bool "Generate readable assembler code"
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 356) depends on DEBUG_KERNEL
bf4735a46a6b8 (Don Mullis 2006-12-10 02:18:37 -0800 357) help
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 358) Disable some compiler optimizations that tend to generate human unreadable
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 359) assembler output. This may make the kernel slightly slower, but it helps
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 360) to keep kernel developers who have to stare a lot at assembler listings
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 361) sane.
bf4735a46a6b8 (Don Mullis 2006-12-10 02:18:37 -0800 362)
e949f4c2d6a3d (Masahiro Yamada 2019-06-04 19:13:59 +0900 363) config HEADERS_INSTALL
e949f4c2d6a3d (Masahiro Yamada 2019-06-04 19:13:59 +0900 364) bool "Install uapi headers to usr/include"
bf4735a46a6b8 (Don Mullis 2006-12-10 02:18:37 -0800 365) depends on !UML
bf4735a46a6b8 (Don Mullis 2006-12-10 02:18:37 -0800 366) help
e949f4c2d6a3d (Masahiro Yamada 2019-06-04 19:13:59 +0900 367) This option will install uapi headers (headers exported to user-space)
e949f4c2d6a3d (Masahiro Yamada 2019-06-04 19:13:59 +0900 368) into the usr/include directory for use during the kernel build.
e949f4c2d6a3d (Masahiro Yamada 2019-06-04 19:13:59 +0900 369) This is unneeded for building the kernel itself, but needed for some
e949f4c2d6a3d (Masahiro Yamada 2019-06-04 19:13:59 +0900 370) user-space program samples. It is also needed by some features such
e949f4c2d6a3d (Masahiro Yamada 2019-06-04 19:13:59 +0900 371) as uapi header sanity checks.
e949f4c2d6a3d (Masahiro Yamada 2019-06-04 19:13:59 +0900 372)
91341d4b2c196 (Sam Ravnborg 2008-01-21 21:31:44 +0100 373) config DEBUG_SECTION_MISMATCH
91341d4b2c196 (Sam Ravnborg 2008-01-21 21:31:44 +0100 374) bool "Enable full Section mismatch analysis"
91341d4b2c196 (Sam Ravnborg 2008-01-21 21:31:44 +0100 375) help
91341d4b2c196 (Sam Ravnborg 2008-01-21 21:31:44 +0100 376) The section mismatch analysis checks if there are illegal
91341d4b2c196 (Sam Ravnborg 2008-01-21 21:31:44 +0100 377) references from one section to another section.
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 378) During linktime or runtime, some sections are dropped;
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 379) any use of code/data previously in these sections would
91341d4b2c196 (Sam Ravnborg 2008-01-21 21:31:44 +0100 380) most likely result in an oops.
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 381) In the code, functions and variables are annotated with
0db0628d90125 (Paul Gortmaker 2013-06-19 14:53:51 -0400 382) __init,, etc. (see the full list in include/linux/init.h),
d6fbfa4fce607 (Geert Uytterhoeven 2008-01-30 11:13:23 +0100 383) which results in the code/data being placed in specific sections.
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 384) The section mismatch analysis is always performed after a full
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 385) kernel build, and enabling this option causes the following
b7dca6dd1e591 (Masahiro Yamada 2019-07-17 15:17:57 +0900 386) additional step to occur:
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 387) - Add the option -fno-inline-functions-called-once to gcc commands.
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 388) When inlining a function annotated with __init in a non-init
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 389) function, we would lose the section information and thus
91341d4b2c196 (Sam Ravnborg 2008-01-21 21:31:44 +0100 390) the analysis would not catch the illegal reference.
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 391) This option tells gcc to inline less (but it does result in
e809ab01013df (Michael Witten 2011-04-17 04:08:48 +0000 392) a larger kernel).
91341d4b2c196 (Sam Ravnborg 2008-01-21 21:31:44 +0100 393)
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 394) config SECTION_MISMATCH_WARN_ONLY
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 395) bool "Make section mismatch errors non-fatal"
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 396) default y
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 397) help
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 398) If you say N here, the build process will fail if there are any
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 399) section mismatch, instead of just throwing warnings.
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 400)
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 401) If unsure, say Y.
47490ec141b99 (Nicolas Boichat 2015-10-06 09:44:42 +1030 402)
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 403) config DEBUG_FORCE_FUNCTION_ALIGN_32B
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 404) bool "Force all function address 32B aligned" if EXPERT
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 405) help
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 406) There are cases that a commit from one domain changes the function
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 407) address alignment of other domains, and cause magic performance
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 408) bump (regression or improvement). Enable this option will help to
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 409) verify if the bump is caused by function alignment changes, while
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 410) it will slightly increase the kernel size and affect icache usage.
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 411)
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 412) It is mainly for debug and performance tuning use.
09c60546f04f7 (Feng Tang 2020-08-11 18:34:13 -0700 413)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 414) #
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 415) # Select this config option from the architecture Kconfig, if it
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 416) # is preferred to always offer frame pointers as a config
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 417) # option on the architecture (regardless of KERNEL_DEBUG):
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 418) #
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 419) config ARCH_WANT_FRAME_POINTERS
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 420) bool
f346f4b373aa3 (Adrian Bunk 2006-01-09 20:54:51 -0800 421)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 422) config FRAME_POINTER
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 423) bool "Compile the kernel with frame pointers"
a687a5337063a (Arnd Bergmann 2018-03-07 23:30:54 +0100 424) depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 425) default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
a304e1b828089 (David Woodhouse 2007-02-12 00:52:00 -0800 426) help
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 427) If you say Y here the resulting kernel image will be slightly
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 428) larger and slower, but it gives very useful debugging information
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 429) in case of kernel bugs. (precise oopses/stacktraces/warnings)
a304e1b828089 (David Woodhouse 2007-02-12 00:52:00 -0800 430)
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 431) config STACK_VALIDATION
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 432) bool "Compile-time stack metadata validation"
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 433) depends on HAVE_STACK_VALIDATION
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 434) default n
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 435) help
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 436) Add compile-time checks to validate stack metadata, including frame
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 437) pointers (if CONFIG_FRAME_POINTER is enabled). This helps ensure
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 438) that runtime stack traces are more reliable.
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 439)
ee9f8fce99640 (Josh Poimboeuf 2017-07-24 18:36:57 -0500 440) This is also a prerequisite for generation of ORC unwind data, which
11af847446ed0 (Josh Poimboeuf 2017-10-13 15:02:00 -0500 441) is needed for CONFIG_UNWINDER_ORC.
ee9f8fce99640 (Josh Poimboeuf 2017-07-24 18:36:57 -0500 442)
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 443) For more information, see
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 444) tools/objtool/Documentation/stack-validation.txt.
b9ab5ebb14ec3 (Josh Poimboeuf 2016-02-28 22:22:42 -0600 445)
6804c1afd794c (Peter Zijlstra 2020-03-18 13:33:54 +0100 446) config VMLINUX_VALIDATION
6804c1afd794c (Peter Zijlstra 2020-03-18 13:33:54 +0100 447) bool
6804c1afd794c (Peter Zijlstra 2020-03-18 13:33:54 +0100 448) depends on STACK_VALIDATION && DEBUG_ENTRY && !PARAVIRT
6804c1afd794c (Peter Zijlstra 2020-03-18 13:33:54 +0100 449) default y
6804c1afd794c (Peter Zijlstra 2020-03-18 13:33:54 +0100 450)
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 451) config VMLINUX_MAP
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 452) bool "Generate vmlinux.map file when linking"
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 453) depends on EXPERT
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 454) help
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 455) Selecting this option will pass "-Map=vmlinux.map" to ld
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 456) when linking vmlinux. That file can be useful for verifying
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 457) and debugging magic section games, and for seeing which
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 458) pieces of code get eliminated with
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 459) CONFIG_LD_DEAD_CODE_DATA_ELIMINATION.
5cc1247204616 (Rasmus Villemoes 2021-03-05 10:27:07 +0100 460)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 461) config DEBUG_FORCE_WEAK_PER_CPU
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 462) bool "Force weak per-cpu definitions"
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 463) depends on DEBUG_KERNEL
8446f1d391f3d (Ingo Molnar 2005-09-06 15:16:27 -0700 464) help
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 465) s390 and alpha require percpu variables in modules to be
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 466) defined weak to work around addressing range issue which
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 467) puts the following two restrictions on percpu variable
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 468) definitions.
8446f1d391f3d (Ingo Molnar 2005-09-06 15:16:27 -0700 469)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 470) 1. percpu symbols must be unique whether static or not
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 471) 2. percpu variables can't be defined inside a function
8446f1d391f3d (Ingo Molnar 2005-09-06 15:16:27 -0700 472)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 473) To ensure that generic code follows the above rules, this
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 474) option forces all percpu variables to be defined as weak.
5f329089431aa (Fernando Luis Vázquez Cao 2012-02-09 17:42:21 -0500 475)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 476) endmenu # "Compiler options"
8446f1d391f3d (Ingo Molnar 2005-09-06 15:16:27 -0700 477)
6210b6402f582 (Changbin Du 2019-12-06 17:03:42 -0800 478) menu "Generic Kernel Debugging Instruments"
6210b6402f582 (Changbin Du 2019-12-06 17:03:42 -0800 479)
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 480) config MAGIC_SYSRQ
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 481) bool "Magic SysRq key"
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 482) depends on !UML
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 483) help
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 484) If you say Y here, you will have some control over the system even
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 485) if the system crashes for example during kernel debugging (e.g., you
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 486) will be able to flush the buffer cache to disk, reboot the system
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 487) immediately or dump some status information). This is accomplished
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 488) by pressing various keys while holding SysRq (Alt+PrintScreen). It
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 489) also works on a serial console (on PC hardware at least), if you
6dfc06651b3d2 (Dave Hansen 2013-07-01 13:04:46 -0700 490) send a BREAK and then within 5 seconds a command keypress. The
f8998c226587f (Hans Holmberg 2017-03-16 09:37:32 +0100 491) keys are documented in <file:Documentation/admin-guide/sysrq.rst>.
f8998c226587f (Hans Holmberg 2017-03-16 09:37:32 +0100 492) Don't say Y unless you really know what this hack does.
8446f1d391f3d (Ingo Molnar 2005-09-06 15:16:27 -0700 493)
8eaede49dfdc1 (Ben Hutchings 2013-10-07 01:05:46 +0100 494) config MAGIC_SYSRQ_DEFAULT_ENABLE
8eaede49dfdc1 (Ben Hutchings 2013-10-07 01:05:46 +0100 495) hex "Enable magic SysRq key functions by default"
8eaede49dfdc1 (Ben Hutchings 2013-10-07 01:05:46 +0100 496) depends on MAGIC_SYSRQ
8eaede49dfdc1 (Ben Hutchings 2013-10-07 01:05:46 +0100 497) default 0x1
8eaede49dfdc1 (Ben Hutchings 2013-10-07 01:05:46 +0100 498) help
8eaede49dfdc1 (Ben Hutchings 2013-10-07 01:05:46 +0100 499) Specifies which SysRq key functions are enabled by default.
8eaede49dfdc1 (Ben Hutchings 2013-10-07 01:05:46 +0100 500) This may be set to 1 or 0 to enable or disable them all, or
f8998c226587f (Hans Holmberg 2017-03-16 09:37:32 +0100 501) to a bitmask as described in Documentation/admin-guide/sysrq.rst.
8eaede49dfdc1 (Ben Hutchings 2013-10-07 01:05:46 +0100 502)
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 503) config MAGIC_SYSRQ_SERIAL
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 504) bool "Enable magic SysRq key over serial"
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 505) depends on MAGIC_SYSRQ
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 506) default y
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 507) help
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 508) Many embedded boards have a disconnected TTL level serial which can
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 509) generate some garbage that can lead to spurious false sysrq detects.
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 510) This option allows you to decide whether you want to enable the
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 511) magic SysRq key.
732dbf3a6104a (Felix Fietkau 2016-12-22 08:31:34 +0100 512)
68af43173d3fc (Dmitry Safonov 2020-03-02 17:51:35 +0000 513) config MAGIC_SYSRQ_SERIAL_SEQUENCE
68af43173d3fc (Dmitry Safonov 2020-03-02 17:51:35 +0000 514) string "Char sequence that enables magic SysRq over serial"
68af43173d3fc (Dmitry Safonov 2020-03-02 17:51:35 +0000 515) depends on MAGIC_SYSRQ_SERIAL
68af43173d3fc (Dmitry Safonov 2020-03-02 17:51:35 +0000 516) default ""
68af43173d3fc (Dmitry Safonov 2020-03-02 17:51:35 +0000 517) help
68af43173d3fc (Dmitry Safonov 2020-03-02 17:51:35 +0000 518) Specifies a sequence of characters that can follow BREAK to enable
68af43173d3fc (Dmitry Safonov 2020-03-02 17:51:35 +0000 519) SysRq on a serial console.
68af43173d3fc (Dmitry Safonov 2020-03-02 17:51:35 +0000 520)
d3394b3d51828 (Dmitry Safonov 2020-03-06 15:31:56 +0000 521) If unsure, leave an empty string and the option will not be enabled.
d3394b3d51828 (Dmitry Safonov 2020-03-06 15:31:56 +0000 522)
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 523) config DEBUG_FS
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 524) bool "Debug Filesystem"
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 525) help
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 526) debugfs is a virtual file system that kernel developers use to put
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 527) debugging files into. Enable this option to be able to read and
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 528) write to these files.
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 529)
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 530) For detailed documentation on the debugfs API, see
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 531) Documentation/filesystems/.
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 532)
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 533) If unsure, say N.
ec29a5c197e6e (Changbin Du 2019-12-06 17:04:06 -0800 534)
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 535) choice
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 536) prompt "Debugfs default access"
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 537) depends on DEBUG_FS
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 538) default DEBUG_FS_ALLOW_ALL
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 539) help
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 540) This selects the default access restrictions for debugfs.
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 541) It can be overridden with kernel command line option
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 542) debugfs=[on,no-mount,off]. The restrictions apply for API access
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 543) and filesystem registration.
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 544)
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 545) config DEBUG_FS_ALLOW_ALL
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 546) bool "Access normal"
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 547) help
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 548) No restrictions apply. Both API and filesystem registration
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 549) is on. This is the normal default operation.
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 550)
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 551) config DEBUG_FS_DISALLOW_MOUNT
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 552) bool "Do not register debugfs as filesystem"
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 553) help
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 554) The API is open but filesystem is not loaded. Clients can still do
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 555) their work and read with debug tools that do not need
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 556) debugfs filesystem.
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 557)
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 558) config DEBUG_FS_ALLOW_NONE
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 559) bool "No access"
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 560) help
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 561) Access is off. Clients get -PERM when trying to create nodes in
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 562) debugfs tree and debugfs is not registered as a filesystem.
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 563) Client can then back-off or continue without debugfs access.
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 564)
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 565) endchoice
a24c6f7bc923d (Peter Enderborg 2020-07-16 09:15:11 +0200 566)
6210b6402f582 (Changbin Du 2019-12-06 17:03:42 -0800 567) source "lib/Kconfig.kgdb"
6210b6402f582 (Changbin Du 2019-12-06 17:03:42 -0800 568) source "lib/Kconfig.ubsan"
2645d432051cd (Changbin Du 2020-09-18 21:20:42 -0700 569) source "lib/Kconfig.kcsan"
6210b6402f582 (Changbin Du 2019-12-06 17:03:42 -0800 570)
6210b6402f582 (Changbin Du 2019-12-06 17:03:42 -0800 571) endmenu
6210b6402f582 (Changbin Du 2019-12-06 17:03:42 -0800 572)
f346f4b373aa3 (Adrian Bunk 2006-01-09 20:54:51 -0800 573) config DEBUG_KERNEL
f346f4b373aa3 (Adrian Bunk 2006-01-09 20:54:51 -0800 574) bool "Kernel debugging"
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 575) help
f346f4b373aa3 (Adrian Bunk 2006-01-09 20:54:51 -0800 576) Say Y here if you are developing drivers or trying to debug and
f346f4b373aa3 (Adrian Bunk 2006-01-09 20:54:51 -0800 577) identify kernel problems.
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 578)
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 579) config DEBUG_MISC
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 580) bool "Miscellaneous debug code"
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 581) default DEBUG_KERNEL
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 582) depends on DEBUG_KERNEL
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 583) help
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 584) Say Y here if you need to enable miscellaneous debug code that should
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 585) be under a more specific debug option but isn't.
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 586)
c66d7a27b794b (Sinan Kaya 2019-05-14 15:44:00 -0700 587)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 588) menu "Memory Debugging"
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 589)
8636a1f9677db (Masahiro Yamada 2018-12-11 20:01:04 +0900 590) source "mm/Kconfig.debug"
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 591)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 592) config DEBUG_OBJECTS
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 593) bool "Debug object operations"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 594) depends on DEBUG_KERNEL
9c44bc03fff44 (Ingo Molnar 2008-05-12 21:21:04 +0200 595) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 596) If you say Y here, additional code will be inserted into the
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 597) kernel to track the life time of various objects and validate
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 598) the operations on those objects.
9c44bc03fff44 (Ingo Molnar 2008-05-12 21:21:04 +0200 599)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 600) config DEBUG_OBJECTS_SELFTEST
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 601) bool "Debug objects selftest"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 602) depends on DEBUG_OBJECTS
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 603) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 604) This enables the selftest of the object debug code.
9c44bc03fff44 (Ingo Molnar 2008-05-12 21:21:04 +0200 605)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 606) config DEBUG_OBJECTS_FREE
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 607) bool "Debug objects in freed memory"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 608) depends on DEBUG_OBJECTS
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 609) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 610) This enables checks whether a k/v free operation frees an area
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 611) which contains an object which has not been deactivated
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 612) properly. This can make kmalloc/kfree-intensive workloads
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 613) much slower.
3ac7fe5a4aab4 (Thomas Gleixner 2008-04-30 00:55:01 -0700 614)
c6f3a97f86a5c (Thomas Gleixner 2008-04-30 00:55:03 -0700 615) config DEBUG_OBJECTS_TIMERS
c6f3a97f86a5c (Thomas Gleixner 2008-04-30 00:55:03 -0700 616) bool "Debug timer objects"
c6f3a97f86a5c (Thomas Gleixner 2008-04-30 00:55:03 -0700 617) depends on DEBUG_OBJECTS
c6f3a97f86a5c (Thomas Gleixner 2008-04-30 00:55:03 -0700 618) help
c6f3a97f86a5c (Thomas Gleixner 2008-04-30 00:55:03 -0700 619) If you say Y here, additional code will be inserted into the
c6f3a97f86a5c (Thomas Gleixner 2008-04-30 00:55:03 -0700 620) timer routines to track the life time of timer objects and
c6f3a97f86a5c (Thomas Gleixner 2008-04-30 00:55:03 -0700 621) validate the timer operations.
c6f3a97f86a5c (Thomas Gleixner 2008-04-30 00:55:03 -0700 622)
dc186ad741c12 (Thomas Gleixner 2009-11-16 01:09:48 +0900 623) config DEBUG_OBJECTS_WORK
dc186ad741c12 (Thomas Gleixner 2009-11-16 01:09:48 +0900 624) bool "Debug work objects"
dc186ad741c12 (Thomas Gleixner 2009-11-16 01:09:48 +0900 625) depends on DEBUG_OBJECTS
dc186ad741c12 (Thomas Gleixner 2009-11-16 01:09:48 +0900 626) help
dc186ad741c12 (Thomas Gleixner 2009-11-16 01:09:48 +0900 627) If you say Y here, additional code will be inserted into the
dc186ad741c12 (Thomas Gleixner 2009-11-16 01:09:48 +0900 628) work queue routines to track the life time of work objects and
dc186ad741c12 (Thomas Gleixner 2009-11-16 01:09:48 +0900 629) validate the work operations.
dc186ad741c12 (Thomas Gleixner 2009-11-16 01:09:48 +0900 630)
551d55a944b14 (Mathieu Desnoyers 2010-04-17 08:48:42 -0400 631) config DEBUG_OBJECTS_RCU_HEAD
551d55a944b14 (Mathieu Desnoyers 2010-04-17 08:48:42 -0400 632) bool "Debug RCU callbacks objects"
fc2ecf7ec76c5 (Mathieu Desnoyers 2011-02-23 09:42:14 -0800 633) depends on DEBUG_OBJECTS
551d55a944b14 (Mathieu Desnoyers 2010-04-17 08:48:42 -0400 634) help
551d55a944b14 (Mathieu Desnoyers 2010-04-17 08:48:42 -0400 635) Enable this to turn on debugging of RCU list heads (call_rcu() usage).
551d55a944b14 (Mathieu Desnoyers 2010-04-17 08:48:42 -0400 636)
e2852ae825dba (Tejun Heo 2010-10-26 14:23:05 -0700 637) config DEBUG_OBJECTS_PERCPU_COUNTER
e2852ae825dba (Tejun Heo 2010-10-26 14:23:05 -0700 638) bool "Debug percpu counter objects"
e2852ae825dba (Tejun Heo 2010-10-26 14:23:05 -0700 639) depends on DEBUG_OBJECTS
e2852ae825dba (Tejun Heo 2010-10-26 14:23:05 -0700 640) help
e2852ae825dba (Tejun Heo 2010-10-26 14:23:05 -0700 641) If you say Y here, additional code will be inserted into the
e2852ae825dba (Tejun Heo 2010-10-26 14:23:05 -0700 642) percpu counter routines to track the life time of percpu counter
e2852ae825dba (Tejun Heo 2010-10-26 14:23:05 -0700 643) objects and validate the percpu counter operations.
e2852ae825dba (Tejun Heo 2010-10-26 14:23:05 -0700 644)
3ae7020543db0 (Ingo Molnar 2008-11-26 10:02:00 +0100 645) config DEBUG_OBJECTS_ENABLE_DEFAULT
3ae7020543db0 (Ingo Molnar 2008-11-26 10:02:00 +0100 646) int "debug_objects bootup default value (0-1)"
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 647) range 0 1
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 648) default "1"
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 649) depends on DEBUG_OBJECTS
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 650) help
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 651) Debug objects boot parameter default value
3ae7020543db0 (Ingo Molnar 2008-11-26 10:02:00 +0100 652)
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 653) config DEBUG_SLAB
4a2f0acf0f951 (Andrew Morton 2006-03-25 03:07:22 -0800 654) bool "Debug slab memory allocations"
4675ff05de2d7 (Levin, Alexander (Sasha Levin) 2017-11-15 17:36:02 -0800 655) depends on DEBUG_KERNEL && SLAB
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 656) help
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 657) Say Y here to have the kernel do limited verification on memory
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 658) allocation as well as poisoning memory on free to catch use of freed
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 659) memory. This can make kmalloc/kfree-intensive workloads much slower.
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 660)
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 661) config SLUB_DEBUG_ON
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 662) bool "SLUB debugging on by default"
4675ff05de2d7 (Levin, Alexander (Sasha Levin) 2017-11-15 17:36:02 -0800 663) depends on SLUB && SLUB_DEBUG
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 664) default n
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 665) help
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 666) Boot with debugging on by default. SLUB boots by default with
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 667) the runtime debug capabilities switched off. Enabling this is
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 668) equivalent to specifying the "slub_debug" parameter on boot.
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 669) There is no support for more fine grained debug control like
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 670) possible with slub_debug=xxx. SLUB debugging may be switched
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 671) off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 672) "slub_debug=-".
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 673)
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 674) config SLUB_STATS
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 675) default n
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 676) bool "Enable SLUB performance statistics"
ab4d5ed5eeda4 (Christoph Lameter 2010-10-05 13:57:26 -0500 677) depends on SLUB && SYSFS
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 678) help
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 679) SLUB statistics are useful to debug SLUBs allocation behavior in
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 680) order find ways to optimize the allocator. This should never be
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 681) enabled for production use since keeping statistics slows down
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 682) the allocator by a few percentage points. The slabinfo command
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 683) supports the determination of the most active slabs to figure
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 684) out which slabs are relevant to a particular load.
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 685) Try running: slabinfo -DA
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 686)
b69ec42b1b194 (Catalin Marinas 2012-10-08 16:28:11 -0700 687) config HAVE_DEBUG_KMEMLEAK
b69ec42b1b194 (Catalin Marinas 2012-10-08 16:28:11 -0700 688) bool
b69ec42b1b194 (Catalin Marinas 2012-10-08 16:28:11 -0700 689)
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 690) config DEBUG_KMEMLEAK
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 691) bool "Kernel memory leak detector"
525c1f9204928 (Kees Cook 2013-01-16 18:54:16 -0800 692) depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
79e0d9bd262bd (Catalin Marinas 2011-04-27 17:06:19 +0100 693) select DEBUG_FS
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 694) select STACKTRACE if STACKTRACE_SUPPORT
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 695) select KALLSYMS
b60e26a2f03d9 (Randy Dunlap 2009-11-06 15:33:45 -0800 696) select CRC32
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 697) help
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 698) Say Y here if you want to enable the memory leak
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 699) detector. The memory allocation/freeing is traced in a way
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 700) similar to the Boehm's conservative garbage collector, the
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 701) difference being that the orphan objects are not freed but
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 702) only shown in /sys/kernel/debug/kmemleak. Enabling this
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 703) feature will introduce an overhead to memory
700199b0c192c (Andreas Platschek 2016-12-14 15:05:40 -0800 704) allocations. See Documentation/dev-tools/kmemleak.rst for more
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 705) details.
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 706)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 707) Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 708) of finding leaks due to the slab objects poisoning.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 709)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 710) In order to access the kmemleak file, debugfs needs to be
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 711) mounted (usually at /sys/kernel/debug).
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 712)
c5665868183fe (Catalin Marinas 2019-09-23 15:34:05 -0700 713) config DEBUG_KMEMLEAK_MEM_POOL_SIZE
c5665868183fe (Catalin Marinas 2019-09-23 15:34:05 -0700 714) int "Kmemleak memory pool size"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 715) depends on DEBUG_KMEMLEAK
c59180ae3e5b4 (Qian Cai 2019-09-23 15:34:10 -0700 716) range 200 1000000
b751c52bb587a (Nicolas Boichat 2019-09-23 15:33:55 -0700 717) default 16000
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 718) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 719) Kmemleak must track all the memory allocations to avoid
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 720) reporting false positives. Since memory may be allocated or
c5665868183fe (Catalin Marinas 2019-09-23 15:34:05 -0700 721) freed before kmemleak is fully initialised, use a static pool
c5665868183fe (Catalin Marinas 2019-09-23 15:34:05 -0700 722) of metadata objects to track such callbacks. After kmemleak is
c5665868183fe (Catalin Marinas 2019-09-23 15:34:05 -0700 723) fully initialised, this memory pool acts as an emergency one
c5665868183fe (Catalin Marinas 2019-09-23 15:34:05 -0700 724) if slab allocations fail.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 725)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 726) config DEBUG_KMEMLEAK_TEST
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 727) tristate "Simple test for the kernel memory leak detector"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 728) depends on DEBUG_KMEMLEAK && m
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 729) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 730) This option enables a module that explicitly leaks memory.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 731)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 732) If unsure, say N.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 733)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 734) config DEBUG_KMEMLEAK_DEFAULT_OFF
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 735) bool "Default kmemleak to off"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 736) depends on DEBUG_KMEMLEAK
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 737) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 738) Say Y here to disable kmemleak by default. It can then be enabled
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 739) on the command line via kmemleak=on.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 740)
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 741) config DEBUG_KMEMLEAK_AUTO_SCAN
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 742) bool "Enable kmemleak auto scan thread on boot up"
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 743) default y
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 744) depends on DEBUG_KMEMLEAK
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 745) help
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 746) Depending on the cpu, kmemleak scan may be cpu intensive and can
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 747) stall user tasks at times. This option enables/disables automatic
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 748) kmemleak scan at boot up.
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 749)
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 750) Say N here to disable kmemleak auto scan thread to stop automatic
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 751) scanning. Disabling this option disables automatic reporting of
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 752) memory leaks.
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 753)
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 754) If unsure, say Y.
d53ce042277a9 (Sri Krishna chowdary 2018-12-28 00:38:54 -0800 755)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 756) config DEBUG_STACK_USAGE
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 757) bool "Stack utilization instrumentation"
6c31da3464b4d (Helge Deller 2016-03-19 17:54:10 +0100 758) depends on DEBUG_KERNEL && !IA64
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 759) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 760) Enables the display of the minimum amount of free stack which each
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 761) task has ever had available in the sysrq-T and sysrq-P debug output.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 762)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 763) This option will slow down process creation somewhat.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 764)
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 765) config SCHED_STACK_END_CHECK
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 766) bool "Detect stack corruption on calls to schedule()"
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 767) depends on DEBUG_KERNEL
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 768) default n
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 769) help
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 770) This option checks for a stack overrun on calls to schedule().
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 771) If the stack end location is found to be over written always panic as
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 772) the content of the corrupted region can no longer be trusted.
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 773) This is to ensure no erroneous behaviour occurs which could result in
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 774) data corruption or a sporadic crash at a later stage once the region
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 775) is examined. The runtime overhead introduced is minimal.
dc9b96387ec9b (Changbin Du 2019-12-06 17:03:57 -0800 776)
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 777) config ARCH_HAS_DEBUG_VM_PGTABLE
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 778) bool
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 779) help
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 780) An architecture should select this when it can successfully
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 781) build and run DEBUG_VM_PGTABLE.
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 782)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 783) config DEBUG_VM
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 784) bool "Debug VM"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 785) depends on DEBUG_KERNEL
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 786) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 787) Enable this to turn on extended checks in the virtual-memory system
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 788) that may impact performance.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 789)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 790) If unsure, say N.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 791)
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 792) config DEBUG_VM_VMACACHE
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 793) bool "Debug VMA caching"
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 794) depends on DEBUG_VM
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 795) help
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 796) Enable this to turn on VMA caching debug information. Doing so
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 797) can cause significant overhead, so only enable it in non-production
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 798) environments.
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 799)
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 800) If unsure, say N.
4f115147ff802 (Davidlohr Bueso 2014-06-04 16:06:46 -0700 801)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 802) config DEBUG_VM_RB
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 803) bool "Debug VM red-black trees"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 804) depends on DEBUG_VM
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 805) help
a663dad65f3f4 (Davidlohr Bueso 2014-04-18 15:07:22 -0700 806) Enable VM red-black tree debugging information and extra validations.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 807)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 808) If unsure, say N.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 809)
95ad97554ac81 (Kirill A. Shutemov 2016-01-15 16:51:21 -0800 810) config DEBUG_VM_PGFLAGS
95ad97554ac81 (Kirill A. Shutemov 2016-01-15 16:51:21 -0800 811) bool "Debug page-flags operations"
95ad97554ac81 (Kirill A. Shutemov 2016-01-15 16:51:21 -0800 812) depends on DEBUG_VM
95ad97554ac81 (Kirill A. Shutemov 2016-01-15 16:51:21 -0800 813) help
95ad97554ac81 (Kirill A. Shutemov 2016-01-15 16:51:21 -0800 814) Enables extra validation on page flags operations.
95ad97554ac81 (Kirill A. Shutemov 2016-01-15 16:51:21 -0800 815)
95ad97554ac81 (Kirill A. Shutemov 2016-01-15 16:51:21 -0800 816) If unsure, say N.
95ad97554ac81 (Kirill A. Shutemov 2016-01-15 16:51:21 -0800 817)
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 818) config DEBUG_VM_PGTABLE
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 819) bool "Debug arch page table for semantics compliance"
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 820) depends on MMU
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 821) depends on ARCH_HAS_DEBUG_VM_PGTABLE
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 822) default y if DEBUG_VM
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 823) help
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 824) This option provides a debug method which can be used to test
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 825) architecture page table helper functions on various platforms in
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 826) verifying if they comply with expected generic MM semantics. This
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 827) will help architecture code in making sure that any changes or
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 828) new additions of these helpers still conform to expected
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 829) semantics of the generic MM. Platforms will have to opt in for
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 830) this through ARCH_HAS_DEBUG_VM_PGTABLE.
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 831)
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 832) If unsure, say N.
399145f9eb6c6 (Anshuman Khandual 2020-06-04 16:47:15 -0700 833)
fa5b6ec9e5274 (Laura Abbott 2017-01-10 13:35:40 -0800 834) config ARCH_HAS_DEBUG_VIRTUAL
fa5b6ec9e5274 (Laura Abbott 2017-01-10 13:35:40 -0800 835) bool
fa5b6ec9e5274 (Laura Abbott 2017-01-10 13:35:40 -0800 836)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 837) config DEBUG_VIRTUAL
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 838) bool "Debug VM translations"
fa5b6ec9e5274 (Laura Abbott 2017-01-10 13:35:40 -0800 839) depends on DEBUG_KERNEL && ARCH_HAS_DEBUG_VIRTUAL
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 840) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 841) Enable some costly sanity checks in virtual to page code. This can
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 842) catch mistakes with virt_to_page() and friends.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 843)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 844) If unsure, say N.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 845)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 846) config DEBUG_NOMMU_REGIONS
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 847) bool "Debug the global anon/private NOMMU mapping region tree"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 848) depends on DEBUG_KERNEL && !MMU
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 849) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 850) This option causes the global tree of anonymous and private mapping
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 851) regions to be regularly checked for invalid topology.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 852)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 853) config DEBUG_MEMORY_INIT
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 854) bool "Debug memory initialisation" if EXPERT
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 855) default !EXPERT
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 856) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 857) Enable this for additional checks during memory initialisation.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 858) The sanity checks verify aspects of the VM such as the memory model
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 859) and other information provided by the architecture. Verbose
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 860) information will be printed at KERN_DEBUG loglevel depending
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 861) on the mminit_loglevel= command-line option.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 862)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 863) If unsure, say Y
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 864)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 865) config MEMORY_NOTIFIER_ERROR_INJECT
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 866) tristate "Memory hotplug notifier error injection module"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 867) depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 868) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 869) This option provides the ability to inject artificial errors to
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 870) memory hotplug notifier chain callbacks. It is controlled through
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 871) debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 872)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 873) If the notifier call chain should be failed with some events
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 874) notified, write the error code to "actions/<notifier event>/error".
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 875)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 876) Example: Inject memory hotplug offline error (-12 == -ENOMEM)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 877)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 878) # cd /sys/kernel/debug/notifier-error-inject/memory
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 879) # echo -12 > actions/MEM_GOING_OFFLINE/error
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 880) # echo offline > /sys/devices/system/memory/memoryXXX/state
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 881) bash: echo: write error: Cannot allocate memory
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 882)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 883) To compile this code as a module, choose M here: the module will
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 884) be called memory-notifier-error-inject.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 885)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 886) If unsure, say N.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 887)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 888) config DEBUG_PER_CPU_MAPS
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 889) bool "Debug access to per_cpu maps"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 890) depends on DEBUG_KERNEL
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 891) depends on SMP
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 892) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 893) Say Y to verify that the per_cpu map being accessed has
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 894) been set up. This adds a fair amount of code to kernel memory
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 895) and decreases performance.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 896)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 897) Say N if unsure.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 898)
6e799cb69a70e (Thomas Gleixner 2020-11-18 20:48:39 +0100 899) config DEBUG_KMAP_LOCAL
6e799cb69a70e (Thomas Gleixner 2020-11-18 20:48:39 +0100 900) bool "Debug kmap_local temporary mappings"
6e799cb69a70e (Thomas Gleixner 2020-11-18 20:48:39 +0100 901) depends on DEBUG_KERNEL && KMAP_LOCAL
6e799cb69a70e (Thomas Gleixner 2020-11-18 20:48:39 +0100 902) help
6e799cb69a70e (Thomas Gleixner 2020-11-18 20:48:39 +0100 903) This option enables additional error checking for the kmap_local
6e799cb69a70e (Thomas Gleixner 2020-11-18 20:48:39 +0100 904) infrastructure. Disable for production use.
6e799cb69a70e (Thomas Gleixner 2020-11-18 20:48:39 +0100 905)
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 906) config ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 907) bool
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 908)
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 909) config DEBUG_KMAP_LOCAL_FORCE_MAP
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 910) bool "Enforce kmap_local temporary mappings"
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 911) depends on DEBUG_KERNEL && ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 912) select KMAP_LOCAL
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 913) select DEBUG_KMAP_LOCAL
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 914) help
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 915) This option enforces temporary mappings through the kmap_local
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 916) mechanism for non-highmem pages and on non-highmem systems.
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 917) Disable this for production systems!
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 918)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 919) config DEBUG_HIGHMEM
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 920) bool "Highmem debugging"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 921) depends on DEBUG_KERNEL && HIGHMEM
0e91a0c6984c8 (Thomas Gleixner 2020-11-18 20:48:40 +0100 922) select DEBUG_KMAP_LOCAL_FORCE_MAP if ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP
6e799cb69a70e (Thomas Gleixner 2020-11-18 20:48:39 +0100 923) select DEBUG_KMAP_LOCAL
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 924) help
b1357c9f6d911 (Geert Uytterhoeven 2014-04-14 18:55:50 +0200 925) This option enables additional error checking for high memory
b1357c9f6d911 (Geert Uytterhoeven 2014-04-14 18:55:50 +0200 926) systems. Disable for production systems.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 927)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 928) config HAVE_DEBUG_STACKOVERFLOW
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 929) bool
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 930)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 931) config DEBUG_STACKOVERFLOW
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 932) bool "Check for stack overflows"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 933) depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW
a7f7f6248d974 (Masahiro Yamada 2020-06-14 01:50:22 +0900 934) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 935) Say Y here if you want to check for overflows of kernel, IRQ
edb0ec0725bb9 (Borislav Petkov 2015-01-25 19:50:34 +0100 936) and exception stacks (if your architecture uses them). This
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 937) option will show detailed messages if free stack space drops
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 938) below a certain limit.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 939)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 940) These kinds of bugs usually occur when call-chains in the
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 941) kernel get too deep, especially when interrupts are
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 942) involved.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 943)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 944) Use this in cases where you see apparently random memory
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 945) corruption, especially if it appears in 'struct thread_info'
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 946)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 947) If in doubt, say "N".
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 948)
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 949) source "lib/Kconfig.kasan"
0ce20dd840897 (Alexander Potapenko 2021-02-25 17:18:53 -0800 950) source "lib/Kconfig.kfence"
0b24becc810dc (Andrey Ryabinin 2015-02-13 14:39:17 -0800 951)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 952) endmenu # "Memory Debugging"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 953)
a304e1b828089 (David Woodhouse 2007-02-12 00:52:00 -0800 954) config DEBUG_SHIRQ
a304e1b828089 (David Woodhouse 2007-02-12 00:52:00 -0800 955) bool "Debug shared IRQ handlers"
0244ad004a54e (Martin Schwidefsky 2013-08-30 09:39:53 +0200 956) depends on DEBUG_KERNEL
a304e1b828089 (David Woodhouse 2007-02-12 00:52:00 -0800 957) help
0a2fae2aea4a2 (Wolfram Sang 2020-07-03 00:20:24 +0200 958) Enable this to generate a spurious interrupt just before a shared
0a2fae2aea4a2 (Wolfram Sang 2020-07-03 00:20:24 +0200 959) interrupt handler is deregistered (generating one when registering
0a2fae2aea4a2 (Wolfram Sang 2020-07-03 00:20:24 +0200 960) is currently disabled). Drivers need to handle this correctly. Some
0a2fae2aea4a2 (Wolfram Sang 2020-07-03 00:20:24 +0200 961) don't and need to be caught.
a304e1b828089 (David Woodhouse 2007-02-12 00:52:00 -0800 962)
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 963) menu "Debug Oops, Lockups and Hangs"
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 964)
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 965) config PANIC_ON_OOPS
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 966) bool "Panic on Oops"
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 967) help
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 968) Say Y here to enable the kernel to panic when it oopses. This
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 969) has the same effect as setting oops=panic on the kernel command
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 970) line.
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 971)
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 972) This feature is useful to ensure that the kernel does not do
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 973) anything erroneous after an oops which could result in data
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 974) corruption or other issues.
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 975)
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 976) Say N if unsure.
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 977)
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 978) config PANIC_ON_OOPS_VALUE
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 979) int
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 980) range 0 1
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 981) default 0 if !PANIC_ON_OOPS
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 982) default 1 if PANIC_ON_OOPS
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 983)
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 984) config PANIC_TIMEOUT
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 985) int "panic timeout"
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 986) default 0
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 987) help
9d5b134f9f51d (Tiezhu Yang 2020-08-11 18:36:49 -0700 988) Set the timeout value (in seconds) until a reboot occurs when
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 989) the kernel panics. If n = 0, then we wait forever. A timeout
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 990) value n > 0 will wait n seconds before rebooting, while a timeout
f43a289df6715 (Changbin Du 2019-12-06 17:03:54 -0800 991) value n < 0 will reboot immediately.
92aef8fbabb4c (Dave Hansen 2013-07-01 13:04:50 -0700 992)
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 993) config LOCKUP_DETECTOR
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 994) bool
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 995)
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 996) config SOFTLOCKUP_DETECTOR
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 997) bool "Detect Soft Lockups"
dea20a3fbdd08 (Heiko Carstens 2006-10-11 01:20:44 -0700 998) depends on DEBUG_KERNEL && !S390
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 999) select LOCKUP_DETECTOR
8446f1d391f3d (Ingo Molnar 2005-09-06 15:16:27 -0700 1000) help
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 1001) Say Y here to enable the kernel to act as a watchdog to detect
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1002) soft lockups.
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 1003)
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 1004) Softlockups are bugs that cause the kernel to loop in kernel
5f329089431aa (Fernando Luis Vázquez Cao 2012-02-09 17:42:21 -0500 1005) mode for more than 20 seconds, without giving other tasks a
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 1006) chance to run. The current stack trace is displayed upon
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 1007) detection and the system will stay locked up.
8446f1d391f3d (Ingo Molnar 2005-09-06 15:16:27 -0700 1008)
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1009) config BOOTPARAM_SOFTLOCKUP_PANIC
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1010) bool "Panic (Reboot) On Soft Lockups"
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1011) depends on SOFTLOCKUP_DETECTOR
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1012) help
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1013) Say Y here to enable the kernel to panic on "soft lockups",
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1014) which are bugs that cause the kernel to loop in kernel
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1015) mode for more than 20 seconds (configurable using the watchdog_thresh
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1016) sysctl), without giving other tasks a chance to run.
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1017)
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1018) The panic can be used in combination with panic_timeout,
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1019) to cause the system to reboot automatically after a
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1020) lockup has been detected. This feature is useful for
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1021) high-availability systems that have uptime guarantees and
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1022) where a lockup must be resolved ASAP.
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1023)
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1024) Say N if unsure.
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1025)
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1026) config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1027) int
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1028) depends on SOFTLOCKUP_DETECTOR
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1029) range 0 1
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1030) default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1031) default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
5f00ae0d3ef8d (Randy Dunlap 2018-04-10 16:32:51 -0700 1032)
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1033) config HARDLOCKUP_DETECTOR_PERF
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1034) bool
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1035) select SOFTLOCKUP_DETECTOR
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1036)
7edaeb6841dfb (Thomas Gleixner 2017-08-15 09:50:13 +0200 1037) #
7edaeb6841dfb (Thomas Gleixner 2017-08-15 09:50:13 +0200 1038) # Enables a timestamp based low pass filter to compensate for perf based
7edaeb6841dfb (Thomas Gleixner 2017-08-15 09:50:13 +0200 1039) # hard lockup detection which runs too fast due to turbo modes.
7edaeb6841dfb (Thomas Gleixner 2017-08-15 09:50:13 +0200 1040) #
7edaeb6841dfb (Thomas Gleixner 2017-08-15 09:50:13 +0200 1041) config HARDLOCKUP_CHECK_TIMESTAMP
7edaeb6841dfb (Thomas Gleixner 2017-08-15 09:50:13 +0200 1042) bool
7edaeb6841dfb (Thomas Gleixner 2017-08-15 09:50:13 +0200 1043)
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1044) #
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1045) # arch/ can define HAVE_HARDLOCKUP_DETECTOR_ARCH to provide their own hard
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1046) # lockup detector rather than the perf based detector.
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1047) #
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1048) config HARDLOCKUP_DETECTOR
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1049) bool "Detect Hard Lockups"
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1050) depends on DEBUG_KERNEL && !S390
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1051) depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_ARCH
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1052) select LOCKUP_DETECTOR
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1053) select HARDLOCKUP_DETECTOR_PERF if HAVE_HARDLOCKUP_DETECTOR_PERF
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1054) select HARDLOCKUP_DETECTOR_ARCH if HAVE_HARDLOCKUP_DETECTOR_ARCH
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1055) help
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1056) Say Y here to enable the kernel to act as a watchdog to detect
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1057) hard lockups.
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1058)
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 1059) Hardlockups are bugs that cause the CPU to loop in kernel mode
5f329089431aa (Fernando Luis Vázquez Cao 2012-02-09 17:42:21 -0500 1060) for more than 10 seconds, without letting other interrupts have a
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 1061) chance to run. The current stack trace is displayed upon detection
58687acba5926 (Don Zickus 2010-05-07 17:11:44 -0400 1062) and the system will stay locked up.
8446f1d391f3d (Ingo Molnar 2005-09-06 15:16:27 -0700 1063)
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1064) config BOOTPARAM_HARDLOCKUP_PANIC
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1065) bool "Panic (Reboot) On Hard Lockups"
8f1f66ed7e1bd (Jan Beulich 2012-10-04 17:13:17 -0700 1066) depends on HARDLOCKUP_DETECTOR
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1067) help
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1068) Say Y here to enable the kernel to panic on "hard lockups",
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1069) which are bugs that cause the kernel to loop in kernel
5f329089431aa (Fernando Luis Vázquez Cao 2012-02-09 17:42:21 -0500 1070) mode with interrupts disabled for more than 10 seconds (configurable
5f329089431aa (Fernando Luis Vázquez Cao 2012-02-09 17:42:21 -0500 1071) using the watchdog_thresh sysctl).
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1072)
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1073) Say N if unsure.
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1074)
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1075) config BOOTPARAM_HARDLOCKUP_PANIC_VALUE
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1076) int
8f1f66ed7e1bd (Jan Beulich 2012-10-04 17:13:17 -0700 1077) depends on HARDLOCKUP_DETECTOR
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1078) range 0 1
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1079) default 0 if !BOOTPARAM_HARDLOCKUP_PANIC
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1080) default 1 if BOOTPARAM_HARDLOCKUP_PANIC
fef2c9bc1b54c (Don Zickus 2011-03-22 16:34:16 -0700 1081)
e162b39a368f0 (Mandeep Singh Baines 2009-01-15 11:08:40 -0800 1082) config DETECT_HUNG_TASK
e162b39a368f0 (Mandeep Singh Baines 2009-01-15 11:08:40 -0800 1083) bool "Detect Hung Tasks"
e162b39a368f0 (Mandeep Singh Baines 2009-01-15 11:08:40 -0800 1084) depends on DEBUG_KERNEL
05a4a95279311 (Nicholas Piggin 2017-07-12 14:35:46 -0700 1085) default SOFTLOCKUP_DETECTOR
e162b39a368f0 (Mandeep Singh Baines 2009-01-15 11:08:40 -0800 1086) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1087) Say Y here to enable the kernel to detect "hung tasks",
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1088) which are bugs that cause the task to be stuck in
96b03ab86d843 (Vivien Didelot 2016-09-22 16:55:13 -0400 1089) uninterruptible "D" state indefinitely.
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1090)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1091) When a hung task is detected, the kernel will print the
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1092) current stack trace (which you should report), but the
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1093) task will stay in uninterruptible state. If lockdep is
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1094) enabled then all held locks will also be reported. This
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1095) feature has negligible overhead.
871751e25d956 (Al Viro 2006-03-25 03:06:39 -0800 1096)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1097) config DEFAULT_HUNG_TASK_TIMEOUT
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1098) int "Default timeout for hung task detection (in seconds)"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1099) depends on DETECT_HUNG_TASK
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1100) default 120
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 1101) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1102) This option controls the default timeout (in seconds) used
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1103) to determine when a task has become non-responsive and should
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1104) be considered hung.
f0630fff54a23 (Christoph Lameter 2007-07-15 23:38:14 -0700 1105)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1106) It can be adjusted at runtime via the kernel.hung_task_timeout_secs
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1107) sysctl or by writing a value to
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1108) /proc/sys/kernel/hung_task_timeout_secs.
8ff12cfc009a2 (Christoph Lameter 2008-02-07 17:47:41 -0800 1109)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1110) A timeout of 0 disables the check. The default is two minutes.
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1111) Keeping the default should be fine in most cases.
b69ec42b1b194 (Catalin Marinas 2012-10-08 16:28:11 -0700 1112)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1113) config BOOTPARAM_HUNG_TASK_PANIC
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1114) bool "Panic (Reboot) On Hung Tasks"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1115) depends on DETECT_HUNG_TASK
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 1116) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1117) Say Y here to enable the kernel to panic on "hung tasks",
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1118) which are bugs that cause the kernel to leave a task stuck
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1119) in uninterruptible "D" state.
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 1120)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1121) The panic can be used in combination with panic_timeout,
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1122) to cause the system to reboot automatically after a
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1123) hung task has been detected. This feature is useful for
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1124) high-availability systems that have uptime guarantees and
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1125) where a hung tasks must be resolved ASAP.
bf96d1e3e7a35 (Catalin Marinas 2009-06-23 14:40:27 +0100 1126)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1127) Say N if unsure.
bf96d1e3e7a35 (Catalin Marinas 2009-06-23 14:40:27 +0100 1128)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1129) config BOOTPARAM_HUNG_TASK_PANIC_VALUE
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1130) int
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1131) depends on DETECT_HUNG_TASK
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1132) range 0 1
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1133) default 0 if !BOOTPARAM_HUNG_TASK_PANIC
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1134) default 1 if BOOTPARAM_HUNG_TASK_PANIC
3bba00d7bdd57 (Catalin Marinas 2009-06-11 13:24:13 +0100 1135)
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1136) config WQ_WATCHDOG
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1137) bool "Detect Workqueue Stalls"
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1138) depends on DEBUG_KERNEL
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1139) help
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1140) Say Y here to enable stall detection on workqueues. If a
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1141) worker pool doesn't make forward progress on a pending work
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1142) item for over a given amount of time, 30s by default, a
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1143) warning message is printed along with dump of workqueue
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1144) state. This can be configured through kernel parameter
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1145) "workqueue.watchdog_thresh" and its sysfs counterpart.
82607adcf9cdf (Tejun Heo 2015-12-08 11:28:04 -0500 1146)
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1147) config TEST_LOCKUP
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1148) tristate "Test module to generate lockups"
63646bc9f95f7 (Tiezhu Yang 2020-08-11 18:34:44 -0700 1149) depends on m
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1150) help
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1151) This builds the "test_lockup" module that helps to make sure
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1152) that watchdogs and lockup detectors are working properly.
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1153)
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1154) Depending on module parameters it could emulate soft or hard
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1155) lockup, "hung task", or locking arbitrary lock for a long time.
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1156) Also it could generate series of lockups with cooling-down periods.
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1157)
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1158) If unsure, say N.
30428ef5d1e8c (Konstantin Khlebnikov 2020-04-06 20:09:47 -0700 1159)
92aef8fbabb4c (Dave Hansen 2013-07-01 13:04:50 -0700 1160) endmenu # "Debug lockups and hangs"
92aef8fbabb4c (Dave Hansen 2013-07-01 13:04:50 -0700 1161)
ebebdd095d7b7 (Changbin Du 2019-12-06 17:04:00 -0800 1162) menu "Scheduler Debugging"
5800dc3cff87c (Jason Baron 2013-11-25 23:23:04 +0000 1163)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1164) config SCHED_DEBUG
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1165) bool "Collect scheduler debugging info"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1166) depends on DEBUG_KERNEL && PROC_FS
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1167) default y
0822ee4ac1ae6 (Catalin Marinas 2009-06-11 13:24:14 +0100 1168) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1169) If you say Y here, the /proc/sched_debug file will be provided
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1170) that can help debug the scheduler. The runtime overhead of this
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1171) option is minimal.
0822ee4ac1ae6 (Catalin Marinas 2009-06-11 13:24:14 +0100 1172)
f6db834799325 (Naveen N Rao 2015-06-25 23:53:37 +0530 1173) config SCHED_INFO
f6db834799325 (Naveen N Rao 2015-06-25 23:53:37 +0530 1174) bool
f6db834799325 (Naveen N Rao 2015-06-25 23:53:37 +0530 1175) default n
f6db834799325 (Naveen N Rao 2015-06-25 23:53:37 +0530 1176)
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1177) config SCHEDSTATS
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1178) bool "Collect scheduler statistics"
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1179) depends on DEBUG_KERNEL && PROC_FS
f6db834799325 (Naveen N Rao 2015-06-25 23:53:37 +0530 1180) select SCHED_INFO
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1181) help
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1182) If you say Y here, additional code will be inserted into the
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1183) scheduler and related routines to collect statistics about
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1184) scheduler behavior and provide them in /proc/schedstat. These
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1185) stats may be useful for both tuning and debugging the scheduler
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1186) If you aren't debugging the scheduler or trying to tune a specific
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1187) application, you can say N to avoid the very slight overhead
0610c8a8a258e (Dave Hansen 2013-07-01 13:04:43 -0700 1188) this adds.
0822ee4ac1ae6 (Catalin Marinas 2009-06-11 13:24:14 +0100 1189)
ebebdd095d7b7 (Changbin Du 2019-12-06 17:04:00 -0800 1190) endmenu
0d9e26329b0c9 (Aaron Tomlin 2014-09-12 14:16:19 +0100 1191)
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1192) config DEBUG_TIMEKEEPING
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1193) bool "Enable extra timekeeping sanity checking"
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1194) help
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1195) This option will enable additional timekeeping sanity checks
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1196) which may be helpful when diagnosing issues where timekeeping
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1197) problems are suspected.
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1198)
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1199) This may include checks in the timekeeping hotpaths, so this
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1200) option may have a (very small) performance impact to some
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1201) workloads.
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1202)
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1203) If unsure, say N.
3c17ad19f0697 (John Stultz 2015-03-11 21:16:32 -0700 1204)
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1205) config DEBUG_PREEMPT
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1206) bool "Debug preemptible kernel"
9f47286924f2f (Sebastian Andrzej Siewior 2019-10-15 21:18:19 +0200 1207) depends on DEBUG_KERNEL && PREEMPTION && TRACE_IRQFLAGS_SUPPORT
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1208) default y
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1209) help
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1210) If you say Y here then the kernel will use a debug variant of the
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1211) commonly used smp_processor_id() function and will print warnings
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1212) if kernel code uses it in a preemption-unsafe way. Also, the kernel
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1213) will detect preemption count underflows.
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1214)
9eade16b4151e (Dave Hansen 2013-07-01 13:04:47 -0700 1215) menu "Lock Debugging (spinlocks, mutexes, etc...)"
9eade16b4151e (Dave Hansen 2013-07-01 13:04:47 -0700 1216)
f07cbebb6daf0 (Waiman Long 2018-03-30 17:27:59 -0400 1217) config LOCK_DEBUGGING_SUPPORT
f07cbebb6daf0 (Waiman Long 2018-03-30 17:27:59 -0400 1218) bool
f07cbebb6daf0 (Waiman Long 2018-03-30 17:27:59 -0400 1219) depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
f07cbebb6daf0 (Waiman Long 2018-03-30 17:27:59 -0400 1220) default y
f07cbebb6daf0 (Waiman Long 2018-03-30 17:27:59 -0400 1221)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1222) config PROVE_LOCKING
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1223) bool "Lock debugging: prove locking correctness"
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1224) depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1225) select LOCKDEP
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1226) select DEBUG_SPINLOCK
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1227) select DEBUG_MUTEXES
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1228) select DEBUG_RT_MUTEXES if RT_MUTEXES
c71fd893f614f (Waiman Long 2019-05-20 16:59:00 -0400 1229) select DEBUG_RWSEMS
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1230) select DEBUG_WW_MUTEX_SLOWPATH
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1231) select DEBUG_LOCK_ALLOC
8fd8ad5c5dfcb (Ahmed S. Darwish 2020-07-20 17:55:13 +0200 1232) select PREEMPT_COUNT if !ARCH_NO_PREEMPT
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1233) select TRACE_IRQFLAGS
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1234) default n
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1235) help
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1236) This feature enables the kernel to prove that all locking
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1237) that occurs in the kernel runtime is mathematically
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1238) correct: that under no circumstance could an arbitrary (and
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1239) not yet triggered) combination of observed locking
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1240) sequences (on an arbitrary number of CPUs, running an
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1241) arbitrary number of tasks and interrupt contexts) cause a
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1242) deadlock.
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1243)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1244) In short, this feature enables the kernel to report locking
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1245) related deadlocks before they actually occur.
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1246)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1247) The proof does not depend on how hard and complex a
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1248) deadlock scenario would be to trigger: how many
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1249) participant CPUs, tasks and irq-contexts would be needed
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1250) for it to trigger. The proof also does not depend on
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1251) timing: if a race and a resulting deadlock is possible
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1252) theoretically (no matter how unlikely the race scenario
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1253) is), it will be proven so and will immediately be
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1254) reported by the kernel (once the event is observed that
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1255) makes the deadlock theoretically possible).
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1256)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1257) If a deadlock is impossible (i.e. the locking rules, as
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1258) observed by the kernel, are mathematically correct), the
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1259) kernel reports nothing.
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1260)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1261) NOTE: this feature can also be enabled for rwlocks, mutexes
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1262) and rwsems - in which case all dependencies between these
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1263) different locking variants are observed and mapped too, and
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1264) the proof of observed correctness is also maintained for an
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1265) arbitrary combination of these separate locking variants.
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1266)
387b14684f944 (Mauro Carvalho Chehab 2019-04-10 08:32:41 -0300 1267) For more details, see Documentation/locking/lockdep-design.rst.
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1268)
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1269) config PROVE_RAW_LOCK_NESTING
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1270) bool "Enable raw_spinlock - spinlock nesting checks"
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1271) depends on PROVE_LOCKING
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1272) default n
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1273) help
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1274) Enable the raw_spinlock vs. spinlock nesting checks which ensure
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1275) that the lock nesting rules for PREEMPT_RT enabled kernels are
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1276) not violated.
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1277)
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1278) NOTE: There are known nesting problems. So if you enable this
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1279) option expect lockdep splats until these problems have been fully
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1280) addressed which is work in progress. This config switch allows to
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1281) identify and analyze these problems. It will be removed and the
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1282) check permanentely enabled once the main issues have been fixed.
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1283)
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1284) If unsure, select N.
de8f5e4f2dc1f (Peter Zijlstra 2020-03-21 12:26:01 +0100 1285)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1286) config LOCK_STAT
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1287) bool "Lock usage statistics"
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1288) depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1289) select LOCKDEP
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1290) select DEBUG_SPINLOCK
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1291) select DEBUG_MUTEXES
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1292) select DEBUG_RT_MUTEXES if RT_MUTEXES
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1293) select DEBUG_LOCK_ALLOC
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1294) default n
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1295) help
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1296) This feature enables tracking lock contention points
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1297)
387b14684f944 (Mauro Carvalho Chehab 2019-04-10 08:32:41 -0300 1298) For more details, see Documentation/locking/lockstat.rst
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1299)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1300) This also enables lock events required by "perf lock",
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1301) subcommand of perf.
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1302) If you want to use "perf lock", you also need to turn on
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1303) CONFIG_EVENT_TRACING.
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1304)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1305) CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1306) (CONFIG_LOCKDEP defines "acquire" and "release" events.)
19193bcad8dce (Waiman Long 2018-03-30 17:28:00 -0400 1307)
e7eebaf6a81b9 (Ingo Molnar 2006-06-27 02:54:55 -0700 1308) config DEBUG_RT_MUTEXES
e7eebaf6a81b9 (Ingo Molnar 2006-06-27 02:54:55 -0700 1309) bool "RT Mutex debugging, deadlock detection"
e7eebaf6a81b9 (Ingo Molnar 2006-06-27 02:54:55 -0700 1310) depends on DEBUG_KERNEL && RT_MUTEXES
e7eebaf6a81b9 (Ingo Molnar 2006-06-27 02:54:55 -0700 1311) help
e7eebaf6a81b9 (Ingo Molnar 2006-06-27 02:54:55 -0700 1312) This allows rt mutex semantics violations and rt mutex related
e7eebaf6a81b9 (Ingo Molnar 2006-06-27 02:54:55 -0700 1313) deadlocks (lockups) to be detected and reported automatically.
e7eebaf6a81b9 (Ingo Molnar 2006-06-27 02:54:55 -0700 1314)
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1315) config DEBUG_SPINLOCK
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1316) bool "Spinlock and rw-lock debugging: basic checks"
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1317) depends on DEBUG_KERNEL
e335e3eb82dad (Raghavendra K T 2012-03-22 15:25:08 +0530 1318) select UNINLINE_SPIN_UNLOCK
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1319) help
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1320) Say Y here and build SMP to catch missing spinlock initialization
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1321) and certain other kinds of spinlock errors commonly made. This is
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1322) best used in conjunction with the NMI watchdog so that spinlock
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1323) deadlocks are also debuggable.
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1324)
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1325) config DEBUG_MUTEXES
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1326) bool "Mutex debugging: basic checks"
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1327) depends on DEBUG_KERNEL
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1328) help
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1329) This feature allows mutex semantics violations to be detected and
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1330) reported.
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1331)
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1332) config DEBUG_WW_MUTEX_SLOWPATH
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1333) bool "Wait/wound mutex debugging: Slowpath testing"
f07cbebb6daf0 (Waiman Long 2018-03-30 17:27:59 -0400 1334) depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1335) select DEBUG_LOCK_ALLOC
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1336) select DEBUG_SPINLOCK
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1337) select DEBUG_MUTEXES
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1338) help
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1339) This feature enables slowpath testing for w/w mutex users by
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1340) injecting additional -EDEADLK wound/backoff cases. Together with
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1341) the full mutex checks enabled with (CONFIG_PROVE_LOCKING) this
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1342) will test all possible w/w mutex interface abuse with the
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1343) exception of simply not acquiring all the required locks.
4d6923733f158 (Rob Clark 2014-08-27 11:19:26 -0400 1344) Note that this feature can introduce significant overhead, so
4d6923733f158 (Rob Clark 2014-08-27 11:19:26 -0400 1345) it really should not be enabled in a production or distro kernel,
4d6923733f158 (Rob Clark 2014-08-27 11:19:26 -0400 1346) even a debug kernel. If you are a driver writer, enable it. If
4d6923733f158 (Rob Clark 2014-08-27 11:19:26 -0400 1347) you are a distro, do not.
2301002769555 (Simona Vetter 2013-06-20 13:31:17 +0200 1348)
5149cbac4235e (Waiman Long 2018-03-30 17:27:58 -0400 1349) config DEBUG_RWSEMS
5149cbac4235e (Waiman Long 2018-03-30 17:27:58 -0400 1350) bool "RW Semaphore debugging: basic checks"
c71fd893f614f (Waiman Long 2019-05-20 16:59:00 -0400 1351) depends on DEBUG_KERNEL
5149cbac4235e (Waiman Long 2018-03-30 17:27:58 -0400 1352) help
c71fd893f614f (Waiman Long 2019-05-20 16:59:00 -0400 1353) This debugging feature allows mismatched rw semaphore locks
c71fd893f614f (Waiman Long 2019-05-20 16:59:00 -0400 1354) and unlocks to be detected and reported.
5149cbac4235e (Waiman Long 2018-03-30 17:27:58 -0400 1355)
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1356) config DEBUG_LOCK_ALLOC
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1357) bool "Lock debugging: detect incorrect freeing of live locks"
f07cbebb6daf0 (Waiman Long 2018-03-30 17:27:59 -0400 1358) depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1359) select DEBUG_SPINLOCK
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1360) select DEBUG_MUTEXES
f5694788ad8da (Peter Zijlstra 2016-09-19 12:15:37 +0200 1361) select DEBUG_RT_MUTEXES if RT_MUTEXES
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1362) select LOCKDEP
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1363) help
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1364) This feature will check whether any held lock (spinlock, rwlock,
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1365) mutex or rwsem) is incorrectly freed by the kernel, via any of the
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1366) memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1367) vfree(), etc.), whether a live lock is incorrectly reinitialized via
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1368) spin_lock_init()/mutex_init()/etc., or whether there is any lock
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1369) held during task exit.
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1370)
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1371) config LOCKDEP
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1372) bool
f07cbebb6daf0 (Waiman Long 2018-03-30 17:27:59 -0400 1373) depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1374) select STACKTRACE
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1375) select KALLSYMS
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1376) select KALLSYMS_ALL
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1377)
395102db441ab (Daniel Jordan 2017-04-10 11:50:52 -0400 1378) config LOCKDEP_SMALL
395102db441ab (Daniel Jordan 2017-04-10 11:50:52 -0400 1379) bool
395102db441ab (Daniel Jordan 2017-04-10 11:50:52 -0400 1380)
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1381) config LOCKDEP_BITS
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1382) int "Bitsize for MAX_LOCKDEP_ENTRIES"
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1383) depends on LOCKDEP && !LOCKDEP_SMALL
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1384) range 10 30
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1385) default 15
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1386) help
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1387) Try increasing this value if you hit "BUG: MAX_LOCKDEP_ENTRIES too low!" message.
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1388)
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1389) config LOCKDEP_CHAINS_BITS
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1390) int "Bitsize for MAX_LOCKDEP_CHAINS"
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1391) depends on LOCKDEP && !LOCKDEP_SMALL
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1392) range 10 30
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1393) default 16
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1394) help
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1395) Try increasing this value if you hit "BUG: MAX_LOCKDEP_CHAINS too low!" message.
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1396)
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1397) config LOCKDEP_STACK_TRACE_BITS
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1398) int "Bitsize for MAX_STACK_TRACE_ENTRIES"
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1399) depends on LOCKDEP && !LOCKDEP_SMALL
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1400) range 10 30
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1401) default 19
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1402) help
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1403) Try increasing this value if you hit "BUG: MAX_STACK_TRACE_ENTRIES too low!" message.
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1404)
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1405) config LOCKDEP_STACK_TRACE_HASH_BITS
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1406) int "Bitsize for STACK_TRACE_HASH_SIZE"
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1407) depends on LOCKDEP && !LOCKDEP_SMALL
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1408) range 10 30
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1409) default 14
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1410) help
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1411) Try increasing this value if you need large MAX_STACK_TRACE_ENTRIES.
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1412)
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1413) config LOCKDEP_CIRCULAR_QUEUE_BITS
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1414) int "Bitsize for elements in circular_queue struct"
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1415) depends on LOCKDEP
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1416) range 10 30
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1417) default 12
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1418) help
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1419) Try increasing this value if you hit "lockdep bfs error:-1" warning due to __cq_enqueue() failure.
5dc33592e9553 (Tetsuo Handa 2021-04-05 20:33:57 +0900 1420)
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1421) config DEBUG_LOCKDEP
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1422) bool "Lock dependency engine debugging"
517e7aa5b022f (Adrian Bunk 2006-07-14 00:24:32 -0700 1423) depends on DEBUG_KERNEL && LOCKDEP
997acaf6b4b59 (Mark Rutland 2021-01-11 15:37:07 +0000 1424) select DEBUG_IRQFLAGS
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1425) help
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1426) If you say Y here, the lock dependency engine will do
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1427) additional runtime checks to debug itself, at the price
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1428) of more runtime overhead.
4d9f34ad366a7 (Ingo Molnar 2006-07-03 00:24:55 -0700 1429)
d902db1eb6038 (Frederic Weisbecker 2011-06-08 19:31:56 +0200 1430) config DEBUG_ATOMIC_SLEEP
d902db1eb6038 (Frederic Weisbecker 2011-06-08 19:31:56 +0200 1431) bool "Sleep inside atomic section checking"
e8f7c70f44f75 (Frederic Weisbecker 2011-06-08 01:51:02 +0200 1432) select PREEMPT_COUNT
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1433) depends on DEBUG_KERNEL
87a4c375995ed (Christoph Hellwig 2018-07-31 13:39:32 +0200 1434) depends on !ARCH_NO_PREEMPT
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1435) help
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1436) If you say Y here, various routines which may sleep will become very
d902db1eb6038 (Frederic Weisbecker 2011-06-08 19:31:56 +0200 1437) noisy if they are called inside atomic sections: when a spinlock is
d902db1eb6038 (Frederic Weisbecker 2011-06-08 19:31:56 +0200 1438) held, inside an rcu read side critical section, inside preempt disabled
d902db1eb6038 (Frederic Weisbecker 2011-06-08 19:31:56 +0200 1439) sections, inside an interrupt, etc...
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1440)
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1441) config DEBUG_LOCKING_API_SELFTESTS
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1442) bool "Locking API boot-time self-tests"
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1443) depends on DEBUG_KERNEL
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1444) help
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1445) Say Y here if you want the kernel to run a short self-test during
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1446) bootup. The self-test checks whether common types of locking bugs
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1447) are detected by debugging mechanisms or not. (if you disable
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1448) lock debugging then those bugs wont be detected of course.)
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1449) The following locking APIs are covered: spinlocks, rwlocks,
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1450) mutexes and rwsems.
cae2ed9aa5734 (Ingo Molnar 2006-07-03 00:24:48 -0700 1451)
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1452) config LOCK_TORTURE_TEST
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1453) tristate "torture tests for locking"
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1454) depends on DEBUG_KERNEL
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1455) select TORTURE_TEST
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1456) help
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1457) This option provides a kernel module that runs torture tests
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1458) on kernel locking primitives. The kernel module may be built
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1459) after the fact on the running kernel to be tested, if desired.
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1460)
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1461) Say Y here if you want kernel locking-primitive torture tests
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1462) to be built into the kernel.
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1463) Say M if you want these torture tests to build as a module.
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1464) Say N if you are unsure.
0af3fe1efa534 (Paul E. McKenney 2014-02-04 15:51:41 -0800 1465)
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1466) config WW_MUTEX_SELFTEST
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1467) tristate "Wait/wound mutex selftests"
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1468) help
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1469) This option provides a kernel module that runs tests on the
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1470) on the struct ww_mutex locking API.
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1471)
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1472) It is recommended to enable DEBUG_WW_MUTEX_SLOWPATH in conjunction
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1473) with this test harness.
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1474)
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1475) Say M if you want these self tests to build as a module.
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1476) Say N if you are unsure.
f2a5fec17395f (Chris Wilson 2016-12-01 11:47:06 +0000 1477)
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1478) config SCF_TORTURE_TEST
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1479) tristate "torture tests for smp_call_function*()"
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1480) depends on DEBUG_KERNEL
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1481) select TORTURE_TEST
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1482) help
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1483) This option provides a kernel module that runs torture tests
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1484) on the smp_call_function() family of primitives. The kernel
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1485) module may be built after the fact on the running kernel to
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1486) be tested, if desired.
e9d338a0b1799 (Paul E. McKenney 2020-06-24 15:59:59 -0700 1487)
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1488) config CSD_LOCK_WAIT_DEBUG
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1489) bool "Debugging for csd_lock_wait(), called from smp_call_function*()"
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1490) depends on DEBUG_KERNEL
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1491) depends on 64BIT
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1492) default n
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1493) help
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1494) This option enables debug prints when CPUs are slow to respond
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1495) to the smp_call_function*() IPI wrappers. These debug prints
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1496) include the IPI handler function currently executing (if any)
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1497) and relevant stack traces.
35feb60474bf4 (Paul E. McKenney 2020-06-30 13:22:54 -0700 1498)
9eade16b4151e (Dave Hansen 2013-07-01 13:04:47 -0700 1499) endmenu # lock debugging
8637c09901049 (Ingo Molnar 2006-07-03 00:24:38 -0700 1500)
9eade16b4151e (Dave Hansen 2013-07-01 13:04:47 -0700 1501) config TRACE_IRQFLAGS
ed00495333ccc (peterz@infradead.org 2020-07-27 14:48:52 +0200 1502) depends on TRACE_IRQFLAGS_SUPPORT
9eade16b4151e (Dave Hansen 2013-07-01 13:04:47 -0700 1503) bool
5ca43f6c3b365 (Stephen Boyd 2011-05-24 17:13:36 -0700 1504) help
9eade16b4151e (Dave Hansen 2013-07-01 13:04:47 -0700 1505) Enables hooks to interrupt enabling and disabling for
9eade16b4151e (Dave Hansen 2013-07-01 13:04:47 -0700 1506) either tracing or lock debugging.
5ca43f6c3b365 (Stephen Boyd 2011-05-24 17:13:36 -0700 1507)
ed00495333ccc (peterz@infradead.org 2020-07-27 14:48:52 +0200 1508) config TRACE_IRQFLAGS_NMI
ed00495333ccc (peterz@infradead.org 2020-07-27 14:48:52 +0200 1509) def_bool y
ed00495333ccc (peterz@infradead.org 2020-07-27 14:48:52 +0200 1510) depends on TRACE_IRQFLAGS
ed00495333ccc (peterz@infradead.org 2020-07-27 14:48:52 +0200 1511) depends on TRACE_IRQFLAGS_NMI_SUPPORT
ed00495333ccc (peterz@infradead.org 2020-07-27 14:48:52 +0200 1512)
997acaf6b4b59 (Mark Rutland 2021-01-11 15:37:07 +0000 1513) config DEBUG_IRQFLAGS
997acaf6b4b59 (Mark Rutland 2021-01-11 15:37:07 +0000 1514) bool "Debug IRQ flag manipulation"
997acaf6b4b59 (Mark Rutland 2021-01-11 15:37:07 +0000 1515) help
997acaf6b4b59 (Mark Rutland 2021-01-11 15:37:07 +0000 1516) Enables checks for potentially unsafe enabling or disabling of
997acaf6b4b59 (Mark Rutland 2021-01-11 15:37:07 +0000 1517) interrupts, such as calling raw_local_irq_restore() when interrupts
997acaf6b4b59 (Mark Rutland 2021-01-11 15:37:07 +0000 1518) are enabled.
997acaf6b4b59 (Mark Rutland 2021-01-11 15:37:07 +0000 1519)
8637c09901049 (Ingo Molnar 2006-07-03 00:24:38 -0700 1520) config STACKTRACE
0c38e1fe0fced (Dave Jones 2014-08-29 15:18:35 -0700 1521) bool "Stack backtrace support"
8637c09901049 (Ingo Molnar 2006-07-03 00:24:38 -0700 1522) depends on STACKTRACE_SUPPORT
0c38e1fe0fced (Dave Jones 2014-08-29 15:18:35 -0700 1523) help
0c38e1fe0fced (Dave Jones 2014-08-29 15:18:35 -0700 1524) This option causes the kernel to create a /proc/pid/stack for
0c38e1fe0fced (Dave Jones 2014-08-29 15:18:35 -0700 1525) every process, showing its current stack trace.
0c38e1fe0fced (Dave Jones 2014-08-29 15:18:35 -0700 1526) It is also used by various kernel debugging features that require
0c38e1fe0fced (Dave Jones 2014-08-29 15:18:35 -0700 1527) stack trace generation.
5ca43f6c3b365 (Stephen Boyd 2011-05-24 17:13:36 -0700 1528)
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1529) config WARN_ALL_UNSEEDED_RANDOM
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1530) bool "Warn for all uses of unseeded randomness"
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1531) default n
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1532) help
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1533) Some parts of the kernel contain bugs relating to their use of
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1534) cryptographically secure random numbers before it's actually possible
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1535) to generate those numbers securely. This setting ensures that these
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1536) flaws don't go unnoticed, by enabling a message, should this ever
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1537) occur. This will allow people with obscure setups to know when things
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1538) are going wrong, so that they might contact developers about fixing
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1539) it.
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1540)
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1541) Unfortunately, on some models of some architectures getting
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1542) a fully seeded CRNG is extremely difficult, and so this can
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1543) result in dmesg getting spammed for a surprisingly long
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1544) time. This is really bad from a security perspective, and
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1545) so architecture maintainers really need to do what they can
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1546) to get the CRNG seeded sooner after the system is booted.
4c5d114ea04d5 (Thibaut Sautereau 2018-09-04 15:46:23 -0700 1547) However, since users cannot do anything actionable to
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1548) address this, by default the kernel will issue only a single
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1549) warning for the first use of unseeded randomness.
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1550)
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1551) Say Y here if you want to receive warnings for all uses of
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1552) unseeded randomness. This will be of use primarily for
4c5d114ea04d5 (Thibaut Sautereau 2018-09-04 15:46:23 -0700 1553) those developers interested in improving the security of
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1554) Linux kernels running on their architecture (or
eecabf567422e (Theodore Ts'o 2017-06-08 04:16:59 -0400 1555) subarchitecture).
d06bfd1989fe9 (Jason A. Donenfeld 2017-06-07 23:06:55 -0400 1556)
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1557) config DEBUG_KOBJECT
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1558) bool "kobject debugging"
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1559) depends on DEBUG_KERNEL
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1560) help
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1561) If you say Y here, some extra kobject debugging messages will be sent
aca52c3983891 (Mike Rapoport 2018-10-30 15:07:44 -0700 1562) to the syslog.
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1563)
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1564) config DEBUG_KOBJECT_RELEASE
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1565) bool "kobject release debugging"
2a999aa0a10f4 (Linus Torvalds 2013-10-29 08:33:36 -0700 1566) depends on DEBUG_OBJECTS_TIMERS
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1567) help
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1568) kobjects are reference counted objects. This means that their
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1569) last reference count put is not predictable, and the kobject can
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1570) live on past the point at which a driver decides to drop it's
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1571) initial reference to the kobject gained on allocation. An
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1572) example of this would be a struct device which has just been
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1573) unregistered.
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1574)
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1575) However, some buggy drivers assume that after such an operation,
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1576) the memory backing the kobject can be immediately freed. This
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1577) goes completely against the principles of a refcounted object.
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1578)
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1579) If you say Y here, the kernel will delay the release of kobjects
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1580) on the last reference count to improve the visibility of this
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1581) kind of kobject release bug.
c817a67ecba7c (Russell King 2013-06-27 15:06:14 +0100 1582)
9b2a60c484715 (Catalin Marinas 2012-10-08 16:28:13 -0700 1583) config HAVE_DEBUG_BUGVERBOSE
9b2a60c484715 (Catalin Marinas 2012-10-08 16:28:13 -0700 1584) bool
9b2a60c484715 (Catalin Marinas 2012-10-08 16:28:13 -0700 1585)
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1586) menu "Debug kernel data structures"
^1da177e4c3f4 (Linus Torvalds 2005-04-16 15:20:36 -0700 1587)
199a9afc3dbe9 (Dave Jones 2006-09-29 01:59:00 -0700 1588) config DEBUG_LIST
199a9afc3dbe9 (Dave Jones 2006-09-29 01:59:00 -0700 1589) bool "Debug linked list manipulation"
4520bcb2ba452 (Arnd Bergmann 2016-08-26 17:42:00 +0200 1590) depends on DEBUG_KERNEL || BUG_ON_DATA_CORRUPTION
199a9afc3dbe9 (Dave Jones 2006-09-29 01:59:00 -0700 1591) help
199a9afc3dbe9 (Dave Jones 2006-09-29 01:59:00 -0700 1592) Enable this to turn on extended checks in the linked-list
199a9afc3dbe9 (Dave Jones 2006-09-29 01:59:00 -0700 1593) walking routines.
199a9afc3dbe9 (Dave Jones 2006-09-29 01:59:00 -0700 1594)
199a9afc3dbe9 (Dave Jones 2006-09-29 01:59:00 -0700 1595) If unsure, say N.
199a9afc3dbe9 (Dave Jones 2006-09-29 01:59:00 -0700 1596)
8e18faeac3e4d (Davidlohr Bueso 2019-05-14 15:42:46 -0700 1597) config DEBUG_PLIST
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1598) bool "Debug priority linked list manipulation"
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1599) depends on DEBUG_KERNEL
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1600) help
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1601) Enable this to turn on extended checks in the priority-ordered
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1602) linked-list (plist) walking routines. This checks the entire
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1603) list multiple times during each manipulation.
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1604)
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1605) If unsure, say N.
b8cfff68ea9cd (Dan Streetman 2014-06-04 16:11:54 -0700 1606)
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1607) config DEBUG_SG
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1608) bool "Debug SG table operations"
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1609) depends on DEBUG_KERNEL
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1610) help
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1611) Enable this to turn on checks on scatter-gather tables. This can
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1612) help find problems with drivers that do not properly initialize
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1613) their sg tables.
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1614)
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1615) If unsure, say N.
d6ec084200c37 (Jens Axboe 2007-10-22 20:01:06 +0200 1616)
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1617) config DEBUG_NOTIFIERS
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1618) bool "Debug notifier call chains"
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1619) depends on DEBUG_KERNEL
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1620) help
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1621) Enable this to turn on sanity checking for notifier call chains.
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1622) This is most useful for kernel developers to make sure that
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1623) modules properly unregister themselves from notifier chains.
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1624) This is a relatively cheap check but if you care about maximum
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1625) performance, say N.
1b2439dbb703a (Arjan van de Ven 2008-08-15 15:29:38 -0700 1626)
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1627) config BUG_ON_DATA_CORRUPTION
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1628) bool "Trigger a BUG when data corruption is detected"
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1629) select DEBUG_LIST
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1630) help
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1631) Select this option if the kernel should BUG when it encounters
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1632) data corruption in kernel memory structures when they get checked
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1633) for validity.
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1634)
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1635) If unsure, say N.
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1636)
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1637) endmenu
3be5cbcde916d (Changbin Du 2019-12-06 17:03:48 -0800 1638)
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1639) config DEBUG_CREDENTIALS
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1640) bool "Debug credential management"
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1641) depends on DEBUG_KERNEL
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1642) help
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1643) Enable this to turn on some debug checking for credential
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1644) management. The additional code keeps track of the number of
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1645) pointers from task_structs to any given cred struct, and checks to
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1646) see that this number never exceeds the usage count of the cred
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1647) struct.
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1648)
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1649) Furthermore, if SELinux is enabled, this also checks that the
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1650) security pointer in the cred struct is never seen to be invalid.
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1651)
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1652) If unsure, say N.
e0e817392b9ac (David Howells 2009-09-02 09:13:40 +0100 1653)
43a0a2a7d725f (Paul E. McKenney 2017-05-17 09:19:44 -0700 1654) source "kernel/rcu/Kconfig.debug"
2f03e3ca74a7f (Dave Hansen 2013-01-07 08:19:23 -0800 1655)
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1656) config DEBUG_WQ_FORCE_RR_CPU
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1657) bool "Force round-robin CPU selection for unbound work items"
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1658) depends on DEBUG_KERNEL
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1659) default n
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1660) help
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1661) Workqueue used to implicitly guarantee that work items queued
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1662) without explicit CPU specified are put on the local CPU. This
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1663) guarantee is no longer true and while local CPU is still
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1664) preferred work items may be put on foreign CPUs. Kernel
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1665) parameter "workqueue.debug_force_rr_cpu" is added to force
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1666) round-robin CPU selection to flush out usages which depend on the
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1667) now broken guarantee. This config option enables the debug
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1668) feature by default. When enabled, memory and cache locality will
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1669) be impacted.
f303fccb82928 (Tejun Heo 2016-02-09 17:59:38 -0500 1670)
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1671) config DEBUG_BLOCK_EXT_DEVT
68d4b3dfcaf24 (Krzysztof Kozlowski 2019-12-06 17:04:08 -0800 1672) bool "Force extended block device numbers and spread them"
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1673) depends on DEBUG_KERNEL
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1674) depends on BLOCK
759f8ca3048f7 (Jens Axboe 2008-08-29 09:06:29 +0200 1675) default n
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1676) help
0e11e342bac31 (Tejun Heo 2008-10-13 10:46:01 +0200 1677) BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
0e11e342bac31 (Tejun Heo 2008-10-13 10:46:01 +0200 1678) SOME DISTRIBUTIONS. DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
0e11e342bac31 (Tejun Heo 2008-10-13 10:46:01 +0200 1679) YOU ARE DOING. Distros, please enable this and fix whatever
0e11e342bac31 (Tejun Heo 2008-10-13 10:46:01 +0200 1680) is broken.
0e11e342bac31 (Tejun Heo 2008-10-13 10:46:01 +0200 1681)
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1682) Conventionally, block device numbers are allocated from
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1683) predetermined contiguous area. However, extended block area
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1684) may introduce non-contiguous block device numbers. This
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1685) option forces most block device numbers to be allocated from
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1686) the extended space and spreads them to discover kernel or
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1687) userland code paths which assume predetermined contiguous
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1688) device number allocation.
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1689)
55dc7db70a73a (Tejun Heo 2008-09-01 13:44:35 +0200 1690) Note that turning on this debug option shuffles all the
55dc7db70a73a (Tejun Heo 2008-09-01 13:44:35 +0200 1691) device numbers for all IDE and SCSI devices including libata
55dc7db70a73a (Tejun Heo 2008-09-01 13:44:35 +0200 1692) ones, so root partition specified using device number
55dc7db70a73a (Tejun Heo 2008-09-01 13:44:35 +0200 1693) directly (via rdev or root=MAJ:MIN) won't work anymore.
55dc7db70a73a (Tejun Heo 2008-09-01 13:44:35 +0200 1694) Textual device names (root=/dev/sdXn) will continue to work.
55dc7db70a73a (Tejun Heo 2008-09-01 13:44:35 +0200 1695)
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1696) Say N if you are unsure.
870d6656126ad (Tejun Heo 2008-08-25 19:47:25 +0900 1697)
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1698) config CPU_HOTPLUG_STATE_CONTROL
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1699) bool "Enable CPU hotplug state control"
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1700) depends on DEBUG_KERNEL
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1701) depends on HOTPLUG_CPU
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1702) default n
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1703) help
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1704) Allows to write steps between "offline" and "online" to the CPUs
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1705) sysfs target file so states can be stepped granular. This is a debug
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1706) option for now as the hotplug machinery cannot be stopped and
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1707) restarted at arbitrary points yet.
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1708)
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1709) Say N if your are unsure.
757c989b9994f (Thomas Gleixner 2016-02-26 18:43:32 +0000 1710)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1711) config LATENCYTOP
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1712) bool "Latency measuring infrastructure"
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1713) depends on DEBUG_KERNEL
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1714) depends on STACKTRACE_SUPPORT
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1715) depends on PROC_FS
7d37cb2c912dc (Julian Braha 2021-04-09 13:27:47 -0700 1716) depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1717) select KALLSYMS
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1718) select KALLSYMS_ALL
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1719) select STACKTRACE
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1720) select SCHEDSTATS
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1721) help
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1722) Enable this option if you want to use the LatencyTOP tool
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1723) to find out which userspace is blocking on what kernel operations.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1724)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1725) source "kernel/trace/Kconfig"
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1726)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1727) config PROVIDE_OHCI1394_DMA_INIT
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1728) bool "Remote debugging over FireWire early on boot"
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1729) depends on PCI && X86
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1730) help
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1731) If you want to debug problems which hang or crash the kernel early
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1732) on boot and the crashing machine has a FireWire port, you can use
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1733) this feature to remotely access the memory of the crashed machine
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1734) over FireWire. This employs remote DMA as part of the OHCI1394
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1735) specification which is now the standard for FireWire controllers.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1736)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1737) With remote DMA, you can monitor the printk buffer remotely using
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1738) firescope and access all memory below 4GB using fireproxy from gdb.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1739) Even controlling a kernel debugger is possible using remote DMA.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1740)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1741) Usage:
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1742)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1743) If ohci1394_dma=early is used as boot parameter, it will initialize
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1744) all OHCI1394 controllers which are found in the PCI config space.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1745)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1746) As all changes to the FireWire bus such as enabling and disabling
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1747) devices cause a bus reset and thereby disable remote DMA for all
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1748) devices, be sure to have the cable plugged and FireWire enabled on
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1749) the debugging host before booting the debug target for debugging.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1750)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1751) This code (~1k) is freed after boot. By then, the firewire stack
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1752) in charge of the OHCI-1394 controllers should be used instead.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1753)
a74e2a226452e (Mauro Carvalho Chehab 2020-05-01 17:37:50 +0200 1754) See Documentation/core-api/debugging-via-ohci1394.rst for more information.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1755)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1756) source "samples/Kconfig"
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1757)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1758) config ARCH_HAS_DEVMEM_IS_ALLOWED
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1759) bool
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1760)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1761) config STRICT_DEVMEM
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1762) bool "Filter access to /dev/mem"
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1763) depends on MMU && DEVMEM
527701eda5f19 (Palmer Dabbelt 2020-07-09 11:43:21 -0700 1764) depends on ARCH_HAS_DEVMEM_IS_ALLOWED || GENERIC_LIB_DEVMEM_IS_ALLOWED
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1765) default y if PPC || X86 || ARM64
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1766) help
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1767) If this option is disabled, you allow userspace (root) access to all
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1768) of memory, including kernel and userspace memory. Accidental
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1769) access to this is obviously disastrous, but specific access can
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1770) be used by people debugging the kernel. Note that with PAT support
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1771) enabled, even in this case there are restrictions on /dev/mem
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1772) use due to the cache aliasing requirements.
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1773)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1774) If this option is switched on, and IO_STRICT_DEVMEM=n, the /dev/mem
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1775) file only allows userspace access to PCI space and the BIOS code and
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1776) data regions. This is sufficient for dosemu and X and all common
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1777) users of /dev/mem.
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1778)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1779) If in doubt, say Y.
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1780)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1781) config IO_STRICT_DEVMEM
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1782) bool "Filter I/O access to /dev/mem"
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1783) depends on STRICT_DEVMEM
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1784) help
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1785) If this option is disabled, you allow userspace (root) access to all
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1786) io-memory regardless of whether a driver is actively using that
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1787) range. Accidental access to this is obviously disastrous, but
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1788) specific access can be used by people debugging kernel drivers.
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1789)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1790) If this option is switched on, the /dev/mem file only allows
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1791) userspace access to *idle* io-memory ranges (see /proc/iomem) This
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1792) may break traditional users of /dev/mem (dosemu, legacy X, etc...)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1793) if the driver using a given range cannot be disabled.
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1794)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1795) If in doubt, say Y.
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1796)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1797) menu "$(SRCARCH) Debugging"
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1798)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1799) source "arch/$(SRCARCH)/Kconfig.debug"
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1800)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1801) endmenu
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1802)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1803) menu "Kernel Testing and Coverage"
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 1804)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1805) source "lib/kunit/Kconfig"
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1806)
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1807) config NOTIFIER_ERROR_INJECTION
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1808) tristate "Notifier error injection"
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1809) depends on DEBUG_KERNEL
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1810) select DEBUG_FS
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1811) help
e41e85cc17fc9 (Masanari Iida 2012-11-30 16:44:39 +0900 1812) This option provides the ability to inject artificial errors to
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1813) specified notifier chain callbacks. It is useful to test the error
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1814) handling of notifier call chain failures.
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1815)
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1816) Say N if unsure.
8d438288145f1 (Akinobu Mita 2012-07-30 14:43:02 -0700 1817)
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1818) config PM_NOTIFIER_ERROR_INJECT
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1819) tristate "PM notifier error injection module"
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1820) depends on PM && NOTIFIER_ERROR_INJECTION
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1821) default m if PM_DEBUG
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1822) help
e41e85cc17fc9 (Masanari Iida 2012-11-30 16:44:39 +0900 1823) This option provides the ability to inject artificial errors to
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1824) PM notifier chain callbacks. It is controlled through debugfs
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1825) interface /sys/kernel/debug/notifier-error-inject/pm
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1826)
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1827) If the notifier call chain should be failed with some events
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1828) notified, write the error code to "actions/<notifier event>/error".
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1829)
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1830) Example: Inject PM suspend error (-12 = -ENOMEM)
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1831)
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1832) # cd /sys/kernel/debug/notifier-error-inject/pm/
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1833) # echo -12 > actions/PM_SUSPEND_PREPARE/error
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1834) # echo mem > /sys/power/state
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1835) bash: echo: write error: Cannot allocate memory
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1836)
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1837) To compile this code as a module, choose M here: the module will
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1838) be called pm-notifier-error-inject.
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1839)
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1840) If unsure, say N.
048b9c3549790 (Akinobu Mita 2012-07-30 14:43:07 -0700 1841)
d526e85f60fce (Benjamin Herrenschmidt 2012-12-14 10:32:52 +1100 1842) config OF_RECONFIG_NOTIFIER_ERROR_INJECT
d526e85f60fce (Benjamin Herrenschmidt 2012-12-14 10:32:52 +1100 1843) tristate "OF reconfig notifier error injection module"
d526e85f60fce (Benjamin Herrenschmidt 2012-12-14 10:32:52 +1100 1844) depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1845) help
e41e85cc17fc9 (Masanari Iida 2012-11-30 16:44:39 +0900 1846) This option provides the ability to inject artificial errors to
d526e85f60fce (Benjamin Herrenschmidt 2012-12-14 10:32:52 +1100 1847) OF reconfig notifier chain callbacks. It is controlled
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1848) through debugfs interface under
d526e85f60fce (Benjamin Herrenschmidt 2012-12-14 10:32:52 +1100 1849) /sys/kernel/debug/notifier-error-inject/OF-reconfig/
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1850)
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1851) If the notifier call chain should be failed with some events
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1852) notified, write the error code to "actions/<notifier event>/error".
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1853)
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1854) To compile this code as a module, choose M here: the module will
e12a95f40ac78 (Akinobu Mita 2013-04-30 15:28:49 -0700 1855) be called of-reconfig-notifier-error-inject.
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1856)
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1857) If unsure, say N.
08dfb4ddeeeeb (Akinobu Mita 2012-07-30 14:43:13 -0700 1858)
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1859) config NETDEV_NOTIFIER_ERROR_INJECT
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1860) tristate "Netdev notifier error injection module"
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1861) depends on NET && NOTIFIER_ERROR_INJECTION
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1862) help
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1863) This option provides the ability to inject artificial errors to
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1864) netdevice notifier chain callbacks. It is controlled through debugfs
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1865) interface /sys/kernel/debug/notifier-error-inject/netdev
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1866)
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1867) If the notifier call chain should be failed with some events
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1868) notified, write the error code to "actions/<notifier event>/error".
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1869)
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1870) Example: Inject netdevice mtu change error (-22 = -EINVAL)
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1871)
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1872) # cd /sys/kernel/debug/notifier-error-inject/netdev
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1873) # echo -22 > actions/NETDEV_CHANGEMTU/error
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1874) # ip link set eth0 mtu 1024
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1875) RTNETLINK answers: Invalid argument
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1876)
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1877) To compile this code as a module, choose M here: the module will
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1878) be called netdev-notifier-error-inject.
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1879)
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1880) If unsure, say N.
02fff96a79775 (Nikolay Aleksandrov 2015-11-28 13:45:28 +0100 1881)
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1882) config FUNCTION_ERROR_INJECTION
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1883) def_bool y
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1884) depends on HAVE_FUNCTION_ERROR_INJECTION && KPROBES
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1885)
6ff1cb355e628 (Akinobu Mita 2006-12-08 02:39:43 -0800 1886) config FAULT_INJECTION
1ab8509a31187 (Andrew Morton 2006-12-08 02:39:49 -0800 1887) bool "Fault-injection framework"
1ab8509a31187 (Andrew Morton 2006-12-08 02:39:49 -0800 1888) depends on DEBUG_KERNEL
329409aeda064 (Akinobu Mita 2006-12-08 02:39:48 -0800 1889) help
329409aeda064 (Akinobu Mita 2006-12-08 02:39:48 -0800 1890) Provide fault-injection framework.
329409aeda064 (Akinobu Mita 2006-12-08 02:39:48 -0800 1891) For more details, see Documentation/fault-injection/.
6ff1cb355e628 (Akinobu Mita 2006-12-08 02:39:43 -0800 1892)
8a8b6502fb669 (Akinobu Mita 2006-12-08 02:39:44 -0800 1893) config FAILSLAB
1ab8509a31187 (Andrew Morton 2006-12-08 02:39:49 -0800 1894) bool "Fault-injection capability for kmalloc"
1ab8509a31187 (Andrew Morton 2006-12-08 02:39:49 -0800 1895) depends on FAULT_INJECTION
773ff60e84146 (Akinobu Mita 2008-12-23 19:37:01 +0900 1896) depends on SLAB || SLUB
8a8b6502fb669 (Akinobu Mita 2006-12-08 02:39:44 -0800 1897) help
1ab8509a31187 (Andrew Morton 2006-12-08 02:39:49 -0800 1898) Provide fault-injection capability for kmalloc.
8a8b6502fb669 (Akinobu Mita 2006-12-08 02:39:44 -0800 1899)
933e312e73f8f (Akinobu Mita 2006-12-08 02:39:45 -0800 1900) config FAIL_PAGE_ALLOC
29b46fa3dc57d (Qiujun Huang 2020-04-06 20:12:49 -0700 1901) bool "Fault-injection capability for alloc_pages()"
1ab8509a31187 (Andrew Morton 2006-12-08 02:39:49 -0800 1902) depends on FAULT_INJECTION
933e312e73f8f (Akinobu Mita 2006-12-08 02:39:45 -0800 1903) help
1ab8509a31187 (Andrew Morton 2006-12-08 02:39:49 -0800 1904) Provide fault-injection capability for alloc_pages().
933e312e73f8f (Akinobu Mita 2006-12-08 02:39:45 -0800 1905)
2c739ced5886c (Albert van der Linde 2020-10-15 20:13:46 -0700 1906) config FAULT_INJECTION_USERCOPY
2c739ced5886c (Albert van der Linde 2020-10-15 20:13:46 -0700 1907) bool "Fault injection capability for usercopy functions"
2c739ced5886c (Albert van der Linde 2020-10-15 20:13:46 -0700 1908) depends on FAULT_INJECTION
2c739ced5886c (Albert van der Linde 2020-10-15 20:13:46 -0700 1909) help
2c739ced5886c (Albert van der Linde 2020-10-15 20:13:46 -0700 1910) Provides fault-injection capability to inject failures
2c739ced5886c (Albert van der Linde 2020-10-15 20:13:46 -0700 1911) in usercopy functions (copy_from_user(), get_user(), ...).
2c739ced5886c (Albert van der Linde 2020-10-15 20:13:46 -0700 1912)
c17bb4951752d (Akinobu Mita 2006-12-08 02:39:46 -0800 1913) config FAIL_MAKE_REQUEST
86327d19f7d91 (Dave Jones 2006-12-12 20:16:36 +0100 1914) bool "Fault-injection capability for disk IO"
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1915) depends on FAULT_INJECTION && BLOCK
c17bb4951752d (Akinobu Mita 2006-12-08 02:39:46 -0800 1916) help
1ab8509a31187 (Andrew Morton 2006-12-08 02:39:49 -0800 1917) Provide fault-injection capability for disk IO.
c17bb4951752d (Akinobu Mita 2006-12-08 02:39:46 -0800 1918)
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1919) config FAIL_IO_TIMEOUT
f4d01439515ac (Takuya Yoshikawa 2010-07-21 16:05:53 +0900 1920) bool "Fault-injection capability for faking disk interrupts"
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1921) depends on FAULT_INJECTION && BLOCK
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1922) help
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1923) Provide fault-injection capability on end IO handling. This
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1924) will make the block layer "forget" an interrupt as configured,
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1925) thus exercising the error handling.
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1926)
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1927) Only works with drivers that use the generic timeout handling,
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1928) for others it wont do anything.
581d4e28d9195 (Jens Axboe 2008-09-14 05:56:33 -0700 1929)
ab51fbab39d86 (Davidlohr Bueso 2015-06-29 23:26:02 -0700 1930) config FAIL_FUTEX
ab51fbab39d86 (Davidlohr Bueso 2015-06-29 23:26:02 -0700 1931) bool "Fault-injection capability for futexes"
ab51fbab39d86 (Davidlohr Bueso 2015-06-29 23:26:02 -0700 1932) select DEBUG_FS
ab51fbab39d86 (Davidlohr Bueso 2015-06-29 23:26:02 -0700 1933) depends on FAULT_INJECTION && FUTEX
ab51fbab39d86 (Davidlohr Bueso 2015-06-29 23:26:02 -0700 1934) help
ab51fbab39d86 (Davidlohr Bueso 2015-06-29 23:26:02 -0700 1935) Provide fault-injection capability for futexes.
ab51fbab39d86 (Davidlohr Bueso 2015-06-29 23:26:02 -0700 1936)
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1937) config FAULT_INJECTION_DEBUG_FS
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1938) bool "Debugfs entries for fault-injection capabilities"
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1939) depends on FAULT_INJECTION && SYSFS && DEBUG_FS
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1940) help
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1941) Enable configuration of fault-injection capabilities via debugfs.
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1942)
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1943) config FAIL_FUNCTION
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1944) bool "Fault-injection capability for functions"
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1945) depends on FAULT_INJECTION_DEBUG_FS && FUNCTION_ERROR_INJECTION
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1946) help
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1947) Provide function-based fault-injection capability.
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1948) This will allow you to override a specific function with a return
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1949) with given return value. As a result, function caller will see
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1950) an error value and have to handle it. This is useful to test the
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1951) error handling in various subsystems.
4b1a29a7f5425 (Masami Hiramatsu 2018-01-13 02:56:03 +0900 1952)
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1953) config FAIL_MMC_REQUEST
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1954) bool "Fault-injection capability for MMC IO"
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1955) depends on FAULT_INJECTION_DEBUG_FS && MMC
6ff1cb355e628 (Akinobu Mita 2006-12-08 02:39:43 -0800 1956) help
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1957) Provide fault-injection capability for MMC IO.
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1958) This will make the mmc core return data errors. This is
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1959) useful to test the error handling in the mmc block device
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1960) and to test how the mmc host driver handles retries from
f1b4bd0676c2b (Mikulas Patocka 2018-06-14 15:27:48 -0700 1961) the block device.
1df49008f4dde (Akinobu Mita 2007-02-20 13:57:56 -0800 1962)
1df49008f4dde (Akinobu Mita 2007-02-20 13:57:56 -0800 1963) config FAULT_INJECTION_STACKTRACE_FILTER
1df49008f4dde (Akinobu Mita 2007-02-20 13:57:56 -0800 1964) bool "stacktrace filter for fault-injection capabilities"
1df49008f4dde (Akinobu Mita 2007-02-20 13:57:56 -0800 1965) depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
6d690dcac92a8 (Akinobu Mita 2007-05-12 10:36:53 -0700 1966) depends on !X86_64
1df49008f4dde (Akinobu Mita 2007-02-20 13:57:56 -0800 1967) select STACKTRACE
7d37cb2c912dc (Julian Braha 2021-04-09 13:27:47 -0700 1968) depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86
1df49008f4dde (Akinobu Mita 2007-02-20 13:57:56 -0800 1969) help
1df49008f4dde (Akinobu Mita 2007-02-20 13:57:56 -0800 1970) Provide stacktrace filter for fault-injection capabilities
267c4025f2e19 (Mathieu Desnoyers 2007-10-18 23:41:07 -0700 1971)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1972) config ARCH_HAS_KCOV
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1973) bool
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 1974) help
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1975) An architecture should select this when it can successfully
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1976) build and run with CONFIG_KCOV. This typically requires
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1977) disabling instrumentation for some early boot code.
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 1978)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1979) config CC_HAS_SANCOV_TRACE_PC
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1980) def_bool $(cc-option,-fsanitize-coverage=trace-pc)
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 1981)
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 1982)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1983) config KCOV
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1984) bool "Code coverage for fuzzing"
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1985) depends on ARCH_HAS_KCOV
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1986) depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1987) select DEBUG_FS
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1988) select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1989) help
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1990) KCOV exposes kernel code coverage information in a form suitable
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1991) for coverage-guided fuzzing (randomized testing).
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 1992)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1993) If RANDOMIZE_BASE is enabled, PC values will not be stable across
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1994) different machines and across reboots. If you need stable PC values,
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1995) disable RANDOMIZE_BASE.
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 1996)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1997) For more details, see Documentation/dev-tools/kcov.rst.
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 1998)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 1999) config KCOV_ENABLE_COMPARISONS
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2000) bool "Enable comparison operands collection by KCOV"
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2001) depends on KCOV
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2002) depends on $(cc-option,-fsanitize-coverage=trace-cmp)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2003) help
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2004) KCOV also exposes operands of every comparison in the instrumented
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2005) code along with operand sizes and PCs of the comparison instructions.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2006) These operands can be used by fuzzing engines to improve the quality
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2007) of fuzzing coverage.
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2008)
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2009) config KCOV_INSTRUMENT_ALL
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2010) bool "Instrument all code by default"
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2011) depends on KCOV
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2012) default y
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2013) help
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2014) If you are doing generic system call fuzzing (like e.g. syzkaller),
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2015) then you will want to instrument the whole kernel and you should
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2016) say y here. If you are doing more targeted fuzzing (like e.g.
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2017) filesystem fuzzing with AFL) then you will want to enable coverage
09a7495258b56 (Changbin Du 2019-12-06 17:03:51 -0800 2018) for more specific subsets of files, and should say n here.
84bc809eecf37 (Brendan Higgins 2019-09-23 02:02:36 -0700 2019)
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2020) config KCOV_IRQ_AREA_SIZE
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2021) hex "Size of interrupt coverage collection area in words"
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2022) depends on KCOV
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2023) default 0x40000
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2024) help
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2025) KCOV uses preallocated per-cpu areas to collect coverage from
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2026) soft interrupts. This specifies the size of those areas in the
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2027) number of unsigned long words.
5ff3b30ab57da (Andrey Konovalov 2020-06-04 16:46:04 -0700 2028)
d3deafaa8b5c1 (Vincent Legoll 2018-02-06 15:38:38 -0800 2029) menuconfig RUNTIME_TESTING_MENU
d3deafaa8b5c1 (Vincent Legoll 2018-02-06 15:38:38 -0800 2030) bool "Runtime Testing"
908009e832b4e (Anders Roxell 2018-02-21 14:46:05 -0800 2031) def_bool y
d3deafaa8b5c1 (Vincent Legoll 2018-02-06 15:38:38 -0800 2032)
d3deafaa8b5c1 (Vincent Legoll 2018-02-06 15:38:38 -0800 2033) if RUNTIME_TESTING_MENU
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2034)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2035) config LKDTM
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2036) tristate "Linux Kernel Dump Test Tool Module"
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2037) depends on DEBUG_FS
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2038) help
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2039) This module enables testing of the different dumping mechanisms by
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2040) inducing system failures at predefined crash points.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2041) If you don't need it: say N
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2042) Choose M here to compile this code as a module. The module will be
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2043) called lkdtm.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2044)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2045) Documentation on how to use the module can be found in
10ffebbed5503 (Mauro Carvalho Chehab 2019-06-12 14:52:44 -0300 2046) Documentation/fault-injection/provoke-crashes.rst
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2047)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2048) config TEST_LIST_SORT
e327fd7c86678 (Geert Uytterhoeven 2017-05-08 15:55:26 -0700 2049) tristate "Linked list sorting test"
e327fd7c86678 (Geert Uytterhoeven 2017-05-08 15:55:26 -0700 2050) depends on DEBUG_KERNEL || m
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2051) help
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2052) Enable this to turn on 'list_sort()' function test. This test is
e327fd7c86678 (Geert Uytterhoeven 2017-05-08 15:55:26 -0700 2053) executed only once during system boot (so affects only boot time),
e327fd7c86678 (Geert Uytterhoeven 2017-05-08 15:55:26 -0700 2054) or at module load time.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2055)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2056) If unsure, say N.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2057)
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2058) config TEST_MIN_HEAP
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2059) tristate "Min heap test"
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2060) depends on DEBUG_KERNEL || m
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2061) help
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2062) Enable this to turn on min heap function tests. This test is
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2063) executed only once during system boot (so affects only boot time),
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2064) or at module load time.
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2065)
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2066) If unsure, say N.
6e24628d78e47 (Ian Rogers 2020-02-13 23:51:29 -0800 2067)
c5adae9583ef6 (Kostenzer Felix 2017-02-24 15:01:07 -0800 2068) config TEST_SORT
5c4e679898eab (Geert Uytterhoeven 2017-05-08 15:55:23 -0700 2069) tristate "Array-based sort test"
5c4e679898eab (Geert Uytterhoeven 2017-05-08 15:55:23 -0700 2070) depends on DEBUG_KERNEL || m
c5adae9583ef6 (Kostenzer Felix 2017-02-24 15:01:07 -0800 2071) help
5c4e679898eab (Geert Uytterhoeven 2017-05-08 15:55:23 -0700 2072) This option enables the self-test function of 'sort()' at boot,
5c4e679898eab (Geert Uytterhoeven 2017-05-08 15:55:23 -0700 2073) or at module load time.
c5adae9583ef6 (Kostenzer Felix 2017-02-24 15:01:07 -0800 2074)
c5adae9583ef6 (Kostenzer Felix 2017-02-24 15:01:07 -0800 2075) If unsure, say N.
c5adae9583ef6 (Kostenzer Felix 2017-02-24 15:01:07 -0800 2076)
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2077) config TEST_DIV64
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2078) tristate "64bit/32bit division and modulo test"
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2079) depends on DEBUG_KERNEL || m
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2080) help
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2081) Enable this to turn on 'do_div()' function test. This test is
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2082) executed only once during system boot (so affects only boot time),
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2083) or at module load time.
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2084)
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2085) If unsure, say N.
5086ea4b0f58b (Maciej W. Rozycki 2021-04-20 04:50:28 +0200 2086)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2087) config KPROBES_SANITY_TEST
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2088) bool "Kprobes sanity tests"
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2089) depends on DEBUG_KERNEL
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2090) depends on KPROBES
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2091) help
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2092) This option provides for testing basic kprobes functionality on
5a6cf77f5e35e (Masami Hiramatsu 2018-06-20 01:05:07 +0900 2093) boot. Samples of kprobe and kretprobe are inserted and
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2094) verified for functionality.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2095)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2096) Say N if you are unsure.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2097)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2098) config BACKTRACE_SELF_TEST
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2099) tristate "Self test for the backtrace code"
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2100) depends on DEBUG_KERNEL
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2101) help
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2102) This option provides a kernel module that can be used to test
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2103) the kernel stack backtrace code. This option is not useful
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2104) for distributions or general kernels, but only for kernel
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2105) developers working on architecture code.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2106)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2107) Note that if you want to also test saved backtraces, you will
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2108) have to enable STACKTRACE as well.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2109)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2110) Say N if you are unsure.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2111)
910a742d4ba86 (Michel Lespinasse 2012-10-08 16:30:39 -0700 2112) config RBTREE_TEST
910a742d4ba86 (Michel Lespinasse 2012-10-08 16:30:39 -0700 2113) tristate "Red-Black tree test"
7c993e11aa59d (Cody P Schafer 2013-09-11 14:25:19 -0700 2114) depends on DEBUG_KERNEL
910a742d4ba86 (Michel Lespinasse 2012-10-08 16:30:39 -0700 2115) help
910a742d4ba86 (Michel Lespinasse 2012-10-08 16:30:39 -0700 2116) A benchmark measuring the performance of the rbtree library.
910a742d4ba86 (Michel Lespinasse 2012-10-08 16:30:39 -0700 2117) Also includes rbtree invariant checks.
910a742d4ba86 (Michel Lespinasse 2012-10-08 16:30:39 -0700 2118)
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2119) config REED_SOLOMON_TEST
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2120) tristate "Reed-Solomon library test"
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2121) depends on DEBUG_KERNEL || m
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2122) select REED_SOLOMON
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2123) select REED_SOLOMON_ENC16
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2124) select REED_SOLOMON_DEC16
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2125) help
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2126) This option enables the self-test function of rslib at boot,
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2127) or at module load time.
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2128)
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2129) If unsure, say N.
4b4f3accd8030 (Ferdinand Blomqvist 2019-06-20 17:10:33 +0300 2130)
fff3fd8a1210a (Michel Lespinasse 2012-10-08 16:31:23 -0700 2131) config INTERVAL_TREE_TEST
fff3fd8a1210a (Michel Lespinasse 2012-10-08 16:31:23 -0700 2132) tristate "Interval tree test"
0f789b6764720 (Davidlohr Bueso 2017-07-10 15:51:43 -0700 2133) depends on DEBUG_KERNEL
a88cc108f6f39 (Chris Wilson 2014-03-17 12:21:54 +0000 2134) select INTERVAL_TREE
fff3fd8a1210a (Michel Lespinasse 2012-10-08 16:31:23 -0700 2135) help
fff3fd8a1210a (Michel Lespinasse 2012-10-08 16:31:23 -0700 2136) A benchmark measuring the performance of the interval tree library
fff3fd8a1210a (Michel Lespinasse 2012-10-08 16:31:23 -0700 2137)
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2138) config PERCPU_TEST
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2139) tristate "Per cpu operations test"
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2140) depends on m && DEBUG_KERNEL
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2141) help
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2142) Enable this option to build test module which validates per-cpu
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2143) operations.
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2144)
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2145) If unsure, say N.
623fd8072c7c4 (Greg Thelen 2013-11-12 15:08:34 -0800 2146)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2147) config ATOMIC64_SELFTEST
55ded9551f9a6 (Geert Uytterhoeven 2017-02-24 15:00:55 -0800 2148) tristate "Perform an atomic64_t self-test"
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2149) help
55ded9551f9a6 (Geert Uytterhoeven 2017-02-24 15:00:55 -0800 2150) Enable this option to test the atomic64_t functions at boot or
55ded9551f9a6 (Geert Uytterhoeven 2017-02-24 15:00:55 -0800 2151) at module load time.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2152)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2153) If unsure, say N.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2154)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2155) config ASYNC_RAID6_TEST
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2156) tristate "Self test for hardware accelerated raid6 recovery"
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2157) depends on ASYNC_RAID6_RECOV
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2158) select ASYNC_MEMCPY
a7f7f6248d974 (Masahiro Yamada 2020-06-14 01:50:22 +0900 2159) help
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2160) This is a one-shot self test that permutes through the
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2161) recovery of all the possible two disk failure scenarios for a
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2162) N-disk array. Recovery is performed with the asynchronous
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2163) raid6 recovery routines, and will optionally use an offload
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2164) engine if one is available.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2165)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2166) If unsure, say N.
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2167)
64d1d77a44697 (Andy Shevchenko 2015-02-12 15:02:21 -0800 2168) config TEST_HEXDUMP
64d1d77a44697 (Andy Shevchenko 2015-02-12 15:02:21 -0800 2169) tristate "Test functions located in the hexdump module at runtime"
64d1d77a44697 (Andy Shevchenko 2015-02-12 15:02:21 -0800 2170)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2171) config TEST_STRING_HELPERS
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2172) tristate "Test functions located in the string_helpers module at runtime"
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2173)
0b0600c8c97ab (Tobin C. Harding 2019-04-05 12:58:59 +1100 2174) config TEST_STRSCPY
0b0600c8c97ab (Tobin C. Harding 2019-04-05 12:58:59 +1100 2175) tristate "Test strscpy*() family of functions at runtime"
0b0600c8c97ab (Tobin C. Harding 2019-04-05 12:58:59 +1100 2176)
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2177) config TEST_KSTRTOX
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2178) tristate "Test kstrto*() family of functions at runtime"
881c5149543a3 (Dave Hansen 2013-07-01 13:04:44 -0700 2179)
707cc7280f452 (Rasmus Villemoes 2015-11-06 16:30:29 -0800 2180) config TEST_PRINTF
707cc7280f452 (Rasmus Villemoes 2015-11-06 16:30:29 -0800 2181) tristate "Test printf() family of functions at runtime"
707cc7280f452 (Rasmus Villemoes 2015-11-06 16:30:29 -0800 2182)
5fd003f56c2c5 (David Decotigny 2016-02-19 09:24:00 -0500 2183) config TEST_BITMAP
5fd003f56c2c5 (David Decotigny 2016-02-19 09:24:00 -0500 2184) tristate "Test bitmap_*() family of functions at runtime"
5fd003f56c2c5 (David Decotigny 2016-02-19 09:24:00 -0500 2185) help
5fd003f56c2c5 (David Decotigny 2016-02-19 09:24:00 -0500 2186) Enable this option to test the bitmap functions at boot.
5fd003f56c2c5 (David Decotigny 2016-02-19 09:24:00 -0500 2187)
5fd003f56c2c5 (David Decotigny 2016-02-19 09:24:00 -0500 2188) If unsure, say N.
5fd003f56c2c5 (David Decotigny 2016-02-19 09:24:00 -0500 2189)
cfaff0e515b54 (Andy Shevchenko 2016-05-30 17:40:41 +0300 2190) config TEST_UUID
cfaff0e515b54 (Andy Shevchenko 2016-05-30 17:40:41 +0300 2191) tristate "Test functions located in the uuid module at runtime"
cfaff0e515b54 (Andy Shevchenko 2016-05-30 17:40:41 +0300 2192)
ad3d6c7263e36 (Matthew Wilcox 2017-11-07 14:57:46 -0500 2193) config TEST_XARRAY
ad3d6c7263e36 (Matthew Wilcox 2017-11-07 14:57:46 -0500 2194) tristate "Test the XArray code at runtime"
ad3d6c7263e36 (Matthew Wilcox 2017-11-07 14:57:46 -0500 2195)
455a35a6cdb6f (Rasmus Villemoes 2018-05-08 00:36:28 +0200 2196) config TEST_OVERFLOW
455a35a6cdb6f (Rasmus Villemoes 2018-05-08 00:36:28 +0200 2197) tristate "Test check_*_overflow() functions at runtime"
455a35a6cdb6f (Rasmus Villemoes 2018-05-08 00:36:28 +0200 2198)
7e1e77636e360 (Thomas Graf 2014-08-02 11:47:44 +0200 2199) config TEST_RHASHTABLE
9d6dbe1bbaf8b (Geert Uytterhoeven 2015-01-29 15:40:25 +0100 2200) tristate "Perform selftest on resizable hash table"
7e1e77636e360 (Thomas Graf 2014-08-02 11:47:44 +0200 2201) help
7e1e77636e360 (Thomas Graf 2014-08-02 11:47:44 +0200 2202) Enable this option to test the rhashtable functions at boot.
7e1e77636e360 (Thomas Graf 2014-08-02 11:47:44 +0200 2203)
7e1e77636e360 (Thomas Graf 2014-08-02 11:47:44 +0200 2204) If unsure, say N.
7e1e77636e360 (Thomas Graf 2014-08-02 11:47:44 +0200 2205)
468a9428521e7 (George Spelvin 2016-05-26 22:11:51 -0400 2206) config TEST_HASH
468a9428521e7 (George Spelvin 2016-05-26 22:11:51 -0400 2207) tristate "Perform selftest on hash functions"
468a9428521e7 (George Spelvin 2016-05-26 22:11:51 -0400 2208) help
2c956a60778cb (Jason A. Donenfeld 2017-01-08 13:54:00 +0100 2209) Enable this option to test the kernel's integer (<linux/hash.h>),
2c956a60778cb (Jason A. Donenfeld 2017-01-08 13:54:00 +0100 2210) string (<linux/stringhash.h>), and siphash (<linux/siphash.h>)
2c956a60778cb (Jason A. Donenfeld 2017-01-08 13:54:00 +0100 2211) hash functions on boot (or module load).
468a9428521e7 (George Spelvin 2016-05-26 22:11:51 -0400 2212)
468a9428521e7 (George Spelvin 2016-05-26 22:11:51 -0400 2213) This is intended to help people writing architecture-specific
468a9428521e7 (George Spelvin 2016-05-26 22:11:51 -0400 2214) optimized versions. If unsure, say N.
468a9428521e7 (George Spelvin 2016-05-26 22:11:51 -0400 2215)
8ab8ba38d4886 (Matthew Wilcox 2018-06-18 16:59:29 -0400 2216) config TEST_IDA
8ab8ba38d4886 (Matthew Wilcox 2018-06-18 16:59:29 -0400 2217) tristate "Perform selftest on IDA functions"
8ab8ba38d4886 (Matthew Wilcox 2018-06-18 16:59:29 -0400 2218)
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2219) config TEST_PARMAN
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2220) tristate "Perform selftest on priority array manager"
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2221) depends on PARMAN
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2222) help
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2223) Enable this option to test priority array manager on boot
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2224) (or module load).
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2225)
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2226) If unsure, say N.
44091d29f2075 (Jiri Pirko 2017-02-03 10:29:06 +0100 2227)
6aed82de719b4 (Daniel Lezcano 2019-05-27 22:55:19 +0200 2228) config TEST_IRQ_TIMINGS
6aed82de719b4 (Daniel Lezcano 2019-05-27 22:55:19 +0200 2229) bool "IRQ timings selftest"
6aed82de719b4 (Daniel Lezcano 2019-05-27 22:55:19 +0200 2230) depends on IRQ_TIMINGS
6aed82de719b4 (Daniel Lezcano 2019-05-27 22:55:19 +0200 2231) help
6aed82de719b4 (Daniel Lezcano 2019-05-27 22:55:19 +0200 2232) Enable this option to test the irq timings code on boot.
6aed82de719b4 (Daniel Lezcano 2019-05-27 22:55:19 +0200 2233)
6aed82de719b4 (Daniel Lezcano 2019-05-27 22:55:19 +0200 2234) If unsure, say N.
6aed82de719b4 (Daniel Lezcano 2019-05-27 22:55:19 +0200 2235)
8a6f0b47dad5f (Valentin Rothberg 2014-10-13 15:51:38 -0700 2236) config TEST_LKM
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2237) tristate "Test module loading with 'hello world' module"
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2238) depends on m
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2239) help
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2240) This builds the "test_module" module that emits "Hello, world"
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2241) on printk when loaded. It is designed to be used for basic
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2242) evaluation of the module loading subsystem (for example when
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2243) validating module verification). It lacks any extra dependencies,
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2244) and will not normally be loaded by the system unless explicitly
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2245) requested by name.
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2246)
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2247) If unsure, say N.
93e9ef83f4060 (Kees Cook 2014-01-23 15:54:37 -0800 2248)
c348c16305280 (Jesse Brandeburg 2020-06-04 16:50:27 -0700 2249) config TEST_BITOPS
6af132f3a11e6 (Wei Yang 2020-06-10 18:41:53 -0700 2250) tristate "Test module for compilation of bitops operations"
c348c16305280 (Jesse Brandeburg 2020-06-04 16:50:27 -0700 2251) depends on m
c348c16305280 (Jesse Brandeburg 2020-06-04 16:50:27 -0700 2252) help
c348c16305280 (Jesse Brandeburg 2020-06-04 16:50:27 -0700 2253) This builds the "test_bitops" module that is much like the
c348c16305280 (Jesse Brandeburg 2020-06-04 16:50:27 -0700 2254) TEST_LKM module except that it does a basic exercise of the
6af132f3a11e6 (Wei Yang 2020-06-10 18:41:53 -0700 2255) set/clear_bit macros and get_count_order/long to make sure there are
6af132f3a11e6 (Wei Yang 2020-06-10 18:41:53 -0700 2256) no compiler warnings from C=1 sparse checker or -Wextra
6af132f3a11e6 (Wei Yang 2020-06-10 18:41:53 -0700 2257) compilations. It has no dependencies and doesn't run or load unless
6af132f3a11e6 (Wei Yang 2020-06-10 18:41:53 -0700 2258) explicitly requested by name. for example: modprobe test_bitops.
c348c16305280 (Jesse Brandeburg 2020-06-04 16:50:27 -0700 2259)
c348c16305280 (Jesse Brandeburg 2020-06-04 16:50:27 -0700 2260) If unsure, say N.
c348c16305280 (Jesse Brandeburg 2020-06-04 16:50:27 -0700 2261)
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2262) config TEST_VMALLOC
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2263) tristate "Test module for stress/performance analysis of vmalloc allocator"
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2264) default n
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2265) depends on MMU
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2266) depends on m
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2267) help
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2268) This builds the "test_vmalloc" module that should be used for
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2269) stress and performance analysis. So, any new change for vmalloc
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2270) subsystem can be evaluated from performance and stability point
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2271) of view.
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2272)
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2273) If unsure, say N.
3f21a6b7ef207 (Uladzislau Rezki (Sony) 2019-03-05 15:43:34 -0800 2274)
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2275) config TEST_USER_COPY
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2276) tristate "Test user/kernel boundary protections"
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2277) depends on m
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2278) help
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2279) This builds the "test_user_copy" module that runs sanity checks
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2280) on the copy_to/from_user infrastructure, making sure basic
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2281) user/kernel boundary testing is working. If it fails to load,
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2282) a regression has been detected in the user/kernel memory boundary
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2283) protections.
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2284)
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2285) If unsure, say N.
3e2a4c183ace8 (Kees Cook 2014-01-23 15:54:38 -0800 2286)
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2287) config TEST_BPF
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2288) tristate "Test BPF filter functionality"
98920ba6911c7 (Randy Dunlap 2014-05-13 09:58:44 -0700 2289) depends on m && NET
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2290) help
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2291) This builds the "test_bpf" module that runs various test vectors
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2292) against the BPF interpreter or BPF JIT compiler depending on the
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2293) current setting. This is in particular useful for BPF JIT compiler
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2294) development, but also to run regression tests against changes in
3c731eba48e1b (Alexei Starovoitov 2014-09-26 00:17:07 -0700 2295) the interpreter code. It also enables test stubs for eBPF maps and
3c731eba48e1b (Alexei Starovoitov 2014-09-26 00:17:07 -0700 2296) verifier used by user space verifier testsuite.
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2297)
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2298) If unsure, say N.
64a8946b447e4 (Alexei Starovoitov 2014-05-08 14:10:52 -0700 2299)
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2300) config TEST_BLACKHOLE_DEV
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2301) tristate "Test blackhole netdev functionality"
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2302) depends on m && NET
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2303) help
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2304) This builds the "test_blackhole_dev" module that validates the
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2305) data path through this blackhole netdev.
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2306)
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2307) If unsure, say N.
509e56b37cc32 (Mahesh Bandewar 2019-07-01 14:39:01 -0700 2308)
dceeb3e7fd5cd (Yury Norov 2018-02-06 15:38:27 -0800 2309) config FIND_BIT_BENCHMARK
4441fca0a27f5 (Yury Norov 2017-11-17 15:28:31 -0800 2310) tristate "Test find_bit functions"
4441fca0a27f5 (Yury Norov 2017-11-17 15:28:31 -0800 2311) help
4441fca0a27f5 (Yury Norov 2017-11-17 15:28:31 -0800 2312) This builds the "test_find_bit" module that measure find_*_bit()
4441fca0a27f5 (Yury Norov 2017-11-17 15:28:31 -0800 2313) functions performance.
4441fca0a27f5 (Yury Norov 2017-11-17 15:28:31 -0800 2314)
4441fca0a27f5 (Yury Norov 2017-11-17 15:28:31 -0800 2315) If unsure, say N.
4441fca0a27f5 (Yury Norov 2017-11-17 15:28:31 -0800 2316)
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2317) config TEST_FIRMWARE
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2318) tristate "Test firmware loading via userspace interface"
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2319) depends on FW_LOADER
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2320) help
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2321) This builds the "test_firmware" module that creates a userspace
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2322) interface for testing firmware loading. This can be used to
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2323) control the triggering of firmware loading without needing an
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2324) actual firmware-using device. The contents can be rechecked by
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2325) userspace.
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2326)
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2327) If unsure, say N.
0a8adf584759c (Kees Cook 2014-07-14 14:38:12 -0700 2328)
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2329) config TEST_SYSCTL
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2330) tristate "sysctl test driver"
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2331) depends on PROC_SYSCTL
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2332) help
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2333) This builds the "test_sysctl" module. This driver enables to test the
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2334) proc sysctl interfaces available to drivers safely without affecting
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2335) production knobs which might alter system functionality.
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2336)
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2337) If unsure, say N.
9308f2f9e7f05 (Luis R. Rodriguez 2017-07-12 14:33:43 -0700 2338)
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2339) config BITFIELD_KUNIT
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2340) tristate "KUnit test bitfield functions at runtime"
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2341) depends on KUNIT
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2342) help
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2343) Enable this option to test the bitfield functions at boot.
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2344)
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2345) KUnit tests run during boot and output the results to the debug log
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2346) in TAP format (http://testanything.org/). Only useful for kernel devs
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2347) running the KUnit test harness, and not intended for inclusion into a
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2348) production build.
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2349)
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2350) For more information on KUnit and unit tests in general please refer
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2351) to the KUnit documentation in Documentation/dev-tools/kunit/.
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2352)
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2353) If unsure, say N.
d2585f5164c29 (Vitor Massaru Iha 2020-07-29 14:58:49 -0300 2354)
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2355) config RESOURCE_KUNIT_TEST
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2356) tristate "KUnit test for resource API"
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2357) depends on KUNIT
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2358) help
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2359) This builds the resource API unit test.
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2360) Tests the logic of API provided by resource.c and ioport.h.
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2361) For more information on KUnit and unit tests in general please refer
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2362) to the KUnit documentation in Documentation/dev-tools/kunit/.
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2363)
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2364) If unsure, say N.
5df38ca6afece (Andy Shevchenko 2020-11-03 22:45:08 +0200 2365)
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2366) config SYSCTL_KUNIT_TEST
5f215aab4ea0c (Anders Roxell 2020-05-11 15:14:29 +0200 2367) tristate "KUnit test for sysctl" if !KUNIT_ALL_TESTS
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2368) depends on KUNIT
5f215aab4ea0c (Anders Roxell 2020-05-11 15:14:29 +0200 2369) default KUNIT_ALL_TESTS
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2370) help
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2371) This builds the proc sysctl unit test, which runs on boot.
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2372) Tests the API contract and implementation correctness of sysctl.
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2373) For more information on KUnit and unit tests in general please refer
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2374) to the KUnit documentation in Documentation/dev-tools/kunit/.
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2375)
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2376) If unsure, say N.
2cb80dbbbaba4 (Iurii Zaikin 2019-09-23 02:02:47 -0700 2377)
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2378) config LIST_KUNIT_TEST
5f215aab4ea0c (Anders Roxell 2020-05-11 15:14:29 +0200 2379) tristate "KUnit Test for Kernel Linked-list structures" if !KUNIT_ALL_TESTS
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2380) depends on KUNIT
5f215aab4ea0c (Anders Roxell 2020-05-11 15:14:29 +0200 2381) default KUNIT_ALL_TESTS
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2382) help
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2383) This builds the linked list KUnit test suite.
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2384) It tests that the API and basic functionality of the list_head type
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2385) and associated macros.
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2386)
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2387) KUnit tests run during boot and output the results to the debug log
d89775fc929c5 (Alexander A. Klimov 2020-08-11 18:34:50 -0700 2388) in TAP format (https://testanything.org/). Only useful for kernel devs
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2389) running the KUnit test harness, and not intended for inclusion into a
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2390) production build.
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2391)
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2392) For more information on KUnit and unit tests in general please refer
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2393) to the KUnit documentation in Documentation/dev-tools/kunit/.
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2394)
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2395) If unsure, say N.
ea2dd7c0875ed (David Gow 2019-10-24 15:46:31 -0700 2396)
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2397) config LINEAR_RANGES_TEST
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2398) tristate "KUnit test for linear_ranges"
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2399) depends on KUNIT
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2400) select LINEAR_RANGES
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2401) help
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2402) This builds the linear_ranges unit test, which runs on boot.
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2403) Tests the linear_ranges logic correctness.
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2404) For more information on KUnit and unit tests in general please refer
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2405) to the KUnit documentation in Documentation/dev-tools/kunit/.
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2406)
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2407) If unsure, say N.
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2408)
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2409) config CMDLINE_KUNIT_TEST
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2410) tristate "KUnit test for cmdline API"
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2411) depends on KUNIT
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2412) help
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2413) This builds the cmdline API unit test.
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2414) Tests the logic of API provided by cmdline.c.
7546861a8c55f (Andy Shevchenko 2020-12-15 20:43:34 -0800 2415) For more information on KUnit and unit tests in general please refer
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2416) to the KUnit documentation in Documentation/dev-tools/kunit/.
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2417)
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2418) If unsure, say N.
33d599f052999 (Matti Vaittinen 2020-05-08 18:40:43 +0300 2419)
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2420) config BITS_TEST
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2421) tristate "KUnit test for bits.h"
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2422) depends on KUNIT
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2423) help
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2424) This builds the bits unit test.
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2425) Tests the logic of macros defined in bits.h.
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2426) For more information on KUnit and unit tests in general please refer
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2427) to the KUnit documentation in Documentation/dev-tools/kunit/.
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2428)
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2429) If unsure, say N.
6d511020e13d5 (Rikard Falkeborn 2020-08-11 18:35:03 -0700 2430)
e704f93af5a08 (David Riley 2014-06-16 14:58:32 -0700 2431) config TEST_UDELAY
e704f93af5a08 (David Riley 2014-06-16 14:58:32 -0700 2432) tristate "udelay test driver"
e704f93af5a08 (David Riley 2014-06-16 14:58:32 -0700 2433) help
e704f93af5a08 (David Riley 2014-06-16 14:58:32 -0700 2434) This builds the "udelay_test" module that helps to make sure
e704f93af5a08 (David Riley 2014-06-16 14:58:32 -0700 2435) that udelay() is working properly.
e704f93af5a08 (David Riley 2014-06-16 14:58:32 -0700 2436)
e704f93af5a08 (David Riley 2014-06-16 14:58:32 -0700 2437) If unsure, say N.
e704f93af5a08 (David Riley 2014-06-16 14:58:32 -0700 2438)
2bf9e0ab08c64 (Ingo Molnar 2015-08-03 11:42:57 +0200 2439) config TEST_STATIC_KEYS
2bf9e0ab08c64 (Ingo Molnar 2015-08-03 11:42:57 +0200 2440) tristate "Test static keys"
579e1acb15346 (Jason Baron 2015-07-30 03:59:44 +0000 2441) depends on m
579e1acb15346 (Jason Baron 2015-07-30 03:59:44 +0000 2442) help
2bf9e0ab08c64 (Ingo Molnar 2015-08-03 11:42:57 +0200 2443) Test the static key interfaces.
579e1acb15346 (Jason Baron 2015-07-30 03:59:44 +0000 2444)
579e1acb15346 (Jason Baron 2015-07-30 03:59:44 +0000 2445) If unsure, say N.
579e1acb15346 (Jason Baron 2015-07-30 03:59:44 +0000 2446)
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2447) config TEST_KMOD
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2448) tristate "kmod stress tester"
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2449) depends on m
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2450) depends on NETDEVICES && NET_CORE && INET # for TUN
ae3d6a3233479 (YueHaibing 2019-04-25 22:23:44 -0700 2451) depends on BLOCK
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2452) select TEST_LKM
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2453) select XFS_FS
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2454) select TUN
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2455) select BTRFS_FS
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2456) help
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2457) Test the kernel's module loading mechanism: kmod. kmod implements
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2458) support to load modules using the Linux kernel's usermode helper.
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2459) This test provides a series of tests against kmod.
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2460)
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2461) Although technically you can either build test_kmod as a module or
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2462) into the kernel we disallow building it into the kernel since
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2463) it stress tests request_module() and this will very likely cause
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2464) some issues by taking over precious threads available from other
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2465) module load requests, ultimately this could be fatal.
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2466)
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2467) To run tests run:
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2468)
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2469) tools/testing/selftests/kmod/kmod.sh --help
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2470)
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2471) If unsure, say N.
d9c6a72d6fa29 (Luis R. Rodriguez 2017-07-14 14:50:08 -0700 2472)
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2473) config TEST_DEBUG_VIRTUAL
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2474) tristate "Test CONFIG_DEBUG_VIRTUAL feature"
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2475) depends on DEBUG_VIRTUAL
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2476) help
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2477) Test the kernel's ability to detect incorrect calls to
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2478) virt_to_phys() done against the non-linear part of the
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2479) kernel's virtual address map.
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2480)
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2481) If unsure, say N.
e4dace3615526 (Florian Fainelli 2017-09-08 16:15:31 -0700 2482)
ce76d938dd988 (Alexander Shishkin 2018-10-05 15:43:05 +0300 2483) config TEST_MEMCAT_P
ce76d938dd988 (Alexander Shishkin 2018-10-05 15:43:05 +0300 2484) tristate "Test memcat_p() helper function"
ce76d938dd988 (Alexander Shishkin 2018-10-05 15:43:05 +0300 2485) help
ce76d938dd988 (Alexander Shishkin 2018-10-05 15:43:05 +0300 2486) Test the memcat_p() helper for correctly merging two
ce76d938dd988 (Alexander Shishkin 2018-10-05 15:43:05 +0300 2487) pointer arrays together.
ce76d938dd988 (Alexander Shishkin 2018-10-05 15:43:05 +0300 2488)
ce76d938dd988 (Alexander Shishkin 2018-10-05 15:43:05 +0300 2489) If unsure, say N.
ce76d938dd988 (Alexander Shishkin 2018-10-05 15:43:05 +0300 2490)
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2491) config TEST_LIVEPATCH
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2492) tristate "Test livepatching"
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2493) default n
bae054372aba0 (Joe Lawrence 2019-01-31 11:41:24 -0500 2494) depends on DYNAMIC_DEBUG
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2495) depends on LIVEPATCH
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2496) depends on m
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2497) help
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2498) Test kernel livepatching features for correctness. The tests will
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2499) load test modules that will be livepatched in various scenarios.
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2500)
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2501) To run all the livepatching tests:
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2502)
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2503) make -C tools/testing/selftests TARGETS=livepatch run_tests
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2504)
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2505) Alternatively, individual tests may be invoked:
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2506)
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2507) tools/testing/selftests/livepatch/test-callbacks.sh
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2508) tools/testing/selftests/livepatch/test-livepatch.sh
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2509) tools/testing/selftests/livepatch/test-shadow-vars.sh
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2510)
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2511) If unsure, say N.
a2818ee4dce57 (Joe Lawrence 2019-01-09 13:43:29 +0100 2512)
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2513) config TEST_OBJAGG
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2514) tristate "Perform selftest on object aggreration manager"
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2515) default n
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2516) depends on OBJAGG
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2517) help
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2518) Enable this option to test object aggregation manager on boot
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2519) (or module load).
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2520)
0a020d416d0af (Jiri Pirko 2018-11-14 08:22:28 +0000 2521)
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2522) config TEST_STACKINIT
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2523) tristate "Test level of stack variable initialization"
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2524) help
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2525) Test if the kernel is zero-initializing stack variables and
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2526) padding. Coverage is controlled by compiler flags,
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2527) CONFIG_GCC_PLUGIN_STRUCTLEAK, CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF,
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2528) or CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL.
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2529)
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2530) If unsure, say N.
50ceaa95ea097 (Kees Cook 2019-01-23 12:24:32 -0700 2531)
5015a300a522c (Alexander Potapenko 2019-07-16 16:27:27 -0700 2532) config TEST_MEMINIT
5015a300a522c (Alexander Potapenko 2019-07-16 16:27:27 -0700 2533) tristate "Test heap/page initialization"
5015a300a522c (Alexander Potapenko 2019-07-16 16:27:27 -0700 2534) help
5015a300a522c (Alexander Potapenko 2019-07-16 16:27:27 -0700 2535) Test if the kernel is zero-initializing heap and page allocations.
5015a300a522c (Alexander Potapenko 2019-07-16 16:27:27 -0700 2536) This can be useful to test init_on_alloc and init_on_free features.
5015a300a522c (Alexander Potapenko 2019-07-16 16:27:27 -0700 2537)
5015a300a522c (Alexander Potapenko 2019-07-16 16:27:27 -0700 2538) If unsure, say N.
5015a300a522c (Alexander Potapenko 2019-07-16 16:27:27 -0700 2539)
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2540) config TEST_HMM
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2541) tristate "Test HMM (Heterogeneous Memory Management)"
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2542) depends on TRANSPARENT_HUGEPAGE
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2543) depends on DEVICE_PRIVATE
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2544) select HMM_MIRROR
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2545) select MMU_NOTIFIER
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2546) help
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2547) This is a pseudo device driver solely for testing HMM.
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2548) Say M here if you want to build the HMM test module.
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2549) Doing so will allow you to run tools/testing/selftest/vm/hmm-tests.
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2550)
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2551) If unsure, say N.
b2ef9f5a5cb37 (Ralph Campbell 2020-04-22 12:50:26 -0700 2552)
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2553) config TEST_FREE_PAGES
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2554) tristate "Test freeing pages"
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2555) help
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2556) Test that a memory leak does not occur due to a race between
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2557) freeing a block of pages and a speculative page reference.
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2558) Loading this module is safe if your kernel has the bug fixed.
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2559) If the bug is not fixed, it will leak gigabytes of memory and
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2560) probably OOM your system.
e320d3012d25b (Matthew Wilcox (Oracle) 2020-10-13 16:56:04 -0700 2561)
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2562) config TEST_FPU
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2563) tristate "Test floating point operations in kernel space"
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2564) depends on X86 && !KCOV_INSTRUMENT_ALL
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2565) help
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2566) Enable this option to add /sys/kernel/debug/selftest_helpers/test_fpu
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2567) which will trigger a sequence of floating point operations. This is used
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2568) for self-testing floating point control register setting in
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2569) kernel_fpu_begin().
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2570)
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2571) If unsure, say N.
4185b3b92792e (Petteri Aimonen 2020-06-18 16:37:37 +0200 2572)
d3deafaa8b5c1 (Vincent Legoll 2018-02-06 15:38:38 -0800 2573) endif # RUNTIME_TESTING_MENU
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2574)
dce44566192ec (Anshuman Khandual 2021-04-29 22:55:15 -0700 2575) config ARCH_USE_MEMTEST
dce44566192ec (Anshuman Khandual 2021-04-29 22:55:15 -0700 2576) bool
dce44566192ec (Anshuman Khandual 2021-04-29 22:55:15 -0700 2577) help
dce44566192ec (Anshuman Khandual 2021-04-29 22:55:15 -0700 2578) An architecture should select this when it uses early_memtest()
dce44566192ec (Anshuman Khandual 2021-04-29 22:55:15 -0700 2579) during boot process.
dce44566192ec (Anshuman Khandual 2021-04-29 22:55:15 -0700 2580)
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2581) config MEMTEST
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2582) bool "Memtest"
dce44566192ec (Anshuman Khandual 2021-04-29 22:55:15 -0700 2583) depends on ARCH_USE_MEMTEST
a7f7f6248d974 (Masahiro Yamada 2020-06-14 01:50:22 +0900 2584) help
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2585) This option adds a kernel parameter 'memtest', which allows memtest
dce44566192ec (Anshuman Khandual 2021-04-29 22:55:15 -0700 2586) to be set and executed.
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2587) memtest=0, mean disabled; -- default
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2588) memtest=1, mean do 1 test pattern;
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2589) ...
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2590) memtest=17, mean do 17 test patterns.
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2591) If you are unsure how to answer this question, answer N.
cc3fa84045694 (Randy Dunlap 2017-10-13 15:57:33 -0700 2592)
21266be9ed542 (Dan Williams 2015-11-19 18:19:29 -0800 2593)
06ec64b84c357 (Christoph Hellwig 2018-07-31 13:39:31 +0200 2594)
af9ca6f9bb16e (Branden Bonaby 2019-10-03 17:01:49 -0400 2595) config HYPERV_TESTING
af9ca6f9bb16e (Branden Bonaby 2019-10-03 17:01:49 -0400 2596) bool "Microsoft Hyper-V driver testing"
af9ca6f9bb16e (Branden Bonaby 2019-10-03 17:01:49 -0400 2597) default n
af9ca6f9bb16e (Branden Bonaby 2019-10-03 17:01:49 -0400 2598) depends on HYPERV && DEBUG_FS
af9ca6f9bb16e (Branden Bonaby 2019-10-03 17:01:49 -0400 2599) help
af9ca6f9bb16e (Branden Bonaby 2019-10-03 17:01:49 -0400 2600) Select this option to enable Hyper-V vmbus testing.
af9ca6f9bb16e (Branden Bonaby 2019-10-03 17:01:49 -0400 2601)
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 2602) endmenu # "Kernel Testing and Coverage"
045f6d7942be2 (Changbin Du 2019-12-17 20:51:56 -0800 2603)
75442fb0ccaac (Mauro Carvalho Chehab 2020-10-30 08:40:45 +0100 2604) source "Documentation/Kconfig"
75442fb0ccaac (Mauro Carvalho Chehab 2020-10-30 08:40:45 +0100 2605)
06ec64b84c357 (Christoph Hellwig 2018-07-31 13:39:31 +0200 2606) endmenu # Kernel hacking