From: Zachary Amsden <zach@vmware.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>,
Arjan van de Ven <arjan@infradead.org>,
Linus Torvalds <torvalds@osdl.org>,
jakub@redhat.com, rusty@rustcorp.com.au, kraxel@suse.de,
linux-kernel@vger.kernel.org
Subject: Re: [patch 1/3] vdso: print fatal signals
Date: Tue, 23 May 2006 15:11:01 -0700 [thread overview]
Message-ID: <44738875.90206@vmware.com> (raw)
In-Reply-To: <20060523000119.GB9934@elte.hu>
Ingo Molnar wrote:
> Index: linux-vdso-rand.q/kernel/signal.c
> ===================================================================
> --- linux-vdso-rand.q.orig/kernel/signal.c
> +++ linux-vdso-rand.q/kernel/signal.c
> @@ -763,6 +763,37 @@ out_set:
> #define LEGACY_QUEUE(sigptr, sig) \
> (((sig) < SIGRTMIN) && sigismember(&(sigptr)->signal, (sig)))
>
> +int print_fatal_signals = 0;
> +
> +static void print_fatal_signal(struct pt_regs *regs, int signr)
> +{
> + printk("%s/%d: potentially unexpected fatal signal %d.\n",
> + current->comm, current->pid, signr);
> +
> +#ifdef __i386__
> + printk("code at %08lx: ", regs->eip);
> + {
> + int i;
> + for (i = 0; i < 16; i++) {
> + unsigned char insn;
> +
> + __get_user(insn, (unsigned char *)(regs->eip + i));
> + printk("%02x ", insn);
> + }
> + }
> +#endif
>
This looks ok for debugging boot problems. Perhaps you could print the
registers too? The instruction dump won't help much for indirect access.
The get_user of eip+i is ok, but doesn't account for segment offsets.
Not that I think it needs to here. But it is one of a many growing
number of places that now try to inspect or modify a potentially
segmented area of memory (page fault handler must inspect for prefetch
instructions, kprobes reads and patches code, FPU emulation). Perhaps a
common interface would be a nice thing at some point in time.
Zach
prev parent reply other threads:[~2006-05-23 22:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-23 0:01 [patch 1/3] vdso: print fatal signals Ingo Molnar
2006-05-23 22:11 ` Zachary Amsden [this message]
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=44738875.90206@vmware.com \
--to=zach@vmware.com \
--cc=akpm@osdl.org \
--cc=arjan@infradead.org \
--cc=jakub@redhat.com \
--cc=kraxel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=torvalds@osdl.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