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/[email protected]/

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 <[email protected]> -- scripts/faddr2line
  (2) Nathan Chancellor <[email protected]> -- scripts/mod/modpost.h
  (3) Namhyung Kim <[email protected]> -- 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 via email to