Kconfig.debug 51 KB

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