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:   Thu, 6 Jun 2019 10:44:21 +0200
From:   Andrea Parri <andrea.parri@...rulasolutions.com>
To:     torvalds@...ux-foundation.org, mingo@...nel.org,
        gregkh@...uxfoundation.org, tglx@...utronix.de, hpa@...or.com,
        peterz@...radead.org, will.deacon@....com,
        linux-kernel@...r.kernel.org
Cc:     linux-tip-commits@...r.kernel.org
Subject: Re: [tip:locking/core] Documentation/atomic_t.txt: Clarify pure
 non-rmw usage

On Mon, Jun 03, 2019 at 06:46:54AM -0700, tip-bot for Peter Zijlstra wrote:
> Commit-ID:  fff9b6c7d26943a8eb32b58364b7ec6b9369746a
> Gitweb:     https://git.kernel.org/tip/fff9b6c7d26943a8eb32b58364b7ec6b9369746a
> Author:     Peter Zijlstra <peterz@...radead.org>
> AuthorDate: Fri, 24 May 2019 13:52:31 +0200
> Committer:  Ingo Molnar <mingo@...nel.org>
> CommitDate: Mon, 3 Jun 2019 12:32:57 +0200
> 
> Documentation/atomic_t.txt: Clarify pure non-rmw usage
> 
> Clarify that pure non-RMW usage of atomic_t is pointless, there is
> nothing 'magical' about atomic_set() / atomic_read().
> 
> This is something that seems to confuse people, because I happen upon it
> semi-regularly.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Acked-by: Will Deacon <will.deacon@....com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Link: https://lkml.kernel.org/r/20190524115231.GN2623@hirez.programming.kicks-ass.net
> Signed-off-by: Ingo Molnar <mingo@...nel.org>

I'd appreciate if you could Cc: me in future changes to this doc.
(as currently suggested by get_maintainer.pl).

This is particularly annoying when you spend time to review such
changes:

  https://lkml.kernel.org/r/20190528111558.GA9106@andrea

Thanks,
  Andrea


> ---
>  Documentation/atomic_t.txt | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/atomic_t.txt b/Documentation/atomic_t.txt
> index dca3fb0554db..89eae7f6b360 100644
> --- a/Documentation/atomic_t.txt
> +++ b/Documentation/atomic_t.txt
> @@ -81,9 +81,11 @@ Non-RMW ops:
>  
>  The non-RMW ops are (typically) regular LOADs and STOREs and are canonically
>  implemented using READ_ONCE(), WRITE_ONCE(), smp_load_acquire() and
> -smp_store_release() respectively.
> +smp_store_release() respectively. Therefore, if you find yourself only using
> +the Non-RMW operations of atomic_t, you do not in fact need atomic_t at all
> +and are doing it wrong.
>  
> -The one detail to this is that atomic_set{}() should be observable to the RMW
> +A subtle detail of atomic_set{}() is that it should be observable to the RMW
>  ops. That is:
>  
>    C atomic-set

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ