From: Yonghong Song <yonghong.song@linux.dev>
To: Andrii Nakryiko <andrii@kernel.org>,
bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net,
martin.lau@kernel.org
Cc: kernel-team@meta.com
Subject: Re: [PATCH bpf-next] libbpf: work around kernel inconsistently stripping '.llvm.' suffix
Date: Thu, 16 Jan 2025 20:01:57 -0800 [thread overview]
Message-ID: <20050719-365d-431d-90d5-183b35e328ae@linux.dev> (raw)
In-Reply-To: <20250117003957.179331-1-andrii@kernel.org>
On 1/16/25 4:39 PM, Andrii Nakryiko wrote:
> Some versions of kernel were stripping out '.llvm.<hash>' suffix from
> kerne symbols (produced by Clang LTO compilation) from function names
> reported in available_filter_functions, while kallsyms reported full
> original name. This confuses libbpf's multi-kprobe logic of finding all
> matching kernel functions for specified user glob pattern by joining
> available_filter_functions and kallsyms contents, because joining by
> full symbol name won't work for symbols containing '.llvm.<hash>' suffix.
>
> This was eventually fixed by [0] in the kernel, but we'd like to not
> regress multi-kprobe experience and add a work around for this bug on
> libbpf side, stripping kallsym's name if it matches user pattern and
> contains '.llvm.' suffix.
>
> [0] fb6a421fb615 ("kallsyms: Match symbols exactly with CONFIG_LTO_CLANG")
>
> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
The fix LGTM.
Acked-by: Yonghong Song <yonghong.song@linux.dev>
next prev parent reply other threads:[~2025-01-17 4:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 0:39 [PATCH bpf-next] libbpf: work around kernel inconsistently stripping '.llvm.' suffix Andrii Nakryiko
2025-01-17 4:01 ` Yonghong Song [this message]
2025-01-17 14:20 ` patchwork-bot+netdevbpf
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=20050719-365d-431d-90d5-183b35e328ae@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kernel-team@meta.com \
--cc=martin.lau@kernel.org \
/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