diff options
| author | Song Liu <song@kernel.org> | 2026-09-16 11:43:25 -0700 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-09-21 11:12:06 +0200 |
| commit | a87892ac05098d23e855e25c7afc128b1e9973fe (patch) | |
| tree | 99625ec759d01a00c0c059738af0c1b154ef99ba /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 35021df3834e0b51dd77e4be6ee7cbe9bcfa4825 (diff) | |
objtool/klp: Add test for EXPORT_SYMBOL_FOR_MODULES references
A symbol exported with EXPORT_SYMBOL_FOR_MODULES() is reachable only by the
modules named in its namespace, and a livepatch module is never one of
them. So a reference to it cannot be an ordinary relocation resolved by the
module loader; it has to be a klp relocation applied at patch time.
Getting this wrong is silent. The module links, loads, and reads the wrong
thing, or fails to load for a reason that does not name the cause.
This tests the behavior of commit 4cd3cfb8b54f ("objtool/klp: Fix
relocations for EXPORT_SYMBOL_FOR_MODULES() symbols"). Which object the
resulting relocation is filed under is a separate question, and one this
test cannot ask: the patched object here is vmlinux, so the vmlinux section
is the one produced either way. That is covered by the module case, in
"objtool/klp: Add test for vmlinux relocs in a patched module".
Assisted-by: Claude:claude-opus-4
Based-on-test-by: Joe Lawrence <joe.lawrence@redhat.com>
Assisted-by: Claude:claude-opus-5
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/20260916184351.2720310-33-song@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
