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:   Tue, 20 Feb 2018 08:11:10 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Andrea Parri <parri.andrea@...il.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Akira Yokosawa <akiyks@...il.com>,
        Kernel development list <linux-kernel@...r.kernel.org>,
        mingo@...nel.org, Will Deacon <will.deacon@....com>,
        boqun.feng@...il.com, npiggin@...il.com, dhowells@...hat.com,
        Jade Alglave <j.alglave@....ac.uk>,
        Luc Maranget <luc.maranget@...ia.fr>,
        Patrick Bellasi <patrick.bellasi@....com>
Subject: Re: [PATCH] tools/memory-model: remove rb-dep,
 smp_read_barrier_depends, and lockless_dereference

On Tue, Feb 20, 2018 at 04:17:52PM +0100, Andrea Parri wrote:
> On Tue, Feb 20, 2018 at 06:48:13AM -0800, Paul E. McKenney wrote:
> > On Mon, Feb 19, 2018 at 06:44:13PM +0100, Peter Zijlstra wrote:
> > > On Mon, Feb 19, 2018 at 12:14:45PM -0500, Alan Stern wrote:
> > > > Note that operations like atomic_add_unless() already include memory 
> > > > barriers.
> > > 
> > > It is valid for atomic_add_unless() to not imply any barriers when the
> > > addition doesn't happen.
> > 
> > Agreed, given that atomic_add_unless() just returns 0 or 1, not the
> > pointer being added.  Of course, the __atomic_add_unless() function
> > that it calls is another story, as it does return the old value.  Sigh.
> > And __atomic_add_unless() is called directly from some code.  All of
> > which looks to be counters rather than pointers, thankfully.
> > 
> > So, do we want to rely on atomic_add_unless() always being
> > invoked on counters rather than pointers, or does it need an
> > smp_read_barrier_depends()?
> 
> alpha's implementation of __atomic_add_unless() has an unconditional smp_mb()
> before returning so, as far as dependencies are concerned, these seem fine.

Very good!

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ