diff options
| author | Leon Hwang <[email protected]> | 2024-10-31 15:28:44 +0000 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2024-11-01 19:31:44 +0000 |
| commit | 4d99e509c161f8610de125202c648fa4acd00541 (patch) | |
| tree | 88876abd37a910cee1893423c013164294f27b1e /tools/testing/selftests/bpf/prog_tests/tracing_struct.c | |
| parent | selftests/bpf: Add a test for open coded kmem_cache iter (diff) | |
| download | kernel-4d99e509c161f8610de125202c648fa4acd00541.tar.gz kernel-4d99e509c161f8610de125202c648fa4acd00541.zip | |
bpf, bpftool: Fix incorrect disasm pc
This patch addresses the bpftool issue "Wrong callq address displayed"[0].
The issue stemmed from an incorrect program counter (PC) value used during
disassembly with LLVM or libbfd.
For LLVM: The PC argument must represent the actual address in the kernel
to compute the correct relative address.
For libbfd: The relative address can be adjusted by adding func_ksym within
the custom info->print_address_func to yield the correct address.
Links:
[0] https://github.com/libbpf/bpftool/issues/109
Changes:
v2 -> v3:
* Address comment from Quentin:
* Remove the typedef.
v1 -> v2:
* Fix the broken libbfd disassembler.
Fixes: e1947c750ffe ("bpftool: Refactor disassembler for JIT-ed programs")
Signed-off-by: Leon Hwang <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Tested-by: Quentin Monnet <[email protected]>
Reviewed-by: Quentin Monnet <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tracing_struct.c')
0 files changed, 0 insertions, 0 deletions
