From: Linus Torvalds <torvalds@linux-foundation.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
Arnd Bergmann <arnd@kernel.org>,
Kees Cook <keescook@chromium.org>,
Nathan Chancellor <nathan@kernel.org>,
Michal Marek <michal.lkml@markovi.net>,
Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
llvm@lists.linux.dev
Subject: Re: [PATCH] modpost: add allow list for llvm IPSCCP
Date: Wed, 29 Sep 2021 16:28:40 -0700 [thread overview]
Message-ID: <CAHk-=wh0BNEDz+uOdJWG8iW=n0PeOEjZpHyuSN2g0pKSCj+6iQ@mail.gmail.com> (raw)
In-Reply-To: <20210929225850.3889950-1-ndesaulniers@google.com>
On Wed, Sep 29, 2021 at 3:59 PM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>
> +static const struct secref_exception secref_allowlist[] = {
> + { .fromsym = "__first_node", .tosym = "numa_nodes_parsed" },
> + { .fromsym = "__next_node", .tosym = "numa_nodes_parsed" },
> + { .fromsym = "__nodes_weight", .tosym = "numa_nodes_parsed" },
> + { .fromsym = "early_get_smp_config", .tosym = "x86_init" },
> + { .fromsym = "test_bit", .tosym = "numa_nodes_parsed" },
> +};
This list is basically made-up and random.
Why did those functions not get inlined? Wouldn't it be better to make
them always-inline?
Or, like in at least the early_get_smp_config() case, just make it be
marked __init, so that if it doesn't get inlined it gets the right
section?
It seems silly to add random source mappings to a checking program.
It was bad for the gcc constprop hack, but at least there it was a
clear case of "this inlining failed". This ad-hoc list has cases of
things that are clearly wrong in general ("test_bit()" must not use
initdata), and that "ok, the function just doesn't have the right
section marker.
(All of get_smp_config/early_get_smp_config/find_smp_config should be
__init, since they most definitely cannot work after __init time - but
why a compiler doesn't just inline them when they are one single
indirect call, I don't really get)
Linus
next prev parent reply other threads:[~2021-09-29 23:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 22:58 [PATCH] modpost: add allow list for llvm IPSCCP Nick Desaulniers
2021-09-29 23:28 ` Linus Torvalds [this message]
2021-09-30 0:18 ` Nick Desaulniers
2021-09-30 8:13 ` Rasmus Villemoes
2021-09-30 12:45 ` Masahiro Yamada
2021-09-30 18:54 ` Linus Torvalds
2021-09-30 19:21 ` Linus Torvalds
2021-10-01 23:26 ` Nick Desaulniers
2021-09-30 23:32 ` Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHk-=wh0BNEDz+uOdJWG8iW=n0PeOEjZpHyuSN2g0pKSCj+6iQ@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=arnd@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=michal.lkml@markovi.net \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).