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: <20180625090648.GU2494@hirez.programming.kicks-ass.net>
Date:   Mon, 25 Jun 2018 11:06:48 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Andrea Parri <andrea.parri@...rulasolutions.com>
Cc:     Alan Stern <stern@...land.harvard.edu>,
        Will Deacon <will.deacon@....com>,
        LKMM Maintainers -- Akira Yokosawa <akiyks@...il.com>,
        Boqun Feng <boqun.feng@...il.com>,
        David Howells <dhowells@...hat.com>,
        Jade Alglave <j.alglave@....ac.uk>,
        Luc Maranget <luc.maranget@...ia.fr>,
        Nicholas Piggin <npiggin@...il.com>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] tools/memory-model: Add write ordering by
 release-acquire and by locks

On Mon, Jun 25, 2018 at 10:29:23AM +0200, Andrea Parri wrote:
> On Mon, Jun 25, 2018 at 09:32:29AM +0200, Peter Zijlstra wrote:
> > 
> > I have yet to digest the rest of the discussion, however:
> > 
> > On Fri, Jun 22, 2018 at 02:09:04PM -0400, Alan Stern wrote:
> > > The LKMM uses the same CAT code for acquire/release and lock/unlock.
> > > (In essence, it considers a lock to be an acquire and an unlock to be a
> > > release; everything else follows from that.)  Treating one differently
> > > from the other in these tests would require some significant changes.
> > > It wouldn't be easy.
> > 
> > That is problematic, acquire+release are very much simpler operations
> > than lock+unlock.
> > 
> > At the very least, lock includes a control-dependency, where acquire
> > does not.
> 
> I don't see how this is relevant here; roughly, "if something is guaranteed
> by a control-dependency, that is also guaranteed by an acquire".  Right? ;)

Right, you are, clearly I needs me a wake up drink :-).. So lock does
very fundamentally involve a RmW, and it has the whole wait-until loop
thing in. But yes, now I'm strugging to better express how it's
different from a memory ordering pov.

But still, the lock case will/must disallow the re-ordering (since we rely on
it), whereas the pure acquire/release seems to be struggling.

Personally I prefer a stronger model over a weaker one (as does Linus
IIRC) but clearly people have different opinions on that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ