Kconfig.debug 51 KB

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