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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1807121637050.1306-100000@iolanthe.rowland.org>
Date:   Thu, 12 Jul 2018 16:43:46 -0400 (EDT)
From:   Alan Stern <stern@...land.harvard.edu>
To:     Andrea Parri <andrea.parri@...rulasolutions.com>
cc:     Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will.deacon@....com>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        LKMM Maintainers -- Akira Yokosawa <akiyks@...il.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Daniel Lustig <dlustig@...dia.com>,
        David Howells <dhowells@...hat.com>,
        Jade Alglave <j.alglave@....ac.uk>,
        Luc Maranget <luc.maranget@...ia.fr>,
        Nicholas Piggin <npiggin@...il.com>,
        Kernel development list <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH v2] tools/memory-model: Add extra ordering for locks and
 remove it for ordinary release/acquire

On Thu, 12 Jul 2018, Andrea Parri wrote:

> > It seems reasonable to ask people to learn that locks have stronger
> > ordering guarantees than RMW atomics do.  Maybe not the greatest
> > situation in the world, but one I think we could live with.
> 
> Yeah, this was one of my main objections.

Does this mean you don't think you could live with it?

> > > Hence my proposal to strenghten rmw-acquire, because that is the basic
> > > primitive used to implement lock.
> > 
> > That was essentially what the v2 patch did.  (And my reasoning was
> > basically the same as what you have just outlined.  There was one
> > additional element: smp_store_release() is already strong enough for
> > TSO; the acquire is what needs to be stronger in the memory model.)
> 
> Mmh? see my comments to v2 (and your reply, in part., the part "At
> least, it's not a valid general-purpose implementation".).
> 
> 
> > > Another, and I like this proposal least, is to introduce a new barrier
> > > to make this all work.
> > 
> > This apparently boils down to two questions:
> > 
> > 	Should spin_lock/spin_unlock be RCsc?
> > 
> > 	Should rmw-acquire be strong enough so that smp_store_release + 
> > 	rmw-acquire is RCtso?
> > 
> > If both answers are No, we end up with the v3 patch.  If the first
> > answer is No and the second is Yes, we end up with the v2 patch.  The
> > problem is that different people seem to want differing answers.
> 
> Again, maybe you're confonding v2 with v1?

Oops, yes, I was.  v1 was the version that made RMW updates be RCtso.  
v2 and v3 affected only locking, the difference being that v2 used 
unlock-rf-lock-po and v3 used po-unlock-rf-lock-po.

Alan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ