diff options
author | Dave Hansen <dave@linux.vnet.ibm.com> | 2013-07-01 16:04:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-04 14:25:39 -0400 |
commit | d1a1dc0be866219f7a613c6368c6a036b8eefe03 (patch) | |
tree | 3e82bc03670f24e26cb340278e6bc2abd8f7f54b | |
parent | 8bb495e3f02401ee6f76d1b1d77f3ac9f079e376 (diff) |
consolidate per-arch stack overflow debugging options
Original posting:
http://lkml.kernel.org/r/20121214184202.F54094D9@kernel.stglabs.ibm.com
Several architectures have similar stack debugging config options.
They all pretty much do the same thing, some with slightly
differing help text.
This patch changes the architectures to instead enable a Kconfig
boolean, and then use that boolean in the generic Kconfig.debug
to present the actual menu option. This removes a bunch of
duplication and adds consistency across arches.
Signed-off-by: Dave Hansen <dave@linux.vnet.ibm.com>
Reviewed-by: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com> [for tile]
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-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 | 21 |
24 files changed, 33 insertions, 90 deletions
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 5917099470ea..cff2aad31041 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 a117652b5fea..82707a77aa73 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 7a58ab933b20..7aae1ef096ea 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 6507dabdd5dd..ffcd557f8cfd 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 c33e3ad2c8fd..a4f5959ed9b0 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 863d877e0b5f..a4914f373958 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 fe120da25625..22f30337a18e 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -121,6 +121,7 @@ config X86 | |||
121 | select OLD_SIGACTION if X86_32 | 121 | select OLD_SIGACTION if X86_32 |
122 | select COMPAT_OLD_SIGACTION if IA32_EMULATION | 122 | select COMPAT_OLD_SIGACTION if IA32_EMULATION |
123 | select RTC_LIB | 123 | select RTC_LIB |
124 | select HAVE_DEBUG_STACKOVERFLOW | ||
124 | 125 | ||
125 | config INSTRUCTION_DECODER | 126 | config INSTRUCTION_DECODER |
126 | def_bool y | 127 | def_bool y |
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index c198b7e13e7b..c1665a8989da 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 566cf2bc08ea..cc443bc6edfc 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -1475,6 +1475,27 @@ config ASYNC_RAID6_TEST | |||
1475 | 1475 | ||
1476 | If unsure, say N. | 1476 | If unsure, say N. |
1477 | 1477 | ||
1478 | config HAVE_DEBUG_STACKOVERFLOW | ||
1479 | bool | ||
1480 | |||
1481 | config DEBUG_STACKOVERFLOW | ||
1482 | bool "Check for stack overflows" | ||
1483 | depends on DEBUG_KERNEL && HAVE_DEBUG_STACKOVERFLOW | ||
1484 | ---help--- | ||
1485 | Say Y here if you want to check for overflows of kernel, IRQ | ||
1486 | and exception stacks (if your archicture uses them). This | ||
1487 | option will show detailed messages if free stack space drops | ||
1488 | below a certain limit. | ||
1489 | |||
1490 | These kinds of bugs usually occur when call-chains in the | ||
1491 | kernel get too deep, especially when interrupts are | ||
1492 | involved. | ||
1493 | |||
1494 | Use this in cases where you see apparently random memory | ||
1495 | corruption, especially if it appears in 'struct thread_info' | ||
1496 | |||
1497 | If in doubt, say "N". | ||
1498 | |||
1478 | source "samples/Kconfig" | 1499 | source "samples/Kconfig" |
1479 | 1500 | ||
1480 | source "lib/Kconfig.kgdb" | 1501 | source "lib/Kconfig.kgdb" |