From: Ben Hutchings <ben@decadent.org.uk>
To: Paul Mundt <lethal@linux-sh.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
David Woodhouse <dwmw2@infradead.org>,
linux-pci@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-parisc@vger.kernel.org, linuxppc-dev@ozlabs.org,
linux-s390@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/4] panic: Allow taint flag for warnings to be changed from TAINT_WARN
Date: Tue, 23 Mar 2010 13:23:00 +0000 [thread overview]
Message-ID: <1269350580.18314.260.camel@localhost> (raw)
In-Reply-To: <20100323074546.GK13417@linux-sh.org>
[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]
On Tue, 2010-03-23 at 16:45 +0900, Paul Mundt wrote:
> On Sat, Mar 20, 2010 at 11:05:40PM +0000, Ben Hutchings wrote:
> > WARN() is used in some places to report firmware or hardware bugs that
> > are then worked-around. These bugs do not affect the stability of the
> > kernel and should not set the usual TAINT_WARN flag. To allow for
> > this, add WARN_TAINT() and WARN_TAINT_ONCE() macros that take a taint
> > flag as argument.
> >
> > Architectures that implement warnings using trap instructions instead
> > of calls to warn_slowpath_*() must now implement __WARN_TAINT(taint)
> > instead of __WARN().
> >
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > ---
> > The architecture-specific changes here are untested and need to be
> > reviewed by architecture maintainers.
> >
> I'm a bit confused about how this is supposed to work, the TAINT_xxx
> values are bit positions presently from 0 to 10, while BUGFLAG_xxx are
> ranged from 0 up. You've set up BUGFLAG_TAINT() to that the TAINT_xxx
> value is shifted up 8 bits but neglected the fact that the trap type is
> 16-bits on most (all?) of the platforms using trap-based BUG handling.
>
> If the 'taint' in question is just the TAINT_xxx value by itself and will
> never be a bitmap then that's fine, but there's certainly not enough room
> to pass the bitmap in on top of the bugflag otherwise (I don't know if
> this is your intention or not though).
Yes, the taint value must be a bit number not a flag. Sloppy wording on
my part.
> Also note that some platforms (like SH) implement additional bugflags, so
> we at least want to keep the lower byte available for architecture
> private use.
I noticed, that's why I started at 8 not 1.
> Having said that, the current patch does work for me, although I'm a bit
> nervous about someone thinking it's ok to pass in a taint bitmap here.
We can maybe use BUILD_BUG_ON() here as the taint bit is already
required to be a compile-time constant.
Ben.
> Tested-by: Paul Mundt <lethal@linux-sh.org>
>
--
Ben Hutchings
Any smoothly functioning technology is indistinguishable from a rigged demo.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Ben Hutchings <ben@decadent.org.uk>
To: Paul Mundt <lethal@linux-sh.org>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
David Woodhouse <dwmw2@infradead.org>,
linux-pci@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-parisc@vger.kernel.org, linuxppc-dev@ozlabs.org,
linux-s390@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/4] panic: Allow taint flag for warnings to be changed
Date: Tue, 23 Mar 2010 13:23:00 +0000 [thread overview]
Message-ID: <1269350580.18314.260.camel@localhost> (raw)
In-Reply-To: <20100323074546.GK13417@linux-sh.org>
[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]
On Tue, 2010-03-23 at 16:45 +0900, Paul Mundt wrote:
> On Sat, Mar 20, 2010 at 11:05:40PM +0000, Ben Hutchings wrote:
> > WARN() is used in some places to report firmware or hardware bugs that
> > are then worked-around. These bugs do not affect the stability of the
> > kernel and should not set the usual TAINT_WARN flag. To allow for
> > this, add WARN_TAINT() and WARN_TAINT_ONCE() macros that take a taint
> > flag as argument.
> >
> > Architectures that implement warnings using trap instructions instead
> > of calls to warn_slowpath_*() must now implement __WARN_TAINT(taint)
> > instead of __WARN().
> >
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > ---
> > The architecture-specific changes here are untested and need to be
> > reviewed by architecture maintainers.
> >
> I'm a bit confused about how this is supposed to work, the TAINT_xxx
> values are bit positions presently from 0 to 10, while BUGFLAG_xxx are
> ranged from 0 up. You've set up BUGFLAG_TAINT() to that the TAINT_xxx
> value is shifted up 8 bits but neglected the fact that the trap type is
> 16-bits on most (all?) of the platforms using trap-based BUG handling.
>
> If the 'taint' in question is just the TAINT_xxx value by itself and will
> never be a bitmap then that's fine, but there's certainly not enough room
> to pass the bitmap in on top of the bugflag otherwise (I don't know if
> this is your intention or not though).
Yes, the taint value must be a bit number not a flag. Sloppy wording on
my part.
> Also note that some platforms (like SH) implement additional bugflags, so
> we at least want to keep the lower byte available for architecture
> private use.
I noticed, that's why I started at 8 not 1.
> Having said that, the current patch does work for me, although I'm a bit
> nervous about someone thinking it's ok to pass in a taint bitmap here.
We can maybe use BUILD_BUG_ON() here as the taint bit is already
required to be a compile-time constant.
Ben.
> Tested-by: Paul Mundt <lethal@linux-sh.org>
>
--
Ben Hutchings
Any smoothly functioning technology is indistinguishable from a rigged demo.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: Ben Hutchings <ben@decadent.org.uk>
To: Paul Mundt <lethal@linux-sh.org>
Cc: linux-s390@vger.kernel.org, linux-parisc@vger.kernel.org,
linux-sh@vger.kernel.org, linux-pci@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
linuxppc-dev@ozlabs.org, David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 2/4] panic: Allow taint flag for warnings to be changed from TAINT_WARN
Date: Tue, 23 Mar 2010 13:23:00 +0000 [thread overview]
Message-ID: <1269350580.18314.260.camel@localhost> (raw)
In-Reply-To: <20100323074546.GK13417@linux-sh.org>
[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]
On Tue, 2010-03-23 at 16:45 +0900, Paul Mundt wrote:
> On Sat, Mar 20, 2010 at 11:05:40PM +0000, Ben Hutchings wrote:
> > WARN() is used in some places to report firmware or hardware bugs that
> > are then worked-around. These bugs do not affect the stability of the
> > kernel and should not set the usual TAINT_WARN flag. To allow for
> > this, add WARN_TAINT() and WARN_TAINT_ONCE() macros that take a taint
> > flag as argument.
> >
> > Architectures that implement warnings using trap instructions instead
> > of calls to warn_slowpath_*() must now implement __WARN_TAINT(taint)
> > instead of __WARN().
> >
> > Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> > ---
> > The architecture-specific changes here are untested and need to be
> > reviewed by architecture maintainers.
> >
> I'm a bit confused about how this is supposed to work, the TAINT_xxx
> values are bit positions presently from 0 to 10, while BUGFLAG_xxx are
> ranged from 0 up. You've set up BUGFLAG_TAINT() to that the TAINT_xxx
> value is shifted up 8 bits but neglected the fact that the trap type is
> 16-bits on most (all?) of the platforms using trap-based BUG handling.
>
> If the 'taint' in question is just the TAINT_xxx value by itself and will
> never be a bitmap then that's fine, but there's certainly not enough room
> to pass the bitmap in on top of the bugflag otherwise (I don't know if
> this is your intention or not though).
Yes, the taint value must be a bit number not a flag. Sloppy wording on
my part.
> Also note that some platforms (like SH) implement additional bugflags, so
> we at least want to keep the lower byte available for architecture
> private use.
I noticed, that's why I started at 8 not 1.
> Having said that, the current patch does work for me, although I'm a bit
> nervous about someone thinking it's ok to pass in a taint bitmap here.
We can maybe use BUILD_BUG_ON() here as the taint bit is already
required to be a compile-time constant.
Ben.
> Tested-by: Paul Mundt <lethal@linux-sh.org>
>
--
Ben Hutchings
Any smoothly functioning technology is indistinguishable from a rigged demo.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2010-03-23 13:23 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-20 23:01 [PATCH 1/4] pci/dmar: Combine the BIOS DMAR table warning messages Ben Hutchings
2010-03-20 23:05 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed from TAINT_WARN Ben Hutchings
2010-03-20 23:05 ` Ben Hutchings
2010-03-20 23:05 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed Ben Hutchings
2010-03-21 19:10 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed from TAINT_WARN Andi Kleen
2010-03-21 19:10 ` Andi Kleen
2010-03-21 19:10 ` Andi Kleen
2010-03-21 19:25 ` Ben Hutchings
2010-03-21 19:25 ` Ben Hutchings
2010-03-21 19:25 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed Ben Hutchings
2010-03-23 2:47 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed from TAINT_WARN Andrew Morton
2010-03-23 2:47 ` Andrew Morton
2010-03-23 2:47 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed Andrew Morton
2010-03-23 13:20 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed from TAINT_WARN Ben Hutchings
2010-03-23 13:20 ` Ben Hutchings
2010-03-23 13:20 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed Ben Hutchings
2010-03-23 7:45 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed from TAINT_WARN Paul Mundt
2010-03-23 7:45 ` Paul Mundt
2010-03-23 7:45 ` Paul Mundt
2010-03-23 13:23 ` Ben Hutchings [this message]
2010-03-23 13:23 ` Ben Hutchings
2010-03-23 13:23 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed Ben Hutchings
2010-03-24 11:11 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed from TAINT_WARN Michael Ellerman
2010-03-24 11:11 ` Michael Ellerman
2010-03-24 11:11 ` [PATCH 2/4] panic: Allow taint flag for warnings to be changed Michael Ellerman
2010-03-20 23:06 ` [PATCH 3/4] panic: Add taint flag TAINT_FIRMWARE_WORKAROUND ('I') Ben Hutchings
2010-03-21 1:56 ` Randy Dunlap
2010-03-20 23:07 ` [PATCH 4/4] pci/dmar: Tone down warnings about invalid BIOS DMAR tables Ben Hutchings
2010-03-21 8:43 ` David Woodhouse
2010-03-21 14:57 ` Ben Hutchings
2010-03-21 15:57 ` David Woodhouse
2010-03-23 2:46 ` [PATCH 1/4] pci/dmar: Combine the BIOS DMAR table warning messages Andrew Morton
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=1269350580.18314.260.camel@localhost \
--to=ben@decadent.org.uk \
--cc=dwmw2@infradead.org \
--cc=jbarnes@virtuousgeek.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.