Kconfig.debug 62 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841
  1. menu "printk and dmesg options"
  2. config PRINTK_TIME
  3. bool "Show timing information on printks"
  4. depends on PRINTK
  5. help
  6. Selecting this option causes time stamps of the printk()
  7. messages to be added to the output of the syslog() system
  8. call and at the console.
  9. The timestamp is always recorded internally, and exported
  10. to /dev/kmsg. This flag just specifies if the timestamp should
  11. be included, not that the timestamp is recorded.
  12. The behavior is also controlled by the kernel command line
  13. parameter printk.time=1. See Documentation/kernel-parameters.txt
  14. config MESSAGE_LOGLEVEL_DEFAULT
  15. int "Default message log level (1-7)"
  16. range 1 7
  17. default "4"
  18. help
  19. Default log level for printk statements with no specified priority.
  20. This was hard-coded to KERN_WARNING since at least 2.6.10 but folks
  21. that are auditing their logs closely may want to set it to a lower
  22. priority.
  23. config BOOT_PRINTK_DELAY
  24. bool "Delay each boot printk message by N milliseconds"
  25. depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
  26. help
  27. This build option allows you to read kernel boot messages
  28. by inserting a short delay after each one. The delay is
  29. specified in milliseconds on the kernel command line,
  30. using "boot_delay=N".
  31. It is likely that you would also need to use "lpj=M" to preset
  32. the "loops per jiffie" value.
  33. See a previous boot log for the "lpj" value to use for your
  34. system, and then set "lpj=M" before setting "boot_delay=N".
  35. NOTE: Using this option may adversely affect SMP systems.
  36. I.e., processors other than the first one may not boot up.
  37. BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect
  38. what it believes to be lockup conditions.
  39. config DYNAMIC_DEBUG
  40. bool "Enable dynamic printk() support"
  41. default n
  42. depends on PRINTK
  43. depends on DEBUG_FS
  44. help
  45. Compiles debug level messages into the kernel, which would not
  46. otherwise be available at runtime. These messages can then be
  47. enabled/disabled based on various levels of scope - per source file,
  48. function, module, format string, and line number. This mechanism
  49. implicitly compiles in all pr_debug() and dev_dbg() calls, which
  50. enlarges the kernel text size by about 2%.
  51. If a source file is compiled with DEBUG flag set, any
  52. pr_debug() calls in it are enabled by default, but can be
  53. disabled at runtime as below. Note that DEBUG flag is
  54. turned on by many CONFIG_*DEBUG* options.
  55. Usage:
  56. Dynamic debugging is controlled via the 'dynamic_debug/control' file,
  57. which is contained in the 'debugfs' filesystem. Thus, the debugfs
  58. filesystem must first be mounted before making use of this feature.
  59. We refer the control file as: <debugfs>/dynamic_debug/control. This
  60. file contains a list of the debug statements that can be enabled. The
  61. format for each line of the file is:
  62. filename:lineno [module]function flags format
  63. filename : source file of the debug statement
  64. lineno : line number of the debug statement
  65. module : module that contains the debug statement
  66. function : function that contains the debug statement
  67. flags : '=p' means the line is turned 'on' for printing
  68. format : the format used for the debug statement
  69. From a live system:
  70. nullarbor:~ # cat <debugfs>/dynamic_debug/control
  71. # filename:lineno [module]function flags format
  72. fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
  73. fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
  74. fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
  75. Example usage:
  76. // enable the message at line 1603 of file svcsock.c
  77. nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
  78. <debugfs>/dynamic_debug/control
  79. // enable all the messages in file svcsock.c
  80. nullarbor:~ # echo -n 'file svcsock.c +p' >
  81. <debugfs>/dynamic_debug/control
  82. // enable all the messages in the NFS server module
  83. nullarbor:~ # echo -n 'module nfsd +p' >
  84. <debugfs>/dynamic_debug/control
  85. // enable all 12 messages in the function svc_process()
  86. nullarbor:~ # echo -n 'func svc_process +p' >
  87. <debugfs>/dynamic_debug/control
  88. // disable all 12 messages in the function svc_process()
  89. nullarbor:~ # echo -n 'func svc_process -p' >
  90. <debugfs>/dynamic_debug/control
  91. See Documentation/dynamic-debug-howto.txt for additional information.
  92. endmenu # "printk and dmesg options"
  93. menu "Compile-time checks and compiler options"
  94. config DEBUG_INFO
  95. bool "Compile the kernel with debug info"
  96. depends on DEBUG_KERNEL && !COMPILE_TEST
  97. help
  98. If you say Y here the resulting kernel image will include
  99. debugging info resulting in a larger kernel image.
  100. This adds debug symbols to the kernel and modules (gcc -g), and
  101. is needed if you intend to use kernel crashdump or binary object
  102. tools like crash, kgdb, LKCD, gdb, etc on the kernel.
  103. Say Y here only if you plan to debug the kernel.
  104. If unsure, say N.
  105. config DEBUG_INFO_REDUCED
  106. bool "Reduce debugging information"
  107. depends on DEBUG_INFO
  108. help
  109. If you say Y here gcc is instructed to generate less debugging
  110. information for structure types. This means that tools that
  111. need full debugging information (like kgdb or systemtap) won't
  112. be happy. But if you merely need debugging information to
  113. resolve line numbers there is no loss. Advantage is that
  114. build directory object sizes shrink dramatically over a full
  115. DEBUG_INFO build and compile times are reduced too.
  116. Only works with newer gcc versions.
  117. config DEBUG_INFO_SPLIT
  118. bool "Produce split debuginfo in .dwo files"
  119. depends on DEBUG_INFO
  120. help
  121. Generate debug info into separate .dwo files. This significantly
  122. reduces the build directory size for builds with DEBUG_INFO,
  123. because it stores the information only once on disk in .dwo
  124. files instead of multiple times in object files and executables.
  125. In addition the debug information is also compressed.
  126. Requires recent gcc (4.7+) and recent gdb/binutils.
  127. Any tool that packages or reads debug information would need
  128. to know about the .dwo files and include them.
  129. Incompatible with older versions of ccache.
  130. config DEBUG_INFO_DWARF4
  131. bool "Generate dwarf4 debuginfo"
  132. depends on DEBUG_INFO
  133. help
  134. Generate dwarf4 debug info. This requires recent versions
  135. of gcc and gdb. It makes the debug information larger.
  136. But it significantly improves the success of resolving
  137. variables in gdb on optimized code.
  138. config GDB_SCRIPTS
  139. bool "Provide GDB scripts for kernel debugging"
  140. depends on DEBUG_INFO
  141. help
  142. This creates the required links to GDB helper scripts in the
  143. build directory. If you load vmlinux into gdb, the helper
  144. scripts will be automatically imported by gdb as well, and
  145. additional functions are available to analyze a Linux kernel
  146. instance. See Documentation/gdb-kernel-debugging.txt for further
  147. details.
  148. config ENABLE_WARN_DEPRECATED
  149. bool "Enable __deprecated logic"
  150. default y
  151. help
  152. Enable the __deprecated logic in the kernel build.
  153. Disable this to suppress the "warning: 'foo' is deprecated
  154. (declared at kernel/power/somefile.c:1234)" messages.
  155. config ENABLE_MUST_CHECK
  156. bool "Enable __must_check logic"
  157. default y
  158. help
  159. Enable the __must_check logic in the kernel build. Disable this to
  160. suppress the "warning: ignoring return value of 'foo', declared with
  161. attribute warn_unused_result" messages.
  162. config FRAME_WARN
  163. int "Warn for stack frames larger than (needs gcc 4.4)"
  164. range 0 8192
  165. default 1024 if !64BIT
  166. default 2048 if 64BIT
  167. help
  168. Tell gcc to warn at build time for stack frames larger than this.
  169. Setting this too low will cause a lot of warnings.
  170. Setting it to 0 disables the warning.
  171. Requires gcc 4.4
  172. config STRIP_ASM_SYMS
  173. bool "Strip assembler-generated symbols during link"
  174. default n
  175. help
  176. Strip internal assembler-generated symbols during a link (symbols
  177. that look like '.Lxxx') so they don't pollute the output of
  178. get_wchan() and suchlike.
  179. config READABLE_ASM
  180. bool "Generate readable assembler code"
  181. depends on DEBUG_KERNEL
  182. help
  183. Disable some compiler optimizations that tend to generate human unreadable
  184. assembler output. This may make the kernel slightly slower, but it helps
  185. to keep kernel developers who have to stare a lot at assembler listings
  186. sane.
  187. config UNUSED_SYMBOLS
  188. bool "Enable unused/obsolete exported symbols"
  189. default y if X86
  190. help
  191. Unused but exported symbols make the kernel needlessly bigger. For
  192. that reason most of these unused exports will soon be removed. This
  193. option is provided temporarily to provide a transition period in case
  194. some external kernel module needs one of these symbols anyway. If you
  195. encounter such a case in your module, consider if you are actually
  196. using the right API. (rationale: since nobody in the kernel is using
  197. this in a module, there is a pretty good chance it's actually the
  198. wrong interface to use). If you really need the symbol, please send a
  199. mail to the linux kernel mailing list mentioning the symbol and why
  200. you really need it, and what the merge plan to the mainline kernel for
  201. your module is.
  202. config PAGE_OWNER
  203. bool "Track page owner"
  204. depends on DEBUG_KERNEL && STACKTRACE_SUPPORT
  205. select DEBUG_FS
  206. select STACKTRACE
  207. select PAGE_EXTENSION
  208. help
  209. This keeps track of what call chain is the owner of a page, may
  210. help to find bare alloc_page(s) leaks. Even if you include this
  211. feature on your build, it is disabled in default. You should pass
  212. "page_owner=on" to boot parameter in order to enable it. Eats
  213. a fair amount of memory if enabled. See tools/vm/page_owner_sort.c
  214. for user-space helper.
  215. If unsure, say N.
  216. config DEBUG_FS
  217. bool "Debug Filesystem"
  218. help
  219. debugfs is a virtual file system that kernel developers use to put
  220. debugging files into. Enable this option to be able to read and
  221. write to these files.
  222. For detailed documentation on the debugfs API, see
  223. Documentation/DocBook/filesystems.
  224. If unsure, say N.
  225. config HEADERS_CHECK
  226. bool "Run 'make headers_check' when building vmlinux"
  227. depends on !UML
  228. help
  229. This option will extract the user-visible kernel headers whenever
  230. building the kernel, and will run basic sanity checks on them to
  231. ensure that exported files do not attempt to include files which
  232. were not exported, etc.
  233. If you're making modifications to header files which are
  234. relevant for userspace, say 'Y', and check the headers
  235. exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
  236. your build tree), to make sure they're suitable.
  237. config DEBUG_SECTION_MISMATCH
  238. bool "Enable full Section mismatch analysis"
  239. help
  240. The section mismatch analysis checks if there are illegal
  241. references from one section to another section.
  242. During linktime or runtime, some sections are dropped;
  243. any use of code/data previously in these sections would
  244. most likely result in an oops.
  245. In the code, functions and variables are annotated with
  246. __init,, etc. (see the full list in include/linux/init.h),
  247. which results in the code/data being placed in specific sections.
  248. The section mismatch analysis is always performed after a full
  249. kernel build, and enabling this option causes the following
  250. additional steps to occur:
  251. - Add the option -fno-inline-functions-called-once to gcc commands.
  252. When inlining a function annotated with __init in a non-init
  253. function, we would lose the section information and thus
  254. the analysis would not catch the illegal reference.
  255. This option tells gcc to inline less (but it does result in
  256. a larger kernel).
  257. - Run the section mismatch analysis for each module/built-in.o file.
  258. When we run the section mismatch analysis on vmlinux.o, we
  259. lose valueble information about where the mismatch was
  260. introduced.
  261. Running the analysis for each module/built-in.o file
  262. tells where the mismatch happens much closer to the
  263. source. The drawback is that the same mismatch is
  264. reported at least twice.
  265. - Enable verbose reporting from modpost in order to help resolve
  266. the section mismatches that are reported.
  267. #
  268. # Select this config option from the architecture Kconfig, if it
  269. # is preferred to always offer frame pointers as a config
  270. # option on the architecture (regardless of KERNEL_DEBUG):
  271. #
  272. config ARCH_WANT_FRAME_POINTERS
  273. bool
  274. help
  275. config FRAME_POINTER
  276. bool "Compile the kernel with frame pointers"
  277. depends on DEBUG_KERNEL && \
  278. (CRIS || M68K || FRV || UML || \
  279. AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \
  280. ARCH_WANT_FRAME_POINTERS
  281. default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
  282. help
  283. If you say Y here the resulting kernel image will be slightly
  284. larger and slower, but it gives very useful debugging information
  285. in case of kernel bugs. (precise oopses/stacktraces/warnings)
  286. config DEBUG_FORCE_WEAK_PER_CPU
  287. bool "Force weak per-cpu definitions"
  288. depends on DEBUG_KERNEL
  289. help
  290. s390 and alpha require percpu variables in modules to be
  291. defined weak to work around addressing range issue which
  292. puts the following two restrictions on percpu variable
  293. definitions.
  294. 1. percpu symbols must be unique whether static or not
  295. 2. percpu variables can't be defined inside a function
  296. To ensure that generic code follows the above rules, this
  297. option forces all percpu variables to be defined as weak.
  298. endmenu # "Compiler options"
  299. config MAGIC_SYSRQ
  300. bool "Magic SysRq key"
  301. depends on !UML
  302. help
  303. If you say Y here, you will have some control over the system even
  304. if the system crashes for example during kernel debugging (e.g., you
  305. will be able to flush the buffer cache to disk, reboot the system
  306. immediately or dump some status information). This is accomplished
  307. by pressing various keys while holding SysRq (Alt+PrintScreen). It
  308. also works on a serial console (on PC hardware at least), if you
  309. send a BREAK and then within 5 seconds a command keypress. The
  310. keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
  311. unless you really know what this hack does.
  312. config MAGIC_SYSRQ_DEFAULT_ENABLE
  313. hex "Enable magic SysRq key functions by default"
  314. depends on MAGIC_SYSRQ
  315. default 0x1
  316. help
  317. Specifies which SysRq key functions are enabled by default.
  318. This may be set to 1 or 0 to enable or disable them all, or
  319. to a bitmask as described in Documentation/sysrq.txt.
  320. config DEBUG_KERNEL
  321. bool "Kernel debugging"
  322. help
  323. Say Y here if you are developing drivers or trying to debug and
  324. identify kernel problems.
  325. menu "Memory Debugging"
  326. source mm/Kconfig.debug
  327. config DEBUG_OBJECTS
  328. bool "Debug object operations"
  329. depends on DEBUG_KERNEL
  330. help
  331. If you say Y here, additional code will be inserted into the
  332. kernel to track the life time of various objects and validate
  333. the operations on those objects.
  334. config DEBUG_OBJECTS_SELFTEST
  335. bool "Debug objects selftest"
  336. depends on DEBUG_OBJECTS
  337. help
  338. This enables the selftest of the object debug code.
  339. config DEBUG_OBJECTS_FREE
  340. bool "Debug objects in freed memory"
  341. depends on DEBUG_OBJECTS
  342. help
  343. This enables checks whether a k/v free operation frees an area
  344. which contains an object which has not been deactivated
  345. properly. This can make kmalloc/kfree-intensive workloads
  346. much slower.
  347. config DEBUG_OBJECTS_TIMERS
  348. bool "Debug timer objects"
  349. depends on DEBUG_OBJECTS
  350. help
  351. If you say Y here, additional code will be inserted into the
  352. timer routines to track the life time of timer objects and
  353. validate the timer operations.
  354. config DEBUG_OBJECTS_WORK
  355. bool "Debug work objects"
  356. depends on DEBUG_OBJECTS
  357. help
  358. If you say Y here, additional code will be inserted into the
  359. work queue routines to track the life time of work objects and
  360. validate the work operations.
  361. config DEBUG_OBJECTS_RCU_HEAD
  362. bool "Debug RCU callbacks objects"
  363. depends on DEBUG_OBJECTS
  364. help
  365. Enable this to turn on debugging of RCU list heads (call_rcu() usage).
  366. config DEBUG_OBJECTS_PERCPU_COUNTER
  367. bool "Debug percpu counter objects"
  368. depends on DEBUG_OBJECTS
  369. help
  370. If you say Y here, additional code will be inserted into the
  371. percpu counter routines to track the life time of percpu counter
  372. objects and validate the percpu counter operations.
  373. config DEBUG_OBJECTS_ENABLE_DEFAULT
  374. int "debug_objects bootup default value (0-1)"
  375. range 0 1
  376. default "1"
  377. depends on DEBUG_OBJECTS
  378. help
  379. Debug objects boot parameter default value
  380. config DEBUG_SLAB
  381. bool "Debug slab memory allocations"
  382. depends on DEBUG_KERNEL && SLAB && !KMEMCHECK
  383. help
  384. Say Y here to have the kernel do limited verification on memory
  385. allocation as well as poisoning memory on free to catch use of freed
  386. memory. This can make kmalloc/kfree-intensive workloads much slower.
  387. config DEBUG_SLAB_LEAK
  388. bool "Memory leak debugging"
  389. depends on DEBUG_SLAB
  390. config SLUB_DEBUG_ON
  391. bool "SLUB debugging on by default"
  392. depends on SLUB && SLUB_DEBUG && !KMEMCHECK
  393. default n
  394. help
  395. Boot with debugging on by default. SLUB boots by default with
  396. the runtime debug capabilities switched off. Enabling this is
  397. equivalent to specifying the "slub_debug" parameter on boot.
  398. There is no support for more fine grained debug control like
  399. possible with slub_debug=xxx. SLUB debugging may be switched
  400. off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
  401. "slub_debug=-".
  402. config SLUB_STATS
  403. default n
  404. bool "Enable SLUB performance statistics"
  405. depends on SLUB && SYSFS
  406. help
  407. SLUB statistics are useful to debug SLUBs allocation behavior in
  408. order find ways to optimize the allocator. This should never be
  409. enabled for production use since keeping statistics slows down
  410. the allocator by a few percentage points. The slabinfo command
  411. supports the determination of the most active slabs to figure
  412. out which slabs are relevant to a particular load.
  413. Try running: slabinfo -DA
  414. config HAVE_DEBUG_KMEMLEAK
  415. bool
  416. config DEBUG_KMEMLEAK
  417. bool "Kernel memory leak detector"
  418. depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
  419. select DEBUG_FS
  420. select STACKTRACE if STACKTRACE_SUPPORT
  421. select KALLSYMS
  422. select CRC32
  423. help
  424. Say Y here if you want to enable the memory leak
  425. detector. The memory allocation/freeing is traced in a way
  426. similar to the Boehm's conservative garbage collector, the
  427. difference being that the orphan objects are not freed but
  428. only shown in /sys/kernel/debug/kmemleak. Enabling this
  429. feature will introduce an overhead to memory
  430. allocations. See Documentation/kmemleak.txt for more
  431. details.
  432. Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
  433. of finding leaks due to the slab objects poisoning.
  434. In order to access the kmemleak file, debugfs needs to be
  435. mounted (usually at /sys/kernel/debug).
  436. config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
  437. int "Maximum kmemleak early log entries"
  438. depends on DEBUG_KMEMLEAK
  439. range 200 40000
  440. default 400
  441. help
  442. Kmemleak must track all the memory allocations to avoid
  443. reporting false positives. Since memory may be allocated or
  444. freed before kmemleak is initialised, an early log buffer is
  445. used to store these actions. If kmemleak reports "early log
  446. buffer exceeded", please increase this value.
  447. config DEBUG_KMEMLEAK_TEST
  448. tristate "Simple test for the kernel memory leak detector"
  449. depends on DEBUG_KMEMLEAK && m
  450. help
  451. This option enables a module that explicitly leaks memory.
  452. If unsure, say N.
  453. config DEBUG_KMEMLEAK_DEFAULT_OFF
  454. bool "Default kmemleak to off"
  455. depends on DEBUG_KMEMLEAK
  456. help
  457. Say Y here to disable kmemleak by default. It can then be enabled
  458. on the command line via kmemleak=on.
  459. config DEBUG_STACK_USAGE
  460. bool "Stack utilization instrumentation"
  461. depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG
  462. help
  463. Enables the display of the minimum amount of free stack which each
  464. task has ever had available in the sysrq-T and sysrq-P debug output.
  465. This option will slow down process creation somewhat.
  466. config DEBUG_VM
  467. bool "Debug VM"
  468. depends on DEBUG_KERNEL
  469. help
  470. Enable this to turn on extended checks in the virtual-memory system
  471. that may impact performance.
  472. If unsure, say N.
  473. config DEBUG_VM_VMACACHE
  474. bool "Debug VMA caching"
  475. depends on DEBUG_VM
  476. help
  477. Enable this to turn on VMA caching debug information. Doing so
  478. can cause significant overhead, so only enable it in non-production
  479. environments.
  480. If unsure, say N.
  481. config DEBUG_VM_RB
  482. bool "Debug VM red-black trees"
  483. depends on DEBUG_VM
  484. help
  485. Enable VM red-black tree debugging information and extra validations.
  486. If unsure, say N.
  487. config DEBUG_VIRTUAL
  488. bool "Debug VM translations"
  489. depends on DEBUG_KERNEL && X86
  490. help
  491. Enable some costly sanity checks in virtual to page code. This can
  492. catch mistakes with virt_to_page() and friends.
  493. If unsure, say N.
  494. config DEBUG_NOMMU_REGIONS
  495. bool "Debug the global anon/private NOMMU mapping region tree"
  496. depends on DEBUG_KERNEL && !MMU
  497. help
  498. This option causes the global tree of anonymous and private mapping
  499. regions to be regularly checked for invalid topology.
  500. config DEBUG_MEMORY_INIT
  501. bool "Debug memory initialisation" if EXPERT
  502. default !EXPERT
  503. help
  504. Enable this for additional checks during memory initialisation.
  505. The sanity checks verify aspects of the VM such as the memory model
  506. and other information provided by the architecture. Verbose
  507. information will be printed at KERN_DEBUG loglevel depending
  508. on the mminit_loglevel= command-line option.
  509. If unsure, say Y
  510. config MEMORY_NOTIFIER_ERROR_INJECT
  511. tristate "Memory hotplug notifier error injection module"
  512. depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
  513. help
  514. This option provides the ability to inject artificial errors to
  515. memory hotplug notifier chain callbacks. It is controlled through
  516. debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
  517. If the notifier call chain should be failed with some events
  518. notified, write the error code to "actions/<notifier event>/error".
  519. Example: Inject memory hotplug offline error (-12 == -ENOMEM)
  520. # cd /sys/kernel/debug/notifier-error-inject/memory
  521. # echo -12 > actions/MEM_GOING_OFFLINE/error
  522. # echo offline > /sys/devices/system/memory/memoryXXX/state
  523. bash: echo: write error: Cannot allocate memory
  524. To compile this code as a module, choose M here: the module will
  525. be called memory-notifier-error-inject.
  526. If unsure, say N.
  527. config DEBUG_PER_CPU_MAPS
  528. bool "Debug access to per_cpu maps"
  529. depends on DEBUG_KERNEL
  530. depends on SMP
  531. help
  532. Say Y to verify that the per_cpu map being accessed has
  533. been set up. This adds a fair amount of code to kernel memory
  534. and decreases performance.
  535. Say N if unsure.
  536. config DEBUG_HIGHMEM
  537. bool "Highmem debugging"
  538. depends on DEBUG_KERNEL && HIGHMEM
  539. help
  540. This option enables additional error checking for high memory
  541. systems. Disable for production systems.
  542. config HAVE_DEBUG_STACKOVERFLOW
  543. bool
  544. config DEBUG_STACKOVERFLOW
  545. bool "Check for stack overflows"
  546. depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW
  547. ---help---
  548. Say Y here if you want to check for overflows of kernel, IRQ
  549. and exception stacks (if your architecture uses them). This
  550. option will show detailed messages if free stack space drops
  551. below a certain limit.
  552. These kinds of bugs usually occur when call-chains in the
  553. kernel get too deep, especially when interrupts are
  554. involved.
  555. Use this in cases where you see apparently random memory
  556. corruption, especially if it appears in 'struct thread_info'
  557. If in doubt, say "N".
  558. source "lib/Kconfig.kmemcheck"
  559. source "lib/Kconfig.kasan"
  560. endmenu # "Memory Debugging"
  561. config DEBUG_SHIRQ
  562. bool "Debug shared IRQ handlers"
  563. depends on DEBUG_KERNEL
  564. help
  565. Enable this to generate a spurious interrupt as soon as a shared
  566. interrupt handler is registered, and just before one is deregistered.
  567. Drivers ought to be able to handle interrupts coming in at those
  568. points; some don't and need to be caught.
  569. menu "Debug Lockups and Hangs"
  570. config LOCKUP_DETECTOR
  571. bool "Detect Hard and Soft Lockups"
  572. depends on DEBUG_KERNEL && !S390
  573. help
  574. Say Y here to enable the kernel to act as a watchdog to detect
  575. hard and soft lockups.
  576. Softlockups are bugs that cause the kernel to loop in kernel
  577. mode for more than 20 seconds, without giving other tasks a
  578. chance to run. The current stack trace is displayed upon
  579. detection and the system will stay locked up.
  580. Hardlockups are bugs that cause the CPU to loop in kernel mode
  581. for more than 10 seconds, without letting other interrupts have a
  582. chance to run. The current stack trace is displayed upon detection
  583. and the system will stay locked up.
  584. The overhead should be minimal. A periodic hrtimer runs to
  585. generate interrupts and kick the watchdog task every 4 seconds.
  586. An NMI is generated every 10 seconds or so to check for hardlockups.
  587. The frequency of hrtimer and NMI events and the soft and hard lockup
  588. thresholds can be controlled through the sysctl watchdog_thresh.
  589. config HARDLOCKUP_DETECTOR
  590. def_bool y
  591. depends on LOCKUP_DETECTOR && !HAVE_NMI_WATCHDOG
  592. depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI
  593. config BOOTPARAM_HARDLOCKUP_PANIC
  594. bool "Panic (Reboot) On Hard Lockups"
  595. depends on HARDLOCKUP_DETECTOR
  596. help
  597. Say Y here to enable the kernel to panic on "hard lockups",
  598. which are bugs that cause the kernel to loop in kernel
  599. mode with interrupts disabled for more than 10 seconds (configurable
  600. using the watchdog_thresh sysctl).
  601. Say N if unsure.
  602. config BOOTPARAM_HARDLOCKUP_PANIC_VALUE
  603. int
  604. depends on HARDLOCKUP_DETECTOR
  605. range 0 1
  606. default 0 if !BOOTPARAM_HARDLOCKUP_PANIC
  607. default 1 if BOOTPARAM_HARDLOCKUP_PANIC
  608. config BOOTPARAM_SOFTLOCKUP_PANIC
  609. bool "Panic (Reboot) On Soft Lockups"
  610. depends on LOCKUP_DETECTOR
  611. help
  612. Say Y here to enable the kernel to panic on "soft lockups",
  613. which are bugs that cause the kernel to loop in kernel
  614. mode for more than 20 seconds (configurable using the watchdog_thresh
  615. sysctl), without giving other tasks a chance to run.
  616. The panic can be used in combination with panic_timeout,
  617. to cause the system to reboot automatically after a
  618. lockup has been detected. This feature is useful for
  619. high-availability systems that have uptime guarantees and
  620. where a lockup must be resolved ASAP.
  621. Say N if unsure.
  622. config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
  623. int
  624. depends on LOCKUP_DETECTOR
  625. range 0 1
  626. default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
  627. default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
  628. config DETECT_HUNG_TASK
  629. bool "Detect Hung Tasks"
  630. depends on DEBUG_KERNEL
  631. default LOCKUP_DETECTOR
  632. help
  633. Say Y here to enable the kernel to detect "hung tasks",
  634. which are bugs that cause the task to be stuck in
  635. uninterruptible "D" state indefinitiley.
  636. When a hung task is detected, the kernel will print the
  637. current stack trace (which you should report), but the
  638. task will stay in uninterruptible state. If lockdep is
  639. enabled then all held locks will also be reported. This
  640. feature has negligible overhead.
  641. config DEFAULT_HUNG_TASK_TIMEOUT
  642. int "Default timeout for hung task detection (in seconds)"
  643. depends on DETECT_HUNG_TASK
  644. default 120
  645. help
  646. This option controls the default timeout (in seconds) used
  647. to determine when a task has become non-responsive and should
  648. be considered hung.
  649. It can be adjusted at runtime via the kernel.hung_task_timeout_secs
  650. sysctl or by writing a value to
  651. /proc/sys/kernel/hung_task_timeout_secs.
  652. A timeout of 0 disables the check. The default is two minutes.
  653. Keeping the default should be fine in most cases.
  654. config BOOTPARAM_HUNG_TASK_PANIC
  655. bool "Panic (Reboot) On Hung Tasks"
  656. depends on DETECT_HUNG_TASK
  657. help
  658. Say Y here to enable the kernel to panic on "hung tasks",
  659. which are bugs that cause the kernel to leave a task stuck
  660. in uninterruptible "D" state.
  661. The panic can be used in combination with panic_timeout,
  662. to cause the system to reboot automatically after a
  663. hung task has been detected. This feature is useful for
  664. high-availability systems that have uptime guarantees and
  665. where a hung tasks must be resolved ASAP.
  666. Say N if unsure.
  667. config BOOTPARAM_HUNG_TASK_PANIC_VALUE
  668. int
  669. depends on DETECT_HUNG_TASK
  670. range 0 1
  671. default 0 if !BOOTPARAM_HUNG_TASK_PANIC
  672. default 1 if BOOTPARAM_HUNG_TASK_PANIC
  673. endmenu # "Debug lockups and hangs"
  674. config PANIC_ON_OOPS
  675. bool "Panic on Oops"
  676. help
  677. Say Y here to enable the kernel to panic when it oopses. This
  678. has the same effect as setting oops=panic on the kernel command
  679. line.
  680. This feature is useful to ensure that the kernel does not do
  681. anything erroneous after an oops which could result in data
  682. corruption or other issues.
  683. Say N if unsure.
  684. config PANIC_ON_OOPS_VALUE
  685. int
  686. range 0 1
  687. default 0 if !PANIC_ON_OOPS
  688. default 1 if PANIC_ON_OOPS
  689. config PANIC_TIMEOUT
  690. int "panic timeout"
  691. default 0
  692. help
  693. Set the timeout value (in seconds) until a reboot occurs when the
  694. the kernel panics. If n = 0, then we wait forever. A timeout
  695. value n > 0 will wait n seconds before rebooting, while a timeout
  696. value n < 0 will reboot immediately.
  697. config SCHED_DEBUG
  698. bool "Collect scheduler debugging info"
  699. depends on DEBUG_KERNEL && PROC_FS
  700. default y
  701. help
  702. If you say Y here, the /proc/sched_debug file will be provided
  703. that can help debug the scheduler. The runtime overhead of this
  704. option is minimal.
  705. config SCHEDSTATS
  706. bool "Collect scheduler statistics"
  707. depends on DEBUG_KERNEL && PROC_FS
  708. help
  709. If you say Y here, additional code will be inserted into the
  710. scheduler and related routines to collect statistics about
  711. scheduler behavior and provide them in /proc/schedstat. These
  712. stats may be useful for both tuning and debugging the scheduler
  713. If you aren't debugging the scheduler or trying to tune a specific
  714. application, you can say N to avoid the very slight overhead
  715. this adds.
  716. config SCHED_STACK_END_CHECK
  717. bool "Detect stack corruption on calls to schedule()"
  718. depends on DEBUG_KERNEL
  719. default n
  720. help
  721. This option checks for a stack overrun on calls to schedule().
  722. If the stack end location is found to be over written always panic as
  723. the content of the corrupted region can no longer be trusted.
  724. This is to ensure no erroneous behaviour occurs which could result in
  725. data corruption or a sporadic crash at a later stage once the region
  726. is examined. The runtime overhead introduced is minimal.
  727. config DEBUG_TIMEKEEPING
  728. bool "Enable extra timekeeping sanity checking"
  729. help
  730. This option will enable additional timekeeping sanity checks
  731. which may be helpful when diagnosing issues where timekeeping
  732. problems are suspected.
  733. This may include checks in the timekeeping hotpaths, so this
  734. option may have a (very small) performance impact to some
  735. workloads.
  736. If unsure, say N.
  737. config TIMER_STATS
  738. bool "Collect kernel timers statistics"
  739. depends on DEBUG_KERNEL && PROC_FS
  740. help
  741. If you say Y here, additional code will be inserted into the
  742. timer routines to collect statistics about kernel timers being
  743. reprogrammed. The statistics can be read from /proc/timer_stats.
  744. The statistics collection is started by writing 1 to /proc/timer_stats,
  745. writing 0 stops it. This feature is useful to collect information
  746. about timer usage patterns in kernel and userspace. This feature
  747. is lightweight if enabled in the kernel config but not activated
  748. (it defaults to deactivated on bootup and will only be activated
  749. if some application like powertop activates it explicitly).
  750. config DEBUG_PREEMPT
  751. bool "Debug preemptible kernel"
  752. depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
  753. default y
  754. help
  755. If you say Y here then the kernel will use a debug variant of the
  756. commonly used smp_processor_id() function and will print warnings
  757. if kernel code uses it in a preemption-unsafe way. Also, the kernel
  758. will detect preemption count underflows.
  759. menu "Lock Debugging (spinlocks, mutexes, etc...)"
  760. config DEBUG_RT_MUTEXES
  761. bool "RT Mutex debugging, deadlock detection"
  762. depends on DEBUG_KERNEL && RT_MUTEXES
  763. help
  764. This allows rt mutex semantics violations and rt mutex related
  765. deadlocks (lockups) to be detected and reported automatically.
  766. config RT_MUTEX_TESTER
  767. bool "Built-in scriptable tester for rt-mutexes"
  768. depends on DEBUG_KERNEL && RT_MUTEXES && BROKEN
  769. help
  770. This option enables a rt-mutex tester.
  771. config DEBUG_SPINLOCK
  772. bool "Spinlock and rw-lock debugging: basic checks"
  773. depends on DEBUG_KERNEL
  774. select UNINLINE_SPIN_UNLOCK
  775. help
  776. Say Y here and build SMP to catch missing spinlock initialization
  777. and certain other kinds of spinlock errors commonly made. This is
  778. best used in conjunction with the NMI watchdog so that spinlock
  779. deadlocks are also debuggable.
  780. config DEBUG_MUTEXES
  781. bool "Mutex debugging: basic checks"
  782. depends on DEBUG_KERNEL
  783. help
  784. This feature allows mutex semantics violations to be detected and
  785. reported.
  786. config DEBUG_WW_MUTEX_SLOWPATH
  787. bool "Wait/wound mutex debugging: Slowpath testing"
  788. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  789. select DEBUG_LOCK_ALLOC
  790. select DEBUG_SPINLOCK
  791. select DEBUG_MUTEXES
  792. help
  793. This feature enables slowpath testing for w/w mutex users by
  794. injecting additional -EDEADLK wound/backoff cases. Together with
  795. the full mutex checks enabled with (CONFIG_PROVE_LOCKING) this
  796. will test all possible w/w mutex interface abuse with the
  797. exception of simply not acquiring all the required locks.
  798. Note that this feature can introduce significant overhead, so
  799. it really should not be enabled in a production or distro kernel,
  800. even a debug kernel. If you are a driver writer, enable it. If
  801. you are a distro, do not.
  802. config DEBUG_LOCK_ALLOC
  803. bool "Lock debugging: detect incorrect freeing of live locks"
  804. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  805. select DEBUG_SPINLOCK
  806. select DEBUG_MUTEXES
  807. select LOCKDEP
  808. help
  809. This feature will check whether any held lock (spinlock, rwlock,
  810. mutex or rwsem) is incorrectly freed by the kernel, via any of the
  811. memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
  812. vfree(), etc.), whether a live lock is incorrectly reinitialized via
  813. spin_lock_init()/mutex_init()/etc., or whether there is any lock
  814. held during task exit.
  815. config PROVE_LOCKING
  816. bool "Lock debugging: prove locking correctness"
  817. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  818. select LOCKDEP
  819. select DEBUG_SPINLOCK
  820. select DEBUG_MUTEXES
  821. select DEBUG_LOCK_ALLOC
  822. select TRACE_IRQFLAGS
  823. default n
  824. help
  825. This feature enables the kernel to prove that all locking
  826. that occurs in the kernel runtime is mathematically
  827. correct: that under no circumstance could an arbitrary (and
  828. not yet triggered) combination of observed locking
  829. sequences (on an arbitrary number of CPUs, running an
  830. arbitrary number of tasks and interrupt contexts) cause a
  831. deadlock.
  832. In short, this feature enables the kernel to report locking
  833. related deadlocks before they actually occur.
  834. The proof does not depend on how hard and complex a
  835. deadlock scenario would be to trigger: how many
  836. participant CPUs, tasks and irq-contexts would be needed
  837. for it to trigger. The proof also does not depend on
  838. timing: if a race and a resulting deadlock is possible
  839. theoretically (no matter how unlikely the race scenario
  840. is), it will be proven so and will immediately be
  841. reported by the kernel (once the event is observed that
  842. makes the deadlock theoretically possible).
  843. If a deadlock is impossible (i.e. the locking rules, as
  844. observed by the kernel, are mathematically correct), the
  845. kernel reports nothing.
  846. NOTE: this feature can also be enabled for rwlocks, mutexes
  847. and rwsems - in which case all dependencies between these
  848. different locking variants are observed and mapped too, and
  849. the proof of observed correctness is also maintained for an
  850. arbitrary combination of these separate locking variants.
  851. For more details, see Documentation/locking/lockdep-design.txt.
  852. config LOCKDEP
  853. bool
  854. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  855. select STACKTRACE
  856. select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE && !ARC && !SCORE
  857. select KALLSYMS
  858. select KALLSYMS_ALL
  859. config LOCK_STAT
  860. bool "Lock usage statistics"
  861. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  862. select LOCKDEP
  863. select DEBUG_SPINLOCK
  864. select DEBUG_MUTEXES
  865. select DEBUG_LOCK_ALLOC
  866. default n
  867. help
  868. This feature enables tracking lock contention points
  869. For more details, see Documentation/locking/lockstat.txt
  870. This also enables lock events required by "perf lock",
  871. subcommand of perf.
  872. If you want to use "perf lock", you also need to turn on
  873. CONFIG_EVENT_TRACING.
  874. CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
  875. (CONFIG_LOCKDEP defines "acquire" and "release" events.)
  876. config DEBUG_LOCKDEP
  877. bool "Lock dependency engine debugging"
  878. depends on DEBUG_KERNEL && LOCKDEP
  879. help
  880. If you say Y here, the lock dependency engine will do
  881. additional runtime checks to debug itself, at the price
  882. of more runtime overhead.
  883. config DEBUG_ATOMIC_SLEEP
  884. bool "Sleep inside atomic section checking"
  885. select PREEMPT_COUNT
  886. depends on DEBUG_KERNEL
  887. help
  888. If you say Y here, various routines which may sleep will become very
  889. noisy if they are called inside atomic sections: when a spinlock is
  890. held, inside an rcu read side critical section, inside preempt disabled
  891. sections, inside an interrupt, etc...
  892. config DEBUG_LOCKING_API_SELFTESTS
  893. bool "Locking API boot-time self-tests"
  894. depends on DEBUG_KERNEL
  895. help
  896. Say Y here if you want the kernel to run a short self-test during
  897. bootup. The self-test checks whether common types of locking bugs
  898. are detected by debugging mechanisms or not. (if you disable
  899. lock debugging then those bugs wont be detected of course.)
  900. The following locking APIs are covered: spinlocks, rwlocks,
  901. mutexes and rwsems.
  902. config LOCK_TORTURE_TEST
  903. tristate "torture tests for locking"
  904. depends on DEBUG_KERNEL
  905. select TORTURE_TEST
  906. default n
  907. help
  908. This option provides a kernel module that runs torture tests
  909. on kernel locking primitives. The kernel module may be built
  910. after the fact on the running kernel to be tested, if desired.
  911. Say Y here if you want kernel locking-primitive torture tests
  912. to be built into the kernel.
  913. Say M if you want these torture tests to build as a module.
  914. Say N if you are unsure.
  915. endmenu # lock debugging
  916. config TRACE_IRQFLAGS
  917. bool
  918. help
  919. Enables hooks to interrupt enabling and disabling for
  920. either tracing or lock debugging.
  921. config STACKTRACE
  922. bool "Stack backtrace support"
  923. depends on STACKTRACE_SUPPORT
  924. help
  925. This option causes the kernel to create a /proc/pid/stack for
  926. every process, showing its current stack trace.
  927. It is also used by various kernel debugging features that require
  928. stack trace generation.
  929. config DEBUG_KOBJECT
  930. bool "kobject debugging"
  931. depends on DEBUG_KERNEL
  932. help
  933. If you say Y here, some extra kobject debugging messages will be sent
  934. to the syslog.
  935. config DEBUG_KOBJECT_RELEASE
  936. bool "kobject release debugging"
  937. depends on DEBUG_OBJECTS_TIMERS
  938. help
  939. kobjects are reference counted objects. This means that their
  940. last reference count put is not predictable, and the kobject can
  941. live on past the point at which a driver decides to drop it's
  942. initial reference to the kobject gained on allocation. An
  943. example of this would be a struct device which has just been
  944. unregistered.
  945. However, some buggy drivers assume that after such an operation,
  946. the memory backing the kobject can be immediately freed. This
  947. goes completely against the principles of a refcounted object.
  948. If you say Y here, the kernel will delay the release of kobjects
  949. on the last reference count to improve the visibility of this
  950. kind of kobject release bug.
  951. config HAVE_DEBUG_BUGVERBOSE
  952. bool
  953. config DEBUG_BUGVERBOSE
  954. bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT
  955. depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE)
  956. default y
  957. help
  958. Say Y here to make BUG() panics output the file name and line number
  959. of the BUG call as well as the EIP and oops trace. This aids
  960. debugging but costs about 70-100K of memory.
  961. config DEBUG_LIST
  962. bool "Debug linked list manipulation"
  963. depends on DEBUG_KERNEL
  964. help
  965. Enable this to turn on extended checks in the linked-list
  966. walking routines.
  967. If unsure, say N.
  968. config DEBUG_PI_LIST
  969. bool "Debug priority linked list manipulation"
  970. depends on DEBUG_KERNEL
  971. help
  972. Enable this to turn on extended checks in the priority-ordered
  973. linked-list (plist) walking routines. This checks the entire
  974. list multiple times during each manipulation.
  975. If unsure, say N.
  976. config DEBUG_SG
  977. bool "Debug SG table operations"
  978. depends on DEBUG_KERNEL
  979. help
  980. Enable this to turn on checks on scatter-gather tables. This can
  981. help find problems with drivers that do not properly initialize
  982. their sg tables.
  983. If unsure, say N.
  984. config DEBUG_NOTIFIERS
  985. bool "Debug notifier call chains"
  986. depends on DEBUG_KERNEL
  987. help
  988. Enable this to turn on sanity checking for notifier call chains.
  989. This is most useful for kernel developers to make sure that
  990. modules properly unregister themselves from notifier chains.
  991. This is a relatively cheap check but if you care about maximum
  992. performance, say N.
  993. config DEBUG_CREDENTIALS
  994. bool "Debug credential management"
  995. depends on DEBUG_KERNEL
  996. help
  997. Enable this to turn on some debug checking for credential
  998. management. The additional code keeps track of the number of
  999. pointers from task_structs to any given cred struct, and checks to
  1000. see that this number never exceeds the usage count of the cred
  1001. struct.
  1002. Furthermore, if SELinux is enabled, this also checks that the
  1003. security pointer in the cred struct is never seen to be invalid.
  1004. If unsure, say N.
  1005. menu "RCU Debugging"
  1006. config PROVE_RCU
  1007. def_bool PROVE_LOCKING
  1008. config PROVE_RCU_REPEATEDLY
  1009. bool "RCU debugging: don't disable PROVE_RCU on first splat"
  1010. depends on PROVE_RCU
  1011. default n
  1012. help
  1013. By itself, PROVE_RCU will disable checking upon issuing the
  1014. first warning (or "splat"). This feature prevents such
  1015. disabling, allowing multiple RCU-lockdep warnings to be printed
  1016. on a single reboot.
  1017. Say Y to allow multiple RCU-lockdep warnings per boot.
  1018. Say N if you are unsure.
  1019. config SPARSE_RCU_POINTER
  1020. bool "RCU debugging: sparse-based checks for pointer usage"
  1021. default n
  1022. help
  1023. This feature enables the __rcu sparse annotation for
  1024. RCU-protected pointers. This annotation will cause sparse
  1025. to flag any non-RCU used of annotated pointers. This can be
  1026. helpful when debugging RCU usage. Please note that this feature
  1027. is not intended to enforce code cleanliness; it is instead merely
  1028. a debugging aid.
  1029. Say Y to make sparse flag questionable use of RCU-protected pointers
  1030. Say N if you are unsure.
  1031. config TORTURE_TEST
  1032. tristate
  1033. default n
  1034. config RCU_TORTURE_TEST
  1035. tristate "torture tests for RCU"
  1036. depends on DEBUG_KERNEL
  1037. select TORTURE_TEST
  1038. select SRCU
  1039. select TASKS_RCU
  1040. default n
  1041. help
  1042. This option provides a kernel module that runs torture tests
  1043. on the RCU infrastructure. The kernel module may be built
  1044. after the fact on the running kernel to be tested, if desired.
  1045. Say Y here if you want RCU torture tests to be built into
  1046. the kernel.
  1047. Say M if you want the RCU torture tests to build as a module.
  1048. Say N if you are unsure.
  1049. config RCU_TORTURE_TEST_RUNNABLE
  1050. bool "torture tests for RCU runnable by default"
  1051. depends on RCU_TORTURE_TEST = y
  1052. default n
  1053. help
  1054. This option provides a way to build the RCU torture tests
  1055. directly into the kernel without them starting up at boot
  1056. time. You can use /proc/sys/kernel/rcutorture_runnable
  1057. to manually override this setting. This /proc file is
  1058. available only when the RCU torture tests have been built
  1059. into the kernel.
  1060. Say Y here if you want the RCU torture tests to start during
  1061. boot (you probably don't).
  1062. Say N here if you want the RCU torture tests to start only
  1063. after being manually enabled via /proc.
  1064. config RCU_TORTURE_TEST_SLOW_PREINIT
  1065. bool "Slow down RCU grace-period pre-initialization to expose races"
  1066. depends on RCU_TORTURE_TEST
  1067. help
  1068. This option delays grace-period pre-initialization (the
  1069. propagation of CPU-hotplug changes up the rcu_node combining
  1070. tree) for a few jiffies between initializing each pair of
  1071. consecutive rcu_node structures. This helps to expose races
  1072. involving grace-period pre-initialization, in other words, it
  1073. makes your kernel less stable. It can also greatly increase
  1074. grace-period latency, especially on systems with large numbers
  1075. of CPUs. This is useful when torture-testing RCU, but in
  1076. almost no other circumstance.
  1077. Say Y here if you want your system to crash and hang more often.
  1078. Say N if you want a sane system.
  1079. config RCU_TORTURE_TEST_SLOW_PREINIT_DELAY
  1080. int "How much to slow down RCU grace-period pre-initialization"
  1081. range 0 5
  1082. default 3
  1083. depends on RCU_TORTURE_TEST_SLOW_PREINIT
  1084. help
  1085. This option specifies the number of jiffies to wait between
  1086. each rcu_node structure pre-initialization step.
  1087. config RCU_TORTURE_TEST_SLOW_INIT
  1088. bool "Slow down RCU grace-period initialization to expose races"
  1089. depends on RCU_TORTURE_TEST
  1090. help
  1091. This option delays grace-period initialization for a few
  1092. jiffies between initializing each pair of consecutive
  1093. rcu_node structures. This helps to expose races involving
  1094. grace-period initialization, in other words, it makes your
  1095. kernel less stable. It can also greatly increase grace-period
  1096. latency, especially on systems with large numbers of CPUs.
  1097. This is useful when torture-testing RCU, but in almost no
  1098. other circumstance.
  1099. Say Y here if you want your system to crash and hang more often.
  1100. Say N if you want a sane system.
  1101. config RCU_TORTURE_TEST_SLOW_INIT_DELAY
  1102. int "How much to slow down RCU grace-period initialization"
  1103. range 0 5
  1104. default 3
  1105. depends on RCU_TORTURE_TEST_SLOW_INIT
  1106. help
  1107. This option specifies the number of jiffies to wait between
  1108. each rcu_node structure initialization.
  1109. config RCU_TORTURE_TEST_SLOW_CLEANUP
  1110. bool "Slow down RCU grace-period cleanup to expose races"
  1111. depends on RCU_TORTURE_TEST
  1112. help
  1113. This option delays grace-period cleanup for a few jiffies
  1114. between cleaning up each pair of consecutive rcu_node
  1115. structures. This helps to expose races involving grace-period
  1116. cleanup, in other words, it makes your kernel less stable.
  1117. It can also greatly increase grace-period latency, especially
  1118. on systems with large numbers of CPUs. This is useful when
  1119. torture-testing RCU, but in almost no other circumstance.
  1120. Say Y here if you want your system to crash and hang more often.
  1121. Say N if you want a sane system.
  1122. config RCU_TORTURE_TEST_SLOW_CLEANUP_DELAY
  1123. int "How much to slow down RCU grace-period cleanup"
  1124. range 0 5
  1125. default 3
  1126. depends on RCU_TORTURE_TEST_SLOW_CLEANUP
  1127. help
  1128. This option specifies the number of jiffies to wait between
  1129. each rcu_node structure cleanup operation.
  1130. config RCU_CPU_STALL_TIMEOUT
  1131. int "RCU CPU stall timeout in seconds"
  1132. depends on RCU_STALL_COMMON
  1133. range 3 300
  1134. default 21
  1135. help
  1136. If a given RCU grace period extends more than the specified
  1137. number of seconds, a CPU stall warning is printed. If the
  1138. RCU grace period persists, additional CPU stall warnings are
  1139. printed at more widely spaced intervals.
  1140. config RCU_CPU_STALL_INFO
  1141. bool "Print additional diagnostics on RCU CPU stall"
  1142. depends on (TREE_RCU || PREEMPT_RCU) && DEBUG_KERNEL
  1143. default y
  1144. help
  1145. For each stalled CPU that is aware of the current RCU grace
  1146. period, print out additional per-CPU diagnostic information
  1147. regarding scheduling-clock ticks, idle state, and,
  1148. for RCU_FAST_NO_HZ kernels, idle-entry state.
  1149. Say N if you are unsure.
  1150. Say Y if you want to enable such diagnostics.
  1151. config RCU_TRACE
  1152. bool "Enable tracing for RCU"
  1153. depends on DEBUG_KERNEL
  1154. select TRACE_CLOCK
  1155. help
  1156. This option provides tracing in RCU which presents stats
  1157. in debugfs for debugging RCU implementation.
  1158. Say Y here if you want to enable RCU tracing
  1159. Say N if you are unsure.
  1160. config RCU_EQS_DEBUG
  1161. bool "Use this when adding any sort of NO_HZ support to your arch"
  1162. depends on DEBUG_KERNEL
  1163. help
  1164. This option provides consistency checks in RCU's handling of
  1165. NO_HZ. These checks have proven quite helpful in detecting
  1166. bugs in arch-specific NO_HZ code.
  1167. Say N here if you need ultimate kernel/user switch latencies
  1168. Say Y if you are unsure
  1169. endmenu # "RCU Debugging"
  1170. config DEBUG_BLOCK_EXT_DEVT
  1171. bool "Force extended block device numbers and spread them"
  1172. depends on DEBUG_KERNEL
  1173. depends on BLOCK
  1174. default n
  1175. help
  1176. BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
  1177. SOME DISTRIBUTIONS. DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
  1178. YOU ARE DOING. Distros, please enable this and fix whatever
  1179. is broken.
  1180. Conventionally, block device numbers are allocated from
  1181. predetermined contiguous area. However, extended block area
  1182. may introduce non-contiguous block device numbers. This
  1183. option forces most block device numbers to be allocated from
  1184. the extended space and spreads them to discover kernel or
  1185. userland code paths which assume predetermined contiguous
  1186. device number allocation.
  1187. Note that turning on this debug option shuffles all the
  1188. device numbers for all IDE and SCSI devices including libata
  1189. ones, so root partition specified using device number
  1190. directly (via rdev or root=MAJ:MIN) won't work anymore.
  1191. Textual device names (root=/dev/sdXn) will continue to work.
  1192. Say N if you are unsure.
  1193. config NOTIFIER_ERROR_INJECTION
  1194. tristate "Notifier error injection"
  1195. depends on DEBUG_KERNEL
  1196. select DEBUG_FS
  1197. help
  1198. This option provides the ability to inject artificial errors to
  1199. specified notifier chain callbacks. It is useful to test the error
  1200. handling of notifier call chain failures.
  1201. Say N if unsure.
  1202. config CPU_NOTIFIER_ERROR_INJECT
  1203. tristate "CPU notifier error injection module"
  1204. depends on HOTPLUG_CPU && NOTIFIER_ERROR_INJECTION
  1205. help
  1206. This option provides a kernel module that can be used to test
  1207. the error handling of the cpu notifiers by injecting artificial
  1208. errors to CPU notifier chain callbacks. It is controlled through
  1209. debugfs interface under /sys/kernel/debug/notifier-error-inject/cpu
  1210. If the notifier call chain should be failed with some events
  1211. notified, write the error code to "actions/<notifier event>/error".
  1212. Example: Inject CPU offline error (-1 == -EPERM)
  1213. # cd /sys/kernel/debug/notifier-error-inject/cpu
  1214. # echo -1 > actions/CPU_DOWN_PREPARE/error
  1215. # echo 0 > /sys/devices/system/cpu/cpu1/online
  1216. bash: echo: write error: Operation not permitted
  1217. To compile this code as a module, choose M here: the module will
  1218. be called cpu-notifier-error-inject.
  1219. If unsure, say N.
  1220. config PM_NOTIFIER_ERROR_INJECT
  1221. tristate "PM notifier error injection module"
  1222. depends on PM && NOTIFIER_ERROR_INJECTION
  1223. default m if PM_DEBUG
  1224. help
  1225. This option provides the ability to inject artificial errors to
  1226. PM notifier chain callbacks. It is controlled through debugfs
  1227. interface /sys/kernel/debug/notifier-error-inject/pm
  1228. If the notifier call chain should be failed with some events
  1229. notified, write the error code to "actions/<notifier event>/error".
  1230. Example: Inject PM suspend error (-12 = -ENOMEM)
  1231. # cd /sys/kernel/debug/notifier-error-inject/pm/
  1232. # echo -12 > actions/PM_SUSPEND_PREPARE/error
  1233. # echo mem > /sys/power/state
  1234. bash: echo: write error: Cannot allocate memory
  1235. To compile this code as a module, choose M here: the module will
  1236. be called pm-notifier-error-inject.
  1237. If unsure, say N.
  1238. config OF_RECONFIG_NOTIFIER_ERROR_INJECT
  1239. tristate "OF reconfig notifier error injection module"
  1240. depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
  1241. help
  1242. This option provides the ability to inject artificial errors to
  1243. OF reconfig notifier chain callbacks. It is controlled
  1244. through debugfs interface under
  1245. /sys/kernel/debug/notifier-error-inject/OF-reconfig/
  1246. If the notifier call chain should be failed with some events
  1247. notified, write the error code to "actions/<notifier event>/error".
  1248. To compile this code as a module, choose M here: the module will
  1249. be called of-reconfig-notifier-error-inject.
  1250. If unsure, say N.
  1251. config FAULT_INJECTION
  1252. bool "Fault-injection framework"
  1253. depends on DEBUG_KERNEL
  1254. help
  1255. Provide fault-injection framework.
  1256. For more details, see Documentation/fault-injection/.
  1257. config FAILSLAB
  1258. bool "Fault-injection capability for kmalloc"
  1259. depends on FAULT_INJECTION
  1260. depends on SLAB || SLUB
  1261. help
  1262. Provide fault-injection capability for kmalloc.
  1263. config FAIL_PAGE_ALLOC
  1264. bool "Fault-injection capabilitiy for alloc_pages()"
  1265. depends on FAULT_INJECTION
  1266. help
  1267. Provide fault-injection capability for alloc_pages().
  1268. config FAIL_MAKE_REQUEST
  1269. bool "Fault-injection capability for disk IO"
  1270. depends on FAULT_INJECTION && BLOCK
  1271. help
  1272. Provide fault-injection capability for disk IO.
  1273. config FAIL_IO_TIMEOUT
  1274. bool "Fault-injection capability for faking disk interrupts"
  1275. depends on FAULT_INJECTION && BLOCK
  1276. help
  1277. Provide fault-injection capability on end IO handling. This
  1278. will make the block layer "forget" an interrupt as configured,
  1279. thus exercising the error handling.
  1280. Only works with drivers that use the generic timeout handling,
  1281. for others it wont do anything.
  1282. config FAIL_MMC_REQUEST
  1283. bool "Fault-injection capability for MMC IO"
  1284. select DEBUG_FS
  1285. depends on FAULT_INJECTION && MMC
  1286. help
  1287. Provide fault-injection capability for MMC IO.
  1288. This will make the mmc core return data errors. This is
  1289. useful to test the error handling in the mmc block device
  1290. and to test how the mmc host driver handles retries from
  1291. the block device.
  1292. config FAULT_INJECTION_DEBUG_FS
  1293. bool "Debugfs entries for fault-injection capabilities"
  1294. depends on FAULT_INJECTION && SYSFS && DEBUG_FS
  1295. help
  1296. Enable configuration of fault-injection capabilities via debugfs.
  1297. config FAULT_INJECTION_STACKTRACE_FILTER
  1298. bool "stacktrace filter for fault-injection capabilities"
  1299. depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
  1300. depends on !X86_64
  1301. select STACKTRACE
  1302. select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !SCORE
  1303. help
  1304. Provide stacktrace filter for fault-injection capabilities
  1305. config LATENCYTOP
  1306. bool "Latency measuring infrastructure"
  1307. depends on HAVE_LATENCYTOP_SUPPORT
  1308. depends on DEBUG_KERNEL
  1309. depends on STACKTRACE_SUPPORT
  1310. depends on PROC_FS
  1311. select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC
  1312. select KALLSYMS
  1313. select KALLSYMS_ALL
  1314. select STACKTRACE
  1315. select SCHEDSTATS
  1316. select SCHED_DEBUG
  1317. help
  1318. Enable this option if you want to use the LatencyTOP tool
  1319. to find out which userspace is blocking on what kernel operations.
  1320. config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
  1321. bool
  1322. config DEBUG_STRICT_USER_COPY_CHECKS
  1323. bool "Strict user copy size checks"
  1324. depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
  1325. depends on DEBUG_KERNEL && !TRACE_BRANCH_PROFILING
  1326. help
  1327. Enabling this option turns a certain set of sanity checks for user
  1328. copy operations into compile time failures.
  1329. The copy_from_user() etc checks are there to help test if there
  1330. are sufficient security checks on the length argument of
  1331. the copy operation, by having gcc prove that the argument is
  1332. within bounds.
  1333. If unsure, say N.
  1334. source kernel/trace/Kconfig
  1335. menu "Runtime Testing"
  1336. config LKDTM
  1337. tristate "Linux Kernel Dump Test Tool Module"
  1338. depends on DEBUG_FS
  1339. depends on BLOCK
  1340. default n
  1341. help
  1342. This module enables testing of the different dumping mechanisms by
  1343. inducing system failures at predefined crash points.
  1344. If you don't need it: say N
  1345. Choose M here to compile this code as a module. The module will be
  1346. called lkdtm.
  1347. Documentation on how to use the module can be found in
  1348. Documentation/fault-injection/provoke-crashes.txt
  1349. config TEST_LIST_SORT
  1350. bool "Linked list sorting test"
  1351. depends on DEBUG_KERNEL
  1352. help
  1353. Enable this to turn on 'list_sort()' function test. This test is
  1354. executed only once during system boot, so affects only boot time.
  1355. If unsure, say N.
  1356. config KPROBES_SANITY_TEST
  1357. bool "Kprobes sanity tests"
  1358. depends on DEBUG_KERNEL
  1359. depends on KPROBES
  1360. default n
  1361. help
  1362. This option provides for testing basic kprobes functionality on
  1363. boot. A sample kprobe, jprobe and kretprobe are inserted and
  1364. verified for functionality.
  1365. Say N if you are unsure.
  1366. config BACKTRACE_SELF_TEST
  1367. tristate "Self test for the backtrace code"
  1368. depends on DEBUG_KERNEL
  1369. default n
  1370. help
  1371. This option provides a kernel module that can be used to test
  1372. the kernel stack backtrace code. This option is not useful
  1373. for distributions or general kernels, but only for kernel
  1374. developers working on architecture code.
  1375. Note that if you want to also test saved backtraces, you will
  1376. have to enable STACKTRACE as well.
  1377. Say N if you are unsure.
  1378. config RBTREE_TEST
  1379. tristate "Red-Black tree test"
  1380. depends on DEBUG_KERNEL
  1381. help
  1382. A benchmark measuring the performance of the rbtree library.
  1383. Also includes rbtree invariant checks.
  1384. config INTERVAL_TREE_TEST
  1385. tristate "Interval tree test"
  1386. depends on m && DEBUG_KERNEL
  1387. select INTERVAL_TREE
  1388. help
  1389. A benchmark measuring the performance of the interval tree library
  1390. config PERCPU_TEST
  1391. tristate "Per cpu operations test"
  1392. depends on m && DEBUG_KERNEL
  1393. help
  1394. Enable this option to build test module which validates per-cpu
  1395. operations.
  1396. If unsure, say N.
  1397. config ATOMIC64_SELFTEST
  1398. bool "Perform an atomic64_t self-test at boot"
  1399. help
  1400. Enable this option to test the atomic64_t functions at boot.
  1401. If unsure, say N.
  1402. config ASYNC_RAID6_TEST
  1403. tristate "Self test for hardware accelerated raid6 recovery"
  1404. depends on ASYNC_RAID6_RECOV
  1405. select ASYNC_MEMCPY
  1406. ---help---
  1407. This is a one-shot self test that permutes through the
  1408. recovery of all the possible two disk failure scenarios for a
  1409. N-disk array. Recovery is performed with the asynchronous
  1410. raid6 recovery routines, and will optionally use an offload
  1411. engine if one is available.
  1412. If unsure, say N.
  1413. config TEST_HEXDUMP
  1414. tristate "Test functions located in the hexdump module at runtime"
  1415. config TEST_STRING_HELPERS
  1416. tristate "Test functions located in the string_helpers module at runtime"
  1417. config TEST_KSTRTOX
  1418. tristate "Test kstrto*() family of functions at runtime"
  1419. config TEST_RHASHTABLE
  1420. tristate "Perform selftest on resizable hash table"
  1421. default n
  1422. help
  1423. Enable this option to test the rhashtable functions at boot.
  1424. If unsure, say N.
  1425. endmenu # runtime tests
  1426. config PROVIDE_OHCI1394_DMA_INIT
  1427. bool "Remote debugging over FireWire early on boot"
  1428. depends on PCI && X86
  1429. help
  1430. If you want to debug problems which hang or crash the kernel early
  1431. on boot and the crashing machine has a FireWire port, you can use
  1432. this feature to remotely access the memory of the crashed machine
  1433. over FireWire. This employs remote DMA as part of the OHCI1394
  1434. specification which is now the standard for FireWire controllers.
  1435. With remote DMA, you can monitor the printk buffer remotely using
  1436. firescope and access all memory below 4GB using fireproxy from gdb.
  1437. Even controlling a kernel debugger is possible using remote DMA.
  1438. Usage:
  1439. If ohci1394_dma=early is used as boot parameter, it will initialize
  1440. all OHCI1394 controllers which are found in the PCI config space.
  1441. As all changes to the FireWire bus such as enabling and disabling
  1442. devices cause a bus reset and thereby disable remote DMA for all
  1443. devices, be sure to have the cable plugged and FireWire enabled on
  1444. the debugging host before booting the debug target for debugging.
  1445. This code (~1k) is freed after boot. By then, the firewire stack
  1446. in charge of the OHCI-1394 controllers should be used instead.
  1447. See Documentation/debugging-via-ohci1394.txt for more information.
  1448. config BUILD_DOCSRC
  1449. bool "Build targets in Documentation/ tree"
  1450. depends on HEADERS_CHECK
  1451. help
  1452. This option attempts to build objects from the source files in the
  1453. kernel Documentation/ tree.
  1454. Say N if you are unsure.
  1455. config DMA_API_DEBUG
  1456. bool "Enable debugging of DMA-API usage"
  1457. depends on HAVE_DMA_API_DEBUG
  1458. help
  1459. Enable this option to debug the use of the DMA API by device drivers.
  1460. With this option you will be able to detect common bugs in device
  1461. drivers like double-freeing of DMA mappings or freeing mappings that
  1462. were never allocated.
  1463. This also attempts to catch cases where a page owned by DMA is
  1464. accessed by the cpu in a way that could cause data corruption. For
  1465. example, this enables cow_user_page() to check that the source page is
  1466. not undergoing DMA.
  1467. This option causes a performance degradation. Use only if you want to
  1468. debug device drivers and dma interactions.
  1469. If unsure, say N.
  1470. config TEST_LKM
  1471. tristate "Test module loading with 'hello world' module"
  1472. default n
  1473. depends on m
  1474. help
  1475. This builds the "test_module" module that emits "Hello, world"
  1476. on printk when loaded. It is designed to be used for basic
  1477. evaluation of the module loading subsystem (for example when
  1478. validating module verification). It lacks any extra dependencies,
  1479. and will not normally be loaded by the system unless explicitly
  1480. requested by name.
  1481. If unsure, say N.
  1482. config TEST_USER_COPY
  1483. tristate "Test user/kernel boundary protections"
  1484. default n
  1485. depends on m
  1486. help
  1487. This builds the "test_user_copy" module that runs sanity checks
  1488. on the copy_to/from_user infrastructure, making sure basic
  1489. user/kernel boundary testing is working. If it fails to load,
  1490. a regression has been detected in the user/kernel memory boundary
  1491. protections.
  1492. If unsure, say N.
  1493. config TEST_BPF
  1494. tristate "Test BPF filter functionality"
  1495. default n
  1496. depends on m && NET
  1497. help
  1498. This builds the "test_bpf" module that runs various test vectors
  1499. against the BPF interpreter or BPF JIT compiler depending on the
  1500. current setting. This is in particular useful for BPF JIT compiler
  1501. development, but also to run regression tests against changes in
  1502. the interpreter code. It also enables test stubs for eBPF maps and
  1503. verifier used by user space verifier testsuite.
  1504. If unsure, say N.
  1505. config TEST_FIRMWARE
  1506. tristate "Test firmware loading via userspace interface"
  1507. default n
  1508. depends on FW_LOADER
  1509. help
  1510. This builds the "test_firmware" module that creates a userspace
  1511. interface for testing firmware loading. This can be used to
  1512. control the triggering of firmware loading without needing an
  1513. actual firmware-using device. The contents can be rechecked by
  1514. userspace.
  1515. If unsure, say N.
  1516. config TEST_UDELAY
  1517. tristate "udelay test driver"
  1518. default n
  1519. help
  1520. This builds the "udelay_test" module that helps to make sure
  1521. that udelay() is working properly.
  1522. If unsure, say N.
  1523. config MEMTEST
  1524. bool "Memtest"
  1525. depends on HAVE_MEMBLOCK
  1526. ---help---
  1527. This option adds a kernel parameter 'memtest', which allows memtest
  1528. to be set.
  1529. memtest=0, mean disabled; -- default
  1530. memtest=1, mean do 1 test pattern;
  1531. ...
  1532. memtest=17, mean do 17 test patterns.
  1533. If you are unsure how to answer this question, answer N.
  1534. source "samples/Kconfig"
  1535. source "lib/Kconfig.kgdb"