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]
Message-ID: <460B3244.9060405@student.ltu.se>
Date:	Thu, 29 Mar 2007 05:28:04 +0200
From:	Richard Knutsson <ricknu-0@...dent.ltu.se>
To:	Alexey Dobriyan <adobriyan@...il.com>
CC:	Milind Arun Choudhary <milindchoudhary@...il.com>,
	kernel-janitors@...ts.osdl.org, linux-kernel@...r.kernel.org,
	akpm@...ux-foundation.org
Subject: Re: [KJ][PATCH] BIT macro cleanup

Alexey Dobriyan wrote:
> On Wed, Mar 28, 2007 at 09:03:09AM +0530, Milind Arun Choudhary wrote:
>   
>> --- a/include/linux/bitops.h
>> +++ b/include/linux/bitops.h
>> @@ -8,6 +8,9 @@
>>   */
>>  #include <asm/bitops.h>
>>
>> +#define BIT(nr)	(1UL << ((nr) % BITS_PER_LONG))
>>     
>
> I think this would be a disaster because something like
>
> 	BIT(123)
>
> would not even generate a warning.
>   
There were a discussion on this, at KJ, when BIT was first used with a 
modular operation. I said the same thing as you do now, but a big user 
of BIT is the input-subsystem who defined their BIT as above. Also it 
was mentioned that the compiler can only find the statical errors, a 
variable input can break it in runtime.
+ if we _really_ want to check the tree for such warnings, it is easy to 
remove the modular operation temporarily (and keep away of input/)

I don't say I like this, just that it is a choose between possible errors.
Richard Knutsson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ