From: Yonghong Song <yhs@meta.com>
To: Kees Cook <keescook@chromium.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Petr Mladek <pmladek@suse.com>, Song Liu <song@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>, Yonghong Song <yhs@fb.com>
Cc: Fangrui Song <maskray@google.com>,
kernel-team@fb.com, Leizhen <thunder.leizhen@huawei.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH v2] kallsyms: strip LTO-only suffixes from promoted global functions
Date: Wed, 12 Jul 2023 23:14:20 -0700 [thread overview]
Message-ID: <a743d8e1-0460-775c-2a21-54a891d6a973@meta.com> (raw)
In-Reply-To: <168920160691.3781136.7715367614867053724.b4-ty@chromium.org>
On 7/12/23 3:40 PM, Kees Cook wrote:
>
> On Wed, 28 Jun 2023 11:19:26 -0700, Yonghong Song wrote:
>> Commit 6eb4bd92c1ce ("kallsyms: strip LTO suffixes from static functions")
>> stripped all function/variable suffixes started with '.' regardless
>> of whether those suffixes are generated at LTO mode or not. In fact,
>> as far as I know, in LTO mode, when a static function/variable is
>> promoted to the global scope, '.llvm.<...>' suffix is added.
>>
>> The existing mechanism breaks live patch for a LTO kernel even if
>> no <symbol>.llvm.<...> symbols are involved. For example, for the following
>> kernel symbols:
>> $ grep bpf_verifier_vlog /proc/kallsyms
>> ffffffff81549f60 t bpf_verifier_vlog
>> ffffffff8268b430 d bpf_verifier_vlog._entry
>> ffffffff8282a958 d bpf_verifier_vlog._entry_ptr
>> ffffffff82e12a1f d bpf_verifier_vlog.__already_done
>> 'bpf_verifier_vlog' is a static function. '_entry', '_entry_ptr' and
>> '__already_done' are static variables used inside 'bpf_verifier_vlog',
>> so llvm promotes them to file-level static with prefix 'bpf_verifier_vlog.'.
>> Note that the func-level to file-level static function promotion also
>> happens without LTO.
>>
>> [...]
>
> Applied, thanks!
>
> [1/1] kallsyms: strip LTO-only suffixes from promoted global functions
> https://git.kernel.org/kees/c/8cc32a9bbf29
Thanks Kees!
>
> Best regards,
prev parent reply other threads:[~2023-07-13 6:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 18:19 Yonghong Song
2023-06-29 2:25 ` Leizhen (ThunderTown)
2023-07-07 22:27 ` Nick Desaulniers
2023-07-08 0:23 ` Yonghong Song
2023-07-12 20:21 ` Yonghong Song
2023-07-08 2:39 ` Song Liu
2023-07-12 22:40 ` Kees Cook
2023-07-13 6:14 ` Yonghong Song [this message]
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=a743d8e1-0460-775c-2a21-54a891d6a973@meta.com \
--to=yhs@meta.com \
--cc=keescook@chromium.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=maskray@google.com \
--cc=ndesaulniers@google.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=song@kernel.org \
--cc=thunder.leizhen@huawei.com \
--cc=yhs@fb.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
all inboxes | Powered by JetHome®