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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 04 Jun 2018 16:24:46 -0700 (PDT)
From:   Palmer Dabbelt <palmer@...ive.com>
To:     mark.rutland@....com
CC:     linux-kernel@...r.kernel.org, mark.rutland@....com,
        boqun.feng@...il.com, Will Deacon <will.deacon@....com>
Subject:     Re: [PATCHv2 02/16] atomics/treewide: remove redundant atomic_inc_not_zero() definitions

On Tue, 29 May 2018 08:43:32 PDT (-0700), mark.rutland@....com wrote:
> When atomic_inc_not_zero(v) isn't defined, <linux/atomic.h> will define
> it as falling back to atomic_add_unless((v), 1, 0), so there's no need
> for arch code to do so.
>
> There should be no functional change as a result of this patch.
>
> Signed-off-by: Mark Rutland <mark.rutland@....com>
> Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> Cc: Boqun Feng <boqun.feng@...il.com>
> Cc: Will Deacon <will.deacon@....com>
> ---
>  arch/arc/include/asm/atomic.h     | 2 --
>  arch/hexagon/include/asm/atomic.h | 2 --
>  arch/riscv/include/asm/atomic.h   | 9 ---------
>  3 files changed, 13 deletions(-)
> [...]
> diff --git a/arch/riscv/include/asm/atomic.h b/arch/riscv/include/asm/atomic.h
> index 739e810c857e..0e27e050ba14 100644
> --- a/arch/riscv/include/asm/atomic.h
> +++ b/arch/riscv/include/asm/atomic.h
> @@ -375,15 +375,6 @@ static __always_inline int atomic64_add_unless(atomic64_t *v, long a, long u)
>  }
>  #endif
>
> -/*
> - * The extra atomic operations that are constructed from one of the core
> - * LR/SC-based operations above.
> - */
> -static __always_inline int atomic_inc_not_zero(atomic_t *v)
> -{
> -        return atomic_fetch_add_unless(v, 1, 0);
> -}
> -
>  #ifndef CONFIG_GENERIC_ATOMIC64
>  static __always_inline long atomic64_inc_not_zero(atomic64_t *v)
>  {

Acked-by: Palmer Dabbelt <palmer@...ive.com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ