diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-07-16 02:40:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-16 12:05:43 -0400 |
commit | 45807a1df9f51d28d0ff0c6bcf900c210411d7c9 (patch) | |
tree | df70e9162ce50ada2393987ca2a5b5794dcbb644 /kernel/sysctl.c | |
parent | 99fc06df72fe1c9ad3ec274720dcb5658c40bfd2 (diff) |
vdso: print fatal signals
Add the print-fatal-signals=1 boot option and the
/proc/sys/kernel/print-fatal-signals runtime switch.
This feature prints some minimal information about userspace segfaults to
the kernel console. This is useful to find early bootup bugs where
userspace debugging is very hard.
Defaults to off.
[akpm@linux-foundation.org: Don't add new sysctl numbers]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sysctl.c')
-rw-r--r-- | kernel/sysctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index ccaebbbd75ae..2cce2286bdcd 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -61,6 +61,7 @@ extern int proc_nr_files(ctl_table *table, int write, struct file *filp, | |||
61 | 61 | ||
62 | /* External variables not in a header file. */ | 62 | /* External variables not in a header file. */ |
63 | extern int C_A_D; | 63 | extern int C_A_D; |
64 | extern int print_fatal_signals; | ||
64 | extern int sysctl_overcommit_memory; | 65 | extern int sysctl_overcommit_memory; |
65 | extern int sysctl_overcommit_ratio; | 66 | extern int sysctl_overcommit_ratio; |
66 | extern int sysctl_panic_on_oom; | 67 | extern int sysctl_panic_on_oom; |
@@ -340,6 +341,14 @@ static ctl_table kern_table[] = { | |||
340 | .proc_handler = &proc_dointvec, | 341 | .proc_handler = &proc_dointvec, |
341 | }, | 342 | }, |
342 | #endif | 343 | #endif |
344 | { | ||
345 | .ctl_name = CTL_UNNUMBERED, | ||
346 | .procname = "print-fatal-signals", | ||
347 | .data = &print_fatal_signals, | ||
348 | .maxlen = sizeof(int), | ||
349 | .mode = 0644, | ||
350 | .proc_handler = &proc_dointvec, | ||
351 | }, | ||
343 | #ifdef __sparc__ | 352 | #ifdef __sparc__ |
344 | { | 353 | { |
345 | .ctl_name = KERN_SPARC_REBOOT, | 354 | .ctl_name = KERN_SPARC_REBOOT, |