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  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:	Fri, 11 May 2007 22:34:13 -0700
From:	"H. Peter Anvin" <>
To:	Satyam Sharma <>
CC:	Jonathan Corbet <>,,, Johannes Stezenbach <>,
	Jesper Juhl <>,
	Randy Dunlap <>,
	Heikki Orsila <>,
	jimmy bahuleyan <>,
	Stefan Richter <>
Subject: Re: [PATCH] "volatile considered harmful", take 3

Satyam Sharma wrote:
>> +  - Pointers to data structures in coherent memory which might be
>> modified
>> +    by I/O devices can, sometimes, legitimately be volatile.  A ring
>> buffer
>> +    used by a network adapter, where that adapter changes pointers to
>> +    indicate which descriptors have been processed, is an example of
>> this
>> +    type of situation.
> is a legitimate use case for volatile is still not clear to me (I
> agree with Alan's
> comment in a previous thread that this seems to be a case where a memory
> barrier would be applicable^Wbetter, actually). I could be wrong here, so
> would be nice if Peter explains why volatile is legitimate here.
> Otherwise, it's fine with me.

I don't see why Alan's way is necessarily better; it should work but is
more heavy-handed as it's disabling *all* optimization such as loop
invariants across the barrier.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists