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: <20180220144939.GG3617@linux.vnet.ibm.com>
Date:   Tue, 20 Feb 2018 06:49:39 -0800
From:   "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Alan Stern <stern@...land.harvard.edu>,
        Andrea Parri <parri.andrea@...il.com>,
        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 Mon, Feb 19, 2018 at 09:28:44PM +0100, Peter Zijlstra wrote:
> On Mon, Feb 19, 2018 at 11:41:23AM -0800, Paul E. McKenney wrote:
> > On Mon, Feb 19, 2018 at 12:14:45PM -0500, Alan Stern wrote:
> > > This leaves us with a question: Do we want to change the kernel by
> > > adding memory barriers after unsuccessful RMW operations on Alpha, or
> > > do we want to change the model by excluding such operations from
> > > address dependencies?
> > 
> > I vote for adding the barrier on Alpha.  However, I don't know of any
> > code in the Linux kernel that relies on read-to-read address dependency
> > ordering headed by a failing RMW operation, so I don't feel all that
> > strongly about this.
> 
> Right, but not knowing doesn't mean doesn't exist, and most certainly
> doesn't mean will never exist.

Fair enough, safety first!

> > > Note that operations like atomic_add_unless() already include memory 
> > > barriers.
> > 
> > And I don't see an atomic_add_unless_relaxed(), so we are good on this
> > one.  So far, anyway!  ;-)
> 
> Not the point, add_unless() is a conditional operation, and therefore
> doesn't need to imply anything when failing.

Plus it doesn't return a pointer, so there is no problem with dereferences.
Unless someone wants to use its return value as an array index and rely
on dependency ordering to the array, but I would NAK that use case.

							Thanx, Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ