All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: masouds@google.com (Masoud Asgharifard Sharbiani)
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make i386 kernel show the segfaults in kernel dmesg, like x86_64.
Date: Thu, 7 Jun 2007 15:41:21 -0700	[thread overview]
Message-ID: <20070607154121.2ecd1212.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070605215242.GA16967@google.com>

On Tue, 5 Jun 2007 14:52:44 -0700
masouds@google.com (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.

  reply	other threads:[~2007-06-07 22:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-05 21:52 [PATCH] Make i386 kernel show the segfaults in kernel dmesg, like x86_64 Masoud Asgharifard Sharbiani
2007-06-07 22:41 ` Andrew Morton [this message]
     [not found] <fa.FB3wQKN6ltiEi81XcB14YVcLGgE@ifi.uio.no>
2007-06-08  2:04 ` Robert Hancock
2007-06-08  2:34   ` Andrew Morton
2007-06-08  3:50   ` Masoud Sharbiani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070607154121.2ecd1212.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masouds@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.