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, 24 Jan 2023 16:54:42 +0100
From:   Jonas Oberhauser <jonas.oberhauser@...weicloud.com>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     "paulmck@...nel.org" <paulmck@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        "parri.andrea" <parri.andrea@...il.com>, will <will@...nel.org>,
        "boqun.feng" <boqun.feng@...il.com>, npiggin <npiggin@...il.com>,
        dhowells <dhowells@...hat.com>,
        "j.alglave" <j.alglave@....ac.uk>,
        "luc.maranget" <luc.maranget@...ia.fr>, akiyks <akiyks@...il.com>,
        dlustig <dlustig@...dia.com>, joel <joel@...lfernandes.org>,
        urezki <urezki@...il.com>,
        quic_neeraju <quic_neeraju@...cinc.com>,
        frederic <frederic@...nel.org>,
        Kernel development list <linux-kernel@...r.kernel.org>
Subject: Re: Internal vs. external barriers (was: Re: Interesting LKMM litmus
 test)



On 1/19/2023 5:41 PM, Alan Stern wrote:
> On Thu, Jan 19, 2023 at 12:22:50PM +0100, Jonas Oberhauser wrote:
>>
>> On 1/19/2023 3:28 AM, Alan Stern wrote:
>>>> This is a permanent error; I've given up. Sorry it didn't
>>> work out.
>> [It seems the e-mail still reached me through the mailing list]
> [For everyone else, Jonas is referring to the fact that the last two
> emails I sent to his huaweicloud.com address could not be delivered, so
> I copied them off-list to his huawei.com address.]
>
>>>> I consider that a hack though and don't like it.
>>> It _is_ a bit of a hack, but not a huge one.  srcu_read_lock() really
>>> is a lot like a load, in that it returns a value obtained by reading
>>> something from memory (along with some other operations, though, so it
>>> isn't a simple straightforward read -- perhaps more like an
>>> atomic_inc_return_relaxed).
>> The issue I have with this is that it might create accidental ordering. How
>> does it behave when you throw fences in the mix?
> I think this isn't going to be a problem.  Certainly any real
> implementation of scru_read_lock() is going to involve some actual load
> operations, so any unintentional ordering caused by fences will also
> apply to real executions.  Likewise for srcu_read_unlock and store
> operations.

Note that there may indeed be reads in the implementation, but most 
likely not from the srcu_read_unlock()s of other threads. Most probably 
from the synchronize_srcu() calls. So the rfe edges being added are 
probably not corresponding to any rfe edges in the implementation.

That said, I believe there may indeed not be any restrictions in 
behavior caused by this, because any code that relies on the order being 
a certain thing would need to use some other ordering mechanism, and 
that would probably restrict the behavior anyways.

It does have the negative side-effect of creating an explosion of 
permutations though, by ordering all unlocks() in a total way and also 
sometimes allowing multiple options for each lock() (e.g., 
lock();unlock() || lock();unlock()  has 4 executions instead of 1).

Anyways, not much to be done about it right now.

best wishes, jonas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ