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] [day] [month] [year] [list]
Message-ID: <4DD335F6.3010501@garzik.org>
Date:	Tue, 17 May 2011 22:59:02 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	David Miller <davem@...emloft.net>
CC:	bhutchings@...arflare.com, netdev@...r.kernel.org
Subject: Re: [PATCH net-next-2.6] sfc: Replace enum efx_fc_type with a 'bitwise'
 type

On 05/17/2011 10:23 PM, David Miller wrote:
> From: Jeff Garzik<jeff@...zik.org>
>
>> On 05/17/2011 05:14 PM, David Miller wrote:
>>> Accept that the compiler currently doesn't want to allow enums to be
>>> used as bit-masks, don't paper around it.
>>
>> This practice is all over the kernel.
>>
>> It's a bit silly to make such a big deal, because of that.
>
> "We do something stupid everywhere" is never a good
> argument for anything.

grepping across the kernel, it is clearly a useful shorthand technique 
for defining typed, named constants, including bitmasks, used widely 
across multiple subsystems, drivers and include/linux.

Given that this technique has passed review time and again, and that 
kernel hackers -do- find it useful for valid reasons, I guess the only 
remaining defense is to call something "stupid."

	Jeff



--
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