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  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:   Mon, 11 May 2020 17:09:20 -0700
From:   Linus Torvalds <>
To:     "Jason A. Donenfeld" <>
Cc:     Linux Kernel Mailing List <>,
        Linux Kbuild mailing list <>,
        "the arch/x86 maintainers" <>,
        stable <>, "H.J. Lu" <>,
        Peter Zijlstra <>,
        Jakub Jelinek <>,
        Oleksandr Natalenko <>,
        Arnd Bergmann <>,
        Andrew Morton <>,
        David Laight <>,
        Masahiro Yamada <>
Subject: Re: [PATCH v2] Kconfig: default to CC_OPTIMIZE_FOR_PERFORMANCE_O3 for
 gcc >= 10

On Mon, May 11, 2020 at 5:04 PM Linus Torvalds
<> wrote:
> Not inlining as aggressively is not necessarily a bad thing. It can
> be, of course. But I've actually also done gcc bugreports about gcc
> inlining too much, and generating _worse_ code as a result (ie
> inlinging things that were behind an "if (unlikely())" test, and
> causing the likely path to grow a stack fram and stack spills as a
> result).

In case people care, the bugzilla case I mentioned is this one:

with example code on why it's actively wrong to inline.

Obviously, in the kernel, we can fix the obvious cases with "noinline"
and "always_inline", but those take care of the outliers.  Having a
compiler that does reasonably well by default is a good thing, and
that very much includes *not* inlining mindlessly.


Powered by blists - more mailing lists