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: <20180704152422.GK4828@arm.com>
Date:   Wed, 4 Jul 2018 16:24:22 +0100
From:   Will Deacon <will.deacon@....com>
To:     Mark Rutland <mark.rutland@....com>
Cc:     linux-kernel@...r.kernel.org, peterz@...radead.org,
        boqun.feng@...il.com, Catalin Marinas <catalin.marinas@....com>
Subject: Re: [PATCHv2 11/11] arm64: use instrumented atomics

On Mon, Jun 25, 2018 at 11:59:52AM +0100, Mark Rutland wrote:
> Now that the generic atomic headers provide instrumented wrappers of all
> the atomics implemented by arm64, let's migrate arm64 over to these.
> 
> The additional instrumentation will help to find bugs (e.g. when fuzzing
> with Syzkaller).
> 
> Mostly this change involes adding an arch_ prefix to a number of
> function names and macro definitions. Due to the way we call the LL/SC
> atomics via the LSE atomic wrappers, this requires adding an arch_
> prefix to some arm64-specific atomic primitives.
> 
> Some unusual whitespace in the cmpxchg wrappers is fixed up as part of
> the change.
> 
> Signed-off-by: Mark Rutland <mark.rutland@....com>
> Cc: Catalin Marinas <catalin.marinas@....com>
> Cc: Will Deacon <will.deacon@....com>
> ---
>  arch/arm64/include/asm/atomic.h      | 237 ++++++++++++++++++-----------------
>  arch/arm64/include/asm/atomic_lse.h  |  51 ++++----
>  arch/arm64/include/asm/cmpxchg.h     | 106 ++++++++--------
>  arch/arm64/include/asm/lse.h         |   2 +-
>  arch/arm64/include/asm/sync_bitops.h |  16 +--
>  5 files changed, 212 insertions(+), 200 deletions(-)

This is mostly straightforward, but the cmpxchg/cmpxchg_double cases grow
an 'arch' prefix which suggests that they're part of the API with the core
atomics and also makes them horribly ugly. This just looks to be an artifact
of __LL_SC_CALL pasting that in. Can you drop that auto pasting of 'arch',
and instead change the non-cmpxchg-case callers of the macro to include the
arch prefix instead, please?

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ