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:   Mon, 23 Jan 2023 20:40:24 +0100
From:   Jonas Oberhauser <jonas.oberhauser@...weicloud.com>
To:     Alan Stern <stern@...land.harvard.edu>
Cc:     paulmck@...nel.org, Andrea Parri <parri.andrea@...il.com>,
        Jonas Oberhauser <jonas.oberhauser@...wei.com>,
        Peter Zijlstra <peterz@...radead.org>, 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/23/2023 4:55 PM, Alan Stern wrote:
> On Mon, Jan 23, 2023 at 12:48:42PM +0100, Jonas Oberhauser wrote:
>>
>> On 1/21/2023 6:36 PM, Alan Stern wrote:
>>> On Fri, Jan 20, 2023 at 10:41:14PM +0100, Jonas Oberhauser wrote:
>>>> On 1/20/2023 5:18 PM, Alan Stern wrote:
>>>>> On Fri, Jan 20, 2023 at 11:13:00AM +0100, Jonas Oberhauser wrote:
>>>>>> Perhaps we could say that reading an index without using it later is
>>>>>> forbidden?
>>>>>>
>>>>>> flag ~empty [Srcu-lock];data;rf;[~ domain(data;[Srcu-unlock])] as
>>>>>> thrown-srcu-cookie-on-floor
>>>>> We already flag locks that don't have a matching unlock.
>>>> Of course, but as you know this is completely orthogonal.
>>> Yeah, okay.  It doesn't hurt to add this check, but the check isn't
>>> complete.  For example, it won't catch the invalid usage here:
>>>
>>> P0(srcu_struct *ss)
>>> {
>>> 	int r1, r2;
>>>
>>> 	r1 = srcu_read_lock(ss);
>>> 	srcu_read_unlock(&ss, r1);
>>> 	r2 = srcu_read_lock(ss);
>>> 	srcu_read_unlock(&ss, r2);
>>> }
>>>
>>> exists (~0:r1=0:r2)
>>>
>>> On the other hand, how often will people make this sort of mistake in
>>> their litmus tests?  My guess is not very.
>> I currently don't care too much about the incorrect usage of herd (by
>> inspecting some final state incorrectly), only incorrect usage in the code.
> I'm inclined to add this check to the memory model.  Would you prefer to
> submit it yourself as a separate patch?  Or are you happy to have it
> merged with my patch, and if so, do you have a final, preferred form for
> the check?

After clearing my confusion, I'm no longer sure if it should be added. 
If you're still inclined to have it, I would prefer to submit the patch, 
but I'd like to define the use-cookie relation (= 
(data|[~Srcu-unlock];rfe)+) and use it also to clarify the srcu match 
definition (I almost would like to do that anyways :D).
Is that ok?

jonas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ