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: <a781481a0705081307r546f8889qecca3db16ea03fb8@mail.gmail.com>
Date:	Tue, 8 May 2007 13:07:51 -0700
From:	"Satyam Sharma" <satyam.sharma@...il.com>
To:	"Randy Dunlap" <randy.dunlap@...cle.com>
Cc:	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Paul Sokolovsky" <pmiscml@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [RFC/PATCH] doc: volatile considered evil

On 5/8/07, Randy Dunlap <randy.dunlap@...cle.com> wrote:
> On Mon, 30 Apr 2007 23:56:42 -0700 Andrew Morton wrote:
>
> > Oh my eyes.  What are these doing?
> >
> > The volatiles are a worry - volatile is said to be basically-always-wrong
> > in-kernel, although we've never managed to document why, and i386
> > cheerfully uses it in readb() and friends.
> >
> > Perhaps if you can describe presisely what's going on here, alternatives
> > might be suggested.
>
> [well, can be turned into a patch]
>
> Here are some 'volatile' comments from Linus, extracted from
> several emails in at least 2 threads.
>
> If this is close to useful, we can add it to Documentation/.

Yes, definitely. Say Documentation/volatile-usage.txt -- this raw
version could be touched a little bit, to have sections that clearly
explain (1) how volatile makes the compiler generate trashy code, (2)
why volatile doesn't even do what people _think_ it does, considering
code is executed out-of-order by _hardware_ these days and not due to
compilers like was the case 20 years back, (3) and so volatile ends up
_hiding_ bugs from people and thus should be consigned to the trash
can of history, (4) _except_ for _really special_ usage cases like
reading IO mapped as memory.
-
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