From: James Bottomley <James.Bottomley@suse.de>
To: Jamie Lokier <jamie@shareable.org>
Cc: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
linux-fsdevel@vger.kernel.org, fengguang.wu@intel.com,
davem@davemloft.net, eparis@redhat.com, hch@infradead.org,
rdreier@cisco.com, schwab@linux-m68k.org, sfr@canb.auug.org.au
Subject: Re: [patch 2/5] vfs: O_* bit numbers uniqueness check
Date: Fri, 27 Aug 2010 00:53:44 -0500 [thread overview]
Message-ID: <1282888424.8133.386.camel@mulgrave.site> (raw)
In-Reply-To: <20100827012700.GK3574@shareable.org>
On Fri, 2010-08-27 at 02:27 +0100, Jamie Lokier wrote:
> James Bottomley wrote:
> > On Tue, 2010-07-20 at 15:29 -0700, akpm@linux-foundation.org wrote:
> > > From: Wu Fengguang <fengguang.wu@intel.com>
> > >
> > > The O_* bit numbers are defined in 20+ arch/*, and can silently overlap.
> > > Add a compile time check to ensure the uniqueness as suggested by David
> > > Miller.
> >
> > Can we get this reverted or fixed? It's causing the parisc compiles to
> > fail. The reason is O_NONBLOCK on parisc has a dual value:
> >
> > #define O_NONBLOCK 000200004 /* HPUX has separate NDELAY & NONBLOCK */
> >
> > The fix would be to take O_NONBLOCK out.
>
> A more thoroughly checking fix would be
>
> BUILD_BUG_ON(18 - 1 /* For O_RDONLY being 0 */
> + HWEIGHT32(O_NONBLOCK) /* Because it's 2 bits on parisc */
> != HWEIGHT32( .... all the bits .... ));
Well, it works, but is it wise? There are several missing flags in this
expression: O_NDELAY being the most noticeable one. It's defined to be
the sames as O_NONBLOCK on some platforms and not on others. Our
O_NONBLOCK problem is essentially the same class.
> Am I allowed to Sign-off handwavy pseudocode? ;-)
Nope ... you'd have to code it as a real patch ...
James
next prev parent reply other threads:[~2010-08-27 5:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 22:29 [patch 2/5] vfs: O_* bit numbers uniqueness check akpm
2010-08-26 23:22 ` James Bottomley
2010-08-27 1:27 ` Jamie Lokier
2010-08-27 5:53 ` James Bottomley [this message]
2010-09-04 1:22 ` [PATCH] vfs: take O_NONBLOCK out of the O_* uniqueness test Wu Fengguang
-- strict thread matches above, loose matches on Subject: below --
2010-05-24 19:24 [patch 2/5] vfs: O_* bit numbers uniqueness check akpm
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=1282888424.8133.386.camel@mulgrave.site \
--to=james.bottomley@suse.de \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=eparis@redhat.com \
--cc=fengguang.wu@intel.com \
--cc=hch@infradead.org \
--cc=jamie@shareable.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=rdreier@cisco.com \
--cc=schwab@linux-m68k.org \
--cc=sfr@canb.auug.org.au \
--cc=viro@zeniv.linux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).