Kconfig.debug 66 KB

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