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: <87y556wxim.fsf@mina86.com>
Date:	Sat, 02 Nov 2013 17:58:57 +0100
From:	Michal Nazarewicz <mina86@...a86.com>
To:	Рустафа Джамурахметов 
	<zbr@...emap.net>, Andrew Morton <akpm@...ux-foundation.org>
Cc:	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drivers: w1: make w1_slave::flags long to avoid casts

> 01.11.2013, 23:30, "Andrew Morton" <akpm@...ux-foundation.org>:
>> set_bit() operates on longs.  So if we do
>>
>> struct foo { u32 a; u32 b; } f;
>> set_bit(0, (long *)&f.a);
>>
>> then we'll scribble on f.b on a big-endian 64-bit machine.

On Sat, Nov 02 2013, Рустафа Джамурахметов <zbr@...emap.net> wrote:
> Argh, why would we just don't do that? Its in-memory field, it can be
> anything, I wouldn't be surprised if it even can be non-atomic because
> of proper locks already being held

If the driver does not require an atomic set_bit operation for setting
and testing the flag, feel free to prepare a patch replacing the whole
thing with a plain bool.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ