public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Question about Kernel Reporting Sigfaults in <arch>/mm/fault.c
@ 2006-07-06 22:26 Sean Kamath
  2006-07-07 12:19 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Sean Kamath @ 2006-07-06 22:26 UTC (permalink / raw)
  To: linux-kernel

Hi.

[All lines are from 2.6.16's latest git repository from kernel.org.]

We recently started noticing error messages showing up in the messages file
every time a user process segfaulted.  Doing some investigation, it turns
out it's only on x86_64 boxen (the other boxes are i386).  We traced this
down to arch/x86_64/mm/fault.c:do_page_fault() (under bad_area_nosemaphore):

478 if (exception_trace && unhandled_signal(tsk, SIGSEGV)) {
479 	printk(
480 	"%s%s[%d]: segfault at %016lx rip %016lx rsp %016lx error %lx\n",
481 		tsk->pid > 1 ? KERN_INFO : KERN_EMERG,
482 		tsk->comm, tsk->pid, address, regs->rip,
483 		regs->rsp, error_code);
484 }

exception_trace is set to 1 (line 296) and not used anywhere else in the file.

arch/i386/mm/fault.c does not have this.
arch/sparc64/mm/fault.c does not have this.

Oddly, sparc/mm/fault.c *does* have (a version of) this, only ifdef'ed out:

319 #if 0
320 	printk("Fault whee %s [%d]: segfaults at %08lx pc=%08lx\n",
321 	tsk->comm, tsk->pid, address, regs->pc);
322 #endif

This leads me to suspect that the segfault reporting in in x86_64 is
vestigial from a time when it was helpful.

The question(s): Is this intentional (to have segfaults reported on x86_64,
and (possibly) nothing else)?  Or was "exception_trace" supposed to be a
flag but never fleshed out?

I admit, it would be nice to be able to toggle on and off segfault
reporting in the kernel (from a system administration point of view, this
is helpful to be able to go back to developers and say 'your program is
crashing a lot' -- something necessary if you are protecting end-users from
a lot of core files . . .) on all platforms.

Sean

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-07 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-06 22:26 Question about Kernel Reporting Sigfaults in <arch>/mm/fault.c Sean Kamath
2006-07-07 12:19 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox