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: <20180222101504.GQ25201@hirez.programming.kicks-ass.net>
Date:   Thu, 22 Feb 2018 11:15:04 +0100
From:   Peter Zijlstra <peterz@...radead.org>
To:     Boqun Feng <boqun.feng@...il.com>
Cc:     Daniel Lustig <dlustig@...dia.com>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        mingo@...nel.org, stern@...land.harvard.edu,
        parri.andrea@...il.com, will.deacon@....com, npiggin@...il.com,
        dhowells@...hat.com, j.alglave@....ac.uk, luc.maranget@...ia.fr,
        akiyks@...il.com, nborisov@...e.com,
        Benjamin Herrenschmidt <benh@...nel.crashing.org>,
        Paul Mackerras <paulus@...ba.org>,
        Michael Ellerman <mpe@...erman.id.au>
Subject: Re: [PATCH RFC tools/lkmm 10/12] tools/memory-model: Add a S
 lock-based external-view litmus test

On Thu, Feb 22, 2018 at 02:58:47PM +0800, Boqun Feng wrote:
> > And yes, if we go with a purely RCpc interpretation of acquire and
> > release, then I don't believe the writes in the previous critical
> > section would be ordered with the writes in the subsequent critical
> > section.  That's really all the argument boils down to.  We'd like
> 
> I think atomics in Linux kernel(and in LKMM) are purely RCpc, right?
> Alan and Andrea? 
> 
> And we are not going to change it, are we?
> 
> If atomics in Linux kernel are purely RCpc, then it cerntainly makes
> sense for riscv to provide purely RCpc atomics.

So there's 3 things:

  smp_load_acquire(), smp_store_release()

  atomic*_{acquire,release}()

  *_{lock,unlock}();

Which are all quite distinct.

smp_load_acquire() and smp_store_release() are RCpc, and there is no
discussion of ever wanting to change that.

The atomics also follow this and are RCpc, in fact the RELEASE only
applies to the STORE and the ACQUIRE only applies to the LOAD of the
atomics.

The locking primitives OTOH we would really rather like to be RCsc, and
everybody except PPC has them as such, PPC being the only one having
RCpc locks.

I read the part you quoted from Daniel as being purely about spinlocks,
the 'critical section' wording being a dead give away, so I'm then
somewhat confused why you talk about atomics.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ