Kconfig.debug 80 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menu "Kernel hacking"
  3. menu "printk and dmesg options"
  4. config PRINTK_TIME
  5. bool "Show timing information on printks"
  6. depends on PRINTK
  7. help
  8. Selecting this option causes time stamps of the printk()
  9. messages to be added to the output of the syslog() system
  10. call and at the console.
  11. The timestamp is always recorded internally, and exported
  12. to /dev/kmsg. This flag just specifies if the timestamp should
  13. be included, not that the timestamp is recorded.
  14. The behavior is also controlled by the kernel command line
  15. parameter printk.time=1. See Documentation/admin-guide/kernel-parameters.rst
  16. config PRINTK_CALLER
  17. bool "Show caller information on printks"
  18. depends on PRINTK
  19. help
  20. Selecting this option causes printk() to add a caller "thread id" (if
  21. in task context) or a caller "processor id" (if not in task context)
  22. to every message.
  23. This option is intended for environments where multiple threads
  24. concurrently call printk() for many times, for it is difficult to
  25. interpret without knowing where these lines (or sometimes individual
  26. line which was divided into multiple lines due to race) came from.
  27. Since toggling after boot makes the code racy, currently there is
  28. no option to enable/disable at the kernel command line parameter or
  29. sysfs interface.
  30. config CONSOLE_LOGLEVEL_DEFAULT
  31. int "Default console loglevel (1-15)"
  32. range 1 15
  33. default "7"
  34. help
  35. Default loglevel to determine what will be printed on the console.
  36. Setting a default here is equivalent to passing in loglevel=<x> in
  37. the kernel bootargs. loglevel=<x> continues to override whatever
  38. value is specified here as well.
  39. Note: This does not affect the log level of un-prefixed printk()
  40. usage in the kernel. That is controlled by the MESSAGE_LOGLEVEL_DEFAULT
  41. option.
  42. config CONSOLE_LOGLEVEL_QUIET
  43. int "quiet console loglevel (1-15)"
  44. range 1 15
  45. default "4"
  46. help
  47. loglevel to use when "quiet" is passed on the kernel commandline.
  48. When "quiet" is passed on the kernel commandline this loglevel
  49. will be used as the loglevel. IOW passing "quiet" will be the
  50. equivalent of passing "loglevel=<CONSOLE_LOGLEVEL_QUIET>"
  51. config MESSAGE_LOGLEVEL_DEFAULT
  52. int "Default message log level (1-7)"
  53. range 1 7
  54. default "4"
  55. help
  56. Default log level for printk statements with no specified priority.
  57. This was hard-coded to KERN_WARNING since at least 2.6.10 but folks
  58. that are auditing their logs closely may want to set it to a lower
  59. priority.
  60. Note: This does not affect what message level gets printed on the console
  61. by default. To change that, use loglevel=<x> in the kernel bootargs,
  62. or pick a different CONSOLE_LOGLEVEL_DEFAULT configuration value.
  63. config BOOT_PRINTK_DELAY
  64. bool "Delay each boot printk message by N milliseconds"
  65. depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
  66. help
  67. This build option allows you to read kernel boot messages
  68. by inserting a short delay after each one. The delay is
  69. specified in milliseconds on the kernel command line,
  70. using "boot_delay=N".
  71. It is likely that you would also need to use "lpj=M" to preset
  72. the "loops per jiffie" value.
  73. See a previous boot log for the "lpj" value to use for your
  74. system, and then set "lpj=M" before setting "boot_delay=N".
  75. NOTE: Using this option may adversely affect SMP systems.
  76. I.e., processors other than the first one may not boot up.
  77. BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect
  78. what it believes to be lockup conditions.
  79. config DYNAMIC_DEBUG
  80. bool "Enable dynamic printk() support"
  81. default n
  82. depends on PRINTK
  83. depends on (DEBUG_FS || PROC_FS)
  84. select DYNAMIC_DEBUG_CORE
  85. help
  86. Compiles debug level messages into the kernel, which would not
  87. otherwise be available at runtime. These messages can then be
  88. enabled/disabled based on various levels of scope - per source file,
  89. function, module, format string, and line number. This mechanism
  90. implicitly compiles in all pr_debug() and dev_dbg() calls, which
  91. enlarges the kernel text size by about 2%.
  92. If a source file is compiled with DEBUG flag set, any
  93. pr_debug() calls in it are enabled by default, but can be
  94. disabled at runtime as below. Note that DEBUG flag is
  95. turned on by many CONFIG_*DEBUG* options.
  96. Usage:
  97. Dynamic debugging is controlled via the 'dynamic_debug/control' file,
  98. which is contained in the 'debugfs' filesystem or procfs.
  99. Thus, the debugfs or procfs filesystem must first be mounted before
  100. making use of this feature.
  101. We refer the control file as: <debugfs>/dynamic_debug/control. This
  102. file contains a list of the debug statements that can be enabled. The
  103. format for each line of the file is:
  104. filename:lineno [module]function flags format
  105. filename : source file of the debug statement
  106. lineno : line number of the debug statement
  107. module : module that contains the debug statement
  108. function : function that contains the debug statement
  109. flags : '=p' means the line is turned 'on' for printing
  110. format : the format used for the debug statement
  111. From a live system:
  112. nullarbor:~ # cat <debugfs>/dynamic_debug/control
  113. # filename:lineno [module]function flags format
  114. fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
  115. fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
  116. fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
  117. Example usage:
  118. // enable the message at line 1603 of file svcsock.c
  119. nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
  120. <debugfs>/dynamic_debug/control
  121. // enable all the messages in file svcsock.c
  122. nullarbor:~ # echo -n 'file svcsock.c +p' >
  123. <debugfs>/dynamic_debug/control
  124. // enable all the messages in the NFS server module
  125. nullarbor:~ # echo -n 'module nfsd +p' >
  126. <debugfs>/dynamic_debug/control
  127. // enable all 12 messages in the function svc_process()
  128. nullarbor:~ # echo -n 'func svc_process +p' >
  129. <debugfs>/dynamic_debug/control
  130. // disable all 12 messages in the function svc_process()
  131. nullarbor:~ # echo -n 'func svc_process -p' >
  132. <debugfs>/dynamic_debug/control
  133. See Documentation/admin-guide/dynamic-debug-howto.rst for additional
  134. information.
  135. config DYNAMIC_DEBUG_CORE
  136. bool "Enable core function of dynamic debug support"
  137. depends on PRINTK
  138. depends on (DEBUG_FS || PROC_FS)
  139. help
  140. Enable core functional support of dynamic debug. It is useful
  141. when you want to tie dynamic debug to your kernel modules with
  142. DYNAMIC_DEBUG_MODULE defined for each of them, especially for
  143. the case of embedded system where the kernel image size is
  144. sensitive for people.
  145. config SYMBOLIC_ERRNAME
  146. bool "Support symbolic error names in printf"
  147. default y if PRINTK
  148. help
  149. If you say Y here, the kernel's printf implementation will
  150. be able to print symbolic error names such as ENOSPC instead
  151. of the number 28. It makes the kernel image slightly larger
  152. (about 3KB), but can make the kernel logs easier to read.
  153. config DEBUG_BUGVERBOSE
  154. bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT
  155. depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE)
  156. default y
  157. help
  158. Say Y here to make BUG() panics output the file name and line number
  159. of the BUG call as well as the EIP and oops trace. This aids
  160. debugging but costs about 70-100K of memory.
  161. endmenu # "printk and dmesg options"
  162. menu "Compile-time checks and compiler options"
  163. config DEBUG_INFO
  164. bool "Compile the kernel with debug info"
  165. depends on DEBUG_KERNEL && !COMPILE_TEST
  166. help
  167. If you say Y here the resulting kernel image will include
  168. debugging info resulting in a larger kernel image.
  169. This adds debug symbols to the kernel and modules (gcc -g), and
  170. is needed if you intend to use kernel crashdump or binary object
  171. tools like crash, kgdb, LKCD, gdb, etc on the kernel.
  172. Say Y here only if you plan to debug the kernel.
  173. If unsure, say N.
  174. if DEBUG_INFO
  175. config DEBUG_INFO_REDUCED
  176. bool "Reduce debugging information"
  177. help
  178. If you say Y here gcc is instructed to generate less debugging
  179. information for structure types. This means that tools that
  180. need full debugging information (like kgdb or systemtap) won't
  181. be happy. But if you merely need debugging information to
  182. resolve line numbers there is no loss. Advantage is that
  183. build directory object sizes shrink dramatically over a full
  184. DEBUG_INFO build and compile times are reduced too.
  185. Only works with newer gcc versions.
  186. config DEBUG_INFO_COMPRESSED
  187. bool "Compressed debugging information"
  188. depends on $(cc-option,-gz=zlib)
  189. depends on $(ld-option,--compress-debug-sections=zlib)
  190. help
  191. Compress the debug information using zlib. Requires GCC 5.0+ or Clang
  192. 5.0+, binutils 2.26+, and zlib.
  193. Users of dpkg-deb via scripts/package/builddeb may find an increase in
  194. size of their debug .deb packages with this config set, due to the
  195. debug info being compressed with zlib, then the object files being
  196. recompressed with a different compression scheme. But this is still
  197. preferable to setting $KDEB_COMPRESS to "none" which would be even
  198. larger.
  199. config DEBUG_INFO_SPLIT
  200. bool "Produce split debuginfo in .dwo files"
  201. depends on $(cc-option,-gsplit-dwarf)
  202. help
  203. Generate debug info into separate .dwo files. This significantly
  204. reduces the build directory size for builds with DEBUG_INFO,
  205. because it stores the information only once on disk in .dwo
  206. files instead of multiple times in object files and executables.
  207. In addition the debug information is also compressed.
  208. Requires recent gcc (4.7+) and recent gdb/binutils.
  209. Any tool that packages or reads debug information would need
  210. to know about the .dwo files and include them.
  211. Incompatible with older versions of ccache.
  212. config DEBUG_INFO_DWARF4
  213. bool "Generate dwarf4 debuginfo"
  214. depends on $(cc-option,-gdwarf-4)
  215. help
  216. Generate dwarf4 debug info. This requires recent versions
  217. of gcc and gdb. It makes the debug information larger.
  218. But it significantly improves the success of resolving
  219. variables in gdb on optimized code.
  220. config DEBUG_INFO_BTF
  221. bool "Generate BTF typeinfo"
  222. depends on !DEBUG_INFO_SPLIT && !DEBUG_INFO_REDUCED
  223. depends on !GCC_PLUGIN_RANDSTRUCT || COMPILE_TEST
  224. help
  225. Generate deduplicated BTF type information from DWARF debug info.
  226. Turning this on expects presence of pahole tool, which will convert
  227. DWARF type info into equivalent deduplicated BTF type info.
  228. config GDB_SCRIPTS
  229. bool "Provide GDB scripts for kernel debugging"
  230. help
  231. This creates the required links to GDB helper scripts in the
  232. build directory. If you load vmlinux into gdb, the helper
  233. scripts will be automatically imported by gdb as well, and
  234. additional functions are available to analyze a Linux kernel
  235. instance. See Documentation/dev-tools/gdb-kernel-debugging.rst
  236. for further details.
  237. endif # DEBUG_INFO
  238. config ENABLE_MUST_CHECK
  239. bool "Enable __must_check logic"
  240. default y
  241. help
  242. Enable the __must_check logic in the kernel build. Disable this to
  243. suppress the "warning: ignoring return value of 'foo', declared with
  244. attribute warn_unused_result" messages.
  245. config FRAME_WARN
  246. int "Warn for stack frames larger than"
  247. range 0 8192
  248. default 2048 if GCC_PLUGIN_LATENT_ENTROPY
  249. default 1280 if (!64BIT && PARISC)
  250. default 1024 if (!64BIT && !PARISC)
  251. default 2048 if 64BIT
  252. help
  253. Tell gcc to warn at build time for stack frames larger than this.
  254. Setting this too low will cause a lot of warnings.
  255. Setting it to 0 disables the warning.
  256. config STRIP_ASM_SYMS
  257. bool "Strip assembler-generated symbols during link"
  258. default n
  259. help
  260. Strip internal assembler-generated symbols during a link (symbols
  261. that look like '.Lxxx') so they don't pollute the output of
  262. get_wchan() and suchlike.
  263. config READABLE_ASM
  264. bool "Generate readable assembler code"
  265. depends on DEBUG_KERNEL
  266. help
  267. Disable some compiler optimizations that tend to generate human unreadable
  268. assembler output. This may make the kernel slightly slower, but it helps
  269. to keep kernel developers who have to stare a lot at assembler listings
  270. sane.
  271. config HEADERS_INSTALL
  272. bool "Install uapi headers to usr/include"
  273. depends on !UML
  274. help
  275. This option will install uapi headers (headers exported to user-space)
  276. into the usr/include directory for use during the kernel build.
  277. This is unneeded for building the kernel itself, but needed for some
  278. user-space program samples. It is also needed by some features such
  279. as uapi header sanity checks.
  280. config DEBUG_SECTION_MISMATCH
  281. bool "Enable full Section mismatch analysis"
  282. help
  283. The section mismatch analysis checks if there are illegal
  284. references from one section to another section.
  285. During linktime or runtime, some sections are dropped;
  286. any use of code/data previously in these sections would
  287. most likely result in an oops.
  288. In the code, functions and variables are annotated with
  289. __init,, etc. (see the full list in include/linux/init.h),
  290. which results in the code/data being placed in specific sections.
  291. The section mismatch analysis is always performed after a full
  292. kernel build, and enabling this option causes the following
  293. additional step to occur:
  294. - Add the option -fno-inline-functions-called-once to gcc commands.
  295. When inlining a function annotated with __init in a non-init
  296. function, we would lose the section information and thus
  297. the analysis would not catch the illegal reference.
  298. This option tells gcc to inline less (but it does result in
  299. a larger kernel).
  300. config SECTION_MISMATCH_WARN_ONLY
  301. bool "Make section mismatch errors non-fatal"
  302. default y
  303. help
  304. If you say N here, the build process will fail if there are any
  305. section mismatch, instead of just throwing warnings.
  306. If unsure, say Y.
  307. config DEBUG_FORCE_FUNCTION_ALIGN_32B
  308. bool "Force all function address 32B aligned" if EXPERT
  309. help
  310. There are cases that a commit from one domain changes the function
  311. address alignment of other domains, and cause magic performance
  312. bump (regression or improvement). Enable this option will help to
  313. verify if the bump is caused by function alignment changes, while
  314. it will slightly increase the kernel size and affect icache usage.
  315. It is mainly for debug and performance tuning use.
  316. #
  317. # Select this config option from the architecture Kconfig, if it
  318. # is preferred to always offer frame pointers as a config
  319. # option on the architecture (regardless of KERNEL_DEBUG):
  320. #
  321. config ARCH_WANT_FRAME_POINTERS
  322. bool
  323. config FRAME_POINTER
  324. bool "Compile the kernel with frame pointers"
  325. depends on DEBUG_KERNEL && (M68K || UML || SUPERH) || ARCH_WANT_FRAME_POINTERS
  326. default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
  327. help
  328. If you say Y here the resulting kernel image will be slightly
  329. larger and slower, but it gives very useful debugging information
  330. in case of kernel bugs. (precise oopses/stacktraces/warnings)
  331. config STACK_VALIDATION
  332. bool "Compile-time stack metadata validation"
  333. depends on HAVE_STACK_VALIDATION
  334. default n
  335. help
  336. Add compile-time checks to validate stack metadata, including frame
  337. pointers (if CONFIG_FRAME_POINTER is enabled). This helps ensure
  338. that runtime stack traces are more reliable.
  339. This is also a prerequisite for generation of ORC unwind data, which
  340. is needed for CONFIG_UNWINDER_ORC.
  341. For more information, see
  342. tools/objtool/Documentation/stack-validation.txt.
  343. config VMLINUX_VALIDATION
  344. bool
  345. depends on STACK_VALIDATION && DEBUG_ENTRY && !PARAVIRT
  346. default y
  347. config DEBUG_FORCE_WEAK_PER_CPU
  348. bool "Force weak per-cpu definitions"
  349. depends on DEBUG_KERNEL
  350. help
  351. s390 and alpha require percpu variables in modules to be
  352. defined weak to work around addressing range issue which
  353. puts the following two restrictions on percpu variable
  354. definitions.
  355. 1. percpu symbols must be unique whether static or not
  356. 2. percpu variables can't be defined inside a function
  357. To ensure that generic code follows the above rules, this
  358. option forces all percpu variables to be defined as weak.
  359. endmenu # "Compiler options"
  360. menu "Generic Kernel Debugging Instruments"
  361. config MAGIC_SYSRQ
  362. bool "Magic SysRq key"
  363. depends on !UML
  364. help
  365. If you say Y here, you will have some control over the system even
  366. if the system crashes for example during kernel debugging (e.g., you
  367. will be able to flush the buffer cache to disk, reboot the system
  368. immediately or dump some status information). This is accomplished
  369. by pressing various keys while holding SysRq (Alt+PrintScreen). It
  370. also works on a serial console (on PC hardware at least), if you
  371. send a BREAK and then within 5 seconds a command keypress. The
  372. keys are documented in <file:Documentation/admin-guide/sysrq.rst>.
  373. Don't say Y unless you really know what this hack does.
  374. config MAGIC_SYSRQ_DEFAULT_ENABLE
  375. hex "Enable magic SysRq key functions by default"
  376. depends on MAGIC_SYSRQ
  377. default 0x1
  378. help
  379. Specifies which SysRq key functions are enabled by default.
  380. This may be set to 1 or 0 to enable or disable them all, or
  381. to a bitmask as described in Documentation/admin-guide/sysrq.rst.
  382. config MAGIC_SYSRQ_SERIAL
  383. bool "Enable magic SysRq key over serial"
  384. depends on MAGIC_SYSRQ
  385. default y
  386. help
  387. Many embedded boards have a disconnected TTL level serial which can
  388. generate some garbage that can lead to spurious false sysrq detects.
  389. This option allows you to decide whether you want to enable the
  390. magic SysRq key.
  391. config MAGIC_SYSRQ_SERIAL_SEQUENCE
  392. string "Char sequence that enables magic SysRq over serial"
  393. depends on MAGIC_SYSRQ_SERIAL
  394. default ""
  395. help
  396. Specifies a sequence of characters that can follow BREAK to enable
  397. SysRq on a serial console.
  398. If unsure, leave an empty string and the option will not be enabled.
  399. config DEBUG_FS
  400. bool "Debug Filesystem"
  401. help
  402. debugfs is a virtual file system that kernel developers use to put
  403. debugging files into. Enable this option to be able to read and
  404. write to these files.
  405. For detailed documentation on the debugfs API, see
  406. Documentation/filesystems/.
  407. If unsure, say N.
  408. choice
  409. prompt "Debugfs default access"
  410. depends on DEBUG_FS
  411. default DEBUG_FS_ALLOW_ALL
  412. help
  413. This selects the default access restrictions for debugfs.
  414. It can be overridden with kernel command line option
  415. debugfs=[on,no-mount,off]. The restrictions apply for API access
  416. and filesystem registration.
  417. config DEBUG_FS_ALLOW_ALL
  418. bool "Access normal"
  419. help
  420. No restrictions apply. Both API and filesystem registration
  421. is on. This is the normal default operation.
  422. config DEBUG_FS_DISALLOW_MOUNT
  423. bool "Do not register debugfs as filesystem"
  424. help
  425. The API is open but filesystem is not loaded. Clients can still do
  426. their work and read with debug tools that do not need
  427. debugfs filesystem.
  428. config DEBUG_FS_ALLOW_NONE
  429. bool "No access"
  430. help
  431. Access is off. Clients get -PERM when trying to create nodes in
  432. debugfs tree and debugfs is not registered as a filesystem.
  433. Client can then back-off or continue without debugfs access.
  434. endchoice
  435. source "lib/Kconfig.kgdb"
  436. source "lib/Kconfig.ubsan"
  437. source "lib/Kconfig.kcsan"
  438. endmenu
  439. config DEBUG_KERNEL
  440. bool "Kernel debugging"
  441. help
  442. Say Y here if you are developing drivers or trying to debug and
  443. identify kernel problems.
  444. config DEBUG_MISC
  445. bool "Miscellaneous debug code"
  446. default DEBUG_KERNEL
  447. depends on DEBUG_KERNEL
  448. help
  449. Say Y here if you need to enable miscellaneous debug code that should
  450. be under a more specific debug option but isn't.
  451. menu "Memory Debugging"
  452. source "mm/Kconfig.debug"
  453. config DEBUG_OBJECTS
  454. bool "Debug object operations"
  455. depends on DEBUG_KERNEL
  456. help
  457. If you say Y here, additional code will be inserted into the
  458. kernel to track the life time of various objects and validate
  459. the operations on those objects.
  460. config DEBUG_OBJECTS_SELFTEST
  461. bool "Debug objects selftest"
  462. depends on DEBUG_OBJECTS
  463. help
  464. This enables the selftest of the object debug code.
  465. config DEBUG_OBJECTS_FREE
  466. bool "Debug objects in freed memory"
  467. depends on DEBUG_OBJECTS
  468. help
  469. This enables checks whether a k/v free operation frees an area
  470. which contains an object which has not been deactivated
  471. properly. This can make kmalloc/kfree-intensive workloads
  472. much slower.
  473. config DEBUG_OBJECTS_TIMERS
  474. bool "Debug timer objects"
  475. depends on DEBUG_OBJECTS
  476. help
  477. If you say Y here, additional code will be inserted into the
  478. timer routines to track the life time of timer objects and
  479. validate the timer operations.
  480. config DEBUG_OBJECTS_WORK
  481. bool "Debug work objects"
  482. depends on DEBUG_OBJECTS
  483. help
  484. If you say Y here, additional code will be inserted into the
  485. work queue routines to track the life time of work objects and
  486. validate the work operations.
  487. config DEBUG_OBJECTS_RCU_HEAD
  488. bool "Debug RCU callbacks objects"
  489. depends on DEBUG_OBJECTS
  490. help
  491. Enable this to turn on debugging of RCU list heads (call_rcu() usage).
  492. config DEBUG_OBJECTS_PERCPU_COUNTER
  493. bool "Debug percpu counter objects"
  494. depends on DEBUG_OBJECTS
  495. help
  496. If you say Y here, additional code will be inserted into the
  497. percpu counter routines to track the life time of percpu counter
  498. objects and validate the percpu counter operations.
  499. config DEBUG_OBJECTS_ENABLE_DEFAULT
  500. int "debug_objects bootup default value (0-1)"
  501. range 0 1
  502. default "1"
  503. depends on DEBUG_OBJECTS
  504. help
  505. Debug objects boot parameter default value
  506. config DEBUG_SLAB
  507. bool "Debug slab memory allocations"
  508. depends on DEBUG_KERNEL && SLAB
  509. help
  510. Say Y here to have the kernel do limited verification on memory
  511. allocation as well as poisoning memory on free to catch use of freed
  512. memory. This can make kmalloc/kfree-intensive workloads much slower.
  513. config SLUB_DEBUG_ON
  514. bool "SLUB debugging on by default"
  515. depends on SLUB && SLUB_DEBUG
  516. default n
  517. help
  518. Boot with debugging on by default. SLUB boots by default with
  519. the runtime debug capabilities switched off. Enabling this is
  520. equivalent to specifying the "slub_debug" parameter on boot.
  521. There is no support for more fine grained debug control like
  522. possible with slub_debug=xxx. SLUB debugging may be switched
  523. off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
  524. "slub_debug=-".
  525. config SLUB_STATS
  526. default n
  527. bool "Enable SLUB performance statistics"
  528. depends on SLUB && SYSFS
  529. help
  530. SLUB statistics are useful to debug SLUBs allocation behavior in
  531. order find ways to optimize the allocator. This should never be
  532. enabled for production use since keeping statistics slows down
  533. the allocator by a few percentage points. The slabinfo command
  534. supports the determination of the most active slabs to figure
  535. out which slabs are relevant to a particular load.
  536. Try running: slabinfo -DA
  537. config HAVE_DEBUG_KMEMLEAK
  538. bool
  539. config DEBUG_KMEMLEAK
  540. bool "Kernel memory leak detector"
  541. depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
  542. select DEBUG_FS
  543. select STACKTRACE if STACKTRACE_SUPPORT
  544. select KALLSYMS
  545. select CRC32
  546. help
  547. Say Y here if you want to enable the memory leak
  548. detector. The memory allocation/freeing is traced in a way
  549. similar to the Boehm's conservative garbage collector, the
  550. difference being that the orphan objects are not freed but
  551. only shown in /sys/kernel/debug/kmemleak. Enabling this
  552. feature will introduce an overhead to memory
  553. allocations. See Documentation/dev-tools/kmemleak.rst for more
  554. details.
  555. Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
  556. of finding leaks due to the slab objects poisoning.
  557. In order to access the kmemleak file, debugfs needs to be
  558. mounted (usually at /sys/kernel/debug).
  559. config DEBUG_KMEMLEAK_MEM_POOL_SIZE
  560. int "Kmemleak memory pool size"
  561. depends on DEBUG_KMEMLEAK
  562. range 200 1000000
  563. default 16000
  564. help
  565. Kmemleak must track all the memory allocations to avoid
  566. reporting false positives. Since memory may be allocated or
  567. freed before kmemleak is fully initialised, use a static pool
  568. of metadata objects to track such callbacks. After kmemleak is
  569. fully initialised, this memory pool acts as an emergency one
  570. if slab allocations fail.
  571. config DEBUG_KMEMLEAK_TEST
  572. tristate "Simple test for the kernel memory leak detector"
  573. depends on DEBUG_KMEMLEAK && m
  574. help
  575. This option enables a module that explicitly leaks memory.
  576. If unsure, say N.
  577. config DEBUG_KMEMLEAK_DEFAULT_OFF
  578. bool "Default kmemleak to off"
  579. depends on DEBUG_KMEMLEAK
  580. help
  581. Say Y here to disable kmemleak by default. It can then be enabled
  582. on the command line via kmemleak=on.
  583. config DEBUG_KMEMLEAK_AUTO_SCAN
  584. bool "Enable kmemleak auto scan thread on boot up"
  585. default y
  586. depends on DEBUG_KMEMLEAK
  587. help
  588. Depending on the cpu, kmemleak scan may be cpu intensive and can
  589. stall user tasks at times. This option enables/disables automatic
  590. kmemleak scan at boot up.
  591. Say N here to disable kmemleak auto scan thread to stop automatic
  592. scanning. Disabling this option disables automatic reporting of
  593. memory leaks.
  594. If unsure, say Y.
  595. config DEBUG_STACK_USAGE
  596. bool "Stack utilization instrumentation"
  597. depends on DEBUG_KERNEL && !IA64
  598. help
  599. Enables the display of the minimum amount of free stack which each
  600. task has ever had available in the sysrq-T and sysrq-P debug output.
  601. This option will slow down process creation somewhat.
  602. config SCHED_STACK_END_CHECK
  603. bool "Detect stack corruption on calls to schedule()"
  604. depends on DEBUG_KERNEL
  605. default n
  606. help
  607. This option checks for a stack overrun on calls to schedule().
  608. If the stack end location is found to be over written always panic as
  609. the content of the corrupted region can no longer be trusted.
  610. This is to ensure no erroneous behaviour occurs which could result in
  611. data corruption or a sporadic crash at a later stage once the region
  612. is examined. The runtime overhead introduced is minimal.
  613. config ARCH_HAS_DEBUG_VM_PGTABLE
  614. bool
  615. help
  616. An architecture should select this when it can successfully
  617. build and run DEBUG_VM_PGTABLE.
  618. config DEBUG_VM
  619. bool "Debug VM"
  620. depends on DEBUG_KERNEL
  621. help
  622. Enable this to turn on extended checks in the virtual-memory system
  623. that may impact performance.
  624. If unsure, say N.
  625. config DEBUG_VM_VMACACHE
  626. bool "Debug VMA caching"
  627. depends on DEBUG_VM
  628. help
  629. Enable this to turn on VMA caching debug information. Doing so
  630. can cause significant overhead, so only enable it in non-production
  631. environments.
  632. If unsure, say N.
  633. config DEBUG_VM_RB
  634. bool "Debug VM red-black trees"
  635. depends on DEBUG_VM
  636. help
  637. Enable VM red-black tree debugging information and extra validations.
  638. If unsure, say N.
  639. config DEBUG_VM_PGFLAGS
  640. bool "Debug page-flags operations"
  641. depends on DEBUG_VM
  642. help
  643. Enables extra validation on page flags operations.
  644. If unsure, say N.
  645. config DEBUG_VM_PGTABLE
  646. bool "Debug arch page table for semantics compliance"
  647. depends on MMU
  648. depends on ARCH_HAS_DEBUG_VM_PGTABLE
  649. default y if DEBUG_VM
  650. help
  651. This option provides a debug method which can be used to test
  652. architecture page table helper functions on various platforms in
  653. verifying if they comply with expected generic MM semantics. This
  654. will help architecture code in making sure that any changes or
  655. new additions of these helpers still conform to expected
  656. semantics of the generic MM. Platforms will have to opt in for
  657. this through ARCH_HAS_DEBUG_VM_PGTABLE.
  658. If unsure, say N.
  659. config ARCH_HAS_DEBUG_VIRTUAL
  660. bool
  661. config DEBUG_VIRTUAL
  662. bool "Debug VM translations"
  663. depends on DEBUG_KERNEL && ARCH_HAS_DEBUG_VIRTUAL
  664. help
  665. Enable some costly sanity checks in virtual to page code. This can
  666. catch mistakes with virt_to_page() and friends.
  667. If unsure, say N.
  668. config DEBUG_NOMMU_REGIONS
  669. bool "Debug the global anon/private NOMMU mapping region tree"
  670. depends on DEBUG_KERNEL && !MMU
  671. help
  672. This option causes the global tree of anonymous and private mapping
  673. regions to be regularly checked for invalid topology.
  674. config DEBUG_MEMORY_INIT
  675. bool "Debug memory initialisation" if EXPERT
  676. default !EXPERT
  677. help
  678. Enable this for additional checks during memory initialisation.
  679. The sanity checks verify aspects of the VM such as the memory model
  680. and other information provided by the architecture. Verbose
  681. information will be printed at KERN_DEBUG loglevel depending
  682. on the mminit_loglevel= command-line option.
  683. If unsure, say Y
  684. config MEMORY_NOTIFIER_ERROR_INJECT
  685. tristate "Memory hotplug notifier error injection module"
  686. depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
  687. help
  688. This option provides the ability to inject artificial errors to
  689. memory hotplug notifier chain callbacks. It is controlled through
  690. debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
  691. If the notifier call chain should be failed with some events
  692. notified, write the error code to "actions/<notifier event>/error".
  693. Example: Inject memory hotplug offline error (-12 == -ENOMEM)
  694. # cd /sys/kernel/debug/notifier-error-inject/memory
  695. # echo -12 > actions/MEM_GOING_OFFLINE/error
  696. # echo offline > /sys/devices/system/memory/memoryXXX/state
  697. bash: echo: write error: Cannot allocate memory
  698. To compile this code as a module, choose M here: the module will
  699. be called memory-notifier-error-inject.
  700. If unsure, say N.
  701. config DEBUG_PER_CPU_MAPS
  702. bool "Debug access to per_cpu maps"
  703. depends on DEBUG_KERNEL
  704. depends on SMP
  705. help
  706. Say Y to verify that the per_cpu map being accessed has
  707. been set up. This adds a fair amount of code to kernel memory
  708. and decreases performance.
  709. Say N if unsure.
  710. config DEBUG_HIGHMEM
  711. bool "Highmem debugging"
  712. depends on DEBUG_KERNEL && HIGHMEM
  713. help
  714. This option enables additional error checking for high memory
  715. systems. Disable for production systems.
  716. config HAVE_DEBUG_STACKOVERFLOW
  717. bool
  718. config DEBUG_STACKOVERFLOW
  719. bool "Check for stack overflows"
  720. depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW
  721. help
  722. Say Y here if you want to check for overflows of kernel, IRQ
  723. and exception stacks (if your architecture uses them). This
  724. option will show detailed messages if free stack space drops
  725. below a certain limit.
  726. These kinds of bugs usually occur when call-chains in the
  727. kernel get too deep, especially when interrupts are
  728. involved.
  729. Use this in cases where you see apparently random memory
  730. corruption, especially if it appears in 'struct thread_info'
  731. If in doubt, say "N".
  732. source "lib/Kconfig.kasan"
  733. source "lib/Kconfig.kfence"
  734. endmenu # "Memory Debugging"
  735. config DEBUG_SHIRQ
  736. bool "Debug shared IRQ handlers"
  737. depends on DEBUG_KERNEL
  738. help
  739. Enable this to generate a spurious interrupt just before a shared
  740. interrupt handler is deregistered (generating one when registering
  741. is currently disabled). Drivers need to handle this correctly. Some
  742. don't and need to be caught.
  743. menu "Debug Oops, Lockups and Hangs"
  744. config PANIC_ON_OOPS
  745. bool "Panic on Oops"
  746. help
  747. Say Y here to enable the kernel to panic when it oopses. This
  748. has the same effect as setting oops=panic on the kernel command
  749. line.
  750. This feature is useful to ensure that the kernel does not do
  751. anything erroneous after an oops which could result in data
  752. corruption or other issues.
  753. Say N if unsure.
  754. config PANIC_ON_OOPS_VALUE
  755. int
  756. range 0 1
  757. default 0 if !PANIC_ON_OOPS
  758. default 1 if PANIC_ON_OOPS
  759. config PANIC_TIMEOUT
  760. int "panic timeout"
  761. default 0
  762. help
  763. Set the timeout value (in seconds) until a reboot occurs when
  764. the kernel panics. If n = 0, then we wait forever. A timeout
  765. value n > 0 will wait n seconds before rebooting, while a timeout
  766. value n < 0 will reboot immediately.
  767. config LOCKUP_DETECTOR
  768. bool
  769. config SOFTLOCKUP_DETECTOR
  770. bool "Detect Soft Lockups"
  771. depends on DEBUG_KERNEL && !S390
  772. select LOCKUP_DETECTOR
  773. help
  774. Say Y here to enable the kernel to act as a watchdog to detect
  775. soft lockups.
  776. Softlockups are bugs that cause the kernel to loop in kernel
  777. mode for more than 20 seconds, without giving other tasks a
  778. chance to run. The current stack trace is displayed upon
  779. detection and the system will stay locked up.
  780. config BOOTPARAM_SOFTLOCKUP_PANIC
  781. bool "Panic (Reboot) On Soft Lockups"
  782. depends on SOFTLOCKUP_DETECTOR
  783. help
  784. Say Y here to enable the kernel to panic on "soft lockups",
  785. which are bugs that cause the kernel to loop in kernel
  786. mode for more than 20 seconds (configurable using the watchdog_thresh
  787. sysctl), without giving other tasks a chance to run.
  788. The panic can be used in combination with panic_timeout,
  789. to cause the system to reboot automatically after a
  790. lockup has been detected. This feature is useful for
  791. high-availability systems that have uptime guarantees and
  792. where a lockup must be resolved ASAP.
  793. Say N if unsure.
  794. config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
  795. int
  796. depends on SOFTLOCKUP_DETECTOR
  797. range 0 1
  798. default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
  799. default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
  800. config HARDLOCKUP_DETECTOR_PERF
  801. bool
  802. select SOFTLOCKUP_DETECTOR
  803. #
  804. # Enables a timestamp based low pass filter to compensate for perf based
  805. # hard lockup detection which runs too fast due to turbo modes.
  806. #
  807. config HARDLOCKUP_CHECK_TIMESTAMP
  808. bool
  809. #
  810. # arch/ can define HAVE_HARDLOCKUP_DETECTOR_ARCH to provide their own hard
  811. # lockup detector rather than the perf based detector.
  812. #
  813. config HARDLOCKUP_DETECTOR
  814. bool "Detect Hard Lockups"
  815. depends on DEBUG_KERNEL && !S390
  816. depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_ARCH
  817. select LOCKUP_DETECTOR
  818. select HARDLOCKUP_DETECTOR_PERF if HAVE_HARDLOCKUP_DETECTOR_PERF
  819. help
  820. Say Y here to enable the kernel to act as a watchdog to detect
  821. hard lockups.
  822. Hardlockups are bugs that cause the CPU to loop in kernel mode
  823. for more than 10 seconds, without letting other interrupts have a
  824. chance to run. The current stack trace is displayed upon detection
  825. and the system will stay locked up.
  826. config BOOTPARAM_HARDLOCKUP_PANIC
  827. bool "Panic (Reboot) On Hard Lockups"
  828. depends on HARDLOCKUP_DETECTOR
  829. help
  830. Say Y here to enable the kernel to panic on "hard lockups",
  831. which are bugs that cause the kernel to loop in kernel
  832. mode with interrupts disabled for more than 10 seconds (configurable
  833. using the watchdog_thresh sysctl).
  834. Say N if unsure.
  835. config BOOTPARAM_HARDLOCKUP_PANIC_VALUE
  836. int
  837. depends on HARDLOCKUP_DETECTOR
  838. range 0 1
  839. default 0 if !BOOTPARAM_HARDLOCKUP_PANIC
  840. default 1 if BOOTPARAM_HARDLOCKUP_PANIC
  841. config DETECT_HUNG_TASK
  842. bool "Detect Hung Tasks"
  843. depends on DEBUG_KERNEL
  844. default SOFTLOCKUP_DETECTOR
  845. help
  846. Say Y here to enable the kernel to detect "hung tasks",
  847. which are bugs that cause the task to be stuck in
  848. uninterruptible "D" state indefinitely.
  849. When a hung task is detected, the kernel will print the
  850. current stack trace (which you should report), but the
  851. task will stay in uninterruptible state. If lockdep is
  852. enabled then all held locks will also be reported. This
  853. feature has negligible overhead.
  854. config DEFAULT_HUNG_TASK_TIMEOUT
  855. int "Default timeout for hung task detection (in seconds)"
  856. depends on DETECT_HUNG_TASK
  857. default 120
  858. help
  859. This option controls the default timeout (in seconds) used
  860. to determine when a task has become non-responsive and should
  861. be considered hung.
  862. It can be adjusted at runtime via the kernel.hung_task_timeout_secs
  863. sysctl or by writing a value to
  864. /proc/sys/kernel/hung_task_timeout_secs.
  865. A timeout of 0 disables the check. The default is two minutes.
  866. Keeping the default should be fine in most cases.
  867. config BOOTPARAM_HUNG_TASK_PANIC
  868. bool "Panic (Reboot) On Hung Tasks"
  869. depends on DETECT_HUNG_TASK
  870. help
  871. Say Y here to enable the kernel to panic on "hung tasks",
  872. which are bugs that cause the kernel to leave a task stuck
  873. in uninterruptible "D" state.
  874. The panic can be used in combination with panic_timeout,
  875. to cause the system to reboot automatically after a
  876. hung task has been detected. This feature is useful for
  877. high-availability systems that have uptime guarantees and
  878. where a hung tasks must be resolved ASAP.
  879. Say N if unsure.
  880. config BOOTPARAM_HUNG_TASK_PANIC_VALUE
  881. int
  882. depends on DETECT_HUNG_TASK
  883. range 0 1
  884. default 0 if !BOOTPARAM_HUNG_TASK_PANIC
  885. default 1 if BOOTPARAM_HUNG_TASK_PANIC
  886. config WQ_WATCHDOG
  887. bool "Detect Workqueue Stalls"
  888. depends on DEBUG_KERNEL
  889. help
  890. Say Y here to enable stall detection on workqueues. If a
  891. worker pool doesn't make forward progress on a pending work
  892. item for over a given amount of time, 30s by default, a
  893. warning message is printed along with dump of workqueue
  894. state. This can be configured through kernel parameter
  895. "workqueue.watchdog_thresh" and its sysfs counterpart.
  896. config TEST_LOCKUP
  897. tristate "Test module to generate lockups"
  898. depends on m
  899. help
  900. This builds the "test_lockup" module that helps to make sure
  901. that watchdogs and lockup detectors are working properly.
  902. Depending on module parameters it could emulate soft or hard
  903. lockup, "hung task", or locking arbitrary lock for a long time.
  904. Also it could generate series of lockups with cooling-down periods.
  905. If unsure, say N.
  906. endmenu # "Debug lockups and hangs"
  907. menu "Scheduler Debugging"
  908. config SCHED_DEBUG
  909. bool "Collect scheduler debugging info"
  910. depends on DEBUG_KERNEL && PROC_FS
  911. default y
  912. help
  913. If you say Y here, the /proc/sched_debug file will be provided
  914. that can help debug the scheduler. The runtime overhead of this
  915. option is minimal.
  916. config SCHED_INFO
  917. bool
  918. default n
  919. config SCHEDSTATS
  920. bool "Collect scheduler statistics"
  921. depends on DEBUG_KERNEL && PROC_FS
  922. select SCHED_INFO
  923. help
  924. If you say Y here, additional code will be inserted into the
  925. scheduler and related routines to collect statistics about
  926. scheduler behavior and provide them in /proc/schedstat. These
  927. stats may be useful for both tuning and debugging the scheduler
  928. If you aren't debugging the scheduler or trying to tune a specific
  929. application, you can say N to avoid the very slight overhead
  930. this adds.
  931. endmenu
  932. config DEBUG_TIMEKEEPING
  933. bool "Enable extra timekeeping sanity checking"
  934. help
  935. This option will enable additional timekeeping sanity checks
  936. which may be helpful when diagnosing issues where timekeeping
  937. problems are suspected.
  938. This may include checks in the timekeeping hotpaths, so this
  939. option may have a (very small) performance impact to some
  940. workloads.
  941. If unsure, say N.
  942. config DEBUG_PREEMPT
  943. bool "Debug preemptible kernel"
  944. depends on DEBUG_KERNEL && PREEMPTION && TRACE_IRQFLAGS_SUPPORT
  945. default y
  946. help
  947. If you say Y here then the kernel will use a debug variant of the
  948. commonly used smp_processor_id() function and will print warnings
  949. if kernel code uses it in a preemption-unsafe way. Also, the kernel
  950. will detect preemption count underflows.
  951. menu "Lock Debugging (spinlocks, mutexes, etc...)"
  952. config LOCK_DEBUGGING_SUPPORT
  953. bool
  954. depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  955. default y
  956. config PROVE_LOCKING
  957. bool "Lock debugging: prove locking correctness"
  958. depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
  959. select LOCKDEP
  960. select DEBUG_SPINLOCK
  961. select DEBUG_MUTEXES
  962. select DEBUG_RT_MUTEXES if RT_MUTEXES
  963. select DEBUG_RWSEMS
  964. select DEBUG_WW_MUTEX_SLOWPATH
  965. select DEBUG_LOCK_ALLOC
  966. select PREEMPT_COUNT if !ARCH_NO_PREEMPT
  967. select TRACE_IRQFLAGS
  968. default n
  969. help
  970. This feature enables the kernel to prove that all locking
  971. that occurs in the kernel runtime is mathematically
  972. correct: that under no circumstance could an arbitrary (and
  973. not yet triggered) combination of observed locking
  974. sequences (on an arbitrary number of CPUs, running an
  975. arbitrary number of tasks and interrupt contexts) cause a
  976. deadlock.
  977. In short, this feature enables the kernel to report locking
  978. related deadlocks before they actually occur.
  979. The proof does not depend on how hard and complex a
  980. deadlock scenario would be to trigger: how many
  981. participant CPUs, tasks and irq-contexts would be needed
  982. for it to trigger. The proof also does not depend on
  983. timing: if a race and a resulting deadlock is possible
  984. theoretically (no matter how unlikely the race scenario
  985. is), it will be proven so and will immediately be
  986. reported by the kernel (once the event is observed that
  987. makes the deadlock theoretically possible).
  988. If a deadlock is impossible (i.e. the locking rules, as
  989. observed by the kernel, are mathematically correct), the
  990. kernel reports nothing.
  991. NOTE: this feature can also be enabled for rwlocks, mutexes
  992. and rwsems - in which case all dependencies between these
  993. different locking variants are observed and mapped too, and
  994. the proof of observed correctness is also maintained for an
  995. arbitrary combination of these separate locking variants.
  996. For more details, see Documentation/locking/lockdep-design.rst.
  997. config PROVE_RAW_LOCK_NESTING
  998. bool "Enable raw_spinlock - spinlock nesting checks"
  999. depends on PROVE_LOCKING
  1000. default n
  1001. help
  1002. Enable the raw_spinlock vs. spinlock nesting checks which ensure
  1003. that the lock nesting rules for PREEMPT_RT enabled kernels are
  1004. not violated.
  1005. NOTE: There are known nesting problems. So if you enable this
  1006. option expect lockdep splats until these problems have been fully
  1007. addressed which is work in progress. This config switch allows to
  1008. identify and analyze these problems. It will be removed and the
  1009. check permanentely enabled once the main issues have been fixed.
  1010. If unsure, select N.
  1011. config LOCK_STAT
  1012. bool "Lock usage statistics"
  1013. depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
  1014. select LOCKDEP
  1015. select DEBUG_SPINLOCK
  1016. select DEBUG_MUTEXES
  1017. select DEBUG_RT_MUTEXES if RT_MUTEXES
  1018. select DEBUG_LOCK_ALLOC
  1019. default n
  1020. help
  1021. This feature enables tracking lock contention points
  1022. For more details, see Documentation/locking/lockstat.rst
  1023. This also enables lock events required by "perf lock",
  1024. subcommand of perf.
  1025. If you want to use "perf lock", you also need to turn on
  1026. CONFIG_EVENT_TRACING.
  1027. CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
  1028. (CONFIG_LOCKDEP defines "acquire" and "release" events.)
  1029. config DEBUG_RT_MUTEXES
  1030. bool "RT Mutex debugging, deadlock detection"
  1031. depends on DEBUG_KERNEL && RT_MUTEXES
  1032. help
  1033. This allows rt mutex semantics violations and rt mutex related
  1034. deadlocks (lockups) to be detected and reported automatically.
  1035. config DEBUG_SPINLOCK
  1036. bool "Spinlock and rw-lock debugging: basic checks"
  1037. depends on DEBUG_KERNEL
  1038. select UNINLINE_SPIN_UNLOCK
  1039. help
  1040. Say Y here and build SMP to catch missing spinlock initialization
  1041. and certain other kinds of spinlock errors commonly made. This is
  1042. best used in conjunction with the NMI watchdog so that spinlock
  1043. deadlocks are also debuggable.
  1044. config DEBUG_MUTEXES
  1045. bool "Mutex debugging: basic checks"
  1046. depends on DEBUG_KERNEL
  1047. help
  1048. This feature allows mutex semantics violations to be detected and
  1049. reported.
  1050. config DEBUG_WW_MUTEX_SLOWPATH
  1051. bool "Wait/wound mutex debugging: Slowpath testing"
  1052. depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
  1053. select DEBUG_LOCK_ALLOC
  1054. select DEBUG_SPINLOCK
  1055. select DEBUG_MUTEXES
  1056. help
  1057. This feature enables slowpath testing for w/w mutex users by
  1058. injecting additional -EDEADLK wound/backoff cases. Together with
  1059. the full mutex checks enabled with (CONFIG_PROVE_LOCKING) this
  1060. will test all possible w/w mutex interface abuse with the
  1061. exception of simply not acquiring all the required locks.
  1062. Note that this feature can introduce significant overhead, so
  1063. it really should not be enabled in a production or distro kernel,
  1064. even a debug kernel. If you are a driver writer, enable it. If
  1065. you are a distro, do not.
  1066. config DEBUG_RWSEMS
  1067. bool "RW Semaphore debugging: basic checks"
  1068. depends on DEBUG_KERNEL
  1069. help
  1070. This debugging feature allows mismatched rw semaphore locks
  1071. and unlocks to be detected and reported.
  1072. config DEBUG_LOCK_ALLOC
  1073. bool "Lock debugging: detect incorrect freeing of live locks"
  1074. depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
  1075. select DEBUG_SPINLOCK
  1076. select DEBUG_MUTEXES
  1077. select DEBUG_RT_MUTEXES if RT_MUTEXES
  1078. select LOCKDEP
  1079. help
  1080. This feature will check whether any held lock (spinlock, rwlock,
  1081. mutex or rwsem) is incorrectly freed by the kernel, via any of the
  1082. memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
  1083. vfree(), etc.), whether a live lock is incorrectly reinitialized via
  1084. spin_lock_init()/mutex_init()/etc., or whether there is any lock
  1085. held during task exit.
  1086. config LOCKDEP
  1087. bool
  1088. depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
  1089. select STACKTRACE
  1090. select KALLSYMS
  1091. select KALLSYMS_ALL
  1092. config LOCKDEP_SMALL
  1093. bool
  1094. config DEBUG_LOCKDEP
  1095. bool "Lock dependency engine debugging"
  1096. depends on DEBUG_KERNEL && LOCKDEP
  1097. help
  1098. If you say Y here, the lock dependency engine will do
  1099. additional runtime checks to debug itself, at the price
  1100. of more runtime overhead.
  1101. config DEBUG_ATOMIC_SLEEP
  1102. bool "Sleep inside atomic section checking"
  1103. select PREEMPT_COUNT
  1104. depends on DEBUG_KERNEL
  1105. depends on !ARCH_NO_PREEMPT
  1106. help
  1107. If you say Y here, various routines which may sleep will become very
  1108. noisy if they are called inside atomic sections: when a spinlock is
  1109. held, inside an rcu read side critical section, inside preempt disabled
  1110. sections, inside an interrupt, etc...
  1111. config DEBUG_LOCKING_API_SELFTESTS
  1112. bool "Locking API boot-time self-tests"
  1113. depends on DEBUG_KERNEL
  1114. help
  1115. Say Y here if you want the kernel to run a short self-test during
  1116. bootup. The self-test checks whether common types of locking bugs
  1117. are detected by debugging mechanisms or not. (if you disable
  1118. lock debugging then those bugs wont be detected of course.)
  1119. The following locking APIs are covered: spinlocks, rwlocks,
  1120. mutexes and rwsems.
  1121. config LOCK_TORTURE_TEST
  1122. tristate "torture tests for locking"
  1123. depends on DEBUG_KERNEL
  1124. select TORTURE_TEST
  1125. help
  1126. This option provides a kernel module that runs torture tests
  1127. on kernel locking primitives. The kernel module may be built
  1128. after the fact on the running kernel to be tested, if desired.
  1129. Say Y here if you want kernel locking-primitive torture tests
  1130. to be built into the kernel.
  1131. Say M if you want these torture tests to build as a module.
  1132. Say N if you are unsure.
  1133. config WW_MUTEX_SELFTEST
  1134. tristate "Wait/wound mutex selftests"
  1135. help
  1136. This option provides a kernel module that runs tests on the
  1137. on the struct ww_mutex locking API.
  1138. It is recommended to enable DEBUG_WW_MUTEX_SLOWPATH in conjunction
  1139. with this test harness.
  1140. Say M if you want these self tests to build as a module.
  1141. Say N if you are unsure.
  1142. config SCF_TORTURE_TEST
  1143. tristate "torture tests for smp_call_function*()"
  1144. depends on DEBUG_KERNEL
  1145. select TORTURE_TEST
  1146. help
  1147. This option provides a kernel module that runs torture tests
  1148. on the smp_call_function() family of primitives. The kernel
  1149. module may be built after the fact on the running kernel to
  1150. be tested, if desired.
  1151. config CSD_LOCK_WAIT_DEBUG
  1152. bool "Debugging for csd_lock_wait(), called from smp_call_function*()"
  1153. depends on DEBUG_KERNEL
  1154. depends on 64BIT
  1155. default n
  1156. help
  1157. This option enables debug prints when CPUs are slow to respond
  1158. to the smp_call_function*() IPI wrappers. These debug prints
  1159. include the IPI handler function currently executing (if any)
  1160. and relevant stack traces.
  1161. endmenu # lock debugging
  1162. config TRACE_IRQFLAGS
  1163. depends on TRACE_IRQFLAGS_SUPPORT
  1164. bool
  1165. help
  1166. Enables hooks to interrupt enabling and disabling for
  1167. either tracing or lock debugging.
  1168. config TRACE_IRQFLAGS_NMI
  1169. def_bool y
  1170. depends on TRACE_IRQFLAGS
  1171. depends on TRACE_IRQFLAGS_NMI_SUPPORT
  1172. config STACKTRACE
  1173. bool "Stack backtrace support"
  1174. depends on STACKTRACE_SUPPORT
  1175. help
  1176. This option causes the kernel to create a /proc/pid/stack for
  1177. every process, showing its current stack trace.
  1178. It is also used by various kernel debugging features that require
  1179. stack trace generation.
  1180. config WARN_ALL_UNSEEDED_RANDOM
  1181. bool "Warn for all uses of unseeded randomness"
  1182. default n
  1183. help
  1184. Some parts of the kernel contain bugs relating to their use of
  1185. cryptographically secure random numbers before it's actually possible
  1186. to generate those numbers securely. This setting ensures that these
  1187. flaws don't go unnoticed, by enabling a message, should this ever
  1188. occur. This will allow people with obscure setups to know when things
  1189. are going wrong, so that they might contact developers about fixing
  1190. it.
  1191. Unfortunately, on some models of some architectures getting
  1192. a fully seeded CRNG is extremely difficult, and so this can
  1193. result in dmesg getting spammed for a surprisingly long
  1194. time. This is really bad from a security perspective, and
  1195. so architecture maintainers really need to do what they can
  1196. to get the CRNG seeded sooner after the system is booted.
  1197. However, since users cannot do anything actionable to
  1198. address this, by default the kernel will issue only a single
  1199. warning for the first use of unseeded randomness.
  1200. Say Y here if you want to receive warnings for all uses of
  1201. unseeded randomness. This will be of use primarily for
  1202. those developers interested in improving the security of
  1203. Linux kernels running on their architecture (or
  1204. subarchitecture).
  1205. config DEBUG_KOBJECT
  1206. bool "kobject debugging"
  1207. depends on DEBUG_KERNEL
  1208. help
  1209. If you say Y here, some extra kobject debugging messages will be sent
  1210. to the syslog.
  1211. config DEBUG_KOBJECT_RELEASE
  1212. bool "kobject release debugging"
  1213. depends on DEBUG_OBJECTS_TIMERS
  1214. help
  1215. kobjects are reference counted objects. This means that their
  1216. last reference count put is not predictable, and the kobject can
  1217. live on past the point at which a driver decides to drop it's
  1218. initial reference to the kobject gained on allocation. An
  1219. example of this would be a struct device which has just been
  1220. unregistered.
  1221. However, some buggy drivers assume that after such an operation,
  1222. the memory backing the kobject can be immediately freed. This
  1223. goes completely against the principles of a refcounted object.
  1224. If you say Y here, the kernel will delay the release of kobjects
  1225. on the last reference count to improve the visibility of this
  1226. kind of kobject release bug.
  1227. config HAVE_DEBUG_BUGVERBOSE
  1228. bool
  1229. menu "Debug kernel data structures"
  1230. config DEBUG_LIST
  1231. bool "Debug linked list manipulation"
  1232. depends on DEBUG_KERNEL || BUG_ON_DATA_CORRUPTION
  1233. help
  1234. Enable this to turn on extended checks in the linked-list
  1235. walking routines.
  1236. If unsure, say N.
  1237. config DEBUG_PLIST
  1238. bool "Debug priority linked list manipulation"
  1239. depends on DEBUG_KERNEL
  1240. help
  1241. Enable this to turn on extended checks in the priority-ordered
  1242. linked-list (plist) walking routines. This checks the entire
  1243. list multiple times during each manipulation.
  1244. If unsure, say N.
  1245. config DEBUG_SG
  1246. bool "Debug SG table operations"
  1247. depends on DEBUG_KERNEL
  1248. help
  1249. Enable this to turn on checks on scatter-gather tables. This can
  1250. help find problems with drivers that do not properly initialize
  1251. their sg tables.
  1252. If unsure, say N.
  1253. config DEBUG_NOTIFIERS
  1254. bool "Debug notifier call chains"
  1255. depends on DEBUG_KERNEL
  1256. help
  1257. Enable this to turn on sanity checking for notifier call chains.
  1258. This is most useful for kernel developers to make sure that
  1259. modules properly unregister themselves from notifier chains.
  1260. This is a relatively cheap check but if you care about maximum
  1261. performance, say N.
  1262. config BUG_ON_DATA_CORRUPTION
  1263. bool "Trigger a BUG when data corruption is detected"
  1264. select DEBUG_LIST
  1265. help
  1266. Select this option if the kernel should BUG when it encounters
  1267. data corruption in kernel memory structures when they get checked
  1268. for validity.
  1269. If unsure, say N.
  1270. endmenu
  1271. config DEBUG_CREDENTIALS
  1272. bool "Debug credential management"
  1273. depends on DEBUG_KERNEL
  1274. help
  1275. Enable this to turn on some debug checking for credential
  1276. management. The additional code keeps track of the number of
  1277. pointers from task_structs to any given cred struct, and checks to
  1278. see that this number never exceeds the usage count of the cred
  1279. struct.
  1280. Furthermore, if SELinux is enabled, this also checks that the
  1281. security pointer in the cred struct is never seen to be invalid.
  1282. If unsure, say N.
  1283. source "kernel/rcu/Kconfig.debug"
  1284. config DEBUG_WQ_FORCE_RR_CPU
  1285. bool "Force round-robin CPU selection for unbound work items"
  1286. depends on DEBUG_KERNEL
  1287. default n
  1288. help
  1289. Workqueue used to implicitly guarantee that work items queued
  1290. without explicit CPU specified are put on the local CPU. This
  1291. guarantee is no longer true and while local CPU is still
  1292. preferred work items may be put on foreign CPUs. Kernel
  1293. parameter "workqueue.debug_force_rr_cpu" is added to force
  1294. round-robin CPU selection to flush out usages which depend on the
  1295. now broken guarantee. This config option enables the debug
  1296. feature by default. When enabled, memory and cache locality will
  1297. be impacted.
  1298. config DEBUG_BLOCK_EXT_DEVT
  1299. bool "Force extended block device numbers and spread them"
  1300. depends on DEBUG_KERNEL
  1301. depends on BLOCK
  1302. default n
  1303. help
  1304. BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
  1305. SOME DISTRIBUTIONS. DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
  1306. YOU ARE DOING. Distros, please enable this and fix whatever
  1307. is broken.
  1308. Conventionally, block device numbers are allocated from
  1309. predetermined contiguous area. However, extended block area
  1310. may introduce non-contiguous block device numbers. This
  1311. option forces most block device numbers to be allocated from
  1312. the extended space and spreads them to discover kernel or
  1313. userland code paths which assume predetermined contiguous
  1314. device number allocation.
  1315. Note that turning on this debug option shuffles all the
  1316. device numbers for all IDE and SCSI devices including libata
  1317. ones, so root partition specified using device number
  1318. directly (via rdev or root=MAJ:MIN) won't work anymore.
  1319. Textual device names (root=/dev/sdXn) will continue to work.
  1320. Say N if you are unsure.
  1321. config CPU_HOTPLUG_STATE_CONTROL
  1322. bool "Enable CPU hotplug state control"
  1323. depends on DEBUG_KERNEL
  1324. depends on HOTPLUG_CPU
  1325. default n
  1326. help
  1327. Allows to write steps between "offline" and "online" to the CPUs
  1328. sysfs target file so states can be stepped granular. This is a debug
  1329. option for now as the hotplug machinery cannot be stopped and
  1330. restarted at arbitrary points yet.
  1331. Say N if your are unsure.
  1332. config LATENCYTOP
  1333. bool "Latency measuring infrastructure"
  1334. depends on DEBUG_KERNEL
  1335. depends on STACKTRACE_SUPPORT
  1336. depends on PROC_FS
  1337. depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86
  1338. select KALLSYMS
  1339. select KALLSYMS_ALL
  1340. select STACKTRACE
  1341. select SCHEDSTATS
  1342. select SCHED_DEBUG
  1343. help
  1344. Enable this option if you want to use the LatencyTOP tool
  1345. to find out which userspace is blocking on what kernel operations.
  1346. source "kernel/trace/Kconfig"
  1347. config PROVIDE_OHCI1394_DMA_INIT
  1348. bool "Remote debugging over FireWire early on boot"
  1349. depends on PCI && X86
  1350. help
  1351. If you want to debug problems which hang or crash the kernel early
  1352. on boot and the crashing machine has a FireWire port, you can use
  1353. this feature to remotely access the memory of the crashed machine
  1354. over FireWire. This employs remote DMA as part of the OHCI1394
  1355. specification which is now the standard for FireWire controllers.
  1356. With remote DMA, you can monitor the printk buffer remotely using
  1357. firescope and access all memory below 4GB using fireproxy from gdb.
  1358. Even controlling a kernel debugger is possible using remote DMA.
  1359. Usage:
  1360. If ohci1394_dma=early is used as boot parameter, it will initialize
  1361. all OHCI1394 controllers which are found in the PCI config space.
  1362. As all changes to the FireWire bus such as enabling and disabling
  1363. devices cause a bus reset and thereby disable remote DMA for all
  1364. devices, be sure to have the cable plugged and FireWire enabled on
  1365. the debugging host before booting the debug target for debugging.
  1366. This code (~1k) is freed after boot. By then, the firewire stack
  1367. in charge of the OHCI-1394 controllers should be used instead.
  1368. See Documentation/core-api/debugging-via-ohci1394.rst for more information.
  1369. source "samples/Kconfig"
  1370. config ARCH_HAS_DEVMEM_IS_ALLOWED
  1371. bool
  1372. config STRICT_DEVMEM
  1373. bool "Filter access to /dev/mem"
  1374. depends on MMU && DEVMEM
  1375. depends on ARCH_HAS_DEVMEM_IS_ALLOWED
  1376. default y if PPC || X86 || ARM64
  1377. help
  1378. If this option is disabled, you allow userspace (root) access to all
  1379. of memory, including kernel and userspace memory. Accidental
  1380. access to this is obviously disastrous, but specific access can
  1381. be used by people debugging the kernel. Note that with PAT support
  1382. enabled, even in this case there are restrictions on /dev/mem
  1383. use due to the cache aliasing requirements.
  1384. If this option is switched on, and IO_STRICT_DEVMEM=n, the /dev/mem
  1385. file only allows userspace access to PCI space and the BIOS code and
  1386. data regions. This is sufficient for dosemu and X and all common
  1387. users of /dev/mem.
  1388. If in doubt, say Y.
  1389. config IO_STRICT_DEVMEM
  1390. bool "Filter I/O access to /dev/mem"
  1391. depends on STRICT_DEVMEM
  1392. help
  1393. If this option is disabled, you allow userspace (root) access to all
  1394. io-memory regardless of whether a driver is actively using that
  1395. range. Accidental access to this is obviously disastrous, but
  1396. specific access can be used by people debugging kernel drivers.
  1397. If this option is switched on, the /dev/mem file only allows
  1398. userspace access to *idle* io-memory ranges (see /proc/iomem) This
  1399. may break traditional users of /dev/mem (dosemu, legacy X, etc...)
  1400. if the driver using a given range cannot be disabled.
  1401. If in doubt, say Y.
  1402. menu "$(SRCARCH) Debugging"
  1403. source "arch/$(SRCARCH)/Kconfig.debug"
  1404. endmenu
  1405. menu "Kernel Testing and Coverage"
  1406. source "lib/kunit/Kconfig"
  1407. config NOTIFIER_ERROR_INJECTION
  1408. tristate "Notifier error injection"
  1409. depends on DEBUG_KERNEL
  1410. select DEBUG_FS
  1411. help
  1412. This option provides the ability to inject artificial errors to
  1413. specified notifier chain callbacks. It is useful to test the error
  1414. handling of notifier call chain failures.
  1415. Say N if unsure.
  1416. config PM_NOTIFIER_ERROR_INJECT
  1417. tristate "PM notifier error injection module"
  1418. depends on PM && NOTIFIER_ERROR_INJECTION
  1419. default m if PM_DEBUG
  1420. help
  1421. This option provides the ability to inject artificial errors to
  1422. PM notifier chain callbacks. It is controlled through debugfs
  1423. interface /sys/kernel/debug/notifier-error-inject/pm
  1424. If the notifier call chain should be failed with some events
  1425. notified, write the error code to "actions/<notifier event>/error".
  1426. Example: Inject PM suspend error (-12 = -ENOMEM)
  1427. # cd /sys/kernel/debug/notifier-error-inject/pm/
  1428. # echo -12 > actions/PM_SUSPEND_PREPARE/error
  1429. # echo mem > /sys/power/state
  1430. bash: echo: write error: Cannot allocate memory
  1431. To compile this code as a module, choose M here: the module will
  1432. be called pm-notifier-error-inject.
  1433. If unsure, say N.
  1434. config OF_RECONFIG_NOTIFIER_ERROR_INJECT
  1435. tristate "OF reconfig notifier error injection module"
  1436. depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
  1437. help
  1438. This option provides the ability to inject artificial errors to
  1439. OF reconfig notifier chain callbacks. It is controlled
  1440. through debugfs interface under
  1441. /sys/kernel/debug/notifier-error-inject/OF-reconfig/
  1442. If the notifier call chain should be failed with some events
  1443. notified, write the error code to "actions/<notifier event>/error".
  1444. To compile this code as a module, choose M here: the module will
  1445. be called of-reconfig-notifier-error-inject.
  1446. If unsure, say N.
  1447. config NETDEV_NOTIFIER_ERROR_INJECT
  1448. tristate "Netdev notifier error injection module"
  1449. depends on NET && NOTIFIER_ERROR_INJECTION
  1450. help
  1451. This option provides the ability to inject artificial errors to
  1452. netdevice notifier chain callbacks. It is controlled through debugfs
  1453. interface /sys/kernel/debug/notifier-error-inject/netdev
  1454. If the notifier call chain should be failed with some events
  1455. notified, write the error code to "actions/<notifier event>/error".
  1456. Example: Inject netdevice mtu change error (-22 = -EINVAL)
  1457. # cd /sys/kernel/debug/notifier-error-inject/netdev
  1458. # echo -22 > actions/NETDEV_CHANGEMTU/error
  1459. # ip link set eth0 mtu 1024
  1460. RTNETLINK answers: Invalid argument
  1461. To compile this code as a module, choose M here: the module will
  1462. be called netdev-notifier-error-inject.
  1463. If unsure, say N.
  1464. config FUNCTION_ERROR_INJECTION
  1465. def_bool y
  1466. depends on HAVE_FUNCTION_ERROR_INJECTION && KPROBES
  1467. config FAULT_INJECTION
  1468. bool "Fault-injection framework"
  1469. depends on DEBUG_KERNEL
  1470. help
  1471. Provide fault-injection framework.
  1472. For more details, see Documentation/fault-injection/.
  1473. config FAILSLAB
  1474. bool "Fault-injection capability for kmalloc"
  1475. depends on FAULT_INJECTION
  1476. depends on SLAB || SLUB
  1477. help
  1478. Provide fault-injection capability for kmalloc.
  1479. config FAIL_PAGE_ALLOC
  1480. bool "Fault-injection capability for alloc_pages()"
  1481. depends on FAULT_INJECTION
  1482. help
  1483. Provide fault-injection capability for alloc_pages().
  1484. config FAULT_INJECTION_USERCOPY
  1485. bool "Fault injection capability for usercopy functions"
  1486. depends on FAULT_INJECTION
  1487. help
  1488. Provides fault-injection capability to inject failures
  1489. in usercopy functions (copy_from_user(), get_user(), ...).
  1490. config FAIL_MAKE_REQUEST
  1491. bool "Fault-injection capability for disk IO"
  1492. depends on FAULT_INJECTION && BLOCK
  1493. help
  1494. Provide fault-injection capability for disk IO.
  1495. config FAIL_IO_TIMEOUT
  1496. bool "Fault-injection capability for faking disk interrupts"
  1497. depends on FAULT_INJECTION && BLOCK
  1498. help
  1499. Provide fault-injection capability on end IO handling. This
  1500. will make the block layer "forget" an interrupt as configured,
  1501. thus exercising the error handling.
  1502. Only works with drivers that use the generic timeout handling,
  1503. for others it wont do anything.
  1504. config FAIL_FUTEX
  1505. bool "Fault-injection capability for futexes"
  1506. select DEBUG_FS
  1507. depends on FAULT_INJECTION && FUTEX
  1508. help
  1509. Provide fault-injection capability for futexes.
  1510. config FAULT_INJECTION_DEBUG_FS
  1511. bool "Debugfs entries for fault-injection capabilities"
  1512. depends on FAULT_INJECTION && SYSFS && DEBUG_FS
  1513. help
  1514. Enable configuration of fault-injection capabilities via debugfs.
  1515. config FAIL_FUNCTION
  1516. bool "Fault-injection capability for functions"
  1517. depends on FAULT_INJECTION_DEBUG_FS && FUNCTION_ERROR_INJECTION
  1518. help
  1519. Provide function-based fault-injection capability.
  1520. This will allow you to override a specific function with a return
  1521. with given return value. As a result, function caller will see
  1522. an error value and have to handle it. This is useful to test the
  1523. error handling in various subsystems.
  1524. config FAIL_MMC_REQUEST
  1525. bool "Fault-injection capability for MMC IO"
  1526. depends on FAULT_INJECTION_DEBUG_FS && MMC
  1527. help
  1528. Provide fault-injection capability for MMC IO.
  1529. This will make the mmc core return data errors. This is
  1530. useful to test the error handling in the mmc block device
  1531. and to test how the mmc host driver handles retries from
  1532. the block device.
  1533. config FAULT_INJECTION_STACKTRACE_FILTER
  1534. bool "stacktrace filter for fault-injection capabilities"
  1535. depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
  1536. depends on !X86_64
  1537. select STACKTRACE
  1538. depends on FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86
  1539. help
  1540. Provide stacktrace filter for fault-injection capabilities
  1541. config ARCH_HAS_KCOV
  1542. bool
  1543. help
  1544. An architecture should select this when it can successfully
  1545. build and run with CONFIG_KCOV. This typically requires
  1546. disabling instrumentation for some early boot code.
  1547. config CC_HAS_SANCOV_TRACE_PC
  1548. def_bool $(cc-option,-fsanitize-coverage=trace-pc)
  1549. config KCOV
  1550. bool "Code coverage for fuzzing"
  1551. depends on ARCH_HAS_KCOV
  1552. depends on CC_HAS_SANCOV_TRACE_PC || GCC_PLUGINS
  1553. select DEBUG_FS
  1554. select GCC_PLUGIN_SANCOV if !CC_HAS_SANCOV_TRACE_PC
  1555. select SKB_EXTENSIONS if NET
  1556. help
  1557. KCOV exposes kernel code coverage information in a form suitable
  1558. for coverage-guided fuzzing (randomized testing).
  1559. If RANDOMIZE_BASE is enabled, PC values will not be stable across
  1560. different machines and across reboots. If you need stable PC values,
  1561. disable RANDOMIZE_BASE.
  1562. For more details, see Documentation/dev-tools/kcov.rst.
  1563. config KCOV_ENABLE_COMPARISONS
  1564. bool "Enable comparison operands collection by KCOV"
  1565. depends on KCOV
  1566. depends on $(cc-option,-fsanitize-coverage=trace-cmp)
  1567. help
  1568. KCOV also exposes operands of every comparison in the instrumented
  1569. code along with operand sizes and PCs of the comparison instructions.
  1570. These operands can be used by fuzzing engines to improve the quality
  1571. of fuzzing coverage.
  1572. config KCOV_INSTRUMENT_ALL
  1573. bool "Instrument all code by default"
  1574. depends on KCOV
  1575. default y
  1576. help
  1577. If you are doing generic system call fuzzing (like e.g. syzkaller),
  1578. then you will want to instrument the whole kernel and you should
  1579. say y here. If you are doing more targeted fuzzing (like e.g.
  1580. filesystem fuzzing with AFL) then you will want to enable coverage
  1581. for more specific subsets of files, and should say n here.
  1582. config KCOV_IRQ_AREA_SIZE
  1583. hex "Size of interrupt coverage collection area in words"
  1584. depends on KCOV
  1585. default 0x40000
  1586. help
  1587. KCOV uses preallocated per-cpu areas to collect coverage from
  1588. soft interrupts. This specifies the size of those areas in the
  1589. number of unsigned long words.
  1590. menuconfig RUNTIME_TESTING_MENU
  1591. bool "Runtime Testing"
  1592. def_bool y
  1593. if RUNTIME_TESTING_MENU
  1594. config LKDTM
  1595. tristate "Linux Kernel Dump Test Tool Module"
  1596. depends on DEBUG_FS
  1597. help
  1598. This module enables testing of the different dumping mechanisms by
  1599. inducing system failures at predefined crash points.
  1600. If you don't need it: say N
  1601. Choose M here to compile this code as a module. The module will be
  1602. called lkdtm.
  1603. Documentation on how to use the module can be found in
  1604. Documentation/fault-injection/provoke-crashes.rst
  1605. config TEST_LIST_SORT
  1606. tristate "Linked list sorting test"
  1607. depends on DEBUG_KERNEL || m
  1608. help
  1609. Enable this to turn on 'list_sort()' function test. This test is
  1610. executed only once during system boot (so affects only boot time),
  1611. or at module load time.
  1612. If unsure, say N.
  1613. config TEST_MIN_HEAP
  1614. tristate "Min heap test"
  1615. depends on DEBUG_KERNEL || m
  1616. help
  1617. Enable this to turn on min heap function tests. This test is
  1618. executed only once during system boot (so affects only boot time),
  1619. or at module load time.
  1620. If unsure, say N.
  1621. config TEST_SORT
  1622. tristate "Array-based sort test"
  1623. depends on DEBUG_KERNEL || m
  1624. help
  1625. This option enables the self-test function of 'sort()' at boot,
  1626. or at module load time.
  1627. If unsure, say N.
  1628. config KPROBES_SANITY_TEST
  1629. bool "Kprobes sanity tests"
  1630. depends on DEBUG_KERNEL
  1631. depends on KPROBES
  1632. help
  1633. This option provides for testing basic kprobes functionality on
  1634. boot. Samples of kprobe and kretprobe are inserted and
  1635. verified for functionality.
  1636. Say N if you are unsure.
  1637. config BACKTRACE_SELF_TEST
  1638. tristate "Self test for the backtrace code"
  1639. depends on DEBUG_KERNEL
  1640. help
  1641. This option provides a kernel module that can be used to test
  1642. the kernel stack backtrace code. This option is not useful
  1643. for distributions or general kernels, but only for kernel
  1644. developers working on architecture code.
  1645. Note that if you want to also test saved backtraces, you will
  1646. have to enable STACKTRACE as well.
  1647. Say N if you are unsure.
  1648. config RBTREE_TEST
  1649. tristate "Red-Black tree test"
  1650. depends on DEBUG_KERNEL
  1651. help
  1652. A benchmark measuring the performance of the rbtree library.
  1653. Also includes rbtree invariant checks.
  1654. config REED_SOLOMON_TEST
  1655. tristate "Reed-Solomon library test"
  1656. depends on DEBUG_KERNEL || m
  1657. select REED_SOLOMON
  1658. select REED_SOLOMON_ENC16
  1659. select REED_SOLOMON_DEC16
  1660. help
  1661. This option enables the self-test function of rslib at boot,
  1662. or at module load time.
  1663. If unsure, say N.
  1664. config INTERVAL_TREE_TEST
  1665. tristate "Interval tree test"
  1666. depends on DEBUG_KERNEL
  1667. select INTERVAL_TREE
  1668. help
  1669. A benchmark measuring the performance of the interval tree library
  1670. config PERCPU_TEST
  1671. tristate "Per cpu operations test"
  1672. depends on m && DEBUG_KERNEL
  1673. help
  1674. Enable this option to build test module which validates per-cpu
  1675. operations.
  1676. If unsure, say N.
  1677. config ATOMIC64_SELFTEST
  1678. tristate "Perform an atomic64_t self-test"
  1679. help
  1680. Enable this option to test the atomic64_t functions at boot or
  1681. at module load time.
  1682. If unsure, say N.
  1683. config ASYNC_RAID6_TEST
  1684. tristate "Self test for hardware accelerated raid6 recovery"
  1685. depends on ASYNC_RAID6_RECOV
  1686. select ASYNC_MEMCPY
  1687. help
  1688. This is a one-shot self test that permutes through the
  1689. recovery of all the possible two disk failure scenarios for a
  1690. N-disk array. Recovery is performed with the asynchronous
  1691. raid6 recovery routines, and will optionally use an offload
  1692. engine if one is available.
  1693. If unsure, say N.
  1694. config TEST_HEXDUMP
  1695. tristate "Test functions located in the hexdump module at runtime"
  1696. config TEST_STRING_HELPERS
  1697. tristate "Test functions located in the string_helpers module at runtime"
  1698. config TEST_STRSCPY
  1699. tristate "Test strscpy*() family of functions at runtime"
  1700. config TEST_KSTRTOX
  1701. tristate "Test kstrto*() family of functions at runtime"
  1702. config TEST_PRINTF
  1703. tristate "Test printf() family of functions at runtime"
  1704. config TEST_BITMAP
  1705. tristate "Test bitmap_*() family of functions at runtime"
  1706. help
  1707. Enable this option to test the bitmap functions at boot.
  1708. If unsure, say N.
  1709. config TEST_UUID
  1710. tristate "Test functions located in the uuid module at runtime"
  1711. config TEST_XARRAY
  1712. tristate "Test the XArray code at runtime"
  1713. config TEST_OVERFLOW
  1714. tristate "Test check_*_overflow() functions at runtime"
  1715. config TEST_RHASHTABLE
  1716. tristate "Perform selftest on resizable hash table"
  1717. help
  1718. Enable this option to test the rhashtable functions at boot.
  1719. If unsure, say N.
  1720. config TEST_HASH
  1721. tristate "Perform selftest on hash functions"
  1722. help
  1723. Enable this option to test the kernel's integer (<linux/hash.h>),
  1724. string (<linux/stringhash.h>), and siphash (<linux/siphash.h>)
  1725. hash functions on boot (or module load).
  1726. This is intended to help people writing architecture-specific
  1727. optimized versions. If unsure, say N.
  1728. config TEST_IDA
  1729. tristate "Perform selftest on IDA functions"
  1730. config TEST_PARMAN
  1731. tristate "Perform selftest on priority array manager"
  1732. depends on PARMAN
  1733. help
  1734. Enable this option to test priority array manager on boot
  1735. (or module load).
  1736. If unsure, say N.
  1737. config TEST_IRQ_TIMINGS
  1738. bool "IRQ timings selftest"
  1739. depends on IRQ_TIMINGS
  1740. help
  1741. Enable this option to test the irq timings code on boot.
  1742. If unsure, say N.
  1743. config TEST_LKM
  1744. tristate "Test module loading with 'hello world' module"
  1745. depends on m
  1746. help
  1747. This builds the "test_module" module that emits "Hello, world"
  1748. on printk when loaded. It is designed to be used for basic
  1749. evaluation of the module loading subsystem (for example when
  1750. validating module verification). It lacks any extra dependencies,
  1751. and will not normally be loaded by the system unless explicitly
  1752. requested by name.
  1753. If unsure, say N.
  1754. config TEST_BITOPS
  1755. tristate "Test module for compilation of bitops operations"
  1756. depends on m
  1757. help
  1758. This builds the "test_bitops" module that is much like the
  1759. TEST_LKM module except that it does a basic exercise of the
  1760. set/clear_bit macros and get_count_order/long to make sure there are
  1761. no compiler warnings from C=1 sparse checker or -Wextra
  1762. compilations. It has no dependencies and doesn't run or load unless
  1763. explicitly requested by name. for example: modprobe test_bitops.
  1764. If unsure, say N.
  1765. config TEST_VMALLOC
  1766. tristate "Test module for stress/performance analysis of vmalloc allocator"
  1767. default n
  1768. depends on MMU
  1769. depends on m
  1770. help
  1771. This builds the "test_vmalloc" module that should be used for
  1772. stress and performance analysis. So, any new change for vmalloc
  1773. subsystem can be evaluated from performance and stability point
  1774. of view.
  1775. If unsure, say N.
  1776. config TEST_USER_COPY
  1777. tristate "Test user/kernel boundary protections"
  1778. depends on m
  1779. help
  1780. This builds the "test_user_copy" module that runs sanity checks
  1781. on the copy_to/from_user infrastructure, making sure basic
  1782. user/kernel boundary testing is working. If it fails to load,
  1783. a regression has been detected in the user/kernel memory boundary
  1784. protections.
  1785. If unsure, say N.
  1786. config TEST_BPF
  1787. tristate "Test BPF filter functionality"
  1788. depends on m && NET
  1789. help
  1790. This builds the "test_bpf" module that runs various test vectors
  1791. against the BPF interpreter or BPF JIT compiler depending on the
  1792. current setting. This is in particular useful for BPF JIT compiler
  1793. development, but also to run regression tests against changes in
  1794. the interpreter code. It also enables test stubs for eBPF maps and
  1795. verifier used by user space verifier testsuite.
  1796. If unsure, say N.
  1797. config TEST_BLACKHOLE_DEV
  1798. tristate "Test blackhole netdev functionality"
  1799. depends on m && NET
  1800. help
  1801. This builds the "test_blackhole_dev" module that validates the
  1802. data path through this blackhole netdev.
  1803. If unsure, say N.
  1804. config FIND_BIT_BENCHMARK
  1805. tristate "Test find_bit functions"
  1806. help
  1807. This builds the "test_find_bit" module that measure find_*_bit()
  1808. functions performance.
  1809. If unsure, say N.
  1810. config TEST_FIRMWARE
  1811. tristate "Test firmware loading via userspace interface"
  1812. depends on FW_LOADER
  1813. help
  1814. This builds the "test_firmware" module that creates a userspace
  1815. interface for testing firmware loading. This can be used to
  1816. control the triggering of firmware loading without needing an
  1817. actual firmware-using device. The contents can be rechecked by
  1818. userspace.
  1819. If unsure, say N.
  1820. config TEST_SYSCTL
  1821. tristate "sysctl test driver"
  1822. depends on PROC_SYSCTL
  1823. help
  1824. This builds the "test_sysctl" module. This driver enables to test the
  1825. proc sysctl interfaces available to drivers safely without affecting
  1826. production knobs which might alter system functionality.
  1827. If unsure, say N.
  1828. config BITFIELD_KUNIT
  1829. tristate "KUnit test bitfield functions at runtime"
  1830. depends on KUNIT
  1831. help
  1832. Enable this option to test the bitfield functions at boot.
  1833. KUnit tests run during boot and output the results to the debug log
  1834. in TAP format (http://testanything.org/). Only useful for kernel devs
  1835. running the KUnit test harness, and not intended for inclusion into a
  1836. production build.
  1837. For more information on KUnit and unit tests in general please refer
  1838. to the KUnit documentation in Documentation/dev-tools/kunit/.
  1839. If unsure, say N.
  1840. config SYSCTL_KUNIT_TEST
  1841. tristate "KUnit test for sysctl" if !KUNIT_ALL_TESTS
  1842. depends on KUNIT
  1843. default KUNIT_ALL_TESTS
  1844. help
  1845. This builds the proc sysctl unit test, which runs on boot.
  1846. Tests the API contract and implementation correctness of sysctl.
  1847. For more information on KUnit and unit tests in general please refer
  1848. to the KUnit documentation in Documentation/dev-tools/kunit/.
  1849. If unsure, say N.
  1850. config LIST_KUNIT_TEST
  1851. tristate "KUnit Test for Kernel Linked-list structures" if !KUNIT_ALL_TESTS
  1852. depends on KUNIT
  1853. default KUNIT_ALL_TESTS
  1854. help
  1855. This builds the linked list KUnit test suite.
  1856. It tests that the API and basic functionality of the list_head type
  1857. and associated macros.
  1858. KUnit tests run during boot and output the results to the debug log
  1859. in TAP format (https://testanything.org/). Only useful for kernel devs
  1860. running the KUnit test harness, and not intended for inclusion into a
  1861. production build.
  1862. For more information on KUnit and unit tests in general please refer
  1863. to the KUnit documentation in Documentation/dev-tools/kunit/.
  1864. If unsure, say N.
  1865. config LINEAR_RANGES_TEST
  1866. tristate "KUnit test for linear_ranges"
  1867. depends on KUNIT
  1868. select LINEAR_RANGES
  1869. help
  1870. This builds the linear_ranges unit test, which runs on boot.
  1871. Tests the linear_ranges logic correctness.
  1872. For more information on KUnit and unit tests in general please refer
  1873. to the KUnit documentation in Documentation/dev-tools/kunit/.
  1874. If unsure, say N.
  1875. config BITS_TEST
  1876. tristate "KUnit test for bits.h"
  1877. depends on KUNIT
  1878. help
  1879. This builds the bits unit test.
  1880. Tests the logic of macros defined in bits.h.
  1881. For more information on KUnit and unit tests in general please refer
  1882. to the KUnit documentation in Documentation/dev-tools/kunit/.
  1883. If unsure, say N.
  1884. config TEST_UDELAY
  1885. tristate "udelay test driver"
  1886. help
  1887. This builds the "udelay_test" module that helps to make sure
  1888. that udelay() is working properly.
  1889. If unsure, say N.
  1890. config TEST_STATIC_KEYS
  1891. tristate "Test static keys"
  1892. depends on m
  1893. help
  1894. Test the static key interfaces.
  1895. If unsure, say N.
  1896. config TEST_KMOD
  1897. tristate "kmod stress tester"
  1898. depends on m
  1899. depends on NETDEVICES && NET_CORE && INET # for TUN
  1900. depends on BLOCK
  1901. select TEST_LKM
  1902. select XFS_FS
  1903. select TUN
  1904. select BTRFS_FS
  1905. help
  1906. Test the kernel's module loading mechanism: kmod. kmod implements
  1907. support to load modules using the Linux kernel's usermode helper.
  1908. This test provides a series of tests against kmod.
  1909. Although technically you can either build test_kmod as a module or
  1910. into the kernel we disallow building it into the kernel since
  1911. it stress tests request_module() and this will very likely cause
  1912. some issues by taking over precious threads available from other
  1913. module load requests, ultimately this could be fatal.
  1914. To run tests run:
  1915. tools/testing/selftests/kmod/kmod.sh --help
  1916. If unsure, say N.
  1917. config TEST_DEBUG_VIRTUAL
  1918. tristate "Test CONFIG_DEBUG_VIRTUAL feature"
  1919. depends on DEBUG_VIRTUAL
  1920. help
  1921. Test the kernel's ability to detect incorrect calls to
  1922. virt_to_phys() done against the non-linear part of the
  1923. kernel's virtual address map.
  1924. If unsure, say N.
  1925. config TEST_MEMCAT_P
  1926. tristate "Test memcat_p() helper function"
  1927. help
  1928. Test the memcat_p() helper for correctly merging two
  1929. pointer arrays together.
  1930. If unsure, say N.
  1931. config TEST_LIVEPATCH
  1932. tristate "Test livepatching"
  1933. default n
  1934. depends on DYNAMIC_DEBUG
  1935. depends on LIVEPATCH
  1936. depends on m
  1937. help
  1938. Test kernel livepatching features for correctness. The tests will
  1939. load test modules that will be livepatched in various scenarios.
  1940. To run all the livepatching tests:
  1941. make -C tools/testing/selftests TARGETS=livepatch run_tests
  1942. Alternatively, individual tests may be invoked:
  1943. tools/testing/selftests/livepatch/test-callbacks.sh
  1944. tools/testing/selftests/livepatch/test-livepatch.sh
  1945. tools/testing/selftests/livepatch/test-shadow-vars.sh
  1946. If unsure, say N.
  1947. config TEST_OBJAGG
  1948. tristate "Perform selftest on object aggreration manager"
  1949. default n
  1950. depends on OBJAGG
  1951. help
  1952. Enable this option to test object aggregation manager on boot
  1953. (or module load).
  1954. config TEST_STACKINIT
  1955. tristate "Test level of stack variable initialization"
  1956. help
  1957. Test if the kernel is zero-initializing stack variables and
  1958. padding. Coverage is controlled by compiler flags,
  1959. CONFIG_GCC_PLUGIN_STRUCTLEAK, CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF,
  1960. or CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL.
  1961. If unsure, say N.
  1962. config TEST_MEMINIT
  1963. tristate "Test heap/page initialization"
  1964. help
  1965. Test if the kernel is zero-initializing heap and page allocations.
  1966. This can be useful to test init_on_alloc and init_on_free features.
  1967. If unsure, say N.
  1968. config TEST_HMM
  1969. tristate "Test HMM (Heterogeneous Memory Management)"
  1970. depends on TRANSPARENT_HUGEPAGE
  1971. depends on DEVICE_PRIVATE
  1972. select HMM_MIRROR
  1973. select MMU_NOTIFIER
  1974. help
  1975. This is a pseudo device driver solely for testing HMM.
  1976. Say M here if you want to build the HMM test module.
  1977. Doing so will allow you to run tools/testing/selftest/vm/hmm-tests.
  1978. If unsure, say N.
  1979. config TEST_FREE_PAGES
  1980. tristate "Test freeing pages"
  1981. help
  1982. Test that a memory leak does not occur due to a race between
  1983. freeing a block of pages and a speculative page reference.
  1984. Loading this module is safe if your kernel has the bug fixed.
  1985. If the bug is not fixed, it will leak gigabytes of memory and
  1986. probably OOM your system.
  1987. config TEST_FPU
  1988. tristate "Test floating point operations in kernel space"
  1989. depends on X86 && !KCOV_INSTRUMENT_ALL
  1990. help
  1991. Enable this option to add /sys/kernel/debug/selftest_helpers/test_fpu
  1992. which will trigger a sequence of floating point operations. This is used
  1993. for self-testing floating point control register setting in
  1994. kernel_fpu_begin().
  1995. If unsure, say N.
  1996. endif # RUNTIME_TESTING_MENU
  1997. config MEMTEST
  1998. bool "Memtest"
  1999. help
  2000. This option adds a kernel parameter 'memtest', which allows memtest
  2001. to be set.
  2002. memtest=0, mean disabled; -- default
  2003. memtest=1, mean do 1 test pattern;
  2004. ...
  2005. memtest=17, mean do 17 test patterns.
  2006. If you are unsure how to answer this question, answer N.
  2007. config HYPERV_TESTING
  2008. bool "Microsoft Hyper-V driver testing"
  2009. default n
  2010. depends on HYPERV && DEBUG_FS
  2011. help
  2012. Select this option to enable Hyper-V vmbus testing.
  2013. endmenu # "Kernel Testing and Coverage"
  2014. source "Documentation/Kconfig"
  2015. endmenu # Kernel hacking