On Tue, 5 Jun 2007 14:52:44 -0700
[email protected] (Masoud Asgharifard Sharbiani) wrote:
> Hello,
> This patch makes the i386 behave the same way that x86_64 does when a
> segfault happens. A line gets printed to the kernel log so that tools
> that need to check for failures can behave more uniformly between
> different kernels. Like x86_64, it can be disabled by setting
> debug.exception-trace sysctl variable to 0 (or by doing
> echo 0 > /proc/sys/debug/exception-trace)
>
> Same behaviour can be extended to other architectures, if needed.
> cheers,
> Masoud.
>
>
> +#ifdef CONFIG_SYSCTL
> +#include <linux/sysctl.h>
> +
> +extern int exception_trace;
> +
> +static ctl_table debug_table2[] = {
> + {
> + .ctl_name = 99,
> + .procname = "exception-trace",
> + .data = &exception_trace,
> + .maxlen = sizeof(int),
> + .mode = 0644,
> + .proc_handler = proc_dointvec
> + },
> + {}
> +};
> +
> +static ctl_table debug_root_table2[] = {
> + {
> + .ctl_name = CTL_DEBUG,
> + .procname = "debug",
> + .mode = 0555,
> + .child = debug_table2
> + },
> + {}
> +};
> +
> +static __init int i386_sysctl_init(void)
> +{
> + register_sysctl_table(debug_root_table2);
> + return 0;
> +}
> +__initcall(i386_sysctl_init);
> +#endif
There's still quite a bit of duplication here.
Perhaps we could move this sysctl stuff into kernel/sysctl.c (under a new
CONFIG_EXCEPTION_TRACE (which seems a poor name - maybe
CONFIG_REPORT_UNHANDLED_SIGNALS?))
akpm:/usr/src/25> grep -r exception_trace Documentation
akpm:/usr/src/25>
ho hum.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]