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:   Fri, 10 Jan 2020 18:58:06 +0100
From:   Arnd Bergmann <arnd@...db.de>
To:     Will Deacon <will@...nel.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        linux-arch <linux-arch@...r.kernel.org>,
        Android Kernel Team <kernel-team@...roid.com>,
        Michael Ellerman <mpe@...erman.id.au>,
        Peter Zijlstra <peterz@...radead.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Segher Boessenkool <segher@...nel.crashing.org>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Subject: Re: [RFC PATCH 0/8] Rework READ_ONCE() to improve codegen

On Fri, Jan 10, 2020 at 5:56 PM Will Deacon <will@...nel.org> wrote:
>
> Hi all,
>
> This is a follow-up RFC to the discussions we had on the mailing list at
> the end of last year:
>
> https://lore.kernel.org/lkml/875zimp0ay.fsf@mpe.ellerman.id.au
>
> Unfortunately, we didn't get a "silver bullet" solution out of that
> long thread, but I've tried to piece together some of the bits and
> pieces we discussed and I've ended up with this series, which does at
> least solve the pressing problem with the bitops for arm64.
>
> The rough summary of the series is:
>
>   * Drop the GCC 4.8 workarounds, so that READ_ONCE() is a
>     straightforward dereference of a cast-to-volatile pointer.
>
>   * Require that the access is either 1, 2, 4 or 8 bytes in size
>     (even 32-bit architectures tend to use 8-byte accesses here).
>
>   * Introduce __READ_ONCE() for tearing operations with no size
>     restriction.
>
>   * Drop pointer qualifiers from scalar types, so that volatile scalars
>     don't generate horrible stack-spilling mess. This is pretty ugly,
>     but it's also mechanical and wrapped up in a macro.
>
>   * Convert acquire/release accessors to perform the same qualifier
>     stripping.
>
> I gave up trying to prevent READ_ONCE() on aggregates because it is
> pervasive, particularly within the mm/ layer on things like pmd_t.
> Thankfully, these don't tend to be volatile.
>
> I have more patches in this area because I'm trying to move all the
> read_barrier_depends() magic into arch/alpha/, but I'm holding off until
> we agree on this part first.

Looks very nice overall, thanks for working on this.

I've added a the series into my randconfig build setup to see
if I run into build-time regressions. Unfortunately there are some
conflicts with the kcsan patches in linux-next that I have to work
around first.

       Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ