Linux Modules
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Petr Pavlu <petr.pavlu@suse.com>
Cc: linux-modules@vger.kernel.org, loongarch@lists.linux.dev,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Nathan Chancellor <nathan@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH v4 0/3] Ignore local labels and mapping symbols during module load
Date: Thu, 20 Aug 2026 20:50:04 +0800	[thread overview]
Message-ID: <20260820125007.22943-1-yangtiezhu@loongson.cn> (raw)

This series prevents compiler generated local labels and mapping symbols
from leaking into /proc/kallsyms for loaded modules. This ensures tracing
tools like bpftrace can resolve accurate kernel stacks on architectures
like LoongArch.

Based on the latest modules-next tree:
https://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git/log/?h=modules-next

There are many discussions in the previous version, here is the link:
https://lore.kernel.org/loongarch/20260812032807.15034-1-yangtiezhu@loongson.cn/

v4:
  (1) Use is_ignored_kernel_symbol() and update
      tools/perf/util/symbol.h in patch #1
  (2) Keep using is_core_symbol() in patch #2
  (3) Update commit messages of the three patches

Cc the maintainers of the updated non-module files:
  (1) Josh Poimboeuf <jpoimboe@kernel.org> -- scripts/faddr2line
  (2) Nathan Chancellor <nathan@kernel.org> -- scripts/mod/modpost.h
  (3) Namhyung Kim <namhyung@kernel.org> -- tools/perf/util/symbol.h

Tiezhu Yang (3):
  module/kallsyms: Rename is_mapping_symbol() to
    is_ignored_kernel_symbol()
  module/kallsyms: Refactor current symbol filtering into
    is_core_symbol()
  module/kallsyms: Ignore local labels and mapping symbols during module
    load

 include/linux/module_symbol.h |  7 +++--
 kernel/module/kallsyms.c      | 59 ++++++++++++++++++-----------------
 scripts/faddr2line            |  2 +-
 scripts/mod/modpost.h         |  2 +-
 tools/perf/util/symbol.h      |  4 +--
 5 files changed, 39 insertions(+), 35 deletions(-)

-- 
2.42.0


             reply	other threads:[~2026-08-20 12:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-20 12:50 Tiezhu Yang [this message]
2026-08-20 12:50 ` [PATCH v4 1/3] module/kallsyms: Rename is_mapping_symbol() to is_ignored_kernel_symbol() Tiezhu Yang
2026-08-24  8:45   ` Huacai Chen
2026-08-25  1:39     ` Tiezhu Yang
2026-09-01 12:30   ` Petr Pavlu
2026-08-20 12:50 ` [PATCH v4 2/3] module/kallsyms: Refactor current symbol filtering into is_core_symbol() Tiezhu Yang
2026-08-20 12:50 ` [PATCH v4 3/3] module/kallsyms: Ignore local labels and mapping symbols during module load Tiezhu Yang

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=20260820125007.22943-1-yangtiezhu@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=jpoimboe@kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=namhyung@kernel.org \
    --cc=nathan@kernel.org \
    --cc=petr.pavlu@suse.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