From: Sean Kamath <skamath@anim.dreamworks.com>
To: linux-kernel@vger.kernel.org
Subject: Question about Kernel Reporting Sigfaults in <arch>/mm/fault.c
Date: Thu, 06 Jul 2006 15:26:39 -0700 [thread overview]
Message-ID: <44AD8E1F.2020509@anim.dreamworks.com> (raw)
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
next reply other threads:[~2006-07-06 22:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 22:26 Sean Kamath [this message]
2006-07-07 12:19 ` Question about Kernel Reporting Sigfaults in <arch>/mm/fault.c Andi Kleen
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=44AD8E1F.2020509@anim.dreamworks.com \
--to=skamath@anim.dreamworks.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox