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: <4599c0d4-6c2a-431f-8bf3-173855c7ba77@rowland.harvard.edu>
Date:   Wed, 22 Mar 2023 10:30:57 -0400
From:   Alan Stern <stern@...land.harvard.edu>
To:     Andrea Parri <parri.andrea@...il.com>
Cc:     "Paul E. McKenney" <paulmck@...nel.org>,
        linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        kernel-team@...a.com, mingo@...nel.org, will@...nel.org,
        peterz@...radead.org, boqun.feng@...il.com, npiggin@...il.com,
        dhowells@...hat.com, j.alglave@....ac.uk, luc.maranget@...ia.fr,
        akiyks@...il.com, Joel Fernandes <joel@...lfernandes.org>,
        Andrea Parri <andrea.parri@...rulasolutions.com>,
        Jonas Oberhauser <jonas.oberhauser@...wei.com>,
        "Paul E. McKenney" <paulmck@...ux.ibm.com>
Subject: Re: [PATCH memory-model 7/8] tools/memory-model: Add documentation
 about SRCU read-side critical sections

On Wed, Mar 22, 2023 at 02:40:52AM +0100, Andrea Parri wrote:
> On Mon, Mar 20, 2023 at 06:02:45PM -0700, Paul E. McKenney wrote:
> > From: Alan Stern <stern@...land.harvard.edu>
> > 
> > Expand the discussion of SRCU and its read-side critical sections in
> > the Linux Kernel Memory Model documentation file explanation.txt.  The
> > new material discusses recent changes to the memory model made in
> > commit 6cd244c87428 ("tools/memory-model: Provide exact SRCU
> > semantics").
> 
> How about squashing the diff below (adjusting subject and changelog):
> 
>   Andrea
> 
> diff --git a/tools/memory-model/Documentation/litmus-tests.txt b/tools/memory-model/Documentation/litmus-tests.txt
> index 26554b1c5575e..acac527328a1f 100644
> --- a/tools/memory-model/Documentation/litmus-tests.txt
> +++ b/tools/memory-model/Documentation/litmus-tests.txt
> @@ -1028,32 +1028,7 @@ Limitations of the Linux-kernel memory model (LKMM) include:
>  		additional call_rcu() process to the site of the
>  		emulated rcu-barrier().
>  
> -	e.	Although sleepable RCU (SRCU) is now modeled, there
> -		are some subtle differences between its semantics and
> -		those in the Linux kernel.  For example, the kernel
> -		might interpret the following sequence as two partially
> -		overlapping SRCU read-side critical sections:
> -
> -			 1  r1 = srcu_read_lock(&my_srcu);
> -			 2  do_something_1();
> -			 3  r2 = srcu_read_lock(&my_srcu);
> -			 4  do_something_2();
> -			 5  srcu_read_unlock(&my_srcu, r1);
> -			 6  do_something_3();
> -			 7  srcu_read_unlock(&my_srcu, r2);
> -
> -		In contrast, LKMM will interpret this as a nested pair of
> -		SRCU read-side critical sections, with the outer critical
> -		section spanning lines 1-7 and the inner critical section
> -		spanning lines 3-5.
> -
> -		This difference would be more of a concern had anyone
> -		identified a reasonable use case for partially overlapping
> -		SRCU read-side critical sections.  For more information
> -		on the trickiness of such overlapping, please see:
> -		https://paulmck.livejournal.com/40593.html
> -
> -	f.	Reader-writer locking is not modeled.  It can be
> +	e.	Reader-writer locking is not modeled.  It can be
>  		emulated in litmus tests using atomic read-modify-write
>  		operations.

Excellent suggestion!

Acked-by: Alan Stern <stern@...land.harvard.edu>

Alan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ