[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOdkKx2vjJc5zxBicYSvSgKKFdpd_HsS-2k9Vwfpni_WNvA@mail.gmail.com>
Date: Fri, 8 Apr 2022 13:16:35 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>,
Masahiro Yamada <masahiroy@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Michal Marek <michal.lkml@...kovi.net>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Sam Ravnborg <sam@...nborg.org>, X86 ML <x86@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Changbin Du <changbin.du@...il.com>,
linux-toolchains@...r.kernel.org,
clang-built-linux <llvm@...ts.linux.dev>
Subject: Re: [PATCH] kbuild: Remove CONFIG_DEBUG_SECTION_MISMATCH
On Fri, Apr 8, 2022 at 1:08 PM Nick Desaulniers <ndesaulniers@...gle.com> wrote:
>
> Lore thread start for newly cc'ed ML readers:
> https://lore.kernel.org/lkml/7fad83ecde03540e65677959034315f8fbb3755e.1649434832.git.jpoimboe@redhat.com/
>
> On Fri, Apr 8, 2022 at 12:14 PM Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > This weird option is having us upgrade quite a few 'inline' to
> > '__always_inline'.
>
> As is, the assumption that __init functions only call other __init
> functions or __always_inline is a brittle house of cards that leads to
> a "what color is your function" [0] scenario, and leads to code that
> happens to not emit warnings for compiler X (or compiler X version Y).
> There's also curious exceptions in modpost that look like memory leaks
> to me.
These assumptions perhaps made more sense in a world prior to
commit 889b3c1245de ("compiler: remove CONFIG_OPTIMIZE_INLINING entirely")
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=889b3c1245de48ed0cacf7aebb25c489d3e4a3e9
(I view 889b3c1245de favorably; perhaps this whole thread is just
fallout from that change though. It's also interesting to note that
CONFIG_OPTIMIZE_INLINING was enabled in the i386 and x86_64
defconfigs. That might color some folk's experience with the use of
`inline` in the kernel sources and whether "inline means
__attribute__((always_inline))").
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists