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: <Yx8ff+Q/mNu/3R92@rowland.harvard.edu>
Date:   Mon, 12 Sep 2022 08:01:03 -0400
From:   Alan Stern <stern@...land.harvard.edu>
To:     Jonas Oberhauser <jonas.oberhauser@...wei.com>
Cc:     Joel Fernandes <joel@...lfernandes.org>,
        Hernan Luis Ponce de Leon <hernanl.leon@...wei.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Peter Zijlstra <peterz@...radead.org>,
        "Paul E. McKenney" <paulmck@...nel.org>,
        "parri.andrea@...il.com" <parri.andrea@...il.com>,
        "will@...nel.org" <will@...nel.org>,
        "npiggin@...il.com" <npiggin@...il.com>,
        "dhowells@...hat.com" <dhowells@...hat.com>,
        "j.alglave@....ac.uk" <j.alglave@....ac.uk>,
        "luc.maranget@...ia.fr" <luc.maranget@...ia.fr>,
        "akiyks@...il.com" <akiyks@...il.com>,
        "dlustig@...dia.com" <dlustig@...dia.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>
Subject: Re: "Verifying and Optimizing Compact NUMA-Aware Locks on Weak
 Memory Models"

On Mon, Sep 12, 2022 at 10:13:33AM +0000, Jonas Oberhauser wrote:
> As I tried to explain before, this problem has nothing to do with 
> stores propagating within a given time to another core. Rather it is 
> due to two stores to the same location happening in a surprising 
> order. I.e., both stores propagate quickly to other cores, but in a 
> surprising coherence order.And if a wmb in the code is replaced by an 
> mb, then this co will create a pb cycle and become forbidden.
> 
> Therefore this hang should be observable on a hypothetical LKMM 
> processor which makes use of all the relaxed liberty the LKMM allows. 
> However according to the authors of that paper (who are my colleagues 
> but I haven't been involved deeply in that work), not even Power+gcc 
> allow this reordering to happen, and if that's true it is probably 
> because the wmb is mapped to lwsync which is fully cumulative in Power 
> but not in LKMM.

Yes, that's right.  On ARM64 architectures the reordering is forbidden 
by other multi-copy atomicity, and on PPC is it forbidden by 
B-cumulativity (neither of which is part of the LKMM).

If I'm not mistaken, another way to forbid it is to replace one of the 
relaxed atomic accesses with an atomic access having release semantics.  
Perhaps this change will find its way into the kernel source, since it 
has less overhead than replacing wmb with bm.

Alan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ