From: Petr Pavlu <petr.pavlu@suse.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Luis Chamberlain <mcgrof@kernel.org>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Aaron Tomlin <atomlin@atomlin.com>,
linux-modules@vger.kernel.org, loongarch@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] module/kallsyms: Filter out local and mapping symbols during module load
Date: Tue, 18 Aug 2026 13:59:55 +0200 [thread overview]
Message-ID: <4e351b13-1670-4813-ac98-e44c00703601@suse.com> (raw)
In-Reply-To: <20260812032807.15034-4-yangtiezhu@loongson.cn>
On 8/12/26 5:28 AM, Tiezhu Yang wrote:
> The compiler toolchains generate local and mapping symbols on certain
> architectures like LoongArch for optimizations and relocations.
Nit: "local" -> "local label".
>
> While the symbols are already filtered out during runtime lookups via
> find_kallsyms_symbol(), they still leak into /proc/kallsyms for loaded
> modules because layout_symtab() and add_kallsyms() do not filter them
> during load time.
>
> Consequently, tracing tools like bpftrace (which do not perform internal
> filtering, unlike perf) resolve identical addresses into confusing local
> labels instead of actual clear C function names.
>
> Fix this by integrating the is_local_mapping_symbol() check directly into
> the newly introduced is_kept_symbol() helper. This ensures these unneeded
> symbols are stripped during module load time, keeping /proc/kallsyms clean
> and resulting in accurate call stacks.
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
--
Thanks,
Petr
next prev parent reply other threads:[~2026-08-18 11:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 3:28 [PATCH v3 0/3] Filter out local and mapping symbols during module load Tiezhu Yang
2026-08-12 3:28 ` [PATCH v3 1/3] module/kallsyms: Rename is_mapping_symbol() to is_local_mapping_symbol() Tiezhu Yang
2026-08-18 11:56 ` Petr Pavlu
2026-08-18 13:04 ` Tiezhu Yang
2026-08-20 9:53 ` Petr Pavlu
2026-08-12 3:28 ` [PATCH v3 2/3] module/kallsyms: Refactor current symbol filtering into is_kept_symbol() Tiezhu Yang
2026-08-12 3:42 ` sashiko-bot
2026-08-18 11:58 ` Petr Pavlu
2026-08-18 13:05 ` Tiezhu Yang
2026-08-12 3:28 ` [PATCH v3 3/3] module/kallsyms: Filter out local and mapping symbols during module load Tiezhu Yang
2026-08-12 3:44 ` sashiko-bot
2026-08-12 4:19 ` Tiezhu Yang
2026-08-18 11:59 ` Petr Pavlu [this message]
2026-08-18 13:06 ` Tiezhu Yang
2026-08-12 15:17 ` [PATCH v3 0/3] " Huacai Chen
2026-08-17 14:11 ` Huacai Chen
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=4e351b13-1670-4813-ac98-e44c00703601@suse.com \
--to=petr.pavlu@suse.com \
--cc=atomlin@atomlin.com \
--cc=da.gomez@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=mcgrof@kernel.org \
--cc=samitolvanen@google.com \
--cc=yangtiezhu@loongson.cn \
/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