diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 14:25:51 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 14:25:51 -0400 |
| commit | e61aca5158a84932cf9fbbcbf8aef9cef63f5026 (patch) | |
| tree | 25234bcfe6b13c8a66bdb22eb9eba0a3bbace424 | |
| parent | da67db4e55b45690cd283cdbdfa92d3252191108 (diff) | |
| parent | 92aef8fbabb4cc8616777ab27d6499a3719c3e4c (diff) | |
Merge branch 'kconfig-diet' from Dave Hansen
Merge Kconfig menu diet patches from Dave Hansen:
"I think the "Kernel Hacking" menu has gotten a bit out of hand. It is
over 120 lines long on my system with everything enabled and options
are scattered around it haphazardly.
http://sr71.net/~dave/linux/kconfig-horror.png
Let's try to introduce some sanity. This set takes that 120 lines
down to 55 and makes it vastly easier to find some things. It's a
start.
This set stands on its own, but there is plenty of room for follow-up
patches. The arch-specific debug options still end up getting stuck
in the top-level "kernel hacking" menu. OPTIMIZE_INLINING, for
instance, could obviously go in to the "compiler options" menu, but
the fact that it is defined in arch/ in a separate Kconfig file keeps
it on its own for the moment.
The Signed-off-by's in here look funky. I changed employers while
working on this set, so I have signoffs from both email addresses"
* emailed patches from Dave Hansen <dave@sr71.net>:
hang and lockup detection menu
kconfig: consolidate printk options
group locking debugging options
consolidate compilation option configs
consolidate runtime testing configs
order memory debugging Kconfig options
consolidate per-arch stack overflow debugging options
| -rw-r--r-- | arch/arc/Kconfig | 1 | ||||
| -rw-r--r-- | arch/arc/Kconfig.debug | 7 | ||||
| -rw-r--r-- | arch/blackfin/Kconfig | 1 | ||||
| -rw-r--r-- | arch/blackfin/Kconfig.debug | 7 | ||||
| -rw-r--r-- | arch/frv/Kconfig | 1 | ||||
| -rw-r--r-- | arch/frv/Kconfig.debug | 4 | ||||
| -rw-r--r-- | arch/m32r/Kconfig | 1 | ||||
| -rw-r--r-- | arch/m32r/Kconfig.debug | 7 | ||||
| -rw-r--r-- | arch/metag/Kconfig | 1 | ||||
| -rw-r--r-- | arch/metag/Kconfig.debug | 7 | ||||
| -rw-r--r-- | arch/mips/Kconfig | 1 | ||||
| -rw-r--r-- | arch/mips/Kconfig.debug | 9 | ||||
| -rw-r--r-- | arch/mn10300/Kconfig | 1 | ||||
| -rw-r--r-- | arch/mn10300/Kconfig.debug | 4 | ||||
| -rw-r--r-- | arch/openrisc/Kconfig | 11 | ||||
| -rw-r--r-- | arch/parisc/Kconfig | 1 | ||||
| -rw-r--r-- | arch/parisc/Kconfig.debug | 11 | ||||
| -rw-r--r-- | arch/powerpc/Kconfig | 1 | ||||
| -rw-r--r-- | arch/powerpc/Kconfig.debug | 7 | ||||
| -rw-r--r-- | arch/tile/Kconfig | 1 | ||||
| -rw-r--r-- | arch/tile/Kconfig.debug | 7 | ||||
| -rw-r--r-- | arch/x86/Kconfig | 1 | ||||
| -rw-r--r-- | arch/x86/Kconfig.debug | 10 | ||||
| -rw-r--r-- | lib/Kconfig.debug | 1076 |
24 files changed, 573 insertions, 605 deletions
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 4a0e54fc01b2..68fcbb2d59e2 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig | |||
| @@ -34,6 +34,7 @@ config ARC | |||
| 34 | select OF | 34 | select OF |
| 35 | select OF_EARLY_FLATTREE | 35 | select OF_EARLY_FLATTREE |
| 36 | select PERF_USE_VMALLOC | 36 | select PERF_USE_VMALLOC |
| 37 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 37 | 38 | ||
| 38 | config SCHED_OMIT_FRAME_POINTER | 39 | config SCHED_OMIT_FRAME_POINTER |
| 39 | def_bool y | 40 | def_bool y |
diff --git a/arch/arc/Kconfig.debug b/arch/arc/Kconfig.debug index 962c6099659e..a7fc0da25650 100644 --- a/arch/arc/Kconfig.debug +++ b/arch/arc/Kconfig.debug | |||
| @@ -15,13 +15,6 @@ config EARLY_PRINTK | |||
| 15 | with klogd/syslogd or the X server. You should normally N here, | 15 | with klogd/syslogd or the X server. You should normally N here, |
| 16 | unless you want to debug such a crash. | 16 | unless you want to debug such a crash. |
| 17 | 17 | ||
| 18 | config DEBUG_STACKOVERFLOW | ||
| 19 | bool "Check for stack overflows" | ||
| 20 | depends on DEBUG_KERNEL | ||
| 21 | help | ||
| 22 | This option will cause messages to be printed if free stack space | ||
| 23 | drops below a certain limit. | ||
| 24 | |||
| 25 | config 16KSTACKS | 18 | config 16KSTACKS |
| 26 | bool "Use 16Kb for kernel stacks instead of 8Kb" | 19 | bool "Use 16Kb for kernel stacks instead of 8Kb" |
| 27 | help | 20 | help |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index b573827d0416..08c7ac650405 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
| @@ -41,6 +41,7 @@ config BLACKFIN | |||
| 41 | select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS | 41 | select ARCH_USES_GETTIMEOFFSET if !GENERIC_CLOCKEVENTS |
| 42 | select HAVE_MOD_ARCH_SPECIFIC | 42 | select HAVE_MOD_ARCH_SPECIFIC |
| 43 | select MODULES_USE_ELF_RELA | 43 | select MODULES_USE_ELF_RELA |
| 44 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 44 | 45 | ||
| 45 | config GENERIC_CSUM | 46 | config GENERIC_CSUM |
| 46 | def_bool y | 47 | def_bool y |
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug index 79594694ee90..f3337ee03621 100644 --- a/arch/blackfin/Kconfig.debug +++ b/arch/blackfin/Kconfig.debug | |||
| @@ -2,13 +2,6 @@ menu "Kernel hacking" | |||
| 2 | 2 | ||
| 3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
| 4 | 4 | ||
| 5 | config DEBUG_STACKOVERFLOW | ||
| 6 | bool "Check for stack overflows" | ||
| 7 | depends on DEBUG_KERNEL | ||
| 8 | help | ||
| 9 | This option will cause messages to be printed if free stack space | ||
| 10 | drops below a certain limit. | ||
| 11 | |||
| 12 | config DEBUG_VERBOSE | 5 | config DEBUG_VERBOSE |
| 13 | bool "Verbose fault messages" | 6 | bool "Verbose fault messages" |
| 14 | default y | 7 | default y |
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig index 2ce731f9aa4d..4b6628ea381e 100644 --- a/arch/frv/Kconfig +++ b/arch/frv/Kconfig | |||
| @@ -14,6 +14,7 @@ config FRV | |||
| 14 | select ARCH_WANT_IPC_PARSE_VERSION | 14 | select ARCH_WANT_IPC_PARSE_VERSION |
| 15 | select OLD_SIGSUSPEND3 | 15 | select OLD_SIGSUSPEND3 |
| 16 | select OLD_SIGACTION | 16 | select OLD_SIGACTION |
| 17 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 17 | 18 | ||
| 18 | config ZONE_DMA | 19 | config ZONE_DMA |
| 19 | bool | 20 | bool |
diff --git a/arch/frv/Kconfig.debug b/arch/frv/Kconfig.debug index 211f01bc4caa..98c99a3ed2be 100644 --- a/arch/frv/Kconfig.debug +++ b/arch/frv/Kconfig.debug | |||
| @@ -2,10 +2,6 @@ menu "Kernel hacking" | |||
| 2 | 2 | ||
| 3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
| 4 | 4 | ||
| 5 | config DEBUG_STACKOVERFLOW | ||
| 6 | bool "Check for stack overflows" | ||
| 7 | depends on DEBUG_KERNEL | ||
| 8 | |||
| 9 | config GDBSTUB | 5 | config GDBSTUB |
| 10 | bool "Remote GDB kernel debugging" | 6 | bool "Remote GDB kernel debugging" |
| 11 | depends on DEBUG_KERNEL | 7 | depends on DEBUG_KERNEL |
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig index bcd17b206571..29a7ef4e448b 100644 --- a/arch/m32r/Kconfig +++ b/arch/m32r/Kconfig | |||
| @@ -16,6 +16,7 @@ config M32R | |||
| 16 | select GENERIC_ATOMIC64 | 16 | select GENERIC_ATOMIC64 |
| 17 | select ARCH_USES_GETTIMEOFFSET | 17 | select ARCH_USES_GETTIMEOFFSET |
| 18 | select MODULES_USE_ELF_RELA | 18 | select MODULES_USE_ELF_RELA |
| 19 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 19 | 20 | ||
| 20 | config SBUS | 21 | config SBUS |
| 21 | bool | 22 | bool |
diff --git a/arch/m32r/Kconfig.debug b/arch/m32r/Kconfig.debug index bb1afc1a31cc..6c612b7691b0 100644 --- a/arch/m32r/Kconfig.debug +++ b/arch/m32r/Kconfig.debug | |||
| @@ -2,13 +2,6 @@ menu "Kernel hacking" | |||
| 2 | 2 | ||
| 3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
| 4 | 4 | ||
| 5 | config DEBUG_STACKOVERFLOW | ||
| 6 | bool "Check for stack overflows" | ||
| 7 | depends on DEBUG_KERNEL | ||
| 8 | help | ||
| 9 | This option will cause messages to be printed if free stack space | ||
| 10 | drops below a certain limit. | ||
| 11 | |||
| 12 | config DEBUG_PAGEALLOC | 5 | config DEBUG_PAGEALLOC |
| 13 | bool "Debug page memory allocations" | 6 | bool "Debug page memory allocations" |
| 14 | depends on DEBUG_KERNEL && BROKEN | 7 | depends on DEBUG_KERNEL && BROKEN |
diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig index dcd94406030e..cfd831c29824 100644 --- a/arch/metag/Kconfig +++ b/arch/metag/Kconfig | |||
| @@ -30,6 +30,7 @@ config METAG | |||
| 30 | select OF | 30 | select OF |
| 31 | select OF_EARLY_FLATTREE | 31 | select OF_EARLY_FLATTREE |
| 32 | select SPARSE_IRQ | 32 | select SPARSE_IRQ |
| 33 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 33 | 34 | ||
| 34 | config STACKTRACE_SUPPORT | 35 | config STACKTRACE_SUPPORT |
| 35 | def_bool y | 36 | def_bool y |
diff --git a/arch/metag/Kconfig.debug b/arch/metag/Kconfig.debug index e45bbf6a7a5d..cb5c92860540 100644 --- a/arch/metag/Kconfig.debug +++ b/arch/metag/Kconfig.debug | |||
| @@ -6,13 +6,6 @@ config TRACE_IRQFLAGS_SUPPORT | |||
| 6 | 6 | ||
| 7 | source "lib/Kconfig.debug" | 7 | source "lib/Kconfig.debug" |
| 8 | 8 | ||
| 9 | config DEBUG_STACKOVERFLOW | ||
| 10 | bool "Check for stack overflows" | ||
| 11 | depends on DEBUG_KERNEL | ||
| 12 | help | ||
| 13 | This option will cause messages to be printed if free stack space | ||
| 14 | drops below a certain limit. | ||
| 15 | |||
| 16 | config 4KSTACKS | 9 | config 4KSTACKS |
| 17 | bool "Use 4Kb for kernel stacks instead of 8Kb" | 10 | bool "Use 4Kb for kernel stacks instead of 8Kb" |
| 18 | depends on DEBUG_KERNEL | 11 | depends on DEBUG_KERNEL |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index e433b90507fb..beeff436b22f 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
| @@ -42,6 +42,7 @@ config MIPS | |||
| 42 | select MODULES_USE_ELF_REL if MODULES | 42 | select MODULES_USE_ELF_REL if MODULES |
| 43 | select MODULES_USE_ELF_RELA if MODULES && 64BIT | 43 | select MODULES_USE_ELF_RELA if MODULES && 64BIT |
| 44 | select CLONE_BACKWARDS | 44 | select CLONE_BACKWARDS |
| 45 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 45 | 46 | ||
| 46 | menu "Machine selection" | 47 | menu "Machine selection" |
| 47 | 48 | ||
diff --git a/arch/mips/Kconfig.debug b/arch/mips/Kconfig.debug index 5a43aa0798ca..37871f0de15e 100644 --- a/arch/mips/Kconfig.debug +++ b/arch/mips/Kconfig.debug | |||
| @@ -67,15 +67,6 @@ config CMDLINE_OVERRIDE | |||
| 67 | 67 | ||
| 68 | Normally, you will choose 'N' here. | 68 | Normally, you will choose 'N' here. |
| 69 | 69 | ||
| 70 | config DEBUG_STACKOVERFLOW | ||
| 71 | bool "Check for stack overflows" | ||
| 72 | depends on DEBUG_KERNEL | ||
| 73 | help | ||
| 74 | This option will cause messages to be printed if free stack space | ||
| 75 | drops below a certain limit(2GB on MIPS). The debugging option | ||
| 76 | provides another way to check stack overflow happened on kernel mode | ||
| 77 | stack usually caused by nested interruption. | ||
| 78 | |||
| 79 | config SMTC_IDLE_HOOK_DEBUG | 70 | config SMTC_IDLE_HOOK_DEBUG |
| 80 | bool "Enable additional debug checks before going into CPU idle loop" | 71 | bool "Enable additional debug checks before going into CPU idle loop" |
| 81 | depends on DEBUG_KERNEL && MIPS_MT_SMTC | 72 | depends on DEBUG_KERNEL && MIPS_MT_SMTC |
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 428da175d073..70e4f663ebd2 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
| @@ -13,6 +13,7 @@ config MN10300 | |||
| 13 | select MODULES_USE_ELF_RELA | 13 | select MODULES_USE_ELF_RELA |
| 14 | select OLD_SIGSUSPEND3 | 14 | select OLD_SIGSUSPEND3 |
| 15 | select OLD_SIGACTION | 15 | select OLD_SIGACTION |
| 16 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 16 | 17 | ||
| 17 | config AM33_2 | 18 | config AM33_2 |
| 18 | def_bool n | 19 | def_bool n |
diff --git a/arch/mn10300/Kconfig.debug b/arch/mn10300/Kconfig.debug index bdbfd444a9ff..94efb3ed223f 100644 --- a/arch/mn10300/Kconfig.debug +++ b/arch/mn10300/Kconfig.debug | |||
| @@ -2,10 +2,6 @@ menu "Kernel hacking" | |||
| 2 | 2 | ||
| 3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
| 4 | 4 | ||
| 5 | config DEBUG_STACKOVERFLOW | ||
| 6 | bool "Check for stack overflows" | ||
| 7 | depends on DEBUG_KERNEL | ||
| 8 | |||
| 9 | config DEBUG_DECOMPRESS_KERNEL | 5 | config DEBUG_DECOMPRESS_KERNEL |
| 10 | bool "Using serial port during decompressing kernel" | 6 | bool "Using serial port during decompressing kernel" |
| 11 | depends on DEBUG_KERNEL | 7 | depends on DEBUG_KERNEL |
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig index 1072bfd18c50..99dbab1c59ac 100644 --- a/arch/openrisc/Kconfig +++ b/arch/openrisc/Kconfig | |||
| @@ -22,6 +22,7 @@ config OPENRISC | |||
| 22 | select GENERIC_STRNCPY_FROM_USER | 22 | select GENERIC_STRNCPY_FROM_USER |
| 23 | select GENERIC_STRNLEN_USER | 23 | select GENERIC_STRNLEN_USER |
| 24 | select MODULES_USE_ELF_RELA | 24 | select MODULES_USE_ELF_RELA |
| 25 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 25 | 26 | ||
| 26 | config MMU | 27 | config MMU |
| 27 | def_bool y | 28 | def_bool y |
| @@ -128,16 +129,6 @@ config CMDLINE | |||
| 128 | 129 | ||
| 129 | menu "Debugging options" | 130 | menu "Debugging options" |
| 130 | 131 | ||
| 131 | config DEBUG_STACKOVERFLOW | ||
| 132 | bool "Check for kernel stack overflow" | ||
| 133 | default y | ||
| 134 | help | ||
| 135 | Make extra checks for space available on stack in some | ||
| 136 | critical functions. This will cause kernel to run a bit slower, | ||
| 137 | but will catch most of kernel stack overruns and exit gracefully. | ||
| 138 | |||
| 139 | Say Y if you are unsure. | ||
| 140 | |||
| 141 | config JUMP_UPON_UNHANDLED_EXCEPTION | 132 | config JUMP_UPON_UNHANDLED_EXCEPTION |
| 142 | bool "Try to die gracefully" | 133 | bool "Try to die gracefully" |
| 143 | default y | 134 | default y |
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 2a2aea5aae5b..aa399a5259b6 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig | |||
| @@ -27,6 +27,7 @@ config PARISC | |||
| 27 | select MODULES_USE_ELF_RELA | 27 | select MODULES_USE_ELF_RELA |
| 28 | select CLONE_BACKWARDS | 28 | select CLONE_BACKWARDS |
| 29 | select TTY # Needed for pdc_cons.c | 29 | select TTY # Needed for pdc_cons.c |
| 30 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 30 | 31 | ||
| 31 | help | 32 | help |
| 32 | The PA-RISC microprocessor is designed by Hewlett-Packard and used | 33 | The PA-RISC microprocessor is designed by Hewlett-Packard and used |
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug index 08a332f6ee87..bc989e522a04 100644 --- a/arch/parisc/Kconfig.debug +++ b/arch/parisc/Kconfig.debug | |||
| @@ -13,14 +13,3 @@ config DEBUG_RODATA | |||
| 13 | If in doubt, say "N". | 13 | If in doubt, say "N". |
| 14 | 14 | ||
| 15 | endmenu | 15 | endmenu |
| 16 | |||
| 17 | config DEBUG_STACKOVERFLOW | ||
| 18 | bool "Check for stack overflows" | ||
| 19 | default y | ||
| 20 | depends on DEBUG_KERNEL | ||
| 21 | ---help--- | ||
| 22 | Say Y here if you want to check the overflows of kernel, IRQ | ||
| 23 | and exception stacks. This option will cause messages of the | ||
| 24 | stacks in detail when free stack space drops below a certain | ||
| 25 | limit. | ||
| 26 | If in doubt, say "N". | ||
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 1022e7b675c2..bc3a0ebf16a7 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
| @@ -138,6 +138,7 @@ config PPC | |||
| 138 | select ARCH_USE_BUILTIN_BSWAP | 138 | select ARCH_USE_BUILTIN_BSWAP |
| 139 | select OLD_SIGSUSPEND | 139 | select OLD_SIGSUSPEND |
| 140 | select OLD_SIGACTION if PPC32 | 140 | select OLD_SIGACTION if PPC32 |
| 141 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 141 | 142 | ||
| 142 | config EARLY_PRINTK | 143 | config EARLY_PRINTK |
| 143 | bool | 144 | bool |
diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index d86875f3e17e..21c9f304e96c 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug | |||
| @@ -28,13 +28,6 @@ config PRINT_STACK_DEPTH | |||
| 28 | too small and stack traces cause important information to | 28 | too small and stack traces cause important information to |
| 29 | scroll off the screen. | 29 | scroll off the screen. |
| 30 | 30 | ||
| 31 | config DEBUG_STACKOVERFLOW | ||
| 32 | bool "Check for stack overflows" | ||
| 33 | depends on DEBUG_KERNEL | ||
| 34 | help | ||
| 35 | This option will cause messages to be printed if free stack space | ||
| 36 | drops below a certain limit. | ||
| 37 | |||
| 38 | config HCALL_STATS | 31 | config HCALL_STATS |
| 39 | bool "Hypervisor call instrumentation" | 32 | bool "Hypervisor call instrumentation" |
| 40 | depends on PPC_PSERIES && DEBUG_FS && TRACEPOINTS | 33 | depends on PPC_PSERIES && DEBUG_FS && TRACEPOINTS |
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig index 3aa37669ff8c..24565a7ffe6d 100644 --- a/arch/tile/Kconfig +++ b/arch/tile/Kconfig | |||
| @@ -25,6 +25,7 @@ config TILE | |||
| 25 | select HAVE_ARCH_TRACEHOOK | 25 | select HAVE_ARCH_TRACEHOOK |
| 26 | select HAVE_SYSCALL_TRACEPOINTS | 26 | select HAVE_SYSCALL_TRACEPOINTS |
| 27 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE | 27 | select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE |
| 28 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 28 | 29 | ||
| 29 | # FIXME: investigate whether we need/want these options. | 30 | # FIXME: investigate whether we need/want these options. |
| 30 | # select HAVE_IOREMAP_PROT | 31 | # select HAVE_IOREMAP_PROT |
diff --git a/arch/tile/Kconfig.debug b/arch/tile/Kconfig.debug index ddbfc3322d7f..9165ea979e85 100644 --- a/arch/tile/Kconfig.debug +++ b/arch/tile/Kconfig.debug | |||
| @@ -14,13 +14,6 @@ config EARLY_PRINTK | |||
| 14 | with klogd/syslogd. You should normally N here, | 14 | with klogd/syslogd. You should normally N here, |
| 15 | unless you want to debug such a crash. | 15 | unless you want to debug such a crash. |
| 16 | 16 | ||
| 17 | config DEBUG_STACKOVERFLOW | ||
| 18 | bool "Check for stack overflows" | ||
| 19 | depends on DEBUG_KERNEL | ||
| 20 | help | ||
| 21 | This option will cause messages to be printed if free stack space | ||
| 22 | drops below a certain limit. | ||
| 23 | |||
| 24 | config DEBUG_EXTRA_FLAGS | 17 | config DEBUG_EXTRA_FLAGS |
| 25 | string "Additional compiler arguments when building with '-g'" | 18 | string "Additional compiler arguments when building with '-g'" |
| 26 | depends on DEBUG_INFO | 19 | depends on DEBUG_INFO |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 2775023a0744..265c672a2f40 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -122,6 +122,7 @@ config X86 | |||
| 122 | select OLD_SIGACTION if X86_32 | 122 | select OLD_SIGACTION if X86_32 |
| 123 | select COMPAT_OLD_SIGACTION if IA32_EMULATION | 123 | select COMPAT_OLD_SIGACTION if IA32_EMULATION |
| 124 | select RTC_LIB | 124 | select RTC_LIB |
| 125 | select HAVE_DEBUG_STACKOVERFLOW | ||
| 125 | 126 | ||
| 126 | config INSTRUCTION_DECODER | 127 | config INSTRUCTION_DECODER |
| 127 | def_bool y | 128 | def_bool y |
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index c963881de0d0..78d91afb8e50 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
| @@ -59,16 +59,6 @@ config EARLY_PRINTK_DBGP | |||
| 59 | with klogd/syslogd or the X server. You should normally N here, | 59 | with klogd/syslogd or the X server. You should normally N here, |
| 60 | unless you want to debug such a crash. You need usb debug device. | 60 | unless you want to debug such a crash. You need usb debug device. |
| 61 | 61 | ||
| 62 | config DEBUG_STACKOVERFLOW | ||
| 63 | bool "Check for stack overflows" | ||
| 64 | depends on DEBUG_KERNEL | ||
| 65 | ---help--- | ||
| 66 | Say Y here if you want to check the overflows of kernel, IRQ | ||
| 67 | and exception stacks. This option will cause messages of the | ||
| 68 | stacks in detail when free stack space drops below a certain | ||
| 69 | limit. | ||
| 70 | If in doubt, say "N". | ||
| 71 | |||
| 72 | config X86_PTDUMP | 62 | config X86_PTDUMP |
| 73 | bool "Export kernel pagetable layout to userspace via debugfs" | 63 | bool "Export kernel pagetable layout to userspace via debugfs" |
| 74 | depends on DEBUG_KERNEL | 64 | depends on DEBUG_KERNEL |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 7154f799541a..88c8d9876702 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | menu "printk and dmesg options" | ||
| 1 | 2 | ||
| 2 | config PRINTK_TIME | 3 | config PRINTK_TIME |
| 3 | bool "Show timing information on printks" | 4 | bool "Show timing information on printks" |
| @@ -25,6 +26,123 @@ config DEFAULT_MESSAGE_LOGLEVEL | |||
| 25 | that are auditing their logs closely may want to set it to a lower | 26 | that are auditing their logs closely may want to set it to a lower |
| 26 | priority. | 27 | priority. |
| 27 | 28 | ||
| 29 | config BOOT_PRINTK_DELAY | ||
| 30 | bool "Delay each boot printk message by N milliseconds" | ||
| 31 | depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY | ||
| 32 | help | ||
| 33 | This build option allows you to read kernel boot messages | ||
| 34 | by inserting a short delay after each one. The delay is | ||
| 35 | specified in milliseconds on the kernel command line, | ||
| 36 | using "boot_delay=N". | ||
| 37 | |||
| 38 | It is likely that you would also need to use "lpj=M" to preset | ||
| 39 | the "loops per jiffie" value. | ||
| 40 | See a previous boot log for the "lpj" value to use for your | ||
| 41 | system, and then set "lpj=M" before setting "boot_delay=N". | ||
| 42 | NOTE: Using this option may adversely affect SMP systems. | ||
| 43 | I.e., processors other than the first one may not boot up. | ||
| 44 | BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect | ||
| 45 | what it believes to be lockup conditions. | ||
| 46 | |||
| 47 | config DYNAMIC_DEBUG | ||
| 48 | bool "Enable dynamic printk() support" | ||
| 49 | default n | ||
| 50 | depends on PRINTK | ||
| 51 | depends on DEBUG_FS | ||
| 52 | help | ||
| 53 | |||
| 54 | Compiles debug level messages into the kernel, which would not | ||
| 55 | otherwise be available at runtime. These messages can then be | ||
| 56 | enabled/disabled based on various levels of scope - per source file, | ||
| 57 | function, module, format string, and line number. This mechanism | ||
| 58 | implicitly compiles in all pr_debug() and dev_dbg() calls, which | ||
| 59 | enlarges the kernel text size by about 2%. | ||
| 60 | |||
| 61 | If a source file is compiled with DEBUG flag set, any | ||
| 62 | pr_debug() calls in it are enabled by default, but can be | ||
| 63 | disabled at runtime as below. Note that DEBUG flag is | ||
| 64 | turned on by many CONFIG_*DEBUG* options. | ||
| 65 | |||
| 66 | Usage: | ||
| 67 | |||
| 68 | Dynamic debugging is controlled via the 'dynamic_debug/control' file, | ||
| 69 | which is contained in the 'debugfs' filesystem. Thus, the debugfs | ||
| 70 | filesystem must first be mounted before making use of this feature. | ||
| 71 | We refer the control file as: <debugfs>/dynamic_debug/control. This | ||
| 72 | file contains a list of the debug statements that can be enabled. The | ||
| 73 | format for each line of the file is: | ||
| 74 | |||
| 75 | filename:lineno [module]function flags format | ||
| 76 | |||
| 77 | filename : source file of the debug statement | ||
| 78 | lineno : line number of the debug statement | ||
| 79 | module : module that contains the debug statement | ||
| 80 | function : function that contains the debug statement | ||
| 81 | flags : '=p' means the line is turned 'on' for printing | ||
| 82 | format : the format used for the debug statement | ||
| 83 | |||
| 84 | From a live system: | ||
| 85 | |||
| 86 | nullarbor:~ # cat <debugfs>/dynamic_debug/control | ||
| 87 | # filename:lineno [module]function flags format | ||
| 88 | fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012" | ||
| 89 | fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012" | ||
| 90 | fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012" | ||
| 91 | |||
| 92 | Example usage: | ||
| 93 | |||
| 94 | // enable the message at line 1603 of file svcsock.c | ||
| 95 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > | ||
| 96 | <debugfs>/dynamic_debug/control | ||
| 97 | |||
| 98 | // enable all the messages in file svcsock.c | ||
| 99 | nullarbor:~ # echo -n 'file svcsock.c +p' > | ||
| 100 | <debugfs>/dynamic_debug/control | ||
| 101 | |||
| 102 | // enable all the messages in the NFS server module | ||
| 103 | nullarbor:~ # echo -n 'module nfsd +p' > | ||
| 104 | <debugfs>/dynamic_debug/control | ||
| 105 | |||
| 106 | // enable all 12 messages in the function svc_process() | ||
| 107 | nullarbor:~ # echo -n 'func svc_process +p' > | ||
| 108 | <debugfs>/dynamic_debug/control | ||
| 109 | |||
| 110 | // disable all 12 messages in the function svc_process() | ||
| 111 | nullarbor:~ # echo -n 'func svc_process -p' > | ||
| 112 | <debugfs>/dynamic_debug/control | ||
| 113 | |||
| 114 | See Documentation/dynamic-debug-howto.txt for additional information. | ||
| 115 | |||
| 116 | endmenu # "printk and dmesg options" | ||
| 117 | |||
| 118 | menu "Compile-time checks and compiler options" | ||
| 119 | |||
| 120 | config DEBUG_INFO | ||
| 121 | bool "Compile the kernel with debug info" | ||
| 122 | depends on DEBUG_KERNEL | ||
| 123 | help | ||
| 124 | If you say Y here the resulting kernel image will include | ||
| 125 | debugging info resulting in a larger kernel image. | ||
| 126 | This adds debug symbols to the kernel and modules (gcc -g), and | ||
| 127 | is needed if you intend to use kernel crashdump or binary object | ||
| 128 | tools like crash, kgdb, LKCD, gdb, etc on the kernel. | ||
| 129 | Say Y here only if you plan to debug the kernel. | ||
| 130 | |||
| 131 | If unsure, say N. | ||
| 132 | |||
| 133 | config DEBUG_INFO_REDUCED | ||
| 134 | bool "Reduce debugging information" | ||
| 135 | depends on DEBUG_INFO | ||
| 136 | help | ||
| 137 | If you say Y here gcc is instructed to generate less debugging | ||
| 138 | information for structure types. This means that tools that | ||
| 139 | need full debugging information (like kgdb or systemtap) won't | ||
| 140 | be happy. But if you merely need debugging information to | ||
| 141 | resolve line numbers there is no loss. Advantage is that | ||
| 142 | build directory object sizes shrink dramatically over a full | ||
| 143 | DEBUG_INFO build and compile times are reduced too. | ||
| 144 | Only works with newer gcc versions. | ||
| 145 | |||
| 28 | config ENABLE_WARN_DEPRECATED | 146 | config ENABLE_WARN_DEPRECATED |
| 29 | bool "Enable __deprecated logic" | 147 | bool "Enable __deprecated logic" |
| 30 | default y | 148 | default y |
| @@ -52,20 +170,6 @@ config FRAME_WARN | |||
| 52 | Setting it to 0 disables the warning. | 170 | Setting it to 0 disables the warning. |
| 53 | Requires gcc 4.4 | 171 | Requires gcc 4.4 |
| 54 | 172 | ||
| 55 | config MAGIC_SYSRQ | ||
| 56 | bool "Magic SysRq key" | ||
| 57 | depends on !UML | ||
| 58 | help | ||
| 59 | If you say Y here, you will have some control over the system even | ||
| 60 | if the system crashes for example during kernel debugging (e.g., you | ||
| 61 | will be able to flush the buffer cache to disk, reboot the system | ||
| 62 | immediately or dump some status information). This is accomplished | ||
| 63 | by pressing various keys while holding SysRq (Alt+PrintScreen). It | ||
| 64 | also works on a serial console (on PC hardware at least), if you | ||
| 65 | send a BREAK and then within 5 seconds a command keypress. The | ||
| 66 | keys are documented in <file:Documentation/sysrq.txt>. Don't say Y | ||
| 67 | unless you really know what this hack does. | ||
| 68 | |||
| 69 | config STRIP_ASM_SYMS | 173 | config STRIP_ASM_SYMS |
| 70 | bool "Strip assembler-generated symbols during link" | 174 | bool "Strip assembler-generated symbols during link" |
| 71 | default n | 175 | default n |
| @@ -156,12 +260,341 @@ config DEBUG_SECTION_MISMATCH | |||
| 156 | - Enable verbose reporting from modpost in order to help resolve | 260 | - Enable verbose reporting from modpost in order to help resolve |
| 157 | the section mismatches that are reported. | 261 | the section mismatches that are reported. |
| 158 | 262 | ||
| 263 | # | ||
| 264 | # Select this config option from the architecture Kconfig, if it | ||
| 265 | # is preferred to always offer frame pointers as a config | ||
| 266 | # option on the architecture (regardless of KERNEL_DEBUG): | ||
| 267 | # | ||
| 268 | config ARCH_WANT_FRAME_POINTERS | ||
| 269 | bool | ||
| 270 | help | ||
| 271 | |||
| 272 | config FRAME_POINTER | ||
| 273 | bool "Compile the kernel with frame pointers" | ||
| 274 | depends on DEBUG_KERNEL && \ | ||
| 275 | (CRIS || M68K || FRV || UML || \ | ||
| 276 | AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \ | ||
| 277 | ARCH_WANT_FRAME_POINTERS | ||
| 278 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | ||
| 279 | help | ||
| 280 | If you say Y here the resulting kernel image will be slightly | ||
| 281 | larger and slower, but it gives very useful debugging information | ||
| 282 | in case of kernel bugs. (precise oopses/stacktraces/warnings) | ||
| 283 | |||
| 284 | config DEBUG_FORCE_WEAK_PER_CPU | ||
| 285 | bool "Force weak per-cpu definitions" | ||
| 286 | depends on DEBUG_KERNEL | ||
| 287 | help | ||
| 288 | s390 and alpha require percpu variables in modules to be | ||
| 289 | defined weak to work around addressing range issue which | ||
| 290 | puts the following two restrictions on percpu variable | ||
| 291 | definitions. | ||
| 292 | |||
| 293 | 1. percpu symbols must be unique whether static or not | ||
| 294 | 2. percpu variables can't be defined inside a function | ||
| 295 | |||
| 296 | To ensure that generic code follows the above rules, this | ||
| 297 | option forces all percpu variables to be defined as weak. | ||
| 298 | |||
| 299 | endmenu # "Compiler options" | ||
| 300 | |||
| 301 | config MAGIC_SYSRQ | ||
| 302 | bool "Magic SysRq key" | ||
| 303 | depends on !UML | ||
| 304 | help | ||
| 305 | If you say Y here, you will have some control over the system even | ||
| 306 | if the system crashes for example during kernel debugging (e.g., you | ||
| 307 | will be able to flush the buffer cache to disk, reboot the system | ||
| 308 | immediately or dump some status information). This is accomplished | ||
| 309 | by pressing various keys while holding SysRq (Alt+PrintScreen). It | ||
| 310 | also works on a serial console (on PC hardware at least), if you | ||
| 311 | send a BREAK and then within 5 seconds a command keypress. The | ||
| 312 | keys are documented in <file:Documentation/sysrq.txt>. Don't say Y | ||
| 313 | unless you really know what this hack does. | ||
| 314 | |||
| 159 | config DEBUG_KERNEL | 315 | config DEBUG_KERNEL |
| 160 | bool "Kernel debugging" | 316 | bool "Kernel debugging" |
| 161 | help | 317 | help |
| 162 | Say Y here if you are developing drivers or trying to debug and | 318 | Say Y here if you are developing drivers or trying to debug and |
| 163 | identify kernel problems. | 319 | identify kernel problems. |
| 164 | 320 | ||
| 321 | menu "Memory Debugging" | ||
| 322 | |||
| 323 | source mm/Kconfig.debug | ||
| 324 | |||
| 325 | config DEBUG_OBJECTS | ||
| 326 | bool "Debug object operations" | ||
| 327 | depends on DEBUG_KERNEL | ||
| 328 | help | ||
| 329 | If you say Y here, additional code will be inserted into the | ||
| 330 | kernel to track the life time of various objects and validate | ||
| 331 | the operations on those objects. | ||
| 332 | |||
| 333 | config DEBUG_OBJECTS_SELFTEST | ||
| 334 | bool "Debug objects selftest" | ||
| 335 | depends on DEBUG_OBJECTS | ||
| 336 | help | ||
| 337 | This enables the selftest of the object debug code. | ||
| 338 | |||
| 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 | |||
| 348 | config DEBUG_OBJECTS_TIMERS | ||
| 349 | bool "Debug timer objects" | ||
| 350 | depends on DEBUG_OBJECTS | ||
| 351 | help | ||
| 352 | If you say Y here, additional code will be inserted into the | ||
| 353 | timer routines to track the life time of timer objects and | ||
| 354 | validate the timer operations. | ||
| 355 | |||
| 356 | config DEBUG_OBJECTS_WORK | ||
| 357 | bool "Debug work objects" | ||
| 358 | depends on DEBUG_OBJECTS | ||
| 359 | help | ||
| 360 | If you say Y here, additional code will be inserted into the | ||
| 361 | work queue routines to track the life time of work objects and | ||
| 362 | validate the work operations. | ||
| 363 | |||
| 364 | config DEBUG_OBJECTS_RCU_HEAD | ||
| 365 | bool "Debug RCU callbacks objects" | ||
| 366 | depends on DEBUG_OBJECTS | ||
| 367 | help | ||
| 368 | Enable this to turn on debugging of RCU list heads (call_rcu() usage). | ||
| 369 | |||
| 370 | config DEBUG_OBJECTS_PERCPU_COUNTER | ||
| 371 | bool "Debug percpu counter objects" | ||
| 372 | depends on DEBUG_OBJECTS | ||
| 373 | help | ||
| 374 | If you say Y here, additional code will be inserted into the | ||
| 375 | percpu counter routines to track the life time of percpu counter | ||
| 376 | objects and validate the percpu counter operations. | ||
| 377 | |||
| 378 | config DEBUG_OBJECTS_ENABLE_DEFAULT | ||
| 379 | int "debug_objects bootup default value (0-1)" | ||
| 380 | range 0 1 | ||
| 381 | default "1" | ||
| 382 | depends on DEBUG_OBJECTS | ||
| 383 | help | ||
| 384 | Debug objects boot parameter default value | ||
| 385 | |||
| 386 | config DEBUG_SLAB | ||
| 387 | bool "Debug slab memory allocations" | ||
| 388 | depends on DEBUG_KERNEL && SLAB && !KMEMCHECK | ||
| 389 | help | ||
| 390 | Say Y here to have the kernel do limited verification on memory | ||
| 391 | allocation as well as poisoning memory on free to catch use of freed | ||
| 392 | memory. This can make kmalloc/kfree-intensive workloads much slower. | ||
| 393 | |||
| 394 | config DEBUG_SLAB_LEAK | ||
| 395 | bool "Memory leak debugging" | ||
| 396 | depends on DEBUG_SLAB | ||
| 397 | |||
| 398 | config SLUB_DEBUG_ON | ||
| 399 | bool "SLUB debugging on by default" | ||
| 400 | depends on SLUB && SLUB_DEBUG && !KMEMCHECK | ||
| 401 | default n | ||
| 402 | help | ||
| 403 | Boot with debugging on by default. SLUB boots by default with | ||
| 404 | the runtime debug capabilities switched off. Enabling this is | ||
| 405 | equivalent to specifying the "slub_debug" parameter on boot. | ||
| 406 | There is no support for more fine grained debug control like | ||
| 407 | possible with slub_debug=xxx. SLUB debugging may be switched | ||
| 408 | off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying | ||
| 409 | "slub_debug=-". | ||
| 410 | |||
| 411 | config SLUB_STATS | ||
| 412 | default n | ||
| 413 | bool "Enable SLUB performance statistics" | ||
| 414 | depends on SLUB && SYSFS | ||
| 415 | help | ||
| 416 | SLUB statistics are useful to debug SLUBs allocation behavior in | ||
| 417 | order find ways to optimize the allocator. This should never be | ||
| 418 | enabled for production use since keeping statistics slows down | ||
| 419 | the allocator by a few percentage points. The slabinfo command | ||
| 420 | supports the determination of the most active slabs to figure | ||
| 421 | out which slabs are relevant to a particular load. | ||
| 422 | Try running: slabinfo -DA | ||
| 423 | |||
| 424 | config HAVE_DEBUG_KMEMLEAK | ||
| 425 | bool | ||
| 426 | |||
| 427 | config DEBUG_KMEMLEAK | ||
| 428 | bool "Kernel memory leak detector" | ||
| 429 | depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK | ||
| 430 | select DEBUG_FS | ||
| 431 | select STACKTRACE if STACKTRACE_SUPPORT | ||
| 432 | select KALLSYMS | ||
| 433 | select CRC32 | ||
| 434 | help | ||
| 435 | Say Y here if you want to enable the memory leak | ||
| 436 | detector. The memory allocation/freeing is traced in a way | ||
| 437 | similar to the Boehm's conservative garbage collector, the | ||
| 438 | difference being that the orphan objects are not freed but | ||
| 439 | only shown in /sys/kernel/debug/kmemleak. Enabling this | ||
| 440 | feature will introduce an overhead to memory | ||
| 441 | allocations. See Documentation/kmemleak.txt for more | ||
| 442 | details. | ||
| 443 | |||
| 444 | Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances | ||
| 445 | of finding leaks due to the slab objects poisoning. | ||
| 446 | |||
| 447 | In order to access the kmemleak file, debugfs needs to be | ||
| 448 | mounted (usually at /sys/kernel/debug). | ||
| 449 | |||
| 450 | config DEBUG_KMEMLEAK_EARLY_LOG_SIZE | ||
| 451 | int "Maximum kmemleak early log entries" | ||
| 452 | depends on DEBUG_KMEMLEAK | ||
| 453 | range 200 40000 | ||
| 454 | default 400 | ||
| 455 | help | ||
| 456 | Kmemleak must track all the memory allocations to avoid | ||
| 457 | reporting false positives. Since memory may be allocated or | ||
| 458 | freed before kmemleak is initialised, an early log buffer is | ||
| 459 | used to store these actions. If kmemleak reports "early log | ||
| 460 | buffer exceeded", please increase this value. | ||
| 461 | |||
| 462 | config DEBUG_KMEMLEAK_TEST | ||
| 463 | tristate "Simple test for the kernel memory leak detector" | ||
| 464 | depends on DEBUG_KMEMLEAK && m | ||
| 465 | help | ||
| 466 | This option enables a module that explicitly leaks memory. | ||
| 467 | |||
| 468 | If unsure, say N. | ||
| 469 | |||
| 470 | config DEBUG_KMEMLEAK_DEFAULT_OFF | ||
| 471 | bool "Default kmemleak to off" | ||
| 472 | depends on DEBUG_KMEMLEAK | ||
| 473 | help | ||
| 474 | Say Y here to disable kmemleak by default. It can then be enabled | ||
| 475 | on the command line via kmemleak=on. | ||
| 476 | |||
| 477 | config DEBUG_STACK_USAGE | ||
| 478 | bool "Stack utilization instrumentation" | ||
| 479 | depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG | ||
| 480 | help | ||
| 481 | Enables the display of the minimum amount of free stack which each | ||
| 482 | task has ever had available in the sysrq-T and sysrq-P debug output. | ||
| 483 | |||
| 484 | This option will slow down process creation somewhat. | ||
| 485 | |||
| 486 | config DEBUG_VM | ||
| 487 | bool "Debug VM" | ||
| 488 | depends on DEBUG_KERNEL | ||
| 489 | help | ||
| 490 | Enable this to turn on extended checks in the virtual-memory system | ||
| 491 | that may impact performance. | ||
| 492 | |||
| 493 | If unsure, say N. | ||
| 494 | |||
| 495 | config DEBUG_VM_RB | ||
| 496 | bool "Debug VM red-black trees" | ||
| 497 | depends on DEBUG_VM | ||
| 498 | help | ||
| 499 | Enable this to turn on more extended checks in the virtual-memory | ||
| 500 | system that may impact performance. | ||
| 501 | |||
| 502 | If unsure, say N. | ||
| 503 | |||
| 504 | config DEBUG_VIRTUAL | ||
| 505 | bool "Debug VM translations" | ||
| 506 | depends on DEBUG_KERNEL && X86 | ||
| 507 | help | ||
| 508 | Enable some costly sanity checks in virtual to page code. This can | ||
| 509 | catch mistakes with virt_to_page() and friends. | ||
| 510 | |||
| 511 | If unsure, say N. | ||
| 512 | |||
| 513 | config DEBUG_NOMMU_REGIONS | ||
| 514 | bool "Debug the global anon/private NOMMU mapping region tree" | ||
| 515 | depends on DEBUG_KERNEL && !MMU | ||
| 516 | help | ||
| 517 | This option causes the global tree of anonymous and private mapping | ||
| 518 | regions to be regularly checked for invalid topology. | ||
| 519 | |||
| 520 | config DEBUG_MEMORY_INIT | ||
| 521 | bool "Debug memory initialisation" if EXPERT | ||
| 522 | default !EXPERT | ||
| 523 | help | ||
| 524 | Enable this for additional checks during memory initialisation. | ||
| 525 | The sanity checks verify aspects of the VM such as the memory model | ||
| 526 | and other information provided by the architecture. Verbose | ||
| 527 | information will be printed at KERN_DEBUG loglevel depending | ||
| 528 | on the mminit_loglevel= command-line option. | ||
| 529 | |||
| 530 | If unsure, say Y | ||
| 531 | |||
| 532 | config MEMORY_NOTIFIER_ERROR_INJECT | ||
| 533 | tristate "Memory hotplug notifier error injection module" | ||
| 534 | depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION | ||
| 535 | help | ||
| 536 | This option provides the ability to inject artificial errors to | ||
| 537 | memory hotplug notifier chain callbacks. It is controlled through | ||
| 538 | debugfs interface under /sys/kernel/debug/notifier-error-inject/memory | ||
| 539 | |||
| 540 | If the notifier call chain should be failed with some events | ||
| 541 | notified, write the error code to "actions/<notifier event>/error". | ||
| 542 | |||
| 543 | Example: Inject memory hotplug offline error (-12 == -ENOMEM) | ||
| 544 | |||
| 545 | # cd /sys/kernel/debug/notifier-error-inject/memory | ||
| 546 | # echo -12 > actions/MEM_GOING_OFFLINE/error | ||
| 547 | # echo offline > /sys/devices/system/memory/memoryXXX/state | ||
| 548 | bash: echo: write error: Cannot allocate memory | ||
| 549 | |||
| 550 | To compile this code as a module, choose M here: the module will | ||
| 551 | be called memory-notifier-error-inject. | ||
| 552 | |||
| 553 | If unsure, say N. | ||
| 554 | |||
| 555 | config DEBUG_PER_CPU_MAPS | ||
| 556 | bool "Debug access to per_cpu maps" | ||
| 557 | depends on DEBUG_KERNEL | ||
| 558 | depends on SMP | ||
| 559 | help | ||
| 560 | Say Y to verify that the per_cpu map being accessed has | ||
| 561 | been set up. This adds a fair amount of code to kernel memory | ||
| 562 | and decreases performance. | ||
| 563 | |||
| 564 | Say N if unsure. | ||
| 565 | |||
| 566 | config DEBUG_HIGHMEM | ||
| 567 | bool "Highmem debugging" | ||
| 568 | depends on DEBUG_KERNEL && HIGHMEM | ||
| 569 | help | ||
| 570 | This options enables addition error checking for high memory systems. | ||
| 571 | Disable for production systems. | ||
| 572 | |||
| 573 | config HAVE_DEBUG_STACKOVERFLOW | ||
| 574 | bool | ||
| 575 | |||
| 576 | config DEBUG_STACKOVERFLOW | ||
| 577 | bool "Check for stack overflows" | ||
| 578 | depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW | ||
| 579 | ---help--- | ||
| 580 | Say Y here if you want to check for overflows of kernel, IRQ | ||
| 581 | and exception stacks (if your archicture uses them). This | ||
| 582 | option will show detailed messages if free stack space drops | ||
| 583 | below a certain limit. | ||
| 584 | |||
| 585 | These kinds of bugs usually occur when call-chains in the | ||
| 586 | kernel get too deep, especially when interrupts are | ||
| 587 | involved. | ||
| 588 | |||
| 589 | Use this in cases where you see apparently random memory | ||
| 590 | corruption, especially if it appears in 'struct thread_info' | ||
| 591 | |||
| 592 | If in doubt, say "N". | ||
| 593 | |||
| 594 | source "lib/Kconfig.kmemcheck" | ||
| 595 | |||
| 596 | endmenu # "Memory Debugging" | ||
| 597 | |||
| 165 | config DEBUG_SHIRQ | 598 | config DEBUG_SHIRQ |
| 166 | bool "Debug shared IRQ handlers" | 599 | bool "Debug shared IRQ handlers" |
| 167 | depends on DEBUG_KERNEL && GENERIC_HARDIRQS | 600 | depends on DEBUG_KERNEL && GENERIC_HARDIRQS |
| @@ -171,6 +604,8 @@ config DEBUG_SHIRQ | |||
| 171 | Drivers ought to be able to handle interrupts coming in at those | 604 | Drivers ought to be able to handle interrupts coming in at those |
| 172 | points; some don't and need to be caught. | 605 | points; some don't and need to be caught. |
| 173 | 606 | ||
| 607 | menu "Debug Lockups and Hangs" | ||
| 608 | |||
| 174 | config LOCKUP_DETECTOR | 609 | config LOCKUP_DETECTOR |
| 175 | bool "Detect Hard and Soft Lockups" | 610 | bool "Detect Hard and Soft Lockups" |
| 176 | depends on DEBUG_KERNEL && !S390 | 611 | depends on DEBUG_KERNEL && !S390 |
| @@ -242,25 +677,6 @@ config BOOTPARAM_SOFTLOCKUP_PANIC_VALUE | |||
| 242 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC | 677 | default 0 if !BOOTPARAM_SOFTLOCKUP_PANIC |
| 243 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC | 678 | default 1 if BOOTPARAM_SOFTLOCKUP_PANIC |
| 244 | 679 | ||
| 245 | config PANIC_ON_OOPS | ||
| 246 | bool "Panic on Oops" | ||
| 247 | help | ||
| 248 | Say Y here to enable the kernel to panic when it oopses. This | ||
| 249 | has the same effect as setting oops=panic on the kernel command | ||
| 250 | line. | ||
| 251 | |||
| 252 | This feature is useful to ensure that the kernel does not do | ||
| 253 | anything erroneous after an oops which could result in data | ||
| 254 | corruption or other issues. | ||
| 255 | |||
| 256 | Say N if unsure. | ||
| 257 | |||
| 258 | config PANIC_ON_OOPS_VALUE | ||
| 259 | int | ||
| 260 | range 0 1 | ||
| 261 | default 0 if !PANIC_ON_OOPS | ||
| 262 | default 1 if PANIC_ON_OOPS | ||
| 263 | |||
| 264 | config DETECT_HUNG_TASK | 680 | config DETECT_HUNG_TASK |
| 265 | bool "Detect Hung Tasks" | 681 | bool "Detect Hung Tasks" |
| 266 | depends on DEBUG_KERNEL | 682 | depends on DEBUG_KERNEL |
| @@ -315,6 +731,27 @@ config BOOTPARAM_HUNG_TASK_PANIC_VALUE | |||
| 315 | default 0 if !BOOTPARAM_HUNG_TASK_PANIC | 731 | default 0 if !BOOTPARAM_HUNG_TASK_PANIC |
| 316 | default 1 if BOOTPARAM_HUNG_TASK_PANIC | 732 | default 1 if BOOTPARAM_HUNG_TASK_PANIC |
| 317 | 733 | ||
| 734 | endmenu # "Debug lockups and hangs" | ||
| 735 | |||
| 736 | config PANIC_ON_OOPS | ||
| 737 | bool "Panic on Oops" | ||
| 738 | help | ||
| 739 | Say Y here to enable the kernel to panic when it oopses. This | ||
| 740 | has the same effect as setting oops=panic on the kernel command | ||
| 741 | line. | ||
| 742 | |||
| 743 | This feature is useful to ensure that the kernel does not do | ||
| 744 | anything erroneous after an oops which could result in data | ||
| 745 | corruption or other issues. | ||
| 746 | |||
| 747 | Say N if unsure. | ||
| 748 | |||
| 749 | config PANIC_ON_OOPS_VALUE | ||
| 750 | int | ||
| 751 | range 0 1 | ||
| 752 | default 0 if !PANIC_ON_OOPS | ||
| 753 | default 1 if PANIC_ON_OOPS | ||
| 754 | |||
| 318 | config SCHED_DEBUG | 755 | config SCHED_DEBUG |
| 319 | bool "Collect scheduler debugging info" | 756 | bool "Collect scheduler debugging info" |
| 320 | depends on DEBUG_KERNEL && PROC_FS | 757 | depends on DEBUG_KERNEL && PROC_FS |
| @@ -350,158 +787,6 @@ config TIMER_STATS | |||
| 350 | (it defaults to deactivated on bootup and will only be activated | 787 | (it defaults to deactivated on bootup and will only be activated |
| 351 | if some application like powertop activates it explicitly). | 788 | if some application like powertop activates it explicitly). |
| 352 | 789 | ||
| 353 | config DEBUG_OBJECTS | ||
| 354 | bool "Debug object operations" | ||
| 355 | depends on DEBUG_KERNEL | ||
| 356 | help | ||
| 357 | If you say Y here, additional code will be inserted into the | ||
| 358 | kernel to track the life time of various objects and validate | ||
| 359 | the operations on those objects. | ||
| 360 | |||
| 361 | config DEBUG_OBJECTS_SELFTEST | ||
| 362 | bool "Debug objects selftest" | ||
| 363 | depends on DEBUG_OBJECTS | ||
| 364 | help | ||
| 365 | This enables the selftest of the object debug code. | ||
| 366 | |||
| 367 | config DEBUG_OBJECTS_FREE | ||
| 368 | bool "Debug objects in freed memory" | ||
| 369 | depends on DEBUG_OBJECTS | ||
| 370 | help | ||
| 371 | This enables checks whether a k/v free operation frees an area | ||
| 372 | which contains an object which has not been deactivated | ||
| 373 | properly. This can make kmalloc/kfree-intensive workloads | ||
| 374 | much slower. | ||
| 375 | |||
| 376 | config DEBUG_OBJECTS_TIMERS | ||
| 377 | bool "Debug timer objects" | ||
| 378 | depends on DEBUG_OBJECTS | ||
| 379 | help | ||
| 380 | If you say Y here, additional code will be inserted into the | ||
| 381 | timer routines to track the life time of timer objects and | ||
| 382 | validate the timer operations. | ||
| 383 | |||
| 384 | config DEBUG_OBJECTS_WORK | ||
| 385 | bool "Debug work objects" | ||
| 386 | depends on DEBUG_OBJECTS | ||
| 387 | help | ||
| 388 | If you say Y here, additional code will be inserted into the | ||
| 389 | work queue routines to track the life time of work objects and | ||
| 390 | validate the work operations. | ||
| 391 | |||
| 392 | config DEBUG_OBJECTS_RCU_HEAD | ||
| 393 | bool "Debug RCU callbacks objects" | ||
| 394 | depends on DEBUG_OBJECTS | ||
| 395 | help | ||
| 396 | Enable this to turn on debugging of RCU list heads (call_rcu() usage). | ||
| 397 | |||
| 398 | config DEBUG_OBJECTS_PERCPU_COUNTER | ||
| 399 | bool "Debug percpu counter objects" | ||
| 400 | depends on DEBUG_OBJECTS | ||
| 401 | help | ||
| 402 | If you say Y here, additional code will be inserted into the | ||
| 403 | percpu counter routines to track the life time of percpu counter | ||
| 404 | objects and validate the percpu counter operations. | ||
| 405 | |||
| 406 | config DEBUG_OBJECTS_ENABLE_DEFAULT | ||
| 407 | int "debug_objects bootup default value (0-1)" | ||
| 408 | range 0 1 | ||
| 409 | default "1" | ||
| 410 | depends on DEBUG_OBJECTS | ||
| 411 | help | ||
| 412 | Debug objects boot parameter default value | ||
| 413 | |||
| 414 | config DEBUG_SLAB | ||
| 415 | bool "Debug slab memory allocations" | ||
| 416 | depends on DEBUG_KERNEL && SLAB && !KMEMCHECK | ||
| 417 | help | ||
| 418 | Say Y here to have the kernel do limited verification on memory | ||
| 419 | allocation as well as poisoning memory on free to catch use of freed | ||
| 420 | memory. This can make kmalloc/kfree-intensive workloads much slower. | ||
| 421 | |||
| 422 | config DEBUG_SLAB_LEAK | ||
| 423 | bool "Memory leak debugging" | ||
| 424 | depends on DEBUG_SLAB | ||
| 425 | |||
| 426 | config SLUB_DEBUG_ON | ||
| 427 | bool "SLUB debugging on by default" | ||
| 428 | depends on SLUB && SLUB_DEBUG && !KMEMCHECK | ||
| 429 | default n | ||
| 430 | help | ||
| 431 | Boot with debugging on by default. SLUB boots by default with | ||
| 432 | the runtime debug capabilities switched off. Enabling this is | ||
| 433 | equivalent to specifying the "slub_debug" parameter on boot. | ||
| 434 | There is no support for more fine grained debug control like | ||
| 435 | possible with slub_debug=xxx. SLUB debugging may be switched | ||
| 436 | off in a kernel built with CONFIG_SLUB_DEBUG_ON by specifying | ||
| 437 | "slub_debug=-". | ||
| 438 | |||
| 439 | config SLUB_STATS | ||
| 440 | default n | ||
| 441 | bool "Enable SLUB performance statistics" | ||
| 442 | depends on SLUB && SYSFS | ||
| 443 | help | ||
| 444 | SLUB statistics are useful to debug SLUBs allocation behavior in | ||
| 445 | order find ways to optimize the allocator. This should never be | ||
| 446 | enabled for production use since keeping statistics slows down | ||
| 447 | the allocator by a few percentage points. The slabinfo command | ||
| 448 | supports the determination of the most active slabs to figure | ||
| 449 | out which slabs are relevant to a particular load. | ||
| 450 | Try running: slabinfo -DA | ||
| 451 | |||
| 452 | config HAVE_DEBUG_KMEMLEAK | ||
| 453 | bool | ||
| 454 | |||
| 455 | config DEBUG_KMEMLEAK | ||
| 456 | bool "Kernel memory leak detector" | ||
| 457 | depends on DEBUG_KERNEL && HAVE_DEBUG_KMEMLEAK | ||
| 458 | select DEBUG_FS | ||
| 459 | select STACKTRACE if STACKTRACE_SUPPORT | ||
| 460 | select KALLSYMS | ||
| 461 | select CRC32 | ||
| 462 | help | ||
| 463 | Say Y here if you want to enable the memory leak | ||
| 464 | detector. The memory allocation/freeing is traced in a way | ||
| 465 | similar to the Boehm's conservative garbage collector, the | ||
| 466 | difference being that the orphan objects are not freed but | ||
| 467 | only shown in /sys/kernel/debug/kmemleak. Enabling this | ||
| 468 | feature will introduce an overhead to memory | ||
| 469 | allocations. See Documentation/kmemleak.txt for more | ||
| 470 | details. | ||
| 471 | |||
| 472 | Enabling DEBUG_SLAB or SLUB_DEBUG may increase the chances | ||
| 473 | of finding leaks due to the slab objects poisoning. | ||
| 474 | |||
| 475 | In order to access the kmemleak file, debugfs needs to be | ||
| 476 | mounted (usually at /sys/kernel/debug). | ||
| 477 | |||
| 478 | config DEBUG_KMEMLEAK_EARLY_LOG_SIZE | ||
| 479 | int "Maximum kmemleak early log entries" | ||
| 480 | depends on DEBUG_KMEMLEAK | ||
| 481 | range 200 40000 | ||
| 482 | default 400 | ||
| 483 | help | ||
| 484 | Kmemleak must track all the memory allocations to avoid | ||
| 485 | reporting false positives. Since memory may be allocated or | ||
| 486 | freed before kmemleak is initialised, an early log buffer is | ||
| 487 | used to store these actions. If kmemleak reports "early log | ||
| 488 | buffer exceeded", please increase this value. | ||
| 489 | |||
| 490 | config DEBUG_KMEMLEAK_TEST | ||
| 491 | tristate "Simple test for the kernel memory leak detector" | ||
| 492 | depends on DEBUG_KMEMLEAK && m | ||
| 493 | help | ||
| 494 | This option enables a module that explicitly leaks memory. | ||
| 495 | |||
| 496 | If unsure, say N. | ||
| 497 | |||
| 498 | config DEBUG_KMEMLEAK_DEFAULT_OFF | ||
| 499 | bool "Default kmemleak to off" | ||
| 500 | depends on DEBUG_KMEMLEAK | ||
| 501 | help | ||
| 502 | Say Y here to disable kmemleak by default. It can then be enabled | ||
| 503 | on the command line via kmemleak=on. | ||
| 504 | |||
| 505 | config DEBUG_PREEMPT | 790 | config DEBUG_PREEMPT |
| 506 | bool "Debug preemptible kernel" | 791 | bool "Debug preemptible kernel" |
| 507 | depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT | 792 | depends on DEBUG_KERNEL && PREEMPT && TRACE_IRQFLAGS_SUPPORT |
| @@ -512,6 +797,8 @@ config DEBUG_PREEMPT | |||
| 512 | if kernel code uses it in a preemption-unsafe way. Also, the kernel | 797 | if kernel code uses it in a preemption-unsafe way. Also, the kernel |
| 513 | will detect preemption count underflows. | 798 | will detect preemption count underflows. |
| 514 | 799 | ||
| 800 | menu "Lock Debugging (spinlocks, mutexes, etc...)" | ||
| 801 | |||
| 515 | config DEBUG_RT_MUTEXES | 802 | config DEBUG_RT_MUTEXES |
| 516 | bool "RT Mutex debugging, deadlock detection" | 803 | bool "RT Mutex debugging, deadlock detection" |
| 517 | depends on DEBUG_KERNEL && RT_MUTEXES | 804 | depends on DEBUG_KERNEL && RT_MUTEXES |
| @@ -654,12 +941,6 @@ config DEBUG_LOCKDEP | |||
| 654 | additional runtime checks to debug itself, at the price | 941 | additional runtime checks to debug itself, at the price |
| 655 | of more runtime overhead. | 942 | of more runtime overhead. |
| 656 | 943 | ||
| 657 | config TRACE_IRQFLAGS | ||
| 658 | bool | ||
| 659 | help | ||
| 660 | Enables hooks to interrupt enabling and disabling for | ||
| 661 | either tracing or lock debugging. | ||
| 662 | |||
| 663 | config DEBUG_ATOMIC_SLEEP | 944 | config DEBUG_ATOMIC_SLEEP |
| 664 | bool "Sleep inside atomic section checking" | 945 | bool "Sleep inside atomic section checking" |
| 665 | select PREEMPT_COUNT | 946 | select PREEMPT_COUNT |
| @@ -681,18 +962,17 @@ config DEBUG_LOCKING_API_SELFTESTS | |||
| 681 | The following locking APIs are covered: spinlocks, rwlocks, | 962 | The following locking APIs are covered: spinlocks, rwlocks, |
| 682 | mutexes and rwsems. | 963 | mutexes and rwsems. |
| 683 | 964 | ||
| 684 | config STACKTRACE | 965 | endmenu # lock debugging |
| 685 | bool | ||
| 686 | depends on STACKTRACE_SUPPORT | ||
| 687 | 966 | ||
| 688 | config DEBUG_STACK_USAGE | 967 | config TRACE_IRQFLAGS |
| 689 | bool "Stack utilization instrumentation" | 968 | bool |
| 690 | depends on DEBUG_KERNEL && !IA64 && !PARISC && !METAG | ||
| 691 | help | 969 | help |
| 692 | Enables the display of the minimum amount of free stack which each | 970 | Enables hooks to interrupt enabling and disabling for |
| 693 | task has ever had available in the sysrq-T and sysrq-P debug output. | 971 | either tracing or lock debugging. |
| 694 | 972 | ||
| 695 | This option will slow down process creation somewhat. | 973 | config STACKTRACE |
| 974 | bool | ||
| 975 | depends on STACKTRACE_SUPPORT | ||
| 696 | 976 | ||
| 697 | config DEBUG_KOBJECT | 977 | config DEBUG_KOBJECT |
| 698 | bool "kobject debugging" | 978 | bool "kobject debugging" |
| @@ -701,13 +981,6 @@ config DEBUG_KOBJECT | |||
| 701 | If you say Y here, some extra kobject debugging messages will be sent | 981 | If you say Y here, some extra kobject debugging messages will be sent |
| 702 | to the syslog. | 982 | to the syslog. |
| 703 | 983 | ||
| 704 | config DEBUG_HIGHMEM | ||
| 705 | bool "Highmem debugging" | ||
| 706 | depends on DEBUG_KERNEL && HIGHMEM | ||
| 707 | help | ||
| 708 | This options enables addition error checking for high memory systems. | ||
| 709 | Disable for production systems. | ||
| 710 | |||
| 711 | config HAVE_DEBUG_BUGVERBOSE | 984 | config HAVE_DEBUG_BUGVERBOSE |
| 712 | bool | 985 | bool |
| 713 | 986 | ||
| @@ -720,66 +993,6 @@ config DEBUG_BUGVERBOSE | |||
| 720 | of the BUG call as well as the EIP and oops trace. This aids | 993 | of the BUG call as well as the EIP and oops trace. This aids |
| 721 | debugging but costs about 70-100K of memory. | 994 | debugging but costs about 70-100K of memory. |
| 722 | 995 | ||
| 723 | config DEBUG_INFO | ||
| 724 | bool "Compile the kernel with debug info" | ||
| 725 | depends on DEBUG_KERNEL | ||
| 726 | help | ||
| 727 | If you say Y here the resulting kernel image will include | ||
| 728 | debugging info resulting in a larger kernel image. | ||
| 729 | This adds debug symbols to the kernel and modules (gcc -g), and | ||
| 730 | is needed if you intend to use kernel crashdump or binary object | ||
| 731 | tools like crash, kgdb, LKCD, gdb, etc on the kernel. | ||
| 732 | Say Y here only if you plan to debug the kernel. | ||
| 733 | |||
| 734 | If unsure, say N. | ||
| 735 | |||
| 736 | config DEBUG_INFO_REDUCED | ||
| 737 | bool "Reduce debugging information" | ||
| 738 | depends on DEBUG_INFO | ||
| 739 | help | ||
| 740 | If you say Y here gcc is instructed to generate less debugging | ||
| 741 | information for structure types. This means that tools that | ||
| 742 | need full debugging information (like kgdb or systemtap) won't | ||
| 743 | be happy. But if you merely need debugging information to | ||
| 744 | resolve line numbers there is no loss. Advantage is that | ||
| 745 | build directory object sizes shrink dramatically over a full | ||
| 746 | DEBUG_INFO build and compile times are reduced too. | ||
| 747 | Only works with newer gcc versions. | ||
| 748 | |||
| 749 | config DEBUG_VM | ||
| 750 | bool "Debug VM" | ||
| 751 | depends on DEBUG_KERNEL | ||
| 752 | help | ||
| 753 | Enable this to turn on extended checks in the virtual-memory system | ||
| 754 | that may impact performance. | ||
| 755 | |||
| 756 | If unsure, say N. | ||
| 757 | |||
| 758 | config DEBUG_VM_RB | ||
| 759 | bool "Debug VM red-black trees" | ||
| 760 | depends on DEBUG_VM | ||
| 761 | help | ||
| 762 | Enable this to turn on more extended checks in the virtual-memory | ||
| 763 | system that may impact performance. | ||
| 764 | |||
| 765 | If unsure, say N. | ||
| 766 | |||
| 767 | config DEBUG_VIRTUAL | ||
| 768 | bool "Debug VM translations" | ||
| 769 | depends on DEBUG_KERNEL && X86 | ||
| 770 | help | ||
| 771 | Enable some costly sanity checks in virtual to page code. This can | ||
| 772 | catch mistakes with virt_to_page() and friends. | ||
| 773 | |||
| 774 | If unsure, say N. | ||
| 775 | |||
| 776 | config DEBUG_NOMMU_REGIONS | ||
| 777 | bool "Debug the global anon/private NOMMU mapping region tree" | ||
| 778 | depends on DEBUG_KERNEL && !MMU | ||
| 779 | help | ||
| 780 | This option causes the global tree of anonymous and private mapping | ||
| 781 | regions to be regularly checked for invalid topology. | ||
| 782 | |||
| 783 | config DEBUG_WRITECOUNT | 996 | config DEBUG_WRITECOUNT |
| 784 | bool "Debug filesystem writers count" | 997 | bool "Debug filesystem writers count" |
| 785 | depends on DEBUG_KERNEL | 998 | depends on DEBUG_KERNEL |
| @@ -790,18 +1003,6 @@ config DEBUG_WRITECOUNT | |||
| 790 | 1003 | ||
| 791 | If unsure, say N. | 1004 | If unsure, say N. |
| 792 | 1005 | ||
| 793 | config DEBUG_MEMORY_INIT | ||
| 794 | bool "Debug memory initialisation" if EXPERT | ||
| 795 | default !EXPERT | ||
| 796 | help | ||
| 797 | Enable this for additional checks during memory initialisation. | ||
| 798 | The sanity checks verify aspects of the VM such as the memory model | ||
| 799 | and other information provided by the architecture. Verbose | ||
| 800 | information will be printed at KERN_DEBUG loglevel depending | ||
| 801 | on the mminit_loglevel= command-line option. | ||
| 802 | |||
| 803 | If unsure, say Y | ||
| 804 | |||
| 805 | config DEBUG_LIST | 1006 | config DEBUG_LIST |
| 806 | bool "Debug linked list manipulation" | 1007 | bool "Debug linked list manipulation" |
| 807 | depends on DEBUG_KERNEL | 1008 | depends on DEBUG_KERNEL |
| @@ -811,15 +1012,6 @@ config DEBUG_LIST | |||
| 811 | 1012 | ||
| 812 | If unsure, say N. | 1013 | If unsure, say N. |
| 813 | 1014 | ||
| 814 | config TEST_LIST_SORT | ||
| 815 | bool "Linked list sorting test" | ||
| 816 | depends on DEBUG_KERNEL | ||
| 817 | help | ||
| 818 | Enable this to turn on 'list_sort()' function test. This test is | ||
| 819 | executed only once during system boot, so affects only boot time. | ||
| 820 | |||
| 821 | If unsure, say N. | ||
| 822 | |||
| 823 | config DEBUG_SG | 1015 | config DEBUG_SG |
| 824 | bool "Debug SG table operations" | 1016 | bool "Debug SG table operations" |
| 825 | depends on DEBUG_KERNEL | 1017 | depends on DEBUG_KERNEL |
| @@ -855,45 +1047,6 @@ config DEBUG_CREDENTIALS | |||
| 855 | 1047 | ||
| 856 | If unsure, say N. | 1048 | If unsure, say N. |
| 857 | 1049 | ||
| 858 | # | ||
| 859 | # Select this config option from the architecture Kconfig, if it | ||
| 860 | # is preferred to always offer frame pointers as a config | ||
| 861 | # option on the architecture (regardless of KERNEL_DEBUG): | ||
| 862 | # | ||
| 863 | config ARCH_WANT_FRAME_POINTERS | ||
| 864 | bool | ||
| 865 | help | ||
| 866 | |||
| 867 | config FRAME_POINTER | ||
| 868 | bool "Compile the kernel with frame pointers" | ||
| 869 | depends on DEBUG_KERNEL && \ | ||
| 870 | (CRIS || M68K || FRV || UML || \ | ||
| 871 | AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || \ | ||
| 872 | ARCH_WANT_FRAME_POINTERS | ||
| 873 | default y if (DEBUG_INFO && UML) || ARCH_WANT_FRAME_POINTERS | ||
| 874 | help | ||
| 875 | If you say Y here the resulting kernel image will be slightly | ||
| 876 | larger and slower, but it gives very useful debugging information | ||
| 877 | in case of kernel bugs. (precise oopses/stacktraces/warnings) | ||
| 878 | |||
| 879 | config BOOT_PRINTK_DELAY | ||
| 880 | bool "Delay each boot printk message by N milliseconds" | ||
| 881 | depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY | ||
| 882 | help | ||
| 883 | This build option allows you to read kernel boot messages | ||
| 884 | by inserting a short delay after each one. The delay is | ||
| 885 | specified in milliseconds on the kernel command line, | ||
| 886 | using "boot_delay=N". | ||
| 887 | |||
| 888 | It is likely that you would also need to use "lpj=M" to preset | ||
| 889 | the "loops per jiffie" value. | ||
| 890 | See a previous boot log for the "lpj" value to use for your | ||
| 891 | system, and then set "lpj=M" before setting "boot_delay=N". | ||
| 892 | NOTE: Using this option may adversely affect SMP systems. | ||
| 893 | I.e., processors other than the first one may not boot up. | ||
| 894 | BOOT_PRINTK_DELAY also may cause LOCKUP_DETECTOR to detect | ||
| 895 | what it believes to be lockup conditions. | ||
| 896 | |||
| 897 | menu "RCU Debugging" | 1050 | menu "RCU Debugging" |
| 898 | 1051 | ||
| 899 | config PROVE_RCU | 1052 | config PROVE_RCU |
| @@ -1032,33 +1185,6 @@ config RCU_TRACE | |||
| 1032 | 1185 | ||
| 1033 | endmenu # "RCU Debugging" | 1186 | endmenu # "RCU Debugging" |
| 1034 | 1187 | ||
| 1035 | config KPROBES_SANITY_TEST | ||
| 1036 | bool "Kprobes sanity tests" | ||
| 1037 | depends on DEBUG_KERNEL | ||
| 1038 | depends on KPROBES | ||
| 1039 | default n | ||
| 1040 | help | ||
| 1041 | This option provides for testing basic kprobes functionality on | ||
| 1042 | boot. A sample kprobe, jprobe and kretprobe are inserted and | ||
| 1043 | verified for functionality. | ||
| 1044 | |||
| 1045 | Say N if you are unsure. | ||
| 1046 | |||
| 1047 | config BACKTRACE_SELF_TEST | ||
| 1048 | tristate "Self test for the backtrace code" | ||
| 1049 | depends on DEBUG_KERNEL | ||
| 1050 | default n | ||
| 1051 | help | ||
| 1052 | This option provides a kernel module that can be used to test | ||
| 1053 | the kernel stack backtrace code. This option is not useful | ||
| 1054 | for distributions or general kernels, but only for kernel | ||
| 1055 | developers working on architecture code. | ||
| 1056 | |||
| 1057 | Note that if you want to also test saved backtraces, you will | ||
| 1058 | have to enable STACKTRACE as well. | ||
| 1059 | |||
| 1060 | Say N if you are unsure. | ||
| 1061 | |||
| 1062 | config DEBUG_BLOCK_EXT_DEVT | 1188 | config DEBUG_BLOCK_EXT_DEVT |
| 1063 | bool "Force extended block device numbers and spread them" | 1189 | bool "Force extended block device numbers and spread them" |
| 1064 | depends on DEBUG_KERNEL | 1190 | depends on DEBUG_KERNEL |
| @@ -1086,47 +1212,6 @@ config DEBUG_BLOCK_EXT_DEVT | |||
| 1086 | 1212 | ||
| 1087 | Say N if you are unsure. | 1213 | Say N if you are unsure. |
| 1088 | 1214 | ||
| 1089 | config DEBUG_FORCE_WEAK_PER_CPU | ||
| 1090 | bool "Force weak per-cpu definitions" | ||
| 1091 | depends on DEBUG_KERNEL | ||
| 1092 | help | ||
| 1093 | s390 and alpha require percpu variables in modules to be | ||
| 1094 | defined weak to work around addressing range issue which | ||
| 1095 | puts the following two restrictions on percpu variable | ||
| 1096 | definitions. | ||
| 1097 | |||
| 1098 | 1. percpu symbols must be unique whether static or not | ||
| 1099 | 2. percpu variables can't be defined inside a function | ||
| 1100 | |||
| 1101 | To ensure that generic code follows the above rules, this | ||
| 1102 | option forces all percpu variables to be defined as weak. | ||
| 1103 | |||
| 1104 | config DEBUG_PER_CPU_MAPS | ||
| 1105 | bool "Debug access to per_cpu maps" | ||
| 1106 | depends on DEBUG_KERNEL | ||
| 1107 | depends on SMP | ||
| 1108 | help | ||
| 1109 | Say Y to verify that the per_cpu map being accessed has | ||
| 1110 | been set up. This adds a fair amount of code to kernel memory | ||
| 1111 | and decreases performance. | ||
| 1112 | |||
| 1113 | Say N if unsure. | ||
| 1114 | |||
| 1115 | config LKDTM | ||
| 1116 | tristate "Linux Kernel Dump Test Tool Module" | ||
| 1117 | depends on DEBUG_FS | ||
| 1118 | depends on BLOCK | ||
| 1119 | default n | ||
| 1120 | help | ||
| 1121 | This module enables testing of the different dumping mechanisms by | ||
| 1122 | inducing system failures at predefined crash points. | ||
| 1123 | If you don't need it: say N | ||
| 1124 | Choose M here to compile this code as a module. The module will be | ||
| 1125 | called lkdtm. | ||
| 1126 | |||
| 1127 | Documentation on how to use the module can be found in | ||
| 1128 | Documentation/fault-injection/provoke-crashes.txt | ||
| 1129 | |||
| 1130 | config NOTIFIER_ERROR_INJECTION | 1215 | config NOTIFIER_ERROR_INJECTION |
| 1131 | tristate "Notifier error injection" | 1216 | tristate "Notifier error injection" |
| 1132 | depends on DEBUG_KERNEL | 1217 | depends on DEBUG_KERNEL |
| @@ -1186,29 +1271,6 @@ config PM_NOTIFIER_ERROR_INJECT | |||
| 1186 | 1271 | ||
| 1187 | If unsure, say N. | 1272 | If unsure, say N. |
| 1188 | 1273 | ||
| 1189 | config MEMORY_NOTIFIER_ERROR_INJECT | ||
| 1190 | tristate "Memory hotplug notifier error injection module" | ||
| 1191 | depends on MEMORY_HOTPLUG_SPARSE && NOTIFIER_ERROR_INJECTION | ||
| 1192 | help | ||
| 1193 | This option provides the ability to inject artificial errors to | ||
| 1194 | memory hotplug notifier chain callbacks. It is controlled through | ||
| 1195 | debugfs interface under /sys/kernel/debug/notifier-error-inject/memory | ||
| 1196 | |||
| 1197 | If the notifier call chain should be failed with some events | ||
| 1198 | notified, write the error code to "actions/<notifier event>/error". | ||
| 1199 | |||
| 1200 | Example: Inject memory hotplug offline error (-12 == -ENOMEM) | ||
| 1201 | |||
| 1202 | # cd /sys/kernel/debug/notifier-error-inject/memory | ||
| 1203 | # echo -12 > actions/MEM_GOING_OFFLINE/error | ||
| 1204 | # echo offline > /sys/devices/system/memory/memoryXXX/state | ||
| 1205 | bash: echo: write error: Cannot allocate memory | ||
| 1206 | |||
| 1207 | To compile this code as a module, choose M here: the module will | ||
| 1208 | be called memory-notifier-error-inject. | ||
| 1209 | |||
| 1210 | If unsure, say N. | ||
| 1211 | |||
| 1212 | config OF_RECONFIG_NOTIFIER_ERROR_INJECT | 1274 | config OF_RECONFIG_NOTIFIER_ERROR_INJECT |
| 1213 | tristate "OF reconfig notifier error injection module" | 1275 | tristate "OF reconfig notifier error injection module" |
| 1214 | depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION | 1276 | depends on OF_DYNAMIC && NOTIFIER_ERROR_INJECTION |
| @@ -1323,9 +1385,61 @@ config DEBUG_STRICT_USER_COPY_CHECKS | |||
| 1323 | 1385 | ||
| 1324 | If unsure, say N. | 1386 | If unsure, say N. |
| 1325 | 1387 | ||
| 1326 | source mm/Kconfig.debug | ||
| 1327 | source kernel/trace/Kconfig | 1388 | source kernel/trace/Kconfig |
| 1328 | 1389 | ||
| 1390 | menu "Runtime Testing" | ||
| 1391 | |||
| 1392 | config LKDTM | ||
| 1393 | tristate "Linux Kernel Dump Test Tool Module" | ||
| 1394 | depends on DEBUG_FS | ||
| 1395 | depends on BLOCK | ||
| 1396 | default n | ||
| 1397 | help | ||
| 1398 | This module enables testing of the different dumping mechanisms by | ||
| 1399 | inducing system failures at predefined crash points. | ||
| 1400 | If you don't need it: say N | ||
| 1401 | Choose M here to compile this code as a module. The module will be | ||
| 1402 | called lkdtm. | ||
| 1403 | |||
| 1404 | Documentation on how to use the module can be found in | ||
| 1405 | Documentation/fault-injection/provoke-crashes.txt | ||
| 1406 | |||
| 1407 | config TEST_LIST_SORT | ||
| 1408 | bool "Linked list sorting test" | ||
| 1409 | depends on DEBUG_KERNEL | ||
| 1410 | help | ||
| 1411 | Enable this to turn on 'list_sort()' function test. This test is | ||
| 1412 | executed only once during system boot, so affects only boot time. | ||
| 1413 | |||
| 1414 | If unsure, say N. | ||
| 1415 | |||
| 1416 | config KPROBES_SANITY_TEST | ||
| 1417 | bool "Kprobes sanity tests" | ||
| 1418 | depends on DEBUG_KERNEL | ||
| 1419 | depends on KPROBES | ||
| 1420 | default n | ||
| 1421 | help | ||
| 1422 | This option provides for testing basic kprobes functionality on | ||
| 1423 | boot. A sample kprobe, jprobe and kretprobe are inserted and | ||
| 1424 | verified for functionality. | ||
| 1425 | |||
| 1426 | Say N if you are unsure. | ||
| 1427 | |||
| 1428 | config BACKTRACE_SELF_TEST | ||
| 1429 | tristate "Self test for the backtrace code" | ||
| 1430 | depends on DEBUG_KERNEL | ||
| 1431 | default n | ||
| 1432 | help | ||
| 1433 | This option provides a kernel module that can be used to test | ||
| 1434 | the kernel stack backtrace code. This option is not useful | ||
| 1435 | for distributions or general kernels, but only for kernel | ||
| 1436 | developers working on architecture code. | ||
| 1437 | |||
| 1438 | Note that if you want to also test saved backtraces, you will | ||
| 1439 | have to enable STACKTRACE as well. | ||
| 1440 | |||
| 1441 | Say N if you are unsure. | ||
| 1442 | |||
| 1329 | config RBTREE_TEST | 1443 | config RBTREE_TEST |
| 1330 | tristate "Red-Black tree test" | 1444 | tristate "Red-Black tree test" |
| 1331 | depends on m && DEBUG_KERNEL | 1445 | depends on m && DEBUG_KERNEL |
| @@ -1339,6 +1453,34 @@ config INTERVAL_TREE_TEST | |||
| 1339 | help | 1453 | help |
| 1340 | A benchmark measuring the performance of the interval tree library | 1454 | A benchmark measuring the performance of the interval tree library |
| 1341 | 1455 | ||
| 1456 | config ATOMIC64_SELFTEST | ||
| 1457 | bool "Perform an atomic64_t self-test at boot" | ||
| 1458 | help | ||
| 1459 | Enable this option to test the atomic64_t functions at boot. | ||
| 1460 | |||
| 1461 | If unsure, say N. | ||
| 1462 | |||
| 1463 | config ASYNC_RAID6_TEST | ||
| 1464 | tristate "Self test for hardware accelerated raid6 recovery" | ||
| 1465 | depends on ASYNC_RAID6_RECOV | ||
| 1466 | select ASYNC_MEMCPY | ||
| 1467 | ---help--- | ||
| 1468 | This is a one-shot self test that permutes through the | ||
| 1469 | recovery of all the possible two disk failure scenarios for a | ||
| 1470 | N-disk array. Recovery is performed with the asynchronous | ||
| 1471 | raid6 recovery routines, and will optionally use an offload | ||
| 1472 | engine if one is available. | ||
| 1473 | |||
| 1474 | If unsure, say N. | ||
| 1475 | |||
| 1476 | config TEST_STRING_HELPERS | ||
| 1477 | tristate "Test functions located in the string_helpers module at runtime" | ||
| 1478 | |||
| 1479 | config TEST_KSTRTOX | ||
| 1480 | tristate "Test kstrto*() family of functions at runtime" | ||
| 1481 | |||
| 1482 | endmenu # runtime tests | ||
| 1483 | |||
| 1342 | config PROVIDE_OHCI1394_DMA_INIT | 1484 | config PROVIDE_OHCI1394_DMA_INIT |
| 1343 | bool "Remote debugging over FireWire early on boot" | 1485 | bool "Remote debugging over FireWire early on boot" |
| 1344 | depends on PCI && X86 | 1486 | depends on PCI && X86 |
| @@ -1388,75 +1530,6 @@ config BUILD_DOCSRC | |||
| 1388 | 1530 | ||
| 1389 | Say N if you are unsure. | 1531 | Say N if you are unsure. |
| 1390 | 1532 | ||
| 1391 | config DYNAMIC_DEBUG | ||
| 1392 | bool "Enable dynamic printk() support" | ||
| 1393 | default n | ||
| 1394 | depends on PRINTK | ||
| 1395 | depends on DEBUG_FS | ||
| 1396 | help | ||
| 1397 | |||
| 1398 | Compiles debug level messages into the kernel, which would not | ||
| 1399 | otherwise be available at runtime. These messages can then be | ||
| 1400 | enabled/disabled based on various levels of scope - per source file, | ||
| 1401 | function, module, format string, and line number. This mechanism | ||
| 1402 | implicitly compiles in all pr_debug() and dev_dbg() calls, which | ||
| 1403 | enlarges the kernel text size by about 2%. | ||
| 1404 | |||
| 1405 | If a source file is compiled with DEBUG flag set, any | ||
| 1406 | pr_debug() calls in it are enabled by default, but can be | ||
| 1407 | disabled at runtime as below. Note that DEBUG flag is | ||
| 1408 | turned on by many CONFIG_*DEBUG* options. | ||
| 1409 | |||
| 1410 | Usage: | ||
| 1411 | |||
| 1412 | Dynamic debugging is controlled via the 'dynamic_debug/control' file, | ||
| 1413 | which is contained in the 'debugfs' filesystem. Thus, the debugfs | ||
| 1414 | filesystem must first be mounted before making use of this feature. | ||
| 1415 | We refer the control file as: <debugfs>/dynamic_debug/control. This | ||
| 1416 | file contains a list of the debug statements that can be enabled. The | ||
| 1417 | format for each line of the file is: | ||
| 1418 | |||
| 1419 | filename:lineno [module]function flags format | ||
| 1420 | |||
| 1421 | filename : source file of the debug statement | ||
| 1422 | lineno : line number of the debug statement | ||
| 1423 | module : module that contains the debug statement | ||
| 1424 | function : function that contains the debug statement | ||
| 1425 | flags : '=p' means the line is turned 'on' for printing | ||
| 1426 | format : the format used for the debug statement | ||
| 1427 | |||
| 1428 | From a live system: | ||
| 1429 | |||
| 1430 | nullarbor:~ # cat <debugfs>/dynamic_debug/control | ||
| 1431 | # filename:lineno [module]function flags format | ||
| 1432 | fs/aio.c:222 [aio]__put_ioctx =_ "__put_ioctx:\040freeing\040%p\012" | ||
| 1433 | fs/aio.c:248 [aio]ioctx_alloc =_ "ENOMEM:\040nr_events\040too\040high\012" | ||
| 1434 | fs/aio.c:1770 [aio]sys_io_cancel =_ "calling\040cancel\012" | ||
| 1435 | |||
| 1436 | Example usage: | ||
| 1437 | |||
| 1438 | // enable the message at line 1603 of file svcsock.c | ||
| 1439 | nullarbor:~ # echo -n 'file svcsock.c line 1603 +p' > | ||
| 1440 | <debugfs>/dynamic_debug/control | ||
| 1441 | |||
| 1442 | // enable all the messages in file svcsock.c | ||
| 1443 | nullarbor:~ # echo -n 'file svcsock.c +p' > | ||
| 1444 | <debugfs>/dynamic_debug/control | ||
| 1445 | |||
| 1446 | // enable all the messages in the NFS server module | ||
| 1447 | nullarbor:~ # echo -n 'module nfsd +p' > | ||
| 1448 | <debugfs>/dynamic_debug/control | ||
| 1449 | |||
| 1450 | // enable all 12 messages in the function svc_process() | ||
| 1451 | nullarbor:~ # echo -n 'func svc_process +p' > | ||
| 1452 | <debugfs>/dynamic_debug/control | ||
| 1453 | |||
| 1454 | // disable all 12 messages in the function svc_process() | ||
| 1455 | nullarbor:~ # echo -n 'func svc_process -p' > | ||
| 1456 | <debugfs>/dynamic_debug/control | ||
| 1457 | |||
| 1458 | See Documentation/dynamic-debug-howto.txt for additional information. | ||
| 1459 | |||
| 1460 | config DMA_API_DEBUG | 1533 | config DMA_API_DEBUG |
| 1461 | bool "Enable debugging of DMA-API usage" | 1534 | bool "Enable debugging of DMA-API usage" |
| 1462 | depends on HAVE_DMA_API_DEBUG | 1535 | depends on HAVE_DMA_API_DEBUG |
| @@ -1468,34 +1541,7 @@ config DMA_API_DEBUG | |||
| 1468 | This option causes a performance degredation. Use only if you want | 1541 | This option causes a performance degredation. Use only if you want |
| 1469 | to debug device drivers. If unsure, say N. | 1542 | to debug device drivers. If unsure, say N. |
| 1470 | 1543 | ||
| 1471 | config ATOMIC64_SELFTEST | ||
| 1472 | bool "Perform an atomic64_t self-test at boot" | ||
| 1473 | help | ||
| 1474 | Enable this option to test the atomic64_t functions at boot. | ||
| 1475 | |||
| 1476 | If unsure, say N. | ||
| 1477 | |||
| 1478 | config ASYNC_RAID6_TEST | ||
| 1479 | tristate "Self test for hardware accelerated raid6 recovery" | ||
| 1480 | depends on ASYNC_RAID6_RECOV | ||
| 1481 | select ASYNC_MEMCPY | ||
| 1482 | ---help--- | ||
| 1483 | This is a one-shot self test that permutes through the | ||
| 1484 | recovery of all the possible two disk failure scenarios for a | ||
| 1485 | N-disk array. Recovery is performed with the asynchronous | ||
| 1486 | raid6 recovery routines, and will optionally use an offload | ||
| 1487 | engine if one is available. | ||
| 1488 | |||
| 1489 | If unsure, say N. | ||
| 1490 | |||
| 1491 | source "samples/Kconfig" | 1544 | source "samples/Kconfig" |
| 1492 | 1545 | ||
| 1493 | source "lib/Kconfig.kgdb" | 1546 | source "lib/Kconfig.kgdb" |
| 1494 | 1547 | ||
| 1495 | source "lib/Kconfig.kmemcheck" | ||
| 1496 | |||
| 1497 | config TEST_STRING_HELPERS | ||
| 1498 | tristate "Test functions located in the string_helpers module at runtime" | ||
| 1499 | |||
| 1500 | config TEST_KSTRTOX | ||
| 1501 | tristate "Test kstrto*() family of functions at runtime" | ||
