[ERD][NEUS7920-76] [COMMON] lib: dss: refactor dbg_snapshot_irq logging
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / lib / Kconfig.debug
1 menu "printk and dmesg options"
2
3 config PRINTK_TIME
4 bool "Show timing information on printks"
5 depends on PRINTK
6 help
7 Selecting this option causes time stamps of the printk()
8 messages to be added to the output of the syslog() system
9 call and at the console.
10
11 The timestamp is always recorded internally, and exported
12 to /dev/kmsg. This flag just specifies if the timestamp should
13 be included, not that the timestamp is recorded.
14
15 The behavior is also controlled by the kernel command line
16 parameter printk.time=1. See Documentation/admin-guide/kernel-parameters.rst
17
18 config CONSOLE_LOGLEVEL_DEFAULT
19 int "Default console loglevel (1-15)"
20 range 1 15
21 default "7"
22 help
23 Default loglevel to determine what will be printed on the console.
24
25 Setting a default here is equivalent to passing in loglevel=<x> in
26 the kernel bootargs. loglevel=<x> continues to override whatever
27 value is specified here as well.
28
29 Note: This does not affect the log level of un-prefixed printk()
30 usage in the kernel. That is controlled by the MESSAGE_LOGLEVEL_DEFAULT
31 option.
32
33 config PRINTK_PROCESS
34 bool "Show process information on printks"
35 depends on PRINTK
36 help
37 Selecting this option causes process to be
38 included in printk output. Or add printk.process=1 at boot-time.
39
40 config MESSAGE_LOGLEVEL_DEFAULT
41 int "Default message log level (1-7)"
42 range 1 7
43 default "4"
44 help
45 Default log level for printk statements with no specified priority.
46
47 This was hard-coded to KERN_WARNING since at least 2.6.10 but folks
48 that are auditing their logs closely may want to set it to a lower
49 priority.
50
51 Note: This does not affect what message level gets printed on the console
52 by default. To change that, use loglevel=<x> in the kernel bootargs,
53 or pick a different CONSOLE_LOGLEVEL_DEFAULT configuration value.
54
55 config BOOT_PRINTK_DELAY
56 bool "Delay each boot printk message by N milliseconds"
57 depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY
58 help
59 This build option allows you to read kernel boot messages
60 by inserting a short delay after each one. The delay is
61 specified in milliseconds on the kernel command line,
62 using "boot_delay=N".
63
64 It is likely that you would also need to use "lpj=M" to preset
65 the "loops per jiffie" value.
66 See a previous boot log for the "lpj" value to use for your
67 system, and then set "lpj=M" before setting "boot_delay=N".
68 NOTE: Using this option may adversely affect SMP systems.
69 I.e., processors other than the first one may not boot up.
70 BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect
71 what it believes to be lockup conditions.
72
73 config DYNAMIC_DEBUG
74 bool "Enable dynamic printk() support"
75 default n
76 depends on PRINTK
77 depends on DEBUG_FS
78 help
79
80 Compiles debug level messages into the kernel, which would not
81 otherwise be available at runtime. These messages can then be
82 enabled/disabled based on various levels of scope - per source file,
83 function, module, format string, and line number. This mechanism
84 implicitly compiles in all pr_debug() and dev_dbg() calls, which
85 enlarges the kernel text size by about 2%.
86
87 If a source file is compiled with DEBUG flag set, any
88 pr_debug() calls in it are enabled by default, but can be
89 disabled at runtime as below. Note that DEBUG flag is
90 turned on by many CONFIG_*DEBUG* options.
91
92 Usage:
93
94 Dynamic debugging is controlled via the 'dynamic_debug/control' file,
95 which is contained in the 'debugfs' filesystem. Thus, the debugfs
96 filesystem must first be mounted before making use of this feature.
97 We refer the control file as: <debugfs>/dynamic_debug/control. This
98 file contains a list of the debug statements that can be enabled. The
99 format for each line of the file is:
100
101 filename:lineno [module]function flags format
102
103 filename : source file of the debug statement
104 lineno : line number of the debug statement
105 module : module that contains the debug statement
106 function : function that contains the debug statement
107 flags : '=p' means the line is turned 'on' for printing
108 format : the format used for the debug statement
109
110 From a live system:
111
112 nullarbor:~ # cat <debugfs>/dynamic_debug/control
113 # filename:lineno [module]function flags format
114 fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012"
115 fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012"
116 fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012"
117
118 Example usage:
119
120 // enable the message at line 1603 of file svcsock.c
121 nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' >
122 <debugfs>/dynamic_debug/control
123
124 // enable all the messages in file svcsock.c
125 nullarbor:~ # echo -n 'file svcsock.c +p' >
126 <debugfs>/dynamic_debug/control
127
128 // enable all the messages in the NFS server module
129 nullarbor:~ # echo -n 'module nfsd +p' >
130 <debugfs>/dynamic_debug/control
131
132 // enable all 12 messages in the function svc_process()
133 nullarbor:~ # echo -n 'func svc_process +p' >
134 <debugfs>/dynamic_debug/control
135
136 // disable all 12 messages in the function svc_process()
137 nullarbor:~ # echo -n 'func svc_process -p' >
138 <debugfs>/dynamic_debug/control
139
140 See Documentation/admin-guide/dynamic-debug-howto.rst for additional
141 information.
142
143 endmenu # "printk and dmesg options"
144
145 menu "Compile-time checks and compiler options"
146
147 config DEBUG_INFO
148 bool "Compile the kernel with debug info"
149 depends on DEBUG_KERNEL && !COMPILE_TEST
150 help
151 If you say Y here the resulting kernel image will include
152 debugging info resulting in a larger kernel image.
153 This adds debug symbols to the kernel and modules (gcc -g), and
154 is needed if you intend to use kernel crashdump or binary object
155 tools like crash, kgdb, LKCD, gdb, etc on the kernel.
156 Say Y here only if you plan to debug the kernel.
157
158 If unsure, say N.
159
160 config DEBUG_INFO_REDUCED
161 bool "Reduce debugging information"
162 depends on DEBUG_INFO
163 help
164 If you say Y here gcc is instructed to generate less debugging
165 information for structure types. This means that tools that
166 need full debugging information (like kgdb or systemtap) won't
167 be happy. But if you merely need debugging information to
168 resolve line numbers there is no loss. Advantage is that
169 build directory object sizes shrink dramatically over a full
170 DEBUG_INFO build and compile times are reduced too.
171 Only works with newer gcc versions.
172
173 config DEBUG_INFO_SPLIT
174 bool "Produce split debuginfo in .dwo files"
175 depends on DEBUG_INFO && !FRV
176 help
177 Generate debug info into separate .dwo files. This significantly
178 reduces the build directory size for builds with DEBUG_INFO,
179 because it stores the information only once on disk in .dwo
180 files instead of multiple times in object files and executables.
181 In addition the debug information is also compressed.
182
183 Requires recent gcc (4.7+) and recent gdb/binutils.
184 Any tool that packages or reads debug information would need
185 to know about the .dwo files and include them.
186 Incompatible with older versions of ccache.
187
188 config DEBUG_INFO_DWARF4
189 bool "Generate dwarf4 debuginfo"
190 depends on DEBUG_INFO
191 help
192 Generate dwarf4 debug info. This requires recent versions
193 of gcc and gdb. It makes the debug information larger.
194 But it significantly improves the success of resolving
195 variables in gdb on optimized code.
196
197 config GDB_SCRIPTS
198 bool "Provide GDB scripts for kernel debugging"
199 depends on DEBUG_INFO
200 help
201 This creates the required links to GDB helper scripts in the
202 build directory. If you load vmlinux into gdb, the helper
203 scripts will be automatically imported by gdb as well, and
204 additional functions are available to analyze a Linux kernel
205 instance. See Documentation/dev-tools/gdb-kernel-debugging.rst
206 for further details.
207
208 config ENABLE_WARN_DEPRECATED
209 bool "Enable __deprecated logic"
210 default y
211 help
212 Enable the __deprecated logic in the kernel build.
213 Disable this to suppress the "warning: 'foo' is deprecated
214 (declared at kernel/power/somefile.c:1234)" messages.
215
216 config ENABLE_MUST_CHECK
217 bool "Enable __must_check logic"
218 default y
219 help
220 Enable the __must_check logic in the kernel build. Disable this to
221 suppress the "warning: ignoring return value of 'foo', declared with
222 attribute warn_unused_result" messages.
223
224 config FRAME_WARN
225 int "Warn for stack frames larger than (needs gcc 4.4)"
226 range 0 8192
227 default 3072 if KASAN_EXTRA
228 default 2048 if GCC_PLUGIN_LATENT_ENTROPY
229 default 1280 if (!64BIT && PARISC)
230 default 1024 if (!64BIT && !PARISC)
231 default 2048 if 64BIT
232 help
233 Tell gcc to warn at build time for stack frames larger than this.
234 Setting this too low will cause a lot of warnings.
235 Setting it to 0 disables the warning.
236 Requires gcc 4.4
237
238 config STRIP_ASM_SYMS
239 bool "Strip assembler-generated symbols during link"
240 default n
241 help
242 Strip internal assembler-generated symbols during a link (symbols
243 that look like '.Lxxx') so they don't pollute the output of
244 get_wchan() and suchlike.
245
246 config READABLE_ASM
247 bool "Generate readable assembler code"
248 depends on DEBUG_KERNEL
249 help
250 Disable some compiler optimizations that tend to generate human unreadable
251 assembler output. This may make the kernel slightly slower, but it helps
252 to keep kernel developers who have to stare a lot at assembler listings
253 sane.
254
255 config UNUSED_SYMBOLS
256 bool "Enable unused/obsolete exported symbols"
257 default y if X86
258 help
259 Unused but exported symbols make the kernel needlessly bigger. For
260 that reason most of these unused exports will soon be removed. This
261 option is provided temporarily to provide a transition period in case
262 some external kernel module needs one of these symbols anyway. If you
263 encounter such a case in your module, consider if you are actually
264 using the right API. (rationale: since nobody in the kernel is using
265 this in a module, there is a pretty good chance it's actually the
266 wrong interface to use). If you really need the symbol, please send a
267 mail to the linux kernel mailing list mentioning the symbol and why
268 you really need it, and what the merge plan to the mainline kernel for
269 your module is.
270
271 config PAGE_OWNER
272 bool "Track page owner"
273 depends on DEBUG_KERNEL && STACKTRACE_SUPPORT
274 select DEBUG_FS
275 select STACKTRACE
276 select STACKDEPOT
277 select PAGE_EXTENSION
278 help
279 This keeps track of what call chain is the owner of a page, may
280 help to find bare alloc_page(s) leaks. Even if you include this
281 feature on your build, it is disabled in default. You should pass
282 "page_owner=on" to boot parameter in order to enable it. Eats
283 a fair amount of memory if enabled. See tools/vm/page_owner_sort.c
284 for user-space helper.
285
286 If unsure, say N.
287
288 config DEBUG_FS
289 bool "Debug Filesystem"
290 help
291 debugfs is a virtual file system that kernel developers use to put
292 debugging files into. Enable this option to be able to read and
293 write to these files.
294
295 For detailed documentation on the debugfs API, see
296 Documentation/filesystems/.
297
298 If unsure, say N.
299
300 config HEADERS_CHECK
301 bool "Run 'make headers_check' when building vmlinux"
302 depends on !UML
303 help
304 This option will extract the user-visible kernel headers whenever
305 building the kernel, and will run basic sanity checks on them to
306 ensure that exported files do not attempt to include files which
307 were not exported, etc.
308
309 If you're making modifications to header files which are
310 relevant for userspace, say 'Y', and check the headers
311 exported to $(INSTALL_HDR_PATH) (usually 'usr/include' in
312 your build tree), to make sure they're suitable.
313
314 config DEBUG_SECTION_MISMATCH
315 bool "Enable full Section mismatch analysis"
316 help
317 The section mismatch analysis checks if there are illegal
318 references from one section to another section.
319 During linktime or runtime, some sections are dropped;
320 any use of code/data previously in these sections would
321 most likely result in an oops.
322 In the code, functions and variables are annotated with
323 __init,, etc. (see the full list in include/linux/init.h),
324 which results in the code/data being placed in specific sections.
325 The section mismatch analysis is always performed after a full
326 kernel build, and enabling this option causes the following
327 additional steps to occur:
328 - Add the option -fno-inline-functions-called-once to gcc commands.
329 When inlining a function annotated with __init in a non-init
330 function, we would lose the section information and thus
331 the analysis would not catch the illegal reference.
332 This option tells gcc to inline less (but it does result in
333 a larger kernel).
334 - Run the section mismatch analysis for each module/built-in.o file.
335 When we run the section mismatch analysis on vmlinux.o, we
336 lose valuable information about where the mismatch was
337 introduced.
338 Running the analysis for each module/built-in.o file
339 tells where the mismatch happens much closer to the
340 source. The drawback is that the same mismatch is
341 reported at least twice.
342 - Enable verbose reporting from modpost in order to help resolve
343 the section mismatches that are reported.
344
345 config SECTION_MISMATCH_WARN_ONLY
346 bool "Make section mismatch errors non-fatal"
347 default y
348 help
349 If you say N here, the build process will fail if there are any
350 section mismatch, instead of just throwing warnings.
351
352 If unsure, say Y.
353
354 #
355 # Select this config option from the architecture Kconfig, if it
356 # is preferred to always offer frame pointers as a config
357 # option on the architecture (regardless of KERNEL_DEBUG):
358 #
359 config ARCH_WANT_FRAME_POINTERS
360 bool
361 help
362
363 config FRAME_POINTER
364 bool "Compile the kernel with frame pointers"
365 depends on DEBUG_KERNEL && \
366 (CRIS || M68K || FRV || UML || \
367 SUPERH || BLACKFIN || MN10300 || METAG) || \
368 ARCH_WANT_FRAME_POINTERS
369 default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS
370 help
371 If you say Y here the resulting kernel image will be slightly
372 larger and slower, but it gives very useful debugging information
373 in case of kernel bugs. (precise oopses/stacktraces/warnings)
374
375 config STACK_VALIDATION
376 bool "Compile-time stack metadata validation"
377 depends on HAVE_STACK_VALIDATION
378 default n
379 help
380 Add compile-time checks to validate stack metadata, including frame
381 pointers (if CONFIG_FRAME_POINTER is enabled). This helps ensure
382 that runtime stack traces are more reliable.
383
384 This is also a prerequisite for generation of ORC unwind data, which
385 is needed for CONFIG_UNWINDER_ORC.
386
387 For more information, see
388 tools/objtool/Documentation/stack-validation.txt.
389
390 config DEBUG_FORCE_WEAK_PER_CPU
391 bool "Force weak per-cpu definitions"
392 depends on DEBUG_KERNEL
393 help
394 s390 and alpha require percpu variables in modules to be
395 defined weak to work around addressing range issue which
396 puts the following two restrictions on percpu variable
397 definitions.
398
399 1. percpu symbols must be unique whether static or not
400 2. percpu variables can't be defined inside a function
401
402 To ensure that generic code follows the above rules, this
403 option forces all percpu variables to be defined as weak.
404
405 endmenu # "Compiler options"
406
407 config MAGIC_SYSRQ
408 bool "Magic SysRq key"
409 depends on !UML
410 help
411 If you say Y here, you will have some control over the system even
412 if the system crashes for example during kernel debugging (e.g., you
413 will be able to flush the buffer cache to disk, reboot the system
414 immediately or dump some status information). This is accomplished
415 by pressing various keys while holding SysRq (Alt+PrintScreen). It
416 also works on a serial console (on PC hardware at least), if you
417 send a BREAK and then within 5 seconds a command keypress. The
418 keys are documented in <file:Documentation/admin-guide/sysrq.rst>.
419 Don't say Y unless you really know what this hack does.
420
421 config MAGIC_SYSRQ_DEFAULT_ENABLE
422 hex "Enable magic SysRq key functions by default"
423 depends on MAGIC_SYSRQ
424 default 0x1
425 help
426 Specifies which SysRq key functions are enabled by default.
427 This may be set to 1 or 0 to enable or disable them all, or
428 to a bitmask as described in Documentation/admin-guide/sysrq.rst.
429
430 config MAGIC_SYSRQ_SERIAL
431 bool "Enable magic SysRq key over serial"
432 depends on MAGIC_SYSRQ
433 default y
434 help
435 Many embedded boards have a disconnected TTL level serial which can
436 generate some garbage that can lead to spurious false sysrq detects.
437 This option allows you to decide whether you want to enable the
438 magic SysRq key.
439
440 config DEBUG_KERNEL
441 bool "Kernel debugging"
442 help
443 Say Y here if you are developing drivers or trying to debug and
444 identify kernel problems.
445
446 menu "Memory Debugging"
447
448 source mm/Kconfig.debug
449
450 config DEBUG_OBJECTS
451 bool "Debug object operations"
452 depends on DEBUG_KERNEL
453 help
454 If you say Y here, additional code will be inserted into the
455 kernel to track the life time of various objects and validate
456 the operations on those objects.
457
458 config DEBUG_OBJECTS_SELFTEST
459 bool "Debug objects selftest"
460 depends on DEBUG_OBJECTS
461 help
462 This enables the selftest of the object debug code.
463
464 config DEBUG_OBJECTS_FREE
465 bool "Debug objects in freed memory"
466 depends on DEBUG_OBJECTS
467 help
468 This enables checks whether a k/v free operation frees an area
469 which contains an object which has not been deactivated
470 properly. This can make kmalloc/kfree-intensive workloads
471 much slower.
472
473 config DEBUG_OBJECTS_TIMERS
474 bool "Debug timer objects"
475 depends on DEBUG_OBJECTS
476 help
477 If you say Y here, additional code will be inserted into the
478 timer routines to track the life time of timer objects and
479 validate the timer operations.
480
481 config DEBUG_OBJECTS_WORK
482 bool "Debug work objects"
483 depends on DEBUG_OBJECTS
484 help
485 If you say Y here, additional code will be inserted into the
486 work queue routines to track the life time of work objects and
487 validate the work operations.
488
489 config DEBUG_OBJECTS_RCU_HEAD
490 bool "Debug RCU callbacks objects"
491 depends on DEBUG_OBJECTS
492 help
493 Enable this to turn on debugging of RCU list heads (call_rcu() usage).
494
495 config DEBUG_OBJECTS_PERCPU_COUNTER
496 bool "Debug percpu counter objects"
497 depends on DEBUG_OBJECTS
498 help
499 If you say Y here, additional code will be inserted into the
500 percpu counter routines to track the life time of percpu counter
501 objects and validate the percpu counter operations.
502
503 config DEBUG_OBJECTS_ENABLE_DEFAULT
504 int "debug_objects bootup default value (0-1)"
505 range 0 1
506 default "1"
507 depends on DEBUG_OBJECTS
508 help
509 Debug objects boot parameter default value
510
511 config DEBUG_SLAB
512 bool "Debug slab memory allocations"
513 depends on DEBUG_KERNEL && SLAB
514 help
515 Say Y here to have the kernel do limited verification on memory
516 allocation as well as poisoning memory on free to catch use of freed
517 memory. This can make kmalloc/kfree-intensive workloads much slower.
518
519 config DEBUG_SLAB_LEAK
520 bool "Memory leak debugging"
521 depends on DEBUG_SLAB
522
523 config SLUB_DEBUG_ON
524 bool "SLUB debugging on by default"
525 depends on SLUB && SLUB_DEBUG
526 default n
527 help
528 Boot with debugging on by default. SLUB boots by default with
529 the runtime debug capabilities switched off. Enabling this is
530 equivalent to specifying the "slub_debug" parameter on boot.
531 There is no support for more fine grained debug control like
532 possible with slub_debug=xxx. SLUB debugging may be switched
533 off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying
534 "slub_debug=-".
535
536 config SLUB_STATS
537 default n
538 bool "Enable SLUB performance statistics"
539 depends on SLUB && SYSFS
540 help
541 SLUB statistics are useful to debug SLUBs allocation behavior in
542 order find ways to optimize the allocator. This should never be
543 enabled for production use since keeping statistics slows down
544 the allocator by a few percentage points. The slabinfo command
545 supports the determination of the most active slabs to figure
546 out which slabs are relevant to a particular load.
547 Try running: slabinfo -DA
548
549 config HAVE_DEBUG_KMEMLEAK
550 bool
551
552 config DEBUG_KMEMLEAK
553 bool "Kernel memory leak detector"
554 depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK
555 select DEBUG_FS
556 select STACKTRACE if STACKTRACE_SUPPORT
557 select KALLSYMS
558 select CRC32
559 help
560 Say Y here if you want to enable the memory leak
561 detector. The memory allocation/freeing is traced in a way
562 similar to the Boehm's conservative garbage collector, the
563 difference being that the orphan objects are not freed but
564 only shown in /sys/kernel/debug/kmemleak. Enabling this
565 feature will introduce an overhead to memory
566 allocations. See Documentation/dev-tools/kmemleak.rst for more
567 details.
568
569 Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances
570 of finding leaks due to the slab objects poisoning.
571
572 In order to access the kmemleak file, debugfs needs to be
573 mounted (usually at /sys/kernel/debug).
574
575 config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
576 int "Maximum kmemleak early log entries"
577 depends on DEBUG_KMEMLEAK
578 range 200 40000
579 default 400
580 help
581 Kmemleak must track all the memory allocations to avoid
582 reporting false positives. Since memory may be allocated or
583 freed before kmemleak is initialised, an early log buffer is
584 used to store these actions. If kmemleak reports "early log
585 buffer exceeded", please increase this value.
586
587 config DEBUG_KMEMLEAK_TEST
588 tristate "Simple test for the kernel memory leak detector"
589 depends on DEBUG_KMEMLEAK && m
590 help
591 This option enables a module that explicitly leaks memory.
592
593 If unsure, say N.
594
595 config DEBUG_KMEMLEAK_DEFAULT_OFF
596 bool "Default kmemleak to off"
597 depends on DEBUG_KMEMLEAK
598 help
599 Say Y here to disable kmemleak by default. It can then be enabled
600 on the command line via kmemleak=on.
601
602 config DEBUG_STACK_USAGE
603 bool "Stack utilization instrumentation"
604 depends on DEBUG_KERNEL && !IA64
605 help
606 Enables the display of the minimum amount of free stack which each
607 task has ever had available in the sysrq-T and sysrq-P debug output.
608
609 This option will slow down process creation somewhat.
610
611 config DEBUG_VM
612 bool "Debug VM"
613 depends on DEBUG_KERNEL
614 help
615 Enable this to turn on extended checks in the virtual-memory system
616 that may impact performance.
617
618 If unsure, say N.
619
620 config DEBUG_VM_VMACACHE
621 bool "Debug VMA caching"
622 depends on DEBUG_VM
623 help
624 Enable this to turn on VMA caching debug information. Doing so
625 can cause significant overhead, so only enable it in non-production
626 environments.
627
628 If unsure, say N.
629
630 config DEBUG_VM_RB
631 bool "Debug VM red-black trees"
632 depends on DEBUG_VM
633 help
634 Enable VM red-black tree debugging information and extra validations.
635
636 If unsure, say N.
637
638 config DEBUG_VM_PGFLAGS
639 bool "Debug page-flags operations"
640 depends on DEBUG_VM
641 help
642 Enables extra validation on page flags operations.
643
644 If unsure, say N.
645
646 config ARCH_HAS_DEBUG_VIRTUAL
647 bool
648
649 config DEBUG_VIRTUAL
650 bool "Debug VM translations"
651 depends on DEBUG_KERNEL && ARCH_HAS_DEBUG_VIRTUAL
652 help
653 Enable some costly sanity checks in virtual to page code. This can
654 catch mistakes with virt_to_page() and friends.
655
656 If unsure, say N.
657
658 config DEBUG_NOMMU_REGIONS
659 bool "Debug the global anon/private NOMMU mapping region tree"
660 depends on DEBUG_KERNEL && !MMU
661 help
662 This option causes the global tree of anonymous and private mapping
663 regions to be regularly checked for invalid topology.
664
665 config DEBUG_MEMORY_INIT
666 bool "Debug memory initialisation" if EXPERT
667 default !EXPERT
668 help
669 Enable this for additional checks during memory initialisation.
670 The sanity checks verify aspects of the VM such as the memory model
671 and other information provided by the architecture. Verbose
672 information will be printed at KERN_DEBUG loglevel depending
673 on the mminit_loglevel= command-line option.
674
675 If unsure, say Y
676
677 config MEMORY_NOTIFIER_ERROR_INJECT
678 tristate "Memory hotplug notifier error injection module"
679 depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION
680 help
681 This option provides the ability to inject artificial errors to
682 memory hotplug notifier chain callbacks. It is controlled through
683 debugfs interface under /sys/kernel/debug/notifier-error-inject/memory
684
685 If the notifier call chain should be failed with some events
686 notified, write the error code to "actions/<notifier event>/error".
687
688 Example: Inject memory hotplug offline error (-12 == -ENOMEM)
689
690 # cd /sys/kernel/debug/notifier-error-inject/memory
691 # echo -12 > actions/MEM_GOING_OFFLINE/error
692 # echo offline > /sys/devices/system/memory/memoryXXX/state
693 bash: echo: write error: Cannot allocate memory
694
695 To compile this code as a module, choose M here: the module will
696 be called memory-notifier-error-inject.
697
698 If unsure, say N.
699
700 config DEBUG_PER_CPU_MAPS
701 bool "Debug access to per_cpu maps"
702 depends on DEBUG_KERNEL
703 depends on SMP
704 help
705 Say Y to verify that the per_cpu map being accessed has
706 been set up. This adds a fair amount of code to kernel memory
707 and decreases performance.
708
709 Say N if unsure.
710
711 config DEBUG_HIGHMEM
712 bool "Highmem debugging"
713 depends on DEBUG_KERNEL && HIGHMEM
714 help
715 This option enables additional error checking for high memory
716 systems. Disable for production systems.
717
718 config HAVE_DEBUG_STACKOVERFLOW
719 bool
720
721 config DEBUG_STACKOVERFLOW
722 bool "Check for stack overflows"
723 depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW
724 ---help---
725 Say Y here if you want to check for overflows of kernel, IRQ
726 and exception stacks (if your architecture uses them). This
727 option will show detailed messages if free stack space drops
728 below a certain limit.
729
730 These kinds of bugs usually occur when call-chains in the
731 kernel get too deep, especially when interrupts are
732 involved.
733
734 Use this in cases where you see apparently random memory
735 corruption, especially if it appears in 'struct thread_info'
736
737 If in doubt, say "N".
738
739 source "lib/Kconfig.kasan"
740
741 endmenu # "Memory Debugging"
742
743 config ARCH_HAS_KCOV
744 bool
745 help
746 KCOV does not have any arch-specific code, but currently it is enabled
747 only for x86_64. KCOV requires testing on other archs, and most likely
748 disabling of instrumentation for some early boot code.
749
750 config KCOV
751 bool "Code coverage for fuzzing"
752 depends on ARCH_HAS_KCOV
753 select DEBUG_FS
754 select GCC_PLUGINS if !COMPILE_TEST
755 select GCC_PLUGIN_SANCOV if !COMPILE_TEST
756 help
757 KCOV exposes kernel code coverage information in a form suitable
758 for coverage-guided fuzzing (randomized testing).
759
760 If RANDOMIZE_BASE is enabled, PC values will not be stable across
761 different machines and across reboots. If you need stable PC values,
762 disable RANDOMIZE_BASE.
763
764 For more details, see Documentation/dev-tools/kcov.rst.
765
766 config KCOV_INSTRUMENT_ALL
767 bool "Instrument all code by default"
768 depends on KCOV
769 default y if KCOV
770 help
771 If you are doing generic system call fuzzing (like e.g. syzkaller),
772 then you will want to instrument the whole kernel and you should
773 say y here. If you are doing more targeted fuzzing (like e.g.
774 filesystem fuzzing with AFL) then you will want to enable coverage
775 for more specific subsets of files, and should say n here.
776
777 config DEBUG_SHIRQ
778 bool "Debug shared IRQ handlers"
779 depends on DEBUG_KERNEL
780 help
781 Enable this to generate a spurious interrupt as soon as a shared
782 interrupt handler is registered, and just before one is deregistered.
783 Drivers ought to be able to handle interrupts coming in at those
784 points; some don't and need to be caught.
785
786 menu "Debug Lockups and Hangs"
787
788 config LOCKUP_DETECTOR
789 bool
790
791 config SOFTLOCKUP_DETECTOR
792 bool "Detect Soft Lockups"
793 depends on DEBUG_KERNEL && !S390
794 select LOCKUP_DETECTOR
795 help
796 Say Y here to enable the kernel to act as a watchdog to detect
797 soft lockups.
798
799 Softlockups are bugs that cause the kernel to loop in kernel
800 mode for more than 20 seconds, without giving other tasks a
801 chance to run. The current stack trace is displayed upon
802 detection and the system will stay locked up.
803
804 config HARDLOCKUP_DETECTOR_PERF
805 bool
806 select SOFTLOCKUP_DETECTOR
807
808 #
809 # Enables a timestamp based low pass filter to compensate for perf based
810 # hard lockup detection which runs too fast due to turbo modes.
811 #
812 config HARDLOCKUP_CHECK_TIMESTAMP
813 bool
814
815 #
816 # arch/ can define HAVE_HARDLOCKUP_DETECTOR_ARCH to provide their own hard
817 # lockup detector rather than the perf based detector.
818 #
819 config HARDLOCKUP_DETECTOR
820 bool "Detect Hard Lockups"
821 depends on DEBUG_KERNEL && !S390
822 depends on HAVE_HARDLOCKUP_DETECTOR_PERF || HAVE_HARDLOCKUP_DETECTOR_ARCH
823 select LOCKUP_DETECTOR
824 select HARDLOCKUP_DETECTOR_PERF if HAVE_HARDLOCKUP_DETECTOR_PERF
825 select HARDLOCKUP_DETECTOR_ARCH if HAVE_HARDLOCKUP_DETECTOR_ARCH
826 help
827 Say Y here to enable the kernel to act as a watchdog to detect
828 hard lockups.
829
830 Hardlockups are bugs that cause the CPU to loop in kernel mode
831 for more than 10 seconds, without letting other interrupts have a
832 chance to run. The current stack trace is displayed upon detection
833 and the system will stay locked up.
834
835 config HARDLOCKUP_DETECTOR_OTHER_CPU
836 def_bool y
837 depends on LOCKUP_DETECTOR && !HAVE_NMI_WATCHDOG
838 depends on !HARDLOCKUP_DETECTOR
839
840 config BOOTPARAM_HARDLOCKUP_PANIC
841 bool "Panic (Reboot) On Hard Lockups"
842 depends on HARDLOCKUP_DETECTOR || HARDLOCKUP_DETECTOR_OTHER_CPU
843 help
844 Say Y here to enable the kernel to panic on "hard lockups",
845 which are bugs that cause the kernel to loop in kernel
846 mode with interrupts disabled for more than 10 seconds (configurable
847 using the watchdog_thresh sysctl).
848
849 Say N if unsure.
850
851 config BOOTPARAM_HARDLOCKUP_PANIC_VALUE
852 int
853 depends on HARDLOCKUP_DETECTOR || HARDLOCKUP_DETECTOR_OTHER_CPU
854 range 0 1
855 default 0 if !BOOTPARAM_HARDLOCKUP_PANIC
856 default 1 if BOOTPARAM_HARDLOCKUP_PANIC
857
858 config BOOTPARAM_SOFTLOCKUP_PANIC
859 bool "Panic (Reboot) On Soft Lockups"
860 depends on SOFTLOCKUP_DETECTOR
861 help
862 Say Y here to enable the kernel to panic on "soft lockups",
863 which are bugs that cause the kernel to loop in kernel
864 mode for more than 20 seconds (configurable using the watchdog_thresh
865 sysctl), without giving other tasks a chance to run.
866
867 The panic can be used in combination with panic_timeout,
868 to cause the system to reboot automatically after a
869 lockup has been detected. This feature is useful for
870 high-availability systems that have uptime guarantees and
871 where a lockup must be resolved ASAP.
872
873 Say N if unsure.
874
875 config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE
876 int
877 depends on SOFTLOCKUP_DETECTOR
878 range 0 1
879 default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC
880 default 1 if BOOTPARAM_SOFTLOCKUP_PANIC
881
882 config DETECT_HUNG_TASK
883 bool "Detect Hung Tasks"
884 depends on DEBUG_KERNEL
885 default SOFTLOCKUP_DETECTOR
886 help
887 Say Y here to enable the kernel to detect "hung tasks",
888 which are bugs that cause the task to be stuck in
889 uninterruptible "D" state indefinitely.
890
891 When a hung task is detected, the kernel will print the
892 current stack trace (which you should report), but the
893 task will stay in uninterruptible state. If lockdep is
894 enabled then all held locks will also be reported. This
895 feature has negligible overhead.
896
897 config DEFAULT_HUNG_TASK_TIMEOUT
898 int "Default timeout for hung task detection (in seconds)"
899 depends on DETECT_HUNG_TASK
900 default 120
901 help
902 This option controls the default timeout (in seconds) used
903 to determine when a task has become non-responsive and should
904 be considered hung.
905
906 It can be adjusted at runtime via the kernel.hung_task_timeout_secs
907 sysctl or by writing a value to
908 /proc/sys/kernel/hung_task_timeout_secs.
909
910 A timeout of 0 disables the check. The default is two minutes.
911 Keeping the default should be fine in most cases.
912
913 config BOOTPARAM_HUNG_TASK_PANIC
914 bool "Panic (Reboot) On Hung Tasks"
915 depends on DETECT_HUNG_TASK
916 help
917 Say Y here to enable the kernel to panic on "hung tasks",
918 which are bugs that cause the kernel to leave a task stuck
919 in uninterruptible "D" state.
920
921 The panic can be used in combination with panic_timeout,
922 to cause the system to reboot automatically after a
923 hung task has been detected. This feature is useful for
924 high-availability systems that have uptime guarantees and
925 where a hung tasks must be resolved ASAP.
926
927 Say N if unsure.
928
929 config BOOTPARAM_HUNG_TASK_PANIC_VALUE
930 int
931 depends on DETECT_HUNG_TASK
932 range 0 1
933 default 0 if !BOOTPARAM_HUNG_TASK_PANIC
934 default 1 if BOOTPARAM_HUNG_TASK_PANIC
935
936 config WQ_WATCHDOG
937 bool "Detect Workqueue Stalls"
938 depends on DEBUG_KERNEL
939 help
940 Say Y here to enable stall detection on workqueues. If a
941 worker pool doesn't make forward progress on a pending work
942 item for over a given amount of time, 30s by default, a
943 warning message is printed along with dump of workqueue
944 state. This can be configured through kernel parameter
945 "workqueue.watchdog_thresh" and its sysfs counterpart.
946
947 endmenu # "Debug lockups and hangs"
948
949 config PANIC_ON_OOPS
950 bool "Panic on Oops"
951 help
952 Say Y here to enable the kernel to panic when it oopses. This
953 has the same effect as setting oops=panic on the kernel command
954 line.
955
956 This feature is useful to ensure that the kernel does not do
957 anything erroneous after an oops which could result in data
958 corruption or other issues.
959
960 Say N if unsure.
961
962 config PANIC_ON_OOPS_VALUE
963 int
964 range 0 1
965 default 0 if !PANIC_ON_OOPS
966 default 1 if PANIC_ON_OOPS
967
968 config PANIC_TIMEOUT
969 int "panic timeout"
970 default 0
971 help
972 Set the timeout value (in seconds) until a reboot occurs when the
973 the kernel panics. If n = 0, then we wait forever. A timeout
974 value n > 0 will wait n seconds before rebooting, while a timeout
975 value n < 0 will reboot immediately.
976
977 config SCHED_DEBUG
978 bool "Collect scheduler debugging info"
979 depends on DEBUG_KERNEL && PROC_FS
980 default y
981 help
982 If you say Y here, the /proc/sched_debug file will be provided
983 that can help debug the scheduler. The runtime overhead of this
984 option is minimal.
985
986 config SCHED_INFO
987 bool
988 default n
989
990 config SCHEDSTATS
991 bool "Collect scheduler statistics"
992 depends on DEBUG_KERNEL && PROC_FS
993 select SCHED_INFO
994 help
995 If you say Y here, additional code will be inserted into the
996 scheduler and related routines to collect statistics about
997 scheduler behavior and provide them in /proc/schedstat. These
998 stats may be useful for both tuning and debugging the scheduler
999 If you aren't debugging the scheduler or trying to tune a specific
1000 application, you can say N to avoid the very slight overhead
1001 this adds.
1002
1003 config SCHED_STACK_END_CHECK
1004 bool "Detect stack corruption on calls to schedule()"
1005 depends on DEBUG_KERNEL
1006 default n
1007 help
1008 This option checks for a stack overrun on calls to schedule().
1009 If the stack end location is found to be over written always panic as
1010 the content of the corrupted region can no longer be trusted.
1011 This is to ensure no erroneous behaviour occurs which could result in
1012 data corruption or a sporadic crash at a later stage once the region
1013 is examined. The runtime overhead introduced is minimal.
1014
1015 config DEBUG_TIMEKEEPING
1016 bool "Enable extra timekeeping sanity checking"
1017 help
1018 This option will enable additional timekeeping sanity checks
1019 which may be helpful when diagnosing issues where timekeeping
1020 problems are suspected.
1021
1022 This may include checks in the timekeeping hotpaths, so this
1023 option may have a (very small) performance impact to some
1024 workloads.
1025
1026 If unsure, say N.
1027
1028 config DEBUG_PREEMPT
1029 bool "Debug preemptible kernel"
1030 depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT
1031 default y
1032 help
1033 If you say Y here then the kernel will use a debug variant of the
1034 commonly used smp_processor_id() function and will print warnings
1035 if kernel code uses it in a preemption-unsafe way. Also, the kernel
1036 will detect preemption count underflows.
1037
1038 menu "Lock Debugging (spinlocks, mutexes, etc...)"
1039
1040 config DEBUG_RT_MUTEXES
1041 bool "RT Mutex debugging, deadlock detection"
1042 depends on DEBUG_KERNEL && RT_MUTEXES
1043 help
1044 This allows rt mutex semantics violations and rt mutex related
1045 deadlocks (lockups) to be detected and reported automatically.
1046
1047 config DEBUG_SPINLOCK
1048 bool "Spinlock and rw-lock debugging: basic checks"
1049 depends on DEBUG_KERNEL
1050 select UNINLINE_SPIN_UNLOCK
1051 help
1052 Say Y here and build SMP to catch missing spinlock initialization
1053 and certain other kinds of spinlock errors commonly made. This is
1054 best used in conjunction with the NMI watchdog so that spinlock
1055 deadlocks are also debuggable.
1056
1057 config DEBUG_MUTEXES
1058 bool "Mutex debugging: basic checks"
1059 depends on DEBUG_KERNEL
1060 help
1061 This feature allows mutex semantics violations to be detected and
1062 reported.
1063
1064 config DEBUG_WW_MUTEX_SLOWPATH
1065 bool "Wait/wound mutex debugging: Slowpath testing"
1066 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
1067 select DEBUG_LOCK_ALLOC
1068 select DEBUG_SPINLOCK
1069 select DEBUG_MUTEXES
1070 help
1071 This feature enables slowpath testing for w/w mutex users by
1072 injecting additional -EDEADLK wound/backoff cases. Together with
1073 the full mutex checks enabled with (CONFIG_PROVE_LOCKING) this
1074 will test all possible w/w mutex interface abuse with the
1075 exception of simply not acquiring all the required locks.
1076 Note that this feature can introduce significant overhead, so
1077 it really should not be enabled in a production or distro kernel,
1078 even a debug kernel. If you are a driver writer, enable it. If
1079 you are a distro, do not.
1080
1081 config DEBUG_LOCK_ALLOC
1082 bool "Lock debugging: detect incorrect freeing of live locks"
1083 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
1084 select DEBUG_SPINLOCK
1085 select DEBUG_MUTEXES
1086 select DEBUG_RT_MUTEXES if RT_MUTEXES
1087 select LOCKDEP
1088 help
1089 This feature will check whether any held lock (spinlock, rwlock,
1090 mutex or rwsem) is incorrectly freed by the kernel, via any of the
1091 memory-freeing routines (kfree(), kmem_cache_free(), free_pages(),
1092 vfree(), etc.), whether a live lock is incorrectly reinitialized via
1093 spin_lock_init()/mutex_init()/etc., or whether there is any lock
1094 held during task exit.
1095
1096 config PROVE_LOCKING
1097 bool "Lock debugging: prove locking correctness"
1098 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
1099 select LOCKDEP
1100 select DEBUG_SPINLOCK
1101 select DEBUG_MUTEXES
1102 select DEBUG_RT_MUTEXES if RT_MUTEXES
1103 select DEBUG_LOCK_ALLOC
1104 select LOCKDEP_CROSSRELEASE if BROKEN
1105 select LOCKDEP_COMPLETIONS if BROKEN
1106 select TRACE_IRQFLAGS
1107 default n
1108 help
1109 This feature enables the kernel to prove that all locking
1110 that occurs in the kernel runtime is mathematically
1111 correct: that under no circumstance could an arbitrary (and
1112 not yet triggered) combination of observed locking
1113 sequences (on an arbitrary number of CPUs, running an
1114 arbitrary number of tasks and interrupt contexts) cause a
1115 deadlock.
1116
1117 In short, this feature enables the kernel to report locking
1118 related deadlocks before they actually occur.
1119
1120 The proof does not depend on how hard and complex a
1121 deadlock scenario would be to trigger: how many
1122 participant CPUs, tasks and irq-contexts would be needed
1123 for it to trigger. The proof also does not depend on
1124 timing: if a race and a resulting deadlock is possible
1125 theoretically (no matter how unlikely the race scenario
1126 is), it will be proven so and will immediately be
1127 reported by the kernel (once the event is observed that
1128 makes the deadlock theoretically possible).
1129
1130 If a deadlock is impossible (i.e. the locking rules, as
1131 observed by the kernel, are mathematically correct), the
1132 kernel reports nothing.
1133
1134 NOTE: this feature can also be enabled for rwlocks, mutexes
1135 and rwsems - in which case all dependencies between these
1136 different locking variants are observed and mapped too, and
1137 the proof of observed correctness is also maintained for an
1138 arbitrary combination of these separate locking variants.
1139
1140 For more details, see Documentation/locking/lockdep-design.txt.
1141
1142 config LOCKDEP
1143 bool
1144 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
1145 select STACKTRACE
1146 select FRAME_POINTER if !MIPS && !PPC && !ARM_UNWIND && !S390 && !MICROBLAZE && !ARC && !SCORE && !X86
1147 select KALLSYMS
1148 select KALLSYMS_ALL
1149
1150 config LOCKDEP_SMALL
1151 bool
1152
1153 config LOCK_STAT
1154 bool "Lock usage statistics"
1155 depends on DEBUG_KERNEL && TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
1156 select LOCKDEP
1157 select DEBUG_SPINLOCK
1158 select DEBUG_MUTEXES
1159 select DEBUG_RT_MUTEXES if RT_MUTEXES
1160 select DEBUG_LOCK_ALLOC
1161 default n
1162 help
1163 This feature enables tracking lock contention points
1164
1165 For more details, see Documentation/locking/lockstat.txt
1166
1167 This also enables lock events required by "perf lock",
1168 subcommand of perf.
1169 If you want to use "perf lock", you also need to turn on
1170 CONFIG_EVENT_TRACING.
1171
1172 CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
1173 (CONFIG_LOCKDEP defines "acquire" and "release" events.)
1174
1175 config LOCKDEP_CROSSRELEASE
1176 bool
1177 help
1178 This makes lockdep work for crosslock which is a lock allowed to
1179 be released in a different context from the acquisition context.
1180 Normally a lock must be released in the context acquiring the lock.
1181 However, relexing this constraint helps synchronization primitives
1182 such as page locks or completions can use the lock correctness
1183 detector, lockdep.
1184
1185 config LOCKDEP_COMPLETIONS
1186 bool
1187 help
1188 A deadlock caused by wait_for_completion() and complete() can be
1189 detected by lockdep using crossrelease feature.
1190
1191 config DEBUG_LOCKDEP
1192 bool "Lock dependency engine debugging"
1193 depends on DEBUG_KERNEL && LOCKDEP
1194 help
1195 If you say Y here, the lock dependency engine will do
1196 additional runtime checks to debug itself, at the price
1197 of more runtime overhead.
1198
1199 config DEBUG_ATOMIC_SLEEP
1200 bool "Sleep inside atomic section checking"
1201 select PREEMPT_COUNT
1202 depends on DEBUG_KERNEL
1203 help
1204 If you say Y here, various routines which may sleep will become very
1205 noisy if they are called inside atomic sections: when a spinlock is
1206 held, inside an rcu read side critical section, inside preempt disabled
1207 sections, inside an interrupt, etc...
1208
1209 config DEBUG_LOCKING_API_SELFTESTS
1210 bool "Locking API boot-time self-tests"
1211 depends on DEBUG_KERNEL
1212 help
1213 Say Y here if you want the kernel to run a short self-test during
1214 bootup. The self-test checks whether common types of locking bugs
1215 are detected by debugging mechanisms or not. (if you disable
1216 lock debugging then those bugs wont be detected of course.)
1217 The following locking APIs are covered: spinlocks, rwlocks,
1218 mutexes and rwsems.
1219
1220 config LOCK_TORTURE_TEST
1221 tristate "torture tests for locking"
1222 depends on DEBUG_KERNEL
1223 select TORTURE_TEST
1224 default n
1225 help
1226 This option provides a kernel module that runs torture tests
1227 on kernel locking primitives. The kernel module may be built
1228 after the fact on the running kernel to be tested, if desired.
1229
1230 Say Y here if you want kernel locking-primitive torture tests
1231 to be built into the kernel.
1232 Say M if you want these torture tests to build as a module.
1233 Say N if you are unsure.
1234
1235 config WW_MUTEX_SELFTEST
1236 tristate "Wait/wound mutex selftests"
1237 help
1238 This option provides a kernel module that runs tests on the
1239 on the struct ww_mutex locking API.
1240
1241 It is recommended to enable DEBUG_WW_MUTEX_SLOWPATH in conjunction
1242 with this test harness.
1243
1244 Say M if you want these self tests to build as a module.
1245 Say N if you are unsure.
1246
1247 endmenu # lock debugging
1248
1249 config TRACE_IRQFLAGS
1250 bool
1251 help
1252 Enables hooks to interrupt enabling and disabling for
1253 either tracing or lock debugging.
1254
1255 config STACKTRACE
1256 bool "Stack backtrace support"
1257 depends on STACKTRACE_SUPPORT
1258 help
1259 This option causes the kernel to create a /proc/pid/stack for
1260 every process, showing its current stack trace.
1261 It is also used by various kernel debugging features that require
1262 stack trace generation.
1263
1264 config WARN_ALL_UNSEEDED_RANDOM
1265 bool "Warn for all uses of unseeded randomness"
1266 default n
1267 help
1268 Some parts of the kernel contain bugs relating to their use of
1269 cryptographically secure random numbers before it's actually possible
1270 to generate those numbers securely. This setting ensures that these
1271 flaws don't go unnoticed, by enabling a message, should this ever
1272 occur. This will allow people with obscure setups to know when things
1273 are going wrong, so that they might contact developers about fixing
1274 it.
1275
1276 Unfortunately, on some models of some architectures getting
1277 a fully seeded CRNG is extremely difficult, and so this can
1278 result in dmesg getting spammed for a surprisingly long
1279 time. This is really bad from a security perspective, and
1280 so architecture maintainers really need to do what they can
1281 to get the CRNG seeded sooner after the system is booted.
1282 However, since users can not do anything actionble to
1283 address this, by default the kernel will issue only a single
1284 warning for the first use of unseeded randomness.
1285
1286 Say Y here if you want to receive warnings for all uses of
1287 unseeded randomness. This will be of use primarily for
1288 those developers interersted in improving the security of
1289 Linux kernels running on their architecture (or
1290 subarchitecture).
1291
1292 config DEBUG_KOBJECT
1293 bool "kobject debugging"
1294 depends on DEBUG_KERNEL
1295 help
1296 If you say Y here, some extra kobject debugging messages will be sent
1297 to the syslog.
1298
1299 config DEBUG_KOBJECT_RELEASE
1300 bool "kobject release debugging"
1301 depends on DEBUG_OBJECTS_TIMERS
1302 help
1303 kobjects are reference counted objects. This means that their
1304 last reference count put is not predictable, and the kobject can
1305 live on past the point at which a driver decides to drop it's
1306 initial reference to the kobject gained on allocation. An
1307 example of this would be a struct device which has just been
1308 unregistered.
1309
1310 However, some buggy drivers assume that after such an operation,
1311 the memory backing the kobject can be immediately freed. This
1312 goes completely against the principles of a refcounted object.
1313
1314 If you say Y here, the kernel will delay the release of kobjects
1315 on the last reference count to improve the visibility of this
1316 kind of kobject release bug.
1317
1318 config HAVE_DEBUG_BUGVERBOSE
1319 bool
1320
1321 config DEBUG_BUGVERBOSE
1322 bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EXPERT
1323 depends on BUG && (GENERIC_BUG || HAVE_DEBUG_BUGVERBOSE)
1324 default y
1325 help
1326 Say Y here to make BUG() panics output the file name and line number
1327 of the BUG call as well as the EIP and oops trace. This aids
1328 debugging but costs about 70-100K of memory.
1329
1330 config DEBUG_LIST
1331 bool "Debug linked list manipulation"
1332 depends on DEBUG_KERNEL || BUG_ON_DATA_CORRUPTION
1333 help
1334 Enable this to turn on extended checks in the linked-list
1335 walking routines.
1336
1337 If unsure, say N.
1338
1339 config DEBUG_PI_LIST
1340 bool "Debug priority linked list manipulation"
1341 depends on DEBUG_KERNEL
1342 help
1343 Enable this to turn on extended checks in the priority-ordered
1344 linked-list (plist) walking routines. This checks the entire
1345 list multiple times during each manipulation.
1346
1347 If unsure, say N.
1348
1349 config DEBUG_SG
1350 bool "Debug SG table operations"
1351 depends on DEBUG_KERNEL
1352 help
1353 Enable this to turn on checks on scatter-gather tables. This can
1354 help find problems with drivers that do not properly initialize
1355 their sg tables.
1356
1357 If unsure, say N.
1358
1359 config DEBUG_NOTIFIERS
1360 bool "Debug notifier call chains"
1361 depends on DEBUG_KERNEL
1362 help
1363 Enable this to turn on sanity checking for notifier call chains.
1364 This is most useful for kernel developers to make sure that
1365 modules properly unregister themselves from notifier chains.
1366 This is a relatively cheap check but if you care about maximum
1367 performance, say N.
1368
1369 config DEBUG_CREDENTIALS
1370 bool "Debug credential management"
1371 depends on DEBUG_KERNEL
1372 help
1373 Enable this to turn on some debug checking for credential
1374 management. The additional code keeps track of the number of
1375 pointers from task_structs to any given cred struct, and checks to
1376 see that this number never exceeds the usage count of the cred
1377 struct.
1378
1379 Furthermore, if SELinux is enabled, this also checks that the
1380 security pointer in the cred struct is never seen to be invalid.
1381
1382 If unsure, say N.
1383
1384 source "kernel/rcu/Kconfig.debug"
1385
1386 config DEBUG_WQ_FORCE_RR_CPU
1387 bool "Force round-robin CPU selection for unbound work items"
1388 depends on DEBUG_KERNEL
1389 default n
1390 help
1391 Workqueue used to implicitly guarantee that work items queued
1392 without explicit CPU specified are put on the local CPU. This
1393 guarantee is no longer true and while local CPU is still
1394 preferred work items may be put on foreign CPUs. Kernel
1395 parameter "workqueue.debug_force_rr_cpu" is added to force
1396 round-robin CPU selection to flush out usages which depend on the
1397 now broken guarantee. This config option enables the debug
1398 feature by default. When enabled, memory and cache locality will
1399 be impacted.
1400
1401 config DEBUG_BLOCK_EXT_DEVT
1402 bool "Force extended block device numbers and spread them"
1403 depends on DEBUG_KERNEL
1404 depends on BLOCK
1405 default n
1406 help
1407 BIG FAT WARNING: ENABLING THIS OPTION MIGHT BREAK BOOTING ON
1408 SOME DISTRIBUTIONS. DO NOT ENABLE THIS UNLESS YOU KNOW WHAT
1409 YOU ARE DOING. Distros, please enable this and fix whatever
1410 is broken.
1411
1412 Conventionally, block device numbers are allocated from
1413 predetermined contiguous area. However, extended block area
1414 may introduce non-contiguous block device numbers. This
1415 option forces most block device numbers to be allocated from
1416 the extended space and spreads them to discover kernel or
1417 userland code paths which assume predetermined contiguous
1418 device number allocation.
1419
1420 Note that turning on this debug option shuffles all the
1421 device numbers for all IDE and SCSI devices including libata
1422 ones, so root partition specified using device number
1423 directly (via rdev or root=MAJ:MIN) won't work anymore.
1424 Textual device names (root=/dev/sdXn) will continue to work.
1425
1426 Say N if you are unsure.
1427
1428 config CPU_HOTPLUG_STATE_CONTROL
1429 bool "Enable CPU hotplug state control"
1430 depends on DEBUG_KERNEL
1431 depends on HOTPLUG_CPU
1432 default n
1433 help
1434 Allows to write steps between "offline" and "online" to the CPUs
1435 sysfs target file so states can be stepped granular. This is a debug
1436 option for now as the hotplug machinery cannot be stopped and
1437 restarted at arbitrary points yet.
1438
1439 Say N if your are unsure.
1440
1441 config NOTIFIER_ERROR_INJECTION
1442 tristate "Notifier error injection"
1443 depends on DEBUG_KERNEL
1444 select DEBUG_FS
1445 help
1446 This option provides the ability to inject artificial errors to
1447 specified notifier chain callbacks. It is useful to test the error
1448 handling of notifier call chain failures.
1449
1450 Say N if unsure.
1451
1452 config PM_NOTIFIER_ERROR_INJECT
1453 tristate "PM notifier error injection module"
1454 depends on PM && NOTIFIER_ERROR_INJECTION
1455 default m if PM_DEBUG
1456 help
1457 This option provides the ability to inject artificial errors to
1458 PM notifier chain callbacks. It is controlled through debugfs
1459 interface /sys/kernel/debug/notifier-error-inject/pm
1460
1461 If the notifier call chain should be failed with some events
1462 notified, write the error code to "actions/<notifier event>/error".
1463
1464 Example: Inject PM suspend error (-12 = -ENOMEM)
1465
1466 # cd /sys/kernel/debug/notifier-error-inject/pm/
1467 # echo -12 > actions/PM_SUSPEND_PREPARE/error
1468 # echo mem > /sys/power/state
1469 bash: echo: write error: Cannot allocate memory
1470
1471 To compile this code as a module, choose M here: the module will
1472 be called pm-notifier-error-inject.
1473
1474 If unsure, say N.
1475
1476 config OF_RECONFIG_NOTIFIER_ERROR_INJECT
1477 tristate "OF reconfig notifier error injection module"
1478 depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION
1479 help
1480 This option provides the ability to inject artificial errors to
1481 OF reconfig notifier chain callbacks. It is controlled
1482 through debugfs interface under
1483 /sys/kernel/debug/notifier-error-inject/OF-reconfig/
1484
1485 If the notifier call chain should be failed with some events
1486 notified, write the error code to "actions/<notifier event>/error".
1487
1488 To compile this code as a module, choose M here: the module will
1489 be called of-reconfig-notifier-error-inject.
1490
1491 If unsure, say N.
1492
1493 config NETDEV_NOTIFIER_ERROR_INJECT
1494 tristate "Netdev notifier error injection module"
1495 depends on NET && NOTIFIER_ERROR_INJECTION
1496 help
1497 This option provides the ability to inject artificial errors to
1498 netdevice notifier chain callbacks. It is controlled through debugfs
1499 interface /sys/kernel/debug/notifier-error-inject/netdev
1500
1501 If the notifier call chain should be failed with some events
1502 notified, write the error code to "actions/<notifier event>/error".
1503
1504 Example: Inject netdevice mtu change error (-22 = -EINVAL)
1505
1506 # cd /sys/kernel/debug/notifier-error-inject/netdev
1507 # echo -22 > actions/NETDEV_CHANGEMTU/error
1508 # ip link set eth0 mtu 1024
1509 RTNETLINK answers: Invalid argument
1510
1511 To compile this code as a module, choose M here: the module will
1512 be called netdev-notifier-error-inject.
1513
1514 If unsure, say N.
1515
1516 config FAULT_INJECTION
1517 bool "Fault-injection framework"
1518 depends on DEBUG_KERNEL
1519 help
1520 Provide fault-injection framework.
1521 For more details, see Documentation/fault-injection/.
1522
1523 config FAILSLAB
1524 bool "Fault-injection capability for kmalloc"
1525 depends on FAULT_INJECTION
1526 depends on SLAB || SLUB
1527 help
1528 Provide fault-injection capability for kmalloc.
1529
1530 config FAIL_PAGE_ALLOC
1531 bool "Fault-injection capabilitiy for alloc_pages()"
1532 depends on FAULT_INJECTION
1533 help
1534 Provide fault-injection capability for alloc_pages().
1535
1536 config FAIL_MAKE_REQUEST
1537 bool "Fault-injection capability for disk IO"
1538 depends on FAULT_INJECTION && BLOCK
1539 help
1540 Provide fault-injection capability for disk IO.
1541
1542 config FAIL_IO_TIMEOUT
1543 bool "Fault-injection capability for faking disk interrupts"
1544 depends on FAULT_INJECTION && BLOCK
1545 help
1546 Provide fault-injection capability on end IO handling. This
1547 will make the block layer "forget" an interrupt as configured,
1548 thus exercising the error handling.
1549
1550 Only works with drivers that use the generic timeout handling,
1551 for others it wont do anything.
1552
1553 config FAIL_MMC_REQUEST
1554 bool "Fault-injection capability for MMC IO"
1555 depends on FAULT_INJECTION_DEBUG_FS && MMC
1556 help
1557 Provide fault-injection capability for MMC IO.
1558 This will make the mmc core return data errors. This is
1559 useful to test the error handling in the mmc block device
1560 and to test how the mmc host driver handles retries from
1561 the block device.
1562
1563 config FAIL_FUTEX
1564 bool "Fault-injection capability for futexes"
1565 select DEBUG_FS
1566 depends on FAULT_INJECTION && FUTEX
1567 help
1568 Provide fault-injection capability for futexes.
1569
1570 config FAULT_INJECTION_DEBUG_FS
1571 bool "Debugfs entries for fault-injection capabilities"
1572 depends on FAULT_INJECTION && SYSFS && DEBUG_FS
1573 help
1574 Enable configuration of fault-injection capabilities via debugfs.
1575
1576 config FAULT_INJECTION_STACKTRACE_FILTER
1577 bool "stacktrace filter for fault-injection capabilities"
1578 depends on FAULT_INJECTION_DEBUG_FS && STACKTRACE_SUPPORT
1579 depends on !X86_64
1580 select STACKTRACE
1581 select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !SCORE && !X86
1582 help
1583 Provide stacktrace filter for fault-injection capabilities
1584
1585 config LATENCYTOP
1586 bool "Latency measuring infrastructure"
1587 depends on DEBUG_KERNEL
1588 depends on STACKTRACE_SUPPORT
1589 depends on PROC_FS
1590 select FRAME_POINTER if !MIPS && !PPC && !S390 && !MICROBLAZE && !ARM_UNWIND && !ARC && !X86
1591 select KALLSYMS
1592 select KALLSYMS_ALL
1593 select STACKTRACE
1594 select SCHEDSTATS
1595 select SCHED_DEBUG
1596 help
1597 Enable this option if you want to use the LatencyTOP tool
1598 to find out which userspace is blocking on what kernel operations.
1599
1600 source kernel/trace/Kconfig
1601
1602 config PROVIDE_OHCI1394_DMA_INIT
1603 bool "Remote debugging over FireWire early on boot"
1604 depends on PCI && X86
1605 help
1606 If you want to debug problems which hang or crash the kernel early
1607 on boot and the crashing machine has a FireWire port, you can use
1608 this feature to remotely access the memory of the crashed machine
1609 over FireWire. This employs remote DMA as part of the OHCI1394
1610 specification which is now the standard for FireWire controllers.
1611
1612 With remote DMA, you can monitor the printk buffer remotely using
1613 firescope and access all memory below 4GB using fireproxy from gdb.
1614 Even controlling a kernel debugger is possible using remote DMA.
1615
1616 Usage:
1617
1618 If ohci1394_dma=early is used as boot parameter, it will initialize
1619 all OHCI1394 controllers which are found in the PCI config space.
1620
1621 As all changes to the FireWire bus such as enabling and disabling
1622 devices cause a bus reset and thereby disable remote DMA for all
1623 devices, be sure to have the cable plugged and FireWire enabled on
1624 the debugging host before booting the debug target for debugging.
1625
1626 This code (~1k) is freed after boot. By then, the firewire stack
1627 in charge of the OHCI-1394 controllers should be used instead.
1628
1629 See Documentation/debugging-via-ohci1394.txt for more information.
1630
1631 config DMA_API_DEBUG
1632 bool "Enable debugging of DMA-API usage"
1633 depends on HAVE_DMA_API_DEBUG
1634 help
1635 Enable this option to debug the use of the DMA API by device drivers.
1636 With this option you will be able to detect common bugs in device
1637 drivers like double-freeing of DMA mappings or freeing mappings that
1638 were never allocated.
1639
1640 This also attempts to catch cases where a page owned by DMA is
1641 accessed by the cpu in a way that could cause data corruption. For
1642 example, this enables cow_user_page() to check that the source page is
1643 not undergoing DMA.
1644
1645 This option causes a performance degradation. Use only if you want to
1646 debug device drivers and dma interactions.
1647
1648 If unsure, say N.
1649
1650 menu "Runtime Testing"
1651
1652 config LKDTM
1653 tristate "Linux Kernel Dump Test Tool Module"
1654 depends on DEBUG_FS
1655 depends on BLOCK
1656 default n
1657 help
1658 This module enables testing of the different dumping mechanisms by
1659 inducing system failures at predefined crash points.
1660 If you don't need it: say N
1661 Choose M here to compile this code as a module. The module will be
1662 called lkdtm.
1663
1664 Documentation on how to use the module can be found in
1665 Documentation/fault-injection/provoke-crashes.txt
1666
1667 config TEST_LIST_SORT
1668 tristate "Linked list sorting test"
1669 depends on DEBUG_KERNEL || m
1670 help
1671 Enable this to turn on 'list_sort()' function test. This test is
1672 executed only once during system boot (so affects only boot time),
1673 or at module load time.
1674
1675 If unsure, say N.
1676
1677 config TEST_SORT
1678 tristate "Array-based sort test"
1679 depends on DEBUG_KERNEL || m
1680 help
1681 This option enables the self-test function of 'sort()' at boot,
1682 or at module load time.
1683
1684 If unsure, say N.
1685
1686 config KPROBES_SANITY_TEST
1687 bool "Kprobes sanity tests"
1688 depends on DEBUG_KERNEL
1689 depends on KPROBES
1690 default n
1691 help
1692 This option provides for testing basic kprobes functionality on
1693 boot. A sample kprobe, jprobe and kretprobe are inserted and
1694 verified for functionality.
1695
1696 Say N if you are unsure.
1697
1698 config BACKTRACE_SELF_TEST
1699 tristate "Self test for the backtrace code"
1700 depends on DEBUG_KERNEL
1701 default n
1702 help
1703 This option provides a kernel module that can be used to test
1704 the kernel stack backtrace code. This option is not useful
1705 for distributions or general kernels, but only for kernel
1706 developers working on architecture code.
1707
1708 Note that if you want to also test saved backtraces, you will
1709 have to enable STACKTRACE as well.
1710
1711 Say N if you are unsure.
1712
1713 config RBTREE_TEST
1714 tristate "Red-Black tree test"
1715 depends on DEBUG_KERNEL
1716 help
1717 A benchmark measuring the performance of the rbtree library.
1718 Also includes rbtree invariant checks.
1719
1720 config INTERVAL_TREE_TEST
1721 tristate "Interval tree test"
1722 depends on DEBUG_KERNEL
1723 select INTERVAL_TREE
1724 help
1725 A benchmark measuring the performance of the interval tree library
1726
1727 config PERCPU_TEST
1728 tristate "Per cpu operations test"
1729 depends on m && DEBUG_KERNEL
1730 help
1731 Enable this option to build test module which validates per-cpu
1732 operations.
1733
1734 If unsure, say N.
1735
1736 config ATOMIC64_SELFTEST
1737 tristate "Perform an atomic64_t self-test"
1738 help
1739 Enable this option to test the atomic64_t functions at boot or
1740 at module load time.
1741
1742 If unsure, say N.
1743
1744 config ASYNC_RAID6_TEST
1745 tristate "Self test for hardware accelerated raid6 recovery"
1746 depends on ASYNC_RAID6_RECOV
1747 select ASYNC_MEMCPY
1748 ---help---
1749 This is a one-shot self test that permutes through the
1750 recovery of all the possible two disk failure scenarios for a
1751 N-disk array. Recovery is performed with the asynchronous
1752 raid6 recovery routines, and will optionally use an offload
1753 engine if one is available.
1754
1755 If unsure, say N.
1756
1757 config TEST_HEXDUMP
1758 tristate "Test functions located in the hexdump module at runtime"
1759
1760 config TEST_STRING_HELPERS
1761 tristate "Test functions located in the string_helpers module at runtime"
1762
1763 config TEST_KSTRTOX
1764 tristate "Test kstrto*() family of functions at runtime"
1765
1766 config TEST_PRINTF
1767 tristate "Test printf() family of functions at runtime"
1768
1769 config TEST_BITMAP
1770 tristate "Test bitmap_*() family of functions at runtime"
1771 default n
1772 help
1773 Enable this option to test the bitmap functions at boot.
1774
1775 If unsure, say N.
1776
1777 config TEST_UUID
1778 tristate "Test functions located in the uuid module at runtime"
1779
1780 config TEST_RHASHTABLE
1781 tristate "Perform selftest on resizable hash table"
1782 default n
1783 help
1784 Enable this option to test the rhashtable functions at boot.
1785
1786 If unsure, say N.
1787
1788 config TEST_HASH
1789 tristate "Perform selftest on hash functions"
1790 default n
1791 help
1792 Enable this option to test the kernel's integer (<linux/hash.h>),
1793 string (<linux/stringhash.h>), and siphash (<linux/siphash.h>)
1794 hash functions on boot (or module load).
1795
1796 This is intended to help people writing architecture-specific
1797 optimized versions. If unsure, say N.
1798
1799 config TEST_PARMAN
1800 tristate "Perform selftest on priority array manager"
1801 default n
1802 depends on PARMAN
1803 help
1804 Enable this option to test priority array manager on boot
1805 (or module load).
1806
1807 If unsure, say N.
1808
1809 config TEST_LKM
1810 tristate "Test module loading with 'hello world' module"
1811 default n
1812 depends on m
1813 help
1814 This builds the "test_module" module that emits "Hello, world"
1815 on printk when loaded. It is designed to be used for basic
1816 evaluation of the module loading subsystem (for example when
1817 validating module verification). It lacks any extra dependencies,
1818 and will not normally be loaded by the system unless explicitly
1819 requested by name.
1820
1821 If unsure, say N.
1822
1823 config TEST_USER_COPY
1824 tristate "Test user/kernel boundary protections"
1825 default n
1826 depends on m
1827 help
1828 This builds the "test_user_copy" module that runs sanity checks
1829 on the copy_to/from_user infrastructure, making sure basic
1830 user/kernel boundary testing is working. If it fails to load,
1831 a regression has been detected in the user/kernel memory boundary
1832 protections.
1833
1834 If unsure, say N.
1835
1836 config TEST_BPF
1837 tristate "Test BPF filter functionality"
1838 default n
1839 depends on m && NET
1840 help
1841 This builds the "test_bpf" module that runs various test vectors
1842 against the BPF interpreter or BPF JIT compiler depending on the
1843 current setting. This is in particular useful for BPF JIT compiler
1844 development, but also to run regression tests against changes in
1845 the interpreter code. It also enables test stubs for eBPF maps and
1846 verifier used by user space verifier testsuite.
1847
1848 If unsure, say N.
1849
1850 config TEST_FIRMWARE
1851 tristate "Test firmware loading via userspace interface"
1852 default n
1853 depends on FW_LOADER
1854 help
1855 This builds the "test_firmware" module that creates a userspace
1856 interface for testing firmware loading. This can be used to
1857 control the triggering of firmware loading without needing an
1858 actual firmware-using device. The contents can be rechecked by
1859 userspace.
1860
1861 If unsure, say N.
1862
1863 config TEST_SYSCTL
1864 tristate "sysctl test driver"
1865 default n
1866 depends on PROC_SYSCTL
1867 help
1868 This builds the "test_sysctl" module. This driver enables to test the
1869 proc sysctl interfaces available to drivers safely without affecting
1870 production knobs which might alter system functionality.
1871
1872 If unsure, say N.
1873
1874 config TEST_UDELAY
1875 tristate "udelay test driver"
1876 default n
1877 help
1878 This builds the "udelay_test" module that helps to make sure
1879 that udelay() is working properly.
1880
1881 If unsure, say N.
1882
1883 config TEST_STATIC_KEYS
1884 tristate "Test static keys"
1885 default n
1886 depends on m
1887 help
1888 Test the static key interfaces.
1889
1890 If unsure, say N.
1891
1892 config TEST_KMOD
1893 tristate "kmod stress tester"
1894 default n
1895 depends on m
1896 depends on BLOCK && (64BIT || LBDAF) # for XFS, BTRFS
1897 depends on NETDEVICES && NET_CORE && INET # for TUN
1898 select TEST_LKM
1899 select XFS_FS
1900 select TUN
1901 select BTRFS_FS
1902 help
1903 Test the kernel's module loading mechanism: kmod. kmod implements
1904 support to load modules using the Linux kernel's usermode helper.
1905 This test provides a series of tests against kmod.
1906
1907 Although technically you can either build test_kmod as a module or
1908 into the kernel we disallow building it into the kernel since
1909 it stress tests request_module() and this will very likely cause
1910 some issues by taking over precious threads available from other
1911 module load requests, ultimately this could be fatal.
1912
1913 To run tests run:
1914
1915 tools/testing/selftests/kmod/kmod.sh --help
1916
1917 If unsure, say N.
1918
1919 config TEST_DEBUG_VIRTUAL
1920 tristate "Test CONFIG_DEBUG_VIRTUAL feature"
1921 depends on DEBUG_VIRTUAL
1922 help
1923 Test the kernel's ability to detect incorrect calls to
1924 virt_to_phys() done against the non-linear part of the
1925 kernel's virtual address map.
1926
1927 If unsure, say N.
1928
1929 endmenu # runtime tests
1930
1931 config MEMTEST
1932 bool "Memtest"
1933 depends on HAVE_MEMBLOCK
1934 ---help---
1935 This option adds a kernel parameter 'memtest', which allows memtest
1936 to be set.
1937 memtest=0, mean disabled; -- default
1938 memtest=1, mean do 1 test pattern;
1939 ...
1940 memtest=17, mean do 17 test patterns.
1941 If you are unsure how to answer this question, answer N.
1942
1943 config BUG_ON_DATA_CORRUPTION
1944 bool "Trigger a BUG when data corruption is detected"
1945 select DEBUG_LIST
1946 help
1947 Select this option if the kernel should BUG when it encounters
1948 data corruption in kernel memory structures when they get checked
1949 for validity.
1950
1951 If unsure, say N.
1952
1953 source "samples/Kconfig"
1954
1955 source "lib/Kconfig.kgdb"
1956
1957 source "lib/Kconfig.ubsan"
1958
1959 config ARCH_HAS_DEVMEM_IS_ALLOWED
1960 bool
1961
1962 config STRICT_DEVMEM
1963 bool "Filter access to /dev/mem"
1964 depends on MMU && DEVMEM
1965 depends on ARCH_HAS_DEVMEM_IS_ALLOWED
1966 default y if TILE || PPC
1967 ---help---
1968 If this option is disabled, you allow userspace (root) access to all
1969 of memory, including kernel and userspace memory. Accidental
1970 access to this is obviously disastrous, but specific access can
1971 be used by people debugging the kernel. Note that with PAT support
1972 enabled, even in this case there are restrictions on /dev/mem
1973 use due to the cache aliasing requirements.
1974
1975 If this option is switched on, and IO_STRICT_DEVMEM=n, the /dev/mem
1976 file only allows userspace access to PCI space and the BIOS code and
1977 data regions. This is sufficient for dosemu and X and all common
1978 users of /dev/mem.
1979
1980 If in doubt, say Y.
1981
1982 config IO_STRICT_DEVMEM
1983 bool "Filter I/O access to /dev/mem"
1984 depends on STRICT_DEVMEM
1985 ---help---
1986 If this option is disabled, you allow userspace (root) access to all
1987 io-memory regardless of whether a driver is actively using that
1988 range. Accidental access to this is obviously disastrous, but
1989 specific access can be used by people debugging kernel drivers.
1990
1991 If this option is switched on, the /dev/mem file only allows
1992 userspace access to *idle* io-memory ranges (see /proc/iomem) This
1993 may break traditional users of /dev/mem (dosemu, legacy X, etc...)
1994 if the driver using a given range cannot be disabled.
1995
1996 If in doubt, say Y.
1997
1998 menuconfig DEBUG_SNAPSHOT
1999 bool "Debug SnapShot Support"
2000 default n
2001
2002 config DEBUG_SNAPSHOT_LINUX_BUILD
2003 bool "May be built in LINUX environment"
2004 depends on DEBUG_SNAPSHOT
2005 default y
2006
2007 config DEBUG_SNAPSHOT_USER_MODE
2008 bool "Enable User Mode, Most of debug feature are disabled"
2009 depends on DEBUG_SNAPSHOT
2010 default n
2011
2012 config DEBUG_SNAPSHOT_CALLSTACK
2013 int "shown callstack level"
2014 depends on DEBUG_SNAPSHOT
2015 range 1 4
2016 default 4
2017
2018 config DEBUG_SNAPSHOT_IRQ_DISABLED
2019 bool "Enable debugging of interrupt disable event by kevent(EXPERIMENTAL)"
2020 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2021 default n
2022
2023 config DEBUG_SNAPSHOT_SPINLOCK
2024 bool "Enable debugging of spinlock event by kevent(EXPERIMENTAL)"
2025 depends on DEBUG_SNAPSHOT && DEBUG_SPINLOCK && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2026 default y
2027
2028 config DEBUG_SNAPSHOT_CLK
2029 bool "Enable debugging of clock event by kevent(EXPERIMENTAL)"
2030 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2031 default y
2032
2033 config DEBUG_SNAPSHOT_PMU
2034 bool "Enable debugging of pmu event by kevent(EXPERIMENTAL)"
2035 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2036 default y
2037
2038 config DEBUG_SNAPSHOT_FREQ
2039 bool "Enable debugging of frequence event by kevent(EXPERIMENTAL)"
2040 depends on DEBUG_SNAPSHOT && PM_DEVFREQ
2041 default y
2042
2043 config DEBUG_SNAPSHOT_DM
2044 bool "Enable debugging of dvfs manager event by kevent(EXPERIMENTAL)"
2045 depends on DEBUG_SNAPSHOT && EXYNOS_DVFS_MANAGER && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2046 default y
2047
2048 config DEBUG_SNAPSHOT_HRTIMER
2049 bool "Enable debugging of hrtimer by kevent"
2050 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2051 default y
2052
2053 config DEBUG_SNAPSHOT_REG
2054 bool "Enable debugging of accessing register by kevent"
2055 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2056 default n
2057
2058 config DEBUG_SNAPSHOT_REGULATOR
2059 bool "Enable debugging of regulator and pmic driver"
2060 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2061 default y
2062
2063 config DEBUG_SNAPSHOT_ACPM
2064 bool "Enable debugging of acpm framework"
2065 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2066 default y
2067
2068 config DEBUG_SNAPSHOT_THERMAL
2069 bool "Enable debugging of thermal driver"
2070 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE && EXYNOS_THERMAL
2071 default y
2072
2073 config DEBUG_SNAPSHOT_I2C
2074 bool "Enable debugging of i2c driver"
2075 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2076 default y
2077
2078 config DEBUG_SNAPSHOT_SPI
2079 bool "Enable debugging of spi driver"
2080 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2081 default y
2082
2083 config DEBUG_SNAPSHOT_BINDER
2084 bool "Enable debugging of binder driver"
2085 depends on DEBUG_SNAPSHOT && !DEBUG_SNAPSHOT_MINIMIZED_MODE
2086 default y
2087
2088 config DEBUG_SNAPSHOT_PANIC_REBOOT
2089 bool "Enable forced reboot after panic for ramdump"
2090 depends on DEBUG_SNAPSHOT
2091 default y
2092
2093 config DEBUG_SNAPSHOT_WATCHDOG_RESET
2094 bool "Support watchdog reset when hardlockup detect"
2095 depends on DEBUG_SNAPSHOT && DEBUG_SNAPSHOT_PANIC_REBOOT
2096 default y
2097
2098 config DEBUG_SNAPSHOT_CRASH_KEY
2099 bool "Support Crash Key to artificial panic for debugging"
2100 depends on DEBUG_SNAPSHOT && KEYBOARD_GPIO
2101 default y
2102
2103 config DEBUG_SNAPSHOT_MINIMIZED_MODE
2104 bool "Support minimized feature configuration"
2105 depends on DEBUG_SNAPSHOT_USER_MODE
2106 default y