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, 22 Nov 2013 10:54:22 -0800
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-kernel@...r.kernel.org, mingo@...nel.org,
	laijs@...fujitsu.com, dipankar@...ibm.com,
	akpm@...ux-foundation.org, mathieu.desnoyers@...icios.com,
	josh@...htriplett.org, niv@...ibm.com, tglx@...utronix.de,
	rostedt@...dmis.org, dhowells@...hat.com, edumazet@...gle.com,
	darren@...art.com, fweisbec@...il.com, sbw@....edu
Subject: Re: [PATCH v2 RFC 1/3] documentation: Add needed ACCESS_ONCE() calls
 to memory-barriers.txt

On Fri, Nov 22, 2013 at 12:17:23PM +0100, Peter Zijlstra wrote:
> On Thu, Nov 21, 2013 at 02:32:30PM -0800, Paul E. McKenney wrote:
> 
> > > > We could, but at the moment I would prefer the decrease in readability
> > > > to the copy-and-paste bugs that omit needed ACCESS_ONCE() calls.
> > > > 
> > > > Is there some way to get both ACCESS_ONCE() and readability?  An
> > > > abbreviation such as AO()?  More easily distinguished variable names?
> > > > Something else?
> > > 
> > > Use a form that looks less like C and thus defeats copy/paste?
> > 
> > My concern with that approach is that there is likely to be a large
> > number of people who are likely to be willing and able to transcribe
> > from any reasonable non-C form to ACCESS_ONCE()-free C code.  :-/
> > 
> > But maybe you have something specific in mind?
> 
> No, that was pretty much it. My issues is though that the subject matter
> is difficult enough without actively obfuscating the examples.
> 
> Furthermore, people will find ways to get it wrong anyhow, if all they
> do is copy/paste without thought, then getting it wrong is pretty much
> guaranteed in this case. Memory ordering isn't something you can do
> without thinking.

One could argue that parsing the ACCESS_ONCE() calls will help them
realize that they actually need to think.  ;-)

							Thanx, Paul

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