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: <4640EAD4.9010106@garzik.org>
Date:	Tue, 08 May 2007 17:25:40 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Randy Dunlap <randy.dunlap@...cle.com>
CC:	Jeremy Fitzhardinge <jeremy@...p.org>,
	Krzysztof Halasa <khc@...waw.pl>,
	David Rientjes <rientjes@...gle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Paul Sokolovsky <pmiscml@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC/PATCH] doc: volatile considered evil

Randy Dunlap wrote:
> Jeff Garzik wrote:
>> Jeremy Fitzhardinge wrote:
>>> No, David means that "asm volatile (...)" is meaningful and OK to use.
> 
> I thought it was OK in readl(), writel(), etc... (and in asm),
> but that's it.  (and jiffies)
> 
>> In a driver?  Highly unlikey it is OK.  In a filesystem?  Even more 
>> unlikely it is OK to use.
>>
>> The set of circumstances where 'volatile' is acceptable is very limited.
>>
>> You will see it used properly in the definitions of writel(), for 
>> example.  But most drivers using 'volatile' are likely bugs.


Not sure how to interpret your top-posted response :)

It is normal in the definition of writel(), in arch code, but 
inappropriate in drivers when they _use_ writel().

If I may generalize, arch code generally knows what it's doing, when it 
uses volatile.  OTOH, driver authors that use volatile generally do 
/not/ know what they are doing.

	Jeff


-
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