]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Fix test_attach_probe for powerpc uprobes
authorJiri Olsa <jolsa@kernel.org>
Fri, 5 Mar 2021 13:40:50 +0000 (14:40 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 8 Mar 2021 16:43:20 +0000 (08:43 -0800)
commitd6dd35be96a00110b4547b54aa069ff38c32a7b7
tree8b719213f0543bc2f202f6650362fdfe23c6ab8a
parent30b7d00046c5d0c58771f7f8ffc445a81d582de5
selftests/bpf: Fix test_attach_probe for powerpc uprobes

When testing uprobes we the test gets GEP (Global Entry Point)
address from kallsyms, but then the function is called locally
so the uprobe is not triggered.

Fixing this by adjusting the address to LEP (Local Entry Point)
for powerpc arch plus instruction check stolen from ppc_function_entry
function pointed out and explained by Michael and Naveen.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Link: https://lore.kernel.org/bpf/20210305134050.139840-1-jolsa@kernel.org
tools/testing/selftests/bpf/prog_tests/attach_probe.c