Kconfig.debug 65 KB

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