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]
Message-ID: <CAKwvOdmak_L9Rp8FQ+N6-N9vWGH3M-jjP+XJTGUTeYCG9N_dBQ@mail.gmail.com>
Date:   Mon, 18 May 2020 16:54:31 -0700
From:   Nick Desaulniers <ndesaulniers@...gle.com>
To:     Brian Gerst <brgerst@...il.com>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
        "H . Peter Anvin" <hpa@...or.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 0/7] x86: Clean up percpu operations

On Mon, May 18, 2020 at 12:19 PM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> On Sun, May 17, 2020 at 8:29 AM Brian Gerst <brgerst@...il.com> wrote:
> >
> > The core percpu operations already have a switch on the width of the
> > data type, which resulted in an extra amount of dead code being
>
> Thanks for the series Brian.  The duplication between knowing the size
> at the call site and the switch is exactly what I picked up on, too.
> This past weekend I started a similar cleanup, but only got through 2
> of the 6 functions you cleaned up.  And via quick glance, your series
> looks much better than mine does.  I'll sit down and review+test these
> after lunch.  I appreciate you taking the time to create this series.

Patch set looks good.  I tested:
* i386_defconfig
* defconfig
* allyesconfig
with ToT Clang and GCC 9.2.1.  Booted the first two in QEMU as a smoke
test as well.

Note that for Clang, I also needed to apply this hunk to
arch/x86/include/asm/uaccess.h
(https://github.com/ClangBuiltLinux/continuous-integration/blob/master/patches/llvm-all/linux-next/x86/x86-support-i386-with-Clang.patch)
which will be the final issue for i386_defconfig+clang.

I think other than the 0day report on patch 4/7, and the use of
__same_type, the series is mostly good to go.  You can add my:
Tested-by: Nick Desaulniers <ndesaulniers@...gle.com>
to any v2 of the whole series.

I generally find the use of named assembly operands and a few of the
simplifications to be a nice touch, which I pointed out per patch.

Thanks again for shaving this yak.

>
> > generated with the x86 operations having another switch.  This patch set
> > rewrites the x86 ops to remove the switch.  Additional cleanups are to
> > use named assembly operands, and to cast variables to the width used in
> > the assembly to make Clang happy.
> >
> > Brian Gerst (7):
> >   x86/percpu: Introduce size abstraction macros
> >   x86/percpu: Clean up percpu_to_op()
> >   x86/percpu: Clean up percpu_from_op()
> >   x86/percpu: Clean up percpu_add_op()
> >   x86/percpu: Clean up percpu_add_return_op()
> >   x86/percpu: Clean up percpu_xchg_op()
> >   x86/percpu: Clean up percpu_cmpxchg_op()
> >
> >  arch/x86/include/asm/percpu.h | 447 ++++++++++++----------------------
> >  1 file changed, 158 insertions(+), 289 deletions(-)
> >
> > --

-- 
Thanks,
~Nick Desaulniers

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ