Kconfig.debug 62 KB

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