diff options
-rw-r--r-- | Documentation/sysctl/kernel.txt | 8 | ||||
-rw-r--r-- | arch/i386/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/traps.c | 2 | ||||
-rw-r--r-- | include/asm-x86_64/stacktrace.h | 2 | ||||
-rw-r--r-- | kernel/sysctl.c | 9 |
5 files changed, 21 insertions, 2 deletions
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 0bc7f1e3c9e6..5922e84d9133 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
@@ -27,6 +27,7 @@ show up in /proc/sys/kernel: | |||
27 | - hotplug | 27 | - hotplug |
28 | - java-appletviewer [ binfmt_java, obsolete ] | 28 | - java-appletviewer [ binfmt_java, obsolete ] |
29 | - java-interpreter [ binfmt_java, obsolete ] | 29 | - java-interpreter [ binfmt_java, obsolete ] |
30 | - kstack_depth_to_print [ X86 only ] | ||
30 | - l2cr [ PPC only ] | 31 | - l2cr [ PPC only ] |
31 | - modprobe ==> Documentation/kmod.txt | 32 | - modprobe ==> Documentation/kmod.txt |
32 | - msgmax | 33 | - msgmax |
@@ -170,6 +171,13 @@ This flag controls the L2 cache of G3 processor boards. If | |||
170 | 171 | ||
171 | ============================================================== | 172 | ============================================================== |
172 | 173 | ||
174 | kstack_depth_to_print: (X86 only) | ||
175 | |||
176 | Controls the number of words to print when dumping the raw | ||
177 | kernel stack. | ||
178 | |||
179 | ============================================================== | ||
180 | |||
173 | osrelease, ostype & version: | 181 | osrelease, ostype & version: |
174 | 182 | ||
175 | # cat osrelease | 183 | # cat osrelease |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index 7b2f9f022089..1d48a75fa338 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -91,7 +91,7 @@ asmlinkage void alignment_check(void); | |||
91 | asmlinkage void spurious_interrupt_bug(void); | 91 | asmlinkage void spurious_interrupt_bug(void); |
92 | asmlinkage void machine_check(void); | 92 | asmlinkage void machine_check(void); |
93 | 93 | ||
94 | static int kstack_depth_to_print = 24; | 94 | int kstack_depth_to_print = 24; |
95 | #ifdef CONFIG_STACK_UNWIND | 95 | #ifdef CONFIG_STACK_UNWIND |
96 | static int call_trace = 1; | 96 | static int call_trace = 1; |
97 | #else | 97 | #else |
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c index 264db33476ab..75ceccee178c 100644 --- a/arch/x86_64/kernel/traps.c +++ b/arch/x86_64/kernel/traps.c | |||
@@ -108,7 +108,7 @@ static inline void preempt_conditional_cli(struct pt_regs *regs) | |||
108 | preempt_enable_no_resched(); | 108 | preempt_enable_no_resched(); |
109 | } | 109 | } |
110 | 110 | ||
111 | static int kstack_depth_to_print = 12; | 111 | int kstack_depth_to_print = 12; |
112 | #ifdef CONFIG_STACK_UNWIND | 112 | #ifdef CONFIG_STACK_UNWIND |
113 | static int call_trace = 1; | 113 | static int call_trace = 1; |
114 | #else | 114 | #else |
diff --git a/include/asm-x86_64/stacktrace.h b/include/asm-x86_64/stacktrace.h index 5eb9799bef76..6f0b54594307 100644 --- a/include/asm-x86_64/stacktrace.h +++ b/include/asm-x86_64/stacktrace.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_STACKTRACE_H | 1 | #ifndef _ASM_STACKTRACE_H |
2 | #define _ASM_STACKTRACE_H 1 | 2 | #define _ASM_STACKTRACE_H 1 |
3 | 3 | ||
4 | extern int kstack_depth_to_print; | ||
5 | |||
4 | /* Generic stack tracer with callbacks */ | 6 | /* Generic stack tracer with callbacks */ |
5 | 7 | ||
6 | struct stacktrace_ops { | 8 | struct stacktrace_ops { |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 09e569f4792b..6fc5e17086f4 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -54,6 +54,7 @@ extern int proc_nr_files(ctl_table *table, int write, struct file *filp, | |||
54 | 54 | ||
55 | #ifdef CONFIG_X86 | 55 | #ifdef CONFIG_X86 |
56 | #include <asm/nmi.h> | 56 | #include <asm/nmi.h> |
57 | #include <asm/stacktrace.h> | ||
57 | #endif | 58 | #endif |
58 | 59 | ||
59 | #if defined(CONFIG_SYSCTL) | 60 | #if defined(CONFIG_SYSCTL) |
@@ -707,6 +708,14 @@ static ctl_table kern_table[] = { | |||
707 | .mode = 0444, | 708 | .mode = 0444, |
708 | .proc_handler = &proc_dointvec, | 709 | .proc_handler = &proc_dointvec, |
709 | }, | 710 | }, |
711 | { | ||
712 | .ctl_name = CTL_UNNUMBERED, | ||
713 | .procname = "kstack_depth_to_print", | ||
714 | .data = &kstack_depth_to_print, | ||
715 | .maxlen = sizeof(int), | ||
716 | .mode = 0644, | ||
717 | .proc_handler = &proc_dointvec, | ||
718 | }, | ||
710 | #endif | 719 | #endif |
711 | #if defined(CONFIG_MMU) | 720 | #if defined(CONFIG_MMU) |
712 | { | 721 | { |