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:   Thu, 13 Jan 2022 17:58:57 +0100
From:   Marco Elver <elver@...gle.com>
To:     Borislav Petkov <bp@...en8.de>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Arnd Bergmann <arnd@...db.de>,
        Boqun Feng <boqun.feng@...il.com>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Will Deacon <will@...nel.org>, X86 ML <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/2] generic/bitops: Always inline some more generic helpers

On Thu, 13 Jan 2022 at 16:53, Borislav Petkov <bp@...en8.de> wrote:
>
> From: Borislav Petkov <bp@...e.de>
>
> Hi all,
>
> a build report by the 0day robot:
>
>   https://lore.kernel.org/r/Yc7t934f%2Bf/mO8lj@zn.tnic
>
> made me look at asm and how gcc, at least, generates funky calls to the
> *_bit() bit manipulation functions on x86 instead of inlining them into
> the call sites as on x86 that's a single insn, in most of the cases.
>
> So PeterZ says the way to go is to always inline them. So here they are.
> The fun thing is that on x86 there is even a size decrease of more than
> a Kilobyte for a defconfig, which is nice, see patch 1.
>
> As always, comments and suggestions are welcome.
>
> Thx.
>
> Borislav Petkov (2):
>   asm-generic/bitops: Always inline all bit manipulation helpers
>   cpumask: Always inline helpers which use bit manipulation functions
>
>  include/asm-generic/bitops/instrumented-atomic.h | 12 ++++++------
>  .../asm-generic/bitops/instrumented-non-atomic.h | 16 ++++++++--------
>  include/linux/cpumask.h                          | 14 +++++++-------
>  3 files changed, 21 insertions(+), 21 deletions(-)

Acked-by: Marco Elver <elver@...gle.com>

Yup, this is probably something we should have done a long time ago. :-)

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ