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: <Zbkt94Q8a-xFXrve@FVFF77S0Q05N>
Date: Tue, 30 Jan 2024 17:12:23 +0000
From: Mark Rutland <mark.rutland@....com>
To: "Paul E. McKenney" <paulmck@...nel.org>
Cc: linux-kernel@...r.kernel.org,
	"E."@paulmck-thinkpad-p17-gen-1.smtp.subspace.kernel.org,
	Alan Stern <stern@...land.harvard.edu>,
	Andrea Parri <parri.andrea@...il.com>, Will Deacon <will@...nel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Boqun Feng <boqun.feng@...il.com>,
	Nicholas Piggin <npiggin@...il.com>,
	David Howells <dhowells@...hat.com>,
	Jade Alglave <j.alglave@....ac.uk>,
	Luc Maranget <luc.maranget@...ia.fr>,
	Paul@...lmck-thinkpad-p17-gen-1.smtp.subspace.kernel.org,
	Akira Yokosawa <akiyks@...il.com>,
	Daniel Lustig <dlustig@...dia.com>,
	Joel Fernandes <joel@...lfernandes.org>,
	Jonathan Corbet <corbet@....net>, linux-arch@...r.kernel.org,
	linux-doc@...r.kernel.org,
	Anna-Maria Behnsen <anna-maria@...utronix.de>
Subject: Re: [PATCH doc] Emphasize that failed atomic operations give no
 ordering

On Tue, Jan 30, 2024 at 06:53:38AM -0800, Paul E. McKenney wrote:
> The ORDERING section of Documentation/atomic_t.txt can easily be read as
> saying that conditional atomic RMW operations that fail are ordered when
> those operations have the _acquire() or _release() prefixes.  This is
> not the case, therefore update this section to make it clear that failed
> conditional atomic RMW operations provide no ordering.
> 
> Reported-by: Anna-Maria Behnsen <anna-maria@...utronix.de>
> Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
> Cc: Alan Stern <stern@...land.harvard.edu>
> Cc: Andrea Parri <parri.andrea@...il.com>
> Cc: Will Deacon <will@...nel.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Boqun Feng <boqun.feng@...il.com>
> Cc: Nicholas Piggin <npiggin@...il.com>
> Cc: David Howells <dhowells@...hat.com>
> Cc: Jade Alglave <j.alglave@....ac.uk>
> Cc: Luc Maranget <luc.maranget@...ia.fr>
> Cc: "Paul E. McKenney" <paulmck@...nel.org>
> Cc: Akira Yokosawa <akiyks@...il.com>
> Cc: Daniel Lustig <dlustig@...dia.com>
> Cc: Joel Fernandes <joel@...lfernandes.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Jonathan Corbet <corbet@....net>
> Cc: <linux-arch@...r.kernel.org>
> Cc: <linux-doc@...r.kernel.org>
> 
> diff --git a/Documentation/atomic_t.txt b/Documentation/atomic_t.txt
> index d7adc6d543db4..bee3b1bca9a7b 100644
> --- a/Documentation/atomic_t.txt
> +++ b/Documentation/atomic_t.txt
> @@ -171,14 +171,14 @@ The rule of thumb:
>   - RMW operations that are conditional are unordered on FAILURE,
>     otherwise the above rules apply.
>  
> -Except of course when an operation has an explicit ordering like:
> +Except of course when a successful operation has an explicit ordering like:
>  
>   {}_relaxed: unordered
>   {}_acquire: the R of the RMW (or atomic_read) is an ACQUIRE
>   {}_release: the W of the RMW (or atomic_set)  is a  RELEASE
>  
>  Where 'unordered' is against other memory locations. Address dependencies are
> -not defeated.
> +not defeated.  Conditional operations are still unordered on FAILURE.
>  
>  Fully ordered primitives are ordered against everything prior and everything
>  subsequent. Therefore a fully ordered primitive is like having an smp_mb()
> 

FWIW:

Acked-by: Mark Rutland <mark.rutland@....com>

Mark.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ