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:	Mon, 09 Oct 2006 00:53:56 +0200
From:	Jan Kiszka <jan.kiszka@....de>
To:	Willy Tarreau <w@....eu>
CC:	linux-kernel@...r.kernel.org,
	Willy Tarreau <wtarreau@...a.kernel.org>
Subject: Re: 2.4.x: i386/x86_64 bitops clobberings

Willy Tarreau wrote:
> Hi Jan,
> 
> On Sun, Oct 08, 2006 at 11:42:07PM +0200, Jan Kiszka wrote:
>> Hi,
>>
>> after going through debugging hell with some out-of-tree code, I
>> realised that this patch
>>
>> http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=92934bcbf96bc9dc931c40ca5f1a57685b7b813b
>>
>> makes a difference: current 2.6 works with the following code sequence
>> as expected (printk is executed), 2.4 fails.
>>
>>
>> #include <asm/bitops.h>
>> #include <linux/module.h>
>>
>> unsigned long a = 1;
>>
>> int module_init(void)
>> {
>> 	unsigned long b = 0;
>> 	int x;
>>
>> 	x = __test_and_set_bit(0, &b);
>> 	if (__test_and_set_bit(0, &a))
>> 		printk("x = %d\n", x);
>>
>> 	return -1;
>> }
>>
>>
>> There will likely be a way to work around my issue. Nevertheless, I
>> wondered if that patch was already considered for 2.4 inclusion. Or is
>> there no risk that in-tree code is affected?
> 
> While I remember some discussion on the subject for 2.6, I don't
> recall anything similiar in 2.4. Wouldn't you happen to build with
> gcc-3.4 ? IIRC, the clobbering changed around this version. Could

I used gcc 3.3.6-13 (Debian).

> you confirm that the patch you pointed above fixes the problem for
> your case ?

Yes. I ported the x86 part back to 2.4.33 and my problem disappeared.

Jan


Download attachment "signature.asc" of type "application/pgp-signature" (247 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ