Re: [patch 2/5] vfs: O_* bit numbers uniqueness check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



James Bottomley wrote:
> On Tue, 2010-07-20 at 15:29 -0700, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
> > From: Wu Fengguang <fengguang.wu@xxxxxxxxx>
> > 
> > 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 ....     ));

Am I allowed to Sign-off handwavy pseudocode? ;-)

-- Jamie
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux