summaryrefslogtreecommitdiff
path: root/tools/bpf/bpf_asm.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2024-01-31 21:24:16 +0200
committerNamhyung Kim <namhyung@kernel.org>2024-02-16 11:44:04 -0800
commit6f04d664a9fa191e97b54a19f95f2db140554662 (patch)
tree25892747aebb6ac63defe82efd3dfd7e85e39e82 /tools/bpf/bpf_asm.c
parent81901fc0640dc8d0210a24c43edff5018b4cc047 (diff)
perf test: Enable Symbols test to work with a current module dso
The test needs a struct machine and creates one for the current host, but a side-effect is that struct machine has set up kernel maps including module maps. If the 'Symbols' test --dso option specifies a current kernel module, it will already be present as a kernel dso, and a map with kmaps needs to be used otherwise there will be a segfault - see below. For that case, find the existing map and use that. In that case also, the dso is split by section into multiple dsos, so test those dsos also. That in turn, shows up that those dsos have not had overlapping symbols removed, so the test fails. Example: Before: $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/arch/x86/kvm/kvm-intel.ko 70: Symbols : --- start --- Testing /lib/modules/6.7.2-local/kernel/arch/x86/kvm/kvm-intel.ko Segmentation fault (core dumped) After: $ perf test -F -v Symbols --dso /lib/modules/$(uname -r)/kernel/arch/x86/kvm/kvm-intel.ko 70: Symbols : --- start --- Testing /lib/modules/6.7.2-local/kernel/arch/x86/kvm/kvm-intel.ko Overlapping symbols: 41d30-41fbb l vmx_init 41d30-41fbb g init_module ---- end ---- Symbols: FAILED! Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240131192416.16387-1-adrian.hunter@intel.com
Diffstat (limited to 'tools/bpf/bpf_asm.c')
0 files changed, 0 insertions, 0 deletions