From: Kyle McMartin <kyle@mcmartin.ca>
To: Randolph Chung <randolph@tausq.org>
Cc: Helge Deller <deller@gmx.de>,
linux-parisc@vger.kernel.org, Kyle McMartin <kyle@mcmartin.ca>
Subject: Re: [PATCH] fix unwind crash - was: Re: 2.6.26 kernel crash
Date: Wed, 6 Aug 2008 15:41:25 -0400 [thread overview]
Message-ID: <20080806194125.GA3281@phobos.i.cabal.ca> (raw)
In-Reply-To: <1e3eba760808030726l93f60dftdcec0c487933129b@mail.gmail.com>
On Sun, Aug 03, 2008 at 07:26:48AM -0700, Randolph Chung wrote:
> (Apologize for my earlier html mail - resent in a more proper format)
>
> Helge, your patch doesn't look quite right.
>
> The kernel unwinder is only supposed to be called for kernel
> addresses. Kyle says he thinks he knows what is wrong so he's going to
> poke at it.
>
> Maybe we can make the kernel unwinder more robust against invalid
> addresses passed to it though.
>
I think this will fix the problem, though I should audit show_stack
callers to make sure.
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 675f1d0..721d281 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -121,11 +121,12 @@ static void print_fr(char *level, struct pt_regs *regs)
void show_regs(struct pt_regs *regs)
{
- int i;
+ int i, user;
char *level;
unsigned long cr30, cr31;
- level = user_mode(regs) ? KERN_DEBUG : KERN_CRIT;
+ user = !!user_mode(regs);
+ level = user ? KERN_DEBUG : KERN_CRIT;
print_gr(level, regs);
@@ -152,7 +153,8 @@ void show_regs(struct pt_regs *regs)
printk(level);
print_symbol(" RP(r2): %s\n", regs->gr[2]);
- parisc_show_stack(current, NULL, regs);
+ if (!user)
+ parisc_show_stack(current, NULL, regs);
}
next prev parent reply other threads:[~2008-08-06 19:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-20 16:46 2.6.26 kernel crash Helge Deller
2008-07-20 17:07 ` Helge Deller
2008-07-20 17:38 ` John David Anglin
2008-07-29 20:31 ` [PATCH] fix unwind crash - was: " Helge Deller
2008-08-01 22:15 ` Helge Deller
2008-08-03 14:26 ` Randolph Chung
2008-08-06 19:41 ` Kyle McMartin [this message]
2008-08-07 1:48 ` Carlos O'Donell
2008-08-08 12:56 ` Carlos O'Donell
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=20080806194125.GA3281@phobos.i.cabal.ca \
--to=kyle@mcmartin.ca \
--cc=deller@gmx.de \
--cc=linux-parisc@vger.kernel.org \
--cc=randolph@tausq.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