From: Andi Kleen <ak@muc.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
linux-kernel@vger.kernel.org, Hugh Dickens <hugh@veritas.com>,
Michael Ellerman <michael@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH RFC 1/4] Generic BUG handling.
Date: 29 Sep 2006 11:13:19 +0200
Date: Fri, 29 Sep 2006 11:13:19 +0200 [thread overview]
Message-ID: <20060929091319.GB41098@muc.de> (raw)
In-Reply-To: <20060929021019.19058b98.akpm@osdl.org>
On Fri, Sep 29, 2006 at 02:10:19AM -0700, Andrew Morton wrote:
> On 29 Sep 2006 10:57:45 +0200
> Andi Kleen <ak@muc.de> wrote:
>
> > > Some architectures (powerpc) implement WARN using the same mechanism;
> > > if the illegal instruction was the result of a WARN, then report_bug()
> > > returns 1; otherwise it returns 0.
> >
> > In theory we could do that on x86 too (and skipping the instruction),
> > the only problem
> > is that the only guaranteed to fault opcode is ud2 :/. Ok maybe we could
> > reserve some int XXX vector.
> >
> > % gid WARN_ON | grep -v arch | wc -l
> > 299
>
> powerpc sets a bit in the __LINE__ number to indicate that it was a
> WARN_ON. That'll work on all architectures.
We still would need an architecture dependent way to skip the opcode
though (just returning would raise it again). On x86
regs->eip += 2 (rip on x86-64)
should be enough
-Andi
next prev parent reply other threads:[~2006-09-29 9:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20060928225444.439520197@goop.org>
[not found] ` <20060928225452.229936605@goop.org>
2006-09-28 23:32 ` [PATCH RFC 1/4] Generic BUG handling Andrew Morton
2006-09-28 23:43 ` Jeremy Fitzhardinge
2006-09-29 0:07 ` Andrew Morton
2006-09-29 5:07 ` Michael Ellerman
2006-09-29 8:41 ` Jeremy Fitzhardinge
2006-09-29 8:49 ` Michael Ellerman
2006-09-29 8:52 ` Andrew Morton
2006-09-29 19:44 ` Jeremy Fitzhardinge
2006-09-29 19:54 ` Andrew Morton
2006-09-29 8:57 ` Andi Kleen
2006-09-29 9:10 ` Andrew Morton
2006-09-29 9:13 ` Andi Kleen [this message]
2006-09-29 9:18 ` Andrew Morton
2006-09-29 9:16 ` Andrew Morton
2006-09-29 9:33 ` Jeremy Fitzhardinge
2006-09-29 9:36 ` Jeremy Fitzhardinge
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=20060929091319.GB41098@muc.de \
--to=ak@muc.de \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@ellerman.id.au \
--cc=paulus@samba.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