Kconfig.debug 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853
  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 SCHED_INFO
  706. bool
  707. default n
  708. config SCHEDSTATS
  709. bool "Collect scheduler statistics"
  710. depends on DEBUG_KERNEL && PROC_FS
  711. select SCHED_INFO
  712. help
  713. If you say Y here, additional code will be inserted into the
  714. scheduler and related routines to collect statistics about
  715. scheduler behavior and provide them in /proc/schedstat. These
  716. stats may be useful for both tuning and debugging the scheduler
  717. If you aren't debugging the scheduler or trying to tune a specific
  718. application, you can say N to avoid the very slight overhead
  719. this adds.
  720. config SCHED_STACK_END_CHECK
  721. bool "Detect stack corruption on calls to schedule()"
  722. depends on DEBUG_KERNEL
  723. default n
  724. help
  725. This option checks for a stack overrun on calls to schedule().
  726. If the stack end location is found to be over written always panic as
  727. the content of the corrupted region can no longer be trusted.
  728. This is to ensure no erroneous behaviour occurs which could result in
  729. data corruption or a sporadic crash at a later stage once the region
  730. is examined. The runtime overhead introduced is minimal.
  731. config DEBUG_TIMEKEEPING
  732. bool "Enable extra timekeeping sanity checking"
  733. help
  734. This option will enable additional timekeeping sanity checks
  735. which may be helpful when diagnosing issues where timekeeping
  736. problems are suspected.
  737. This may include checks in the timekeeping hotpaths, so this
  738. option may have a (very small) performance impact to some
  739. workloads.
  740. If unsure, say N.
  741. config TIMER_STATS
  742. bool "Collect kernel timers statistics"
  743. depends on DEBUG_KERNEL && PROC_FS
  744. help
  745. If you say Y here, additional code will be inserted into the
  746. timer routines to collect statistics about kernel timers being
  747. reprogrammed. The statistics can be read from /proc/timer_stats.
  748. The statistics collection is started by writing 1 to /proc/timer_stats,
  749. writing 0 stops it. This feature is useful to collect information
  750. about timer usage patterns in kernel and userspace. This feature
  751. is lightweight if enabled in the kernel config but not activated
  752. (it defaults to deactivated on bootup and will only be activated
  753. if some application like powertop activates it explicitly).
  754. config DEBUG_PREEMPT
  755. bool "Debug preemptible kernel"
  756. depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
  757. default y
  758. help
  759. If you say Y here then the kernel will use a debug variant of the
  760. commonly used smp_processor_id() function and will print warnings
  761. if kernel code uses it in a preemption-unsafe way. Also, the kernel
  762. will detect preemption count underflows.
  763. menu "Lock Debugging (spinlocks, mutexes, etc...)"
  764. config DEBUG_RT_MUTEXES
  765. bool "RT Mutex debugging, deadlock detection"
  766. depends on DEBUG_KERNEL && RT_MUTEXES
  767. help
  768. This allows rt mutex semantics violations and rt mutex related
  769. deadlocks (lockups) to be detected and reported automatically.
  770. config RT_MUTEX_TESTER
  771. bool "Built-in scriptable tester for rt-mutexes"
  772. depends on DEBUG_KERNEL && RT_MUTEXES && BROKEN
  773. help
  774. This option enables a rt-mutex tester.
  775. config DEBUG_SPINLOCK
  776. bool "Spinlock and rw-lock debugging: basic checks"
  777. depends on DEBUG_KERNEL
  778. select UNINLINE_SPIN_UNLOCK
  779. help
  780. Say Y here and build SMP to catch missing spinlock initialization
  781. and certain other kinds of spinlock errors commonly made. This is
  782. best used in conjunction with the NMI watchdog so that spinlock
  783. deadlocks are also debuggable.
  784. config DEBUG_MUTEXES
  785. bool "Mutex debugging: basic checks"
  786. depends on DEBUG_KERNEL
  787. help
  788. This feature allows mutex semantics violations to be detected and
  789. reported.
  790. config DEBUG_WW_MUTEX_SLOWPATH
  791. bool "Wait/wound mutex debugging: Slowpath testing"
  792. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  793. select DEBUG_LOCK_ALLOC
  794. select DEBUG_SPINLOCK
  795. select DEBUG_MUTEXES
  796. help
  797. This feature enables slowpath testing for w/w mutex users by
  798. injecting additional -EDEADLK wound/backoff cases. Together with
  799. the full mutex checks enabled with (CONFIG_PROVE_LOCKING) this
  800. will test all possible w/w mutex interface abuse with the
  801. exception of simply not acquiring all the required locks.
  802. Note that this feature can introduce significant overhead, so
  803. it really should not be enabled in a production or distro kernel,
  804. even a debug kernel. If you are a driver writer, enable it. If
  805. you are a distro, do not.
  806. config DEBUG_LOCK_ALLOC
  807. bool "Lock debugging: detect incorrect freeing of live locks"
  808. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  809. select DEBUG_SPINLOCK
  810. select DEBUG_MUTEXES
  811. select LOCKDEP
  812. help
  813. This feature will check whether any held lock (spinlock, rwlock,
  814. mutex or rwsem) is incorrectly freed by the kernel, via any of the
  815. memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
  816. vfree(), etc.), whether a live lock is incorrectly reinitialized via
  817. spin_lock_init()/mutex_init()/etc., or whether there is any lock
  818. held during task exit.
  819. config PROVE_LOCKING
  820. bool "Lock debugging: prove locking correctness"
  821. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  822. select LOCKDEP
  823. select DEBUG_SPINLOCK
  824. select DEBUG_MUTEXES
  825. select DEBUG_LOCK_ALLOC
  826. select TRACE_IRQFLAGS
  827. default n
  828. help
  829. This feature enables the kernel to prove that all locking
  830. that occurs in the kernel runtime is mathematically
  831. correct: that under no circumstance could an arbitrary (and
  832. not yet triggered) combination of observed locking
  833. sequences (on an arbitrary number of CPUs, running an
  834. arbitrary number of tasks and interrupt contexts) cause a
  835. deadlock.
  836. In short, this feature enables the kernel to report locking
  837. related deadlocks before they actually occur.
  838. The proof does not depend on how hard and complex a
  839. deadlock scenario would be to trigger: how many
  840. participant CPUs, tasks and irq-contexts would be needed
  841. for it to trigger. The proof also does not depend on
  842. timing: if a race and a resulting deadlock is possible
  843. theoretically (no matter how unlikely the race scenario
  844. is), it will be proven so and will immediately be
  845. reported by the kernel (once the event is observed that
  846. makes the deadlock theoretically possible).
  847. If a deadlock is impossible (i.e. the locking rules, as
  848. observed by the kernel, are mathematically correct), the
  849. kernel reports nothing.
  850. NOTE: this feature can also be enabled for rwlocks, mutexes
  851. and rwsems - in which case all dependencies between these
  852. different locking variants are observed and mapped too, and
  853. the proof of observed correctness is also maintained for an
  854. arbitrary combination of these separate locking variants.
  855. For more details, see Documentation/locking/lockdep-design.txt.
  856. config LOCKDEP
  857. bool
  858. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  859. select STACKTRACE
  860. select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE && !ARC && !SCORE
  861. select KALLSYMS
  862. select KALLSYMS_ALL
  863. config LOCK_STAT
  864. bool "Lock usage statistics"
  865. depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
  866. select LOCKDEP
  867. select DEBUG_SPINLOCK
  868. select DEBUG_MUTEXES
  869. select DEBUG_LOCK_ALLOC
  870. default n
  871. help
  872. This feature enables tracking lock contention points
  873. For more details, see Documentation/locking/lockstat.txt
  874. This also enables lock events required by "perf lock",
  875. subcommand of perf.
  876. If you want to use "perf lock", you also need to turn on
  877. CONFIG_EVENT_TRACING.
  878. CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
  879. (CONFIG_LOCKDEP defines "acquire" and "release" events.)
  880. config DEBUG_LOCKDEP
  881. bool "Lock dependency engine debugging"
  882. depends on DEBUG_KERNEL && LOCKDEP
  883. help
  884. If you say Y here, the lock dependency engine will do
  885. additional runtime checks to debug itself, at the price
  886. of more runtime overhead.
  887. config DEBUG_ATOMIC_SLEEP
  888. bool "Sleep inside atomic section checking"
  889. select PREEMPT_COUNT
  890. depends on DEBUG_KERNEL
  891. help
  892. If you say Y here, various routines which may sleep will become very
  893. noisy if they are called inside atomic sections: when a spinlock is
  894. held, inside an rcu read side critical section, inside preempt disabled
  895. sections, inside an interrupt, etc...
  896. config DEBUG_LOCKING_API_SELFTESTS
  897. bool "Locking API boot-time self-tests"
  898. depends on DEBUG_KERNEL
  899. help
  900. Say Y here if you want the kernel to run a short self-test during
  901. bootup. The self-test checks whether common types of locking bugs
  902. are detected by debugging mechanisms or not. (if you disable
  903. lock debugging then those bugs wont be detected of course.)
  904. The following locking APIs are covered: spinlocks, rwlocks,
  905. mutexes and rwsems.
  906. config LOCK_TORTURE_TEST
  907. tristate "torture tests for locking"
  908. depends on DEBUG_KERNEL
  909. select TORTURE_TEST
  910. default n
  911. help
  912. This option provides a kernel module that runs torture tests
  913. on kernel locking primitives. The kernel module may be built
  914. after the fact on the running kernel to be tested, if desired.
  915. Say Y here if you want kernel locking-primitive torture tests
  916. to be built into the kernel.
  917. Say M if you want these torture tests to build as a module.
  918. Say N if you are unsure.
  919. endmenu # lock debugging
  920. config TRACE_IRQFLAGS
  921. bool
  922. help
  923. Enables hooks to interrupt enabling and disabling for
  924. either tracing or lock debugging.
  925. config STACKTRACE
  926. bool "Stack backtrace support"
  927. depends on STACKTRACE_SUPPORT
  928. help
  929. This option causes the kernel to create a /proc/pid/stack for
  930. every process, showing its current stack trace.
  931. It is also used by various kernel debugging features that require
  932. stack trace generation.
  933. config DEBUG_KOBJECT
  934. bool "kobject debugging"
  935. depends on DEBUG_KERNEL
  936. help
  937. If you say Y here, some extra kobject debugging messages will be sent
  938. to the syslog.
  939. config DEBUG_KOBJECT_RELEASE
  940. bool "kobject release debugging"
  941. depends on DEBUG_OBJECTS_TIMERS
  942. help
  943. kobjects are reference counted objects. This means that their
  944. last reference count put is not predictable, and the kobject can
  945. live on past the point at which a driver decides to drop it's
  946. initial reference to the kobject gained on allocation. An
  947. example of this would be a struct device which has just been
  948. unregistered.
  949. However, some buggy drivers assume that after such an operation,
  950. the memory backing the kobject can be immediately freed. This
  951. goes completely against the principles of a refcounted object.
  952. If you say Y here, the kernel will delay the release of kobjects
  953. on the last reference count to improve the visibility of this
  954. kind of kobject release bug.
  955. config HAVE_DEBUG_BUGVERBOSE
  956. bool
  957. config DEBUG_BUGVERBOSE
  958. bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT
  959. depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE)
  960. default y
  961. help
  962. Say Y here to make BUG() panics output the file name and line number
  963. of the BUG call as well as the EIP and oops trace. This aids
  964. debugging but costs about 70-100K of memory.
  965. config DEBUG_LIST
  966. bool "Debug linked list manipulation"
  967. depends on DEBUG_KERNEL
  968. help
  969. Enable this to turn on extended checks in the linked-list
  970. walking routines.
  971. If unsure, say N.
  972. config DEBUG_PI_LIST
  973. bool "Debug priority linked list manipulation"
  974. depends on DEBUG_KERNEL
  975. help
  976. Enable this to turn on extended checks in the priority-ordered
  977. linked-list (plist) walking routines. This checks the entire
  978. list multiple times during each manipulation.
  979. If unsure, say N.
  980. config DEBUG_SG
  981. bool "Debug SG table operations"
  982. depends on DEBUG_KERNEL
  983. help
  984. Enable this to turn on checks on scatter-gather tables. This can
  985. help find problems with drivers that do not properly initialize
  986. their sg tables.
  987. If unsure, say N.
  988. config DEBUG_NOTIFIERS
  989. bool "Debug notifier call chains"
  990. depends on DEBUG_KERNEL
  991. help
  992. Enable this to turn on sanity checking for notifier call chains.
  993. This is most useful for kernel developers to make sure that
  994. modules properly unregister themselves from notifier chains.
  995. This is a relatively cheap check but if you care about maximum
  996. performance, say N.
  997. config DEBUG_CREDENTIALS
  998. bool "Debug credential management"
  999. depends on DEBUG_KERNEL
  1000. help
  1001. Enable this to turn on some debug checking for credential
  1002. management. The additional code keeps track of the number of
  1003. pointers from task_structs to any given cred struct, and checks to
  1004. see that this number never exceeds the usage count of the cred
  1005. struct.
  1006. Furthermore, if SELinux is enabled, this also checks that the
  1007. security pointer in the cred struct is never seen to be invalid.
  1008. If unsure, say N.
  1009. menu "RCU Debugging"
  1010. config PROVE_RCU
  1011. def_bool PROVE_LOCKING
  1012. config PROVE_RCU_REPEATEDLY
  1013. bool "RCU debugging: don't disable PROVE_RCU on first splat"
  1014. depends on PROVE_RCU
  1015. default n
  1016. help
  1017. By itself, PROVE_RCU will disable checking upon issuing the
  1018. first warning (or "splat"). This feature prevents such
  1019. disabling, allowing multiple RCU-lockdep warnings to be printed
  1020. on a single reboot.
  1021. Say Y to allow multiple RCU-lockdep warnings per boot.
  1022. Say N if you are unsure.
  1023. config SPARSE_RCU_POINTER
  1024. bool "RCU debugging: sparse-based checks for pointer usage"
  1025. default n
  1026. help
  1027. This feature enables the __rcu sparse annotation for
  1028. RCU-protected pointers. This annotation will cause sparse
  1029. to flag any non-RCU used of annotated pointers. This can be
  1030. helpful when debugging RCU usage. Please note that this feature
  1031. is not intended to enforce code cleanliness; it is instead merely
  1032. a debugging aid.
  1033. Say Y to make sparse flag questionable use of RCU-protected pointers
  1034. Say N if you are unsure.
  1035. config TORTURE_TEST
  1036. tristate
  1037. default n
  1038. config RCU_TORTURE_TEST
  1039. tristate "torture tests for RCU"
  1040. depends on DEBUG_KERNEL
  1041. select TORTURE_TEST
  1042. select SRCU
  1043. select TASKS_RCU
  1044. default n
  1045. help
  1046. This option provides a kernel module that runs torture tests
  1047. on the RCU infrastructure. The kernel module may be built
  1048. after the fact on the running kernel to be tested, if desired.
  1049. Say Y here if you want RCU torture tests to be built into
  1050. the kernel.
  1051. Say M if you want the RCU torture tests to build as a module.
  1052. Say N if you are unsure.
  1053. config RCU_TORTURE_TEST_RUNNABLE
  1054. bool "torture tests for RCU runnable by default"
  1055. depends on RCU_TORTURE_TEST = y
  1056. default n
  1057. help
  1058. This option provides a way to build the RCU torture tests
  1059. directly into the kernel without them starting up at boot
  1060. time. You can use /proc/sys/kernel/rcutorture_runnable
  1061. to manually override this setting. This /proc file is
  1062. available only when the RCU torture tests have been built
  1063. into the kernel.
  1064. Say Y here if you want the RCU torture tests to start during
  1065. boot (you probably don't).
  1066. Say N here if you want the RCU torture tests to start only
  1067. after being manually enabled via /proc.
  1068. config RCU_TORTURE_TEST_SLOW_PREINIT
  1069. bool "Slow down RCU grace-period pre-initialization to expose races"
  1070. depends on RCU_TORTURE_TEST
  1071. help
  1072. This option delays grace-period pre-initialization (the
  1073. propagation of CPU-hotplug changes up the rcu_node combining
  1074. tree) for a few jiffies between initializing each pair of
  1075. consecutive rcu_node structures. This helps to expose races
  1076. involving grace-period pre-initialization, in other words, it
  1077. makes your kernel less stable. It can also greatly increase
  1078. grace-period latency, especially on systems with large numbers
  1079. of CPUs. This is useful when torture-testing RCU, but in
  1080. almost no other circumstance.
  1081. Say Y here if you want your system to crash and hang more often.
  1082. Say N if you want a sane system.
  1083. config RCU_TORTURE_TEST_SLOW_PREINIT_DELAY
  1084. int "How much to slow down RCU grace-period pre-initialization"
  1085. range 0 5
  1086. default 3
  1087. depends on RCU_TORTURE_TEST_SLOW_PREINIT
  1088. help
  1089. This option specifies the number of jiffies to wait between
  1090. each rcu_node structure pre-initialization step.
  1091. config RCU_TORTURE_TEST_SLOW_INIT
  1092. bool "Slow down RCU grace-period initialization to expose races"
  1093. depends on RCU_TORTURE_TEST
  1094. help
  1095. This option delays grace-period initialization for a few
  1096. jiffies between initializing each pair of consecutive
  1097. rcu_node structures. This helps to expose races involving
  1098. grace-period initialization, in other words, it makes your
  1099. kernel less stable. It can also greatly increase grace-period
  1100. latency, especially on systems with large numbers of CPUs.
  1101. This is useful when torture-testing RCU, but in almost no
  1102. other circumstance.
  1103. Say Y here if you want your system to crash and hang more often.
  1104. Say N if you want a sane system.
  1105. config RCU_TORTURE_TEST_SLOW_INIT_DELAY
  1106. int "How much to slow down RCU grace-period initialization"
  1107. range 0 5
  1108. default 3
  1109. depends on RCU_TORTURE_TEST_SLOW_INIT
  1110. help
  1111. This option specifies the number of jiffies to wait between
  1112. each rcu_node structure initialization.
  1113. config RCU_TORTURE_TEST_SLOW_CLEANUP
  1114. bool "Slow down RCU grace-period cleanup to expose races"
  1115. depends on RCU_TORTURE_TEST
  1116. help
  1117. This option delays grace-period cleanup for a few jiffies
  1118. between cleaning up each pair of consecutive rcu_node
  1119. structures. This helps to expose races involving grace-period
  1120. cleanup, in other words, it makes your kernel less stable.
  1121. It can also greatly increase grace-period latency, especially
  1122. on systems with large numbers of CPUs. This is useful when
  1123. torture-testing RCU, but in almost no other circumstance.
  1124. Say Y here if you want your system to crash and hang more often.
  1125. Say N if you want a sane system.
  1126. config RCU_TORTURE_TEST_SLOW_CLEANUP_DELAY
  1127. int "How much to slow down RCU grace-period cleanup"
  1128. range 0 5
  1129. default 3
  1130. depends on RCU_TORTURE_TEST_SLOW_CLEANUP
  1131. help
  1132. This option specifies the number of jiffies to wait between
  1133. each rcu_node structure cleanup operation.
  1134. config RCU_CPU_STALL_TIMEOUT
  1135. int "RCU CPU stall timeout in seconds"
  1136. depends on RCU_STALL_COMMON
  1137. range 3 300
  1138. default 21
  1139. help
  1140. If a given RCU grace period extends more than the specified
  1141. number of seconds, a CPU stall warning is printed. If the
  1142. RCU grace period persists, additional CPU stall warnings are
  1143. printed at more widely spaced intervals.
  1144. config RCU_CPU_STALL_INFO
  1145. bool "Print additional diagnostics on RCU CPU stall"
  1146. depends on (TREE_RCU || PREEMPT_RCU) && DEBUG_KERNEL
  1147. default y
  1148. help
  1149. For each stalled CPU that is aware of the current RCU grace
  1150. period, print out additional per-CPU diagnostic information
  1151. regarding scheduling-clock ticks, idle state, and,
  1152. for RCU_FAST_NO_HZ kernels, idle-entry state.
  1153. Say N if you are unsure.
  1154. Say Y if you want to enable such diagnostics.
  1155. config RCU_TRACE
  1156. bool "Enable tracing for RCU"
  1157. depends on DEBUG_KERNEL
  1158. select TRACE_CLOCK
  1159. help
  1160. This option provides tracing in RCU which presents stats
  1161. in debugfs for debugging RCU implementation.
  1162. Say Y here if you want to enable RCU tracing
  1163. Say N if you are unsure.
  1164. config RCU_EQS_DEBUG
  1165. bool "Use this when adding any sort of NO_HZ support to your arch"
  1166. depends on DEBUG_KERNEL
  1167. help
  1168. This option provides consistency checks in RCU's handling of
  1169. NO_HZ. These checks have proven quite helpful in detecting
  1170. bugs in arch-specific NO_HZ code.
  1171. Say N here if you need ultimate kernel/user switch latencies
  1172. Say Y if you are unsure
  1173. endmenu # "RCU Debugging"
  1174. config DEBUG_BLOCK_EXT_DEVT
  1175. bool "Force extended block device numbers and spread them"
  1176. depends on DEBUG_KERNEL
  1177. depends on BLOCK
  1178. default n
  1179. help
  1180. BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
  1181. SOME DISTRIBUTIONS. DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
  1182. YOU ARE DOING. Distros, please enable this and fix whatever
  1183. is broken.
  1184. Conventionally, block device numbers are allocated from
  1185. predetermined contiguous area. However, extended block area
  1186. may introduce non-contiguous block device numbers. This
  1187. option forces most block device numbers to be allocated from
  1188. the extended space and spreads them to discover kernel or
  1189. userland code paths which assume predetermined contiguous
  1190. device number allocation.
  1191. Note that turning on this debug option shuffles all the
  1192. device numbers for all IDE and SCSI devices including libata
  1193. ones, so root partition specified using device number
  1194. directly (via rdev or root=MAJ:MIN) won't work anymore.
  1195. Textual device names (root=/dev/sdXn) will continue to work.
  1196. Say N if you are unsure.
  1197. config NOTIFIER_ERROR_INJECTION
  1198. tristate "Notifier error injection"
  1199. depends on DEBUG_KERNEL
  1200. select DEBUG_FS
  1201. help
  1202. This option provides the ability to inject artificial errors to
  1203. specified notifier chain callbacks. It is useful to test the error
  1204. handling of notifier call chain failures.
  1205. Say N if unsure.
  1206. config CPU_NOTIFIER_ERROR_INJECT
  1207. tristate "CPU notifier error injection module"
  1208. depends on HOTPLUG_CPU && NOTIFIER_ERROR_INJECTION
  1209. help
  1210. This option provides a kernel module that can be used to test
  1211. the error handling of the cpu notifiers by injecting artificial
  1212. errors to CPU notifier chain callbacks. It is controlled through
  1213. debugfs interface under /sys/kernel/debug/notifier-error-inject/cpu
  1214. If the notifier call chain should be failed with some events
  1215. notified, write the error code to "actions/<notifier event>/error".
  1216. Example: Inject CPU offline error (-1 == -EPERM)
  1217. # cd /sys/kernel/debug/notifier-error-inject/cpu
  1218. # echo -1 > actions/CPU_DOWN_PREPARE/error
  1219. # echo 0 > /sys/devices/system/cpu/cpu1/online
  1220. bash: echo: write error: Operation not permitted
  1221. To compile this code as a module, choose M here: the module will
  1222. be called cpu-notifier-error-inject.
  1223. If unsure, say N.
  1224. config PM_NOTIFIER_ERROR_INJECT
  1225. tristate "PM notifier error injection module"
  1226. depends on PM && NOTIFIER_ERROR_INJECTION
  1227. default m if PM_DEBUG
  1228. help
  1229. This option provides the ability to inject artificial errors to
  1230. PM notifier chain callbacks. It is controlled through debugfs
  1231. interface /sys/kernel/debug/notifier-error-inject/pm
  1232. If the notifier call chain should be failed with some events
  1233. notified, write the error code to "actions/<notifier event>/error".
  1234. Example: Inject PM suspend error (-12 = -ENOMEM)
  1235. # cd /sys/kernel/debug/notifier-error-inject/pm/
  1236. # echo -12 > actions/PM_SUSPEND_PREPARE/error
  1237. # echo mem > /sys/power/state
  1238. bash: echo: write error: Cannot allocate memory
  1239. To compile this code as a module, choose M here: the module will
  1240. be called pm-notifier-error-inject.
  1241. If unsure, say N.
  1242. config OF_RECONFIG_NOTIFIER_ERROR_INJECT
  1243. tristate "OF reconfig notifier error injection module"
  1244. depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
  1245. help
  1246. This option provides the ability to inject artificial errors to
  1247. OF reconfig notifier chain callbacks. It is controlled
  1248. through debugfs interface under
  1249. /sys/kernel/debug/notifier-error-inject/OF-reconfig/
  1250. If the notifier call chain should be failed with some events
  1251. notified, write the error code to "actions/<notifier event>/error".
  1252. To compile this code as a module, choose M here: the module will
  1253. be called of-reconfig-notifier-error-inject.
  1254. If unsure, say N.
  1255. config FAULT_INJECTION
  1256. bool "Fault-injection framework"
  1257. depends on DEBUG_KERNEL
  1258. help
  1259. Provide fault-injection framework.
  1260. For more details, see Documentation/fault-injection/.
  1261. config FAILSLAB
  1262. bool "Fault-injection capability for kmalloc"
  1263. depends on FAULT_INJECTION
  1264. depends on SLAB || SLUB
  1265. help
  1266. Provide fault-injection capability for kmalloc.
  1267. config FAIL_PAGE_ALLOC
  1268. bool "Fault-injection capabilitiy for alloc_pages()"
  1269. depends on FAULT_INJECTION
  1270. help
  1271. Provide fault-injection capability for alloc_pages().
  1272. config FAIL_MAKE_REQUEST
  1273. bool "Fault-injection capability for disk IO"
  1274. depends on FAULT_INJECTION && BLOCK
  1275. help
  1276. Provide fault-injection capability for disk IO.
  1277. config FAIL_IO_TIMEOUT
  1278. bool "Fault-injection capability for faking disk interrupts"
  1279. depends on FAULT_INJECTION && BLOCK
  1280. help
  1281. Provide fault-injection capability on end IO handling. This
  1282. will make the block layer "forget" an interrupt as configured,
  1283. thus exercising the error handling.
  1284. Only works with drivers that use the generic timeout handling,
  1285. for others it wont do anything.
  1286. config FAIL_MMC_REQUEST
  1287. bool "Fault-injection capability for MMC IO"
  1288. select DEBUG_FS
  1289. depends on FAULT_INJECTION && MMC
  1290. help
  1291. Provide fault-injection capability for MMC IO.
  1292. This will make the mmc core return data errors. This is
  1293. useful to test the error handling in the mmc block device
  1294. and to test how the mmc host driver handles retries from
  1295. the block device.
  1296. config FAIL_FUTEX
  1297. bool "Fault-injection capability for futexes"
  1298. select DEBUG_FS
  1299. depends on FAULT_INJECTION && FUTEX
  1300. help
  1301. Provide fault-injection capability for futexes.
  1302. config FAULT_INJECTION_DEBUG_FS
  1303. bool "Debugfs entries for fault-injection capabilities"
  1304. depends on FAULT_INJECTION && SYSFS && DEBUG_FS
  1305. help
  1306. Enable configuration of fault-injection capabilities via debugfs.
  1307. config FAULT_INJECTION_STACKTRACE_FILTER
  1308. bool "stacktrace filter for fault-injection capabilities"
  1309. depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
  1310. depends on !X86_64
  1311. select STACKTRACE
  1312. select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !SCORE
  1313. help
  1314. Provide stacktrace filter for fault-injection capabilities
  1315. config LATENCYTOP
  1316. bool "Latency measuring infrastructure"
  1317. depends on HAVE_LATENCYTOP_SUPPORT
  1318. depends on DEBUG_KERNEL
  1319. depends on STACKTRACE_SUPPORT
  1320. depends on PROC_FS
  1321. select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC
  1322. select KALLSYMS
  1323. select KALLSYMS_ALL
  1324. select STACKTRACE
  1325. select SCHEDSTATS
  1326. select SCHED_DEBUG
  1327. help
  1328. Enable this option if you want to use the LatencyTOP tool
  1329. to find out which userspace is blocking on what kernel operations.
  1330. config ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
  1331. bool
  1332. config DEBUG_STRICT_USER_COPY_CHECKS
  1333. bool "Strict user copy size checks"
  1334. depends on ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS
  1335. depends on DEBUG_KERNEL && !TRACE_BRANCH_PROFILING
  1336. help
  1337. Enabling this option turns a certain set of sanity checks for user
  1338. copy operations into compile time failures.
  1339. The copy_from_user() etc checks are there to help test if there
  1340. are sufficient security checks on the length argument of
  1341. the copy operation, by having gcc prove that the argument is
  1342. within bounds.
  1343. If unsure, say N.
  1344. source kernel/trace/Kconfig
  1345. menu "Runtime Testing"
  1346. config LKDTM
  1347. tristate "Linux Kernel Dump Test Tool Module"
  1348. depends on DEBUG_FS
  1349. depends on BLOCK
  1350. default n
  1351. help
  1352. This module enables testing of the different dumping mechanisms by
  1353. inducing system failures at predefined crash points.
  1354. If you don't need it: say N
  1355. Choose M here to compile this code as a module. The module will be
  1356. called lkdtm.
  1357. Documentation on how to use the module can be found in
  1358. Documentation/fault-injection/provoke-crashes.txt
  1359. config TEST_LIST_SORT
  1360. bool "Linked list sorting test"
  1361. depends on DEBUG_KERNEL
  1362. help
  1363. Enable this to turn on 'list_sort()' function test. This test is
  1364. executed only once during system boot, so affects only boot time.
  1365. If unsure, say N.
  1366. config KPROBES_SANITY_TEST
  1367. bool "Kprobes sanity tests"
  1368. depends on DEBUG_KERNEL
  1369. depends on KPROBES
  1370. default n
  1371. help
  1372. This option provides for testing basic kprobes functionality on
  1373. boot. A sample kprobe, jprobe and kretprobe are inserted and
  1374. verified for functionality.
  1375. Say N if you are unsure.
  1376. config BACKTRACE_SELF_TEST
  1377. tristate "Self test for the backtrace code"
  1378. depends on DEBUG_KERNEL
  1379. default n
  1380. help
  1381. This option provides a kernel module that can be used to test
  1382. the kernel stack backtrace code. This option is not useful
  1383. for distributions or general kernels, but only for kernel
  1384. developers working on architecture code.
  1385. Note that if you want to also test saved backtraces, you will
  1386. have to enable STACKTRACE as well.
  1387. Say N if you are unsure.
  1388. config RBTREE_TEST
  1389. tristate "Red-Black tree test"
  1390. depends on DEBUG_KERNEL
  1391. help
  1392. A benchmark measuring the performance of the rbtree library.
  1393. Also includes rbtree invariant checks.
  1394. config INTERVAL_TREE_TEST
  1395. tristate "Interval tree test"
  1396. depends on m && DEBUG_KERNEL
  1397. select INTERVAL_TREE
  1398. help
  1399. A benchmark measuring the performance of the interval tree library
  1400. config PERCPU_TEST
  1401. tristate "Per cpu operations test"
  1402. depends on m && DEBUG_KERNEL
  1403. help
  1404. Enable this option to build test module which validates per-cpu
  1405. operations.
  1406. If unsure, say N.
  1407. config ATOMIC64_SELFTEST
  1408. bool "Perform an atomic64_t self-test at boot"
  1409. help
  1410. Enable this option to test the atomic64_t functions at boot.
  1411. If unsure, say N.
  1412. config ASYNC_RAID6_TEST
  1413. tristate "Self test for hardware accelerated raid6 recovery"
  1414. depends on ASYNC_RAID6_RECOV
  1415. select ASYNC_MEMCPY
  1416. ---help---
  1417. This is a one-shot self test that permutes through the
  1418. recovery of all the possible two disk failure scenarios for a
  1419. N-disk array. Recovery is performed with the asynchronous
  1420. raid6 recovery routines, and will optionally use an offload
  1421. engine if one is available.
  1422. If unsure, say N.
  1423. config TEST_HEXDUMP
  1424. tristate "Test functions located in the hexdump module at runtime"
  1425. config TEST_STRING_HELPERS
  1426. tristate "Test functions located in the string_helpers module at runtime"
  1427. config TEST_KSTRTOX
  1428. tristate "Test kstrto*() family of functions at runtime"
  1429. config TEST_RHASHTABLE
  1430. tristate "Perform selftest on resizable hash table"
  1431. default n
  1432. help
  1433. Enable this option to test the rhashtable functions at boot.
  1434. If unsure, say N.
  1435. endmenu # runtime tests
  1436. config PROVIDE_OHCI1394_DMA_INIT
  1437. bool "Remote debugging over FireWire early on boot"
  1438. depends on PCI && X86
  1439. help
  1440. If you want to debug problems which hang or crash the kernel early
  1441. on boot and the crashing machine has a FireWire port, you can use
  1442. this feature to remotely access the memory of the crashed machine
  1443. over FireWire. This employs remote DMA as part of the OHCI1394
  1444. specification which is now the standard for FireWire controllers.
  1445. With remote DMA, you can monitor the printk buffer remotely using
  1446. firescope and access all memory below 4GB using fireproxy from gdb.
  1447. Even controlling a kernel debugger is possible using remote DMA.
  1448. Usage:
  1449. If ohci1394_dma=early is used as boot parameter, it will initialize
  1450. all OHCI1394 controllers which are found in the PCI config space.
  1451. As all changes to the FireWire bus such as enabling and disabling
  1452. devices cause a bus reset and thereby disable remote DMA for all
  1453. devices, be sure to have the cable plugged and FireWire enabled on
  1454. the debugging host before booting the debug target for debugging.
  1455. This code (~1k) is freed after boot. By then, the firewire stack
  1456. in charge of the OHCI-1394 controllers should be used instead.
  1457. See Documentation/debugging-via-ohci1394.txt for more information.
  1458. config BUILD_DOCSRC
  1459. bool "Build targets in Documentation/ tree"
  1460. depends on HEADERS_CHECK
  1461. help
  1462. This option attempts to build objects from the source files in the
  1463. kernel Documentation/ tree.
  1464. Say N if you are unsure.
  1465. config DMA_API_DEBUG
  1466. bool "Enable debugging of DMA-API usage"
  1467. depends on HAVE_DMA_API_DEBUG
  1468. help
  1469. Enable this option to debug the use of the DMA API by device drivers.
  1470. With this option you will be able to detect common bugs in device
  1471. drivers like double-freeing of DMA mappings or freeing mappings that
  1472. were never allocated.
  1473. This also attempts to catch cases where a page owned by DMA is
  1474. accessed by the cpu in a way that could cause data corruption. For
  1475. example, this enables cow_user_page() to check that the source page is
  1476. not undergoing DMA.
  1477. This option causes a performance degradation. Use only if you want to
  1478. debug device drivers and dma interactions.
  1479. If unsure, say N.
  1480. config TEST_LKM
  1481. tristate "Test module loading with 'hello world' module"
  1482. default n
  1483. depends on m
  1484. help
  1485. This builds the "test_module" module that emits "Hello, world"
  1486. on printk when loaded. It is designed to be used for basic
  1487. evaluation of the module loading subsystem (for example when
  1488. validating module verification). It lacks any extra dependencies,
  1489. and will not normally be loaded by the system unless explicitly
  1490. requested by name.
  1491. If unsure, say N.
  1492. config TEST_USER_COPY
  1493. tristate "Test user/kernel boundary protections"
  1494. default n
  1495. depends on m
  1496. help
  1497. This builds the "test_user_copy" module that runs sanity checks
  1498. on the copy_to/from_user infrastructure, making sure basic
  1499. user/kernel boundary testing is working. If it fails to load,
  1500. a regression has been detected in the user/kernel memory boundary
  1501. protections.
  1502. If unsure, say N.
  1503. config TEST_BPF
  1504. tristate "Test BPF filter functionality"
  1505. default n
  1506. depends on m && NET
  1507. help
  1508. This builds the "test_bpf" module that runs various test vectors
  1509. against the BPF interpreter or BPF JIT compiler depending on the
  1510. current setting. This is in particular useful for BPF JIT compiler
  1511. development, but also to run regression tests against changes in
  1512. the interpreter code. It also enables test stubs for eBPF maps and
  1513. verifier used by user space verifier testsuite.
  1514. If unsure, say N.
  1515. config TEST_FIRMWARE
  1516. tristate "Test firmware loading via userspace interface"
  1517. default n
  1518. depends on FW_LOADER
  1519. help
  1520. This builds the "test_firmware" module that creates a userspace
  1521. interface for testing firmware loading. This can be used to
  1522. control the triggering of firmware loading without needing an
  1523. actual firmware-using device. The contents can be rechecked by
  1524. userspace.
  1525. If unsure, say N.
  1526. config TEST_UDELAY
  1527. tristate "udelay test driver"
  1528. default n
  1529. help
  1530. This builds the "udelay_test" module that helps to make sure
  1531. that udelay() is working properly.
  1532. If unsure, say N.
  1533. config MEMTEST
  1534. bool "Memtest"
  1535. depends on HAVE_MEMBLOCK
  1536. ---help---
  1537. This option adds a kernel parameter 'memtest', which allows memtest
  1538. to be set.
  1539. memtest=0, mean disabled; -- default
  1540. memtest=1, mean do 1 test pattern;
  1541. ...
  1542. memtest=17, mean do 17 test patterns.
  1543. If you are unsure how to answer this question, answer N.
  1544. source "samples/Kconfig"
  1545. source "lib/Kconfig.kgdb"