lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 3 Jul 2007 11:24:23 -0700
From:	Inaky Perez-Gonzalez <inaky@...ux.intel.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	"Kok, Auke" <auke-jan.h.kok@...el.com>,
	Michael Buesch <mb@...sch.de>,
	Christoph Hellwig <hch@...radead.org>,
	Stephen Hemminger <shemminger@...ux-foundation.org>,
	"Veeraiyan, Ayyappan" <ayyappan.veeraiyan@...el.com>,
	netdev@...r.kernel.org, arjan@...ux.intel.com,
	akpm@...ux-foundation.org
Subject: Re: [PATCH] ixgbe: Introduce new 10GbE driver for Intel 82598 based PCI Express adapters...

On Tuesday 03 July 2007, Jeff Garzik wrote:
> Inaky Perez-Gonzalez wrote:
> > I don't think bitfields are broken. Maybe it's the compiler what should be fixed (*)
> 
> Then you do not understand bitfields.  It is -axiomatic- that bitfields 
> are more difficult for compilers to implement.
> 
> Access to bitfields are not atomic within the machine int in which they 
> are stored... you need to "unpack" the values stored in bitfields, even 
> if they are single-bit bitfields.

Which we do manually when we don't use bitfields. Again, conceptually,
there is no difference.

> You cannot set multiple bitfields at one time, without even more complex 
> data structures.  You cannot compare and test multiple bitfields at one 
>   time.

But I am not saying that you only use bitfields. There are cases where
they make the code much more readable (for me, at least), and cases
(like the one you mention) where they not [this is why I use unions,
btw]..

> ...
>  
> Finally, this is -nothing new-.  I've been telling other driver writers 
> not to use bitfields in their drivers.  Google for 'garzik' and 'bitfield'.

I know, I am just disagreeing. This is one of those things each person is
entrenched on and is impossible to change (like emacs vs vi).
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ