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:   Tue, 26 Oct 2021 05:29:36 -0700
From:   Max Filippov <jcmvbkbc@...il.com>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Arnd Bergmann <arnd@...db.de>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Chris Zankel <chris@...kel.net>,
        Darren Hart <dvhart@...radead.org>,
        Davidlohr Bueso <dave@...olabs.net>,
        André Almeida <andrealmeid@...labora.com>,
        Masahiro Yamada <masahiroy@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Nathan Chancellor <nathan@...nel.org>,
        linux-mips@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
        "open list:TENSILICA XTENSA PORT (xtensa)" 
        <linux-xtensa@...ux-xtensa.org>,
        Linux-Arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH 1/2] futex: ensure futex_atomic_cmpxchg_inatomic() is present

On Tue, Oct 26, 2021 at 3:04 AM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> The boot-time detection of futex_atomic_cmpxchg_inatomic()
> has a bug on some 32-bit arm builds, and Thomas Gleixner
> suggested that setting CONFIG_HAVE_FUTEX_CMPXCHG would
> avoid the problem, as it is always present anyway.
>
> Looking into which other architectures could do the same
> showed that almost all architectures have it, the exceptions
> being:
>
>  - some old 32-bit MIPS uniprocessor cores without ll/sc
>  - one xtensa variant with no SMP
>  - 32-bit SPARC when built for SMP
>
> Fix MIPS And Xtensa by rearranging the generic code to let it be used
> as a fallback.
>
> For SPARC, the SMP definition just ends up turning off futex anyway,
> so this can be done at Kconfig time instead. Note that sparc32
> glibc requires the CASA instruction for its mutexes anyway,
> which is only available when running on SPARCv9 or LEON CPUs,
> but needs to be implemented in the sparc32 kernel for those.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  arch/mips/include/asm/futex.h   | 29 ++++++++++++++++++-----------
>  arch/xtensa/include/asm/futex.h |  8 ++++++--
>  include/asm-generic/futex.h     | 31 +++++++++++--------------------
>  init/Kconfig                    |  1 +
>  4 files changed, 36 insertions(+), 33 deletions(-)

For xtensa:
Acked-by: Max Filippov <jcmvbkbc@...il.com>

-- 
Thanks.
-- Max

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ