Kconfig.debug 50 KB

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