From: Chuck Ebbert <76306.1226@compuserve.com>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: Andi Kleen <ak@suse.de>, linux-kernel <linux-kernel@vger.kernel.org>
Subject: x86_64 GPF handler (was: [PATCH] remove errornous semicolon)
Date: Wed, 24 Nov 2004 00:23:23 -0500 [thread overview]
Message-ID: <200411240026_MC3-1-8F47-CE27@compuserve.com> (raw)
Jesper Juhl wrote:
> arch/i386/kernel/traps.c: In function `do_general_protection':
> arch/i386/kernel/traps.c:506: warning: empty body in an if-statement
>
> upon inspecting the code I see what looks like a mistakenly placed ";"
>
> if (!fixup_exception(regs)) {
> if (notify_die(DIE_GPF, "general protection fault", regs,
> error_code, 13, SIGSEGV) == NOTIFY_STOP);
> return;
> die("general protection fault", regs, error_code);
> }
Ouch. No matter what the notifier chain returns it will be treated
as if it returned NOTIFY_STOP, and no kernel-mode GPF will ever reach
the die().
This bug was introduced 31 Aug 04 by prasanna@in.ibm.com during a
kprobes update. The comments say it was ported from x86_64, so I had
a look:
/* kernel gp */
{
const struct exception_table_entry *fixup;
fixup = search_exception_tables(regs->rip);
if (fixup) {
regs->rip = fixup->fixup;
return;
}
notify_die(DIE_GPF, "general protection fault", regs, error_code,
13, SIGSEGV);
die("general protection fault", regs, error_code);
}
x86_64 never checks the result of notify_die() and unconditionally does a die().
I don't know if this is a bug or not...
Andi, if this is not a bug could you explain why not?
--Chuck Ebbert 24-Nov-04 00:23:50
next reply other threads:[~2004-11-24 5:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-24 5:23 Chuck Ebbert [this message]
2004-11-24 10:43 ` x86_64 GPF handler (was: [PATCH] remove errornous semicolon) Andi Kleen
2004-11-24 11:45 ` Prasanna S Panchamukhi
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=200411240026_MC3-1-8F47-CE27@compuserve.com \
--to=76306.1226@compuserve.com \
--cc=ak@suse.de \
--cc=juhl-lkml@dif.dk \
--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