[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <168920160691.3781136.7715367614867053724.b4-ty@chromium.org>
Date: Wed, 12 Jul 2023 15:40:09 -0700
From: Kees Cook <keescook@...omium.org>
To: Nick Desaulniers <ndesaulniers@...gle.com>,
Petr Mladek <pmladek@...e.com>, Song Liu <song@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Yonghong Song <yhs@...com>
Cc: Kees Cook <keescook@...omium.org>,
Fangrui Song <maskray@...gle.com>, kernel-team@...com,
Leizhen <thunder.leizhen@...wei.com>,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH v2] kallsyms: strip LTO-only suffixes from promoted global functions
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
Best regards,
--
Kees Cook
Powered by blists - more mailing lists