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:	Wed, 18 May 2016 13:05:55 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc:	Peter Hurley <peter@...leysoftware.com>,
	Waiman Long <Waiman.Long@....com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Davidlohr Bueso <dave@...olabs.net>,
	Jason Low <jason.low2@...com>,
	Dave Chinner <david@...morbit.com>,
	Scott J Norton <scott.norton@....com>,
	Douglas Hatch <doug.hatch@....com>, kcc@...gle.com,
	dvyukov@...gle.com, dhowells@...hat.com
Subject: Re: [PATCH v2] locking/rwsem: Add reader-owned state to the owner
 field

On Tue, May 17, 2016 at 12:46:07PM -0700, Paul E. McKenney wrote:
> Actually, if you show a case where this makes a visible system-wide
> difference, you could create a set of primitives for #1 below.  Have
> a compiler version check, and if it is an old compiler, map them to
> READ_ONCE() and WRITE_ONCE(), otherwise as follows, though preferably
> with better names:
> 
> #define READ_NOTEAR(x) __atomic_load_n(&(x), __ATOMIC_RELAXED)
> #define WRITE_NOTEAR(x, v) __atomic_store_n(&(x), (v), __ATOMIC_RELAXED)
> 
> The ambiguity between "no tear" and "not ear" should help motivate a
> better choice of name.

Alternatively, could we try and talk to our GCC friends to make sure GCC
doesn't tear loads/stores irrespective of what the C language spec
allows?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ