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:	Fri, 28 Mar 2008 14:07:34 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Sam Ravnborg <sam@...nborg.org>
CC:	LKML <linux-kernel@...r.kernel.org>, Ingo Molnar <mingo@...e.hu>
Subject: Re: use of volatile in iounmap()?

Sam Ravnborg wrote:
>>>
>> Yes.  The use of volatile in a function prototype like this means that 
>> it is valid to pass a volatile pointer to that function -- in other 
>> words, we're telling gcc that we're not going to do anything with the 
>> pointer that is invalid for a volatile pointer.

> If I understand you correct then it is then not wrong to say
> that we have the argument volatile to avoid warnings from gcc
> when we pass a volatile pointer.
> 
> And then having the pointer marked volatile put a few restrictions
> on iounmap().

Correct.

>> A lot of the "volatile considered harmful" stuff that has been bandied 
>> about is explicitly about marking *data* items volatile (it does have 
>> its uses, but it's easy to get wrong); Linus has explicitly made the 
>> distinction between volatile *data* and volatile *operations*.
> 
> Yes - but unfortunately the volatile-considered-harmful.txt
> does many deal with the data part.

Yes, it does.

	-hpa

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