linux/arch/powerpc/net
Hari Bathini d2beb81904 powerpc64/bpf: fix the address returned by bpf_get_func_ip
commit 157820264a upstream.

bpf_get_func_ip() helper function returns the address of the traced
function. It relies on the IP address stored at ctx - 16 by the bpf
trampoline. On 64-bit powerpc, this address is recovered from LR
accounting for OOL trampoline. But the address stored here was off
by 4-bytes. Ensure the address is the actual start of the traced
function.

Reported-by: Abhishek Dubey <adubey@linux.ibm.com>
Fixes: d243b62b7b ("powerpc64/bpf: Add support for bpf trampolines")
Cc: stable@vger.kernel.org
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260303181031.390073-3-hbathini@linux.ibm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-03-19 16:08:44 +01:00
..
bpf_jit.h powerpc64/bpf: Implement bpf_addr_space_cast instruction 2025-09-06 15:49:43 +05:30
bpf_jit_comp.c powerpc64/bpf: fix the address returned by bpf_get_func_ip 2026-03-19 16:08:44 +01:00
bpf_jit_comp32.c powerpc64/bpf: Implement PROBE_MEM32 pseudo instructions 2025-09-06 15:49:43 +05:30
bpf_jit_comp64.c powerpc64/bpf: fix kfunc call support 2026-03-19 16:08:44 +01:00
Makefile powerpc/bpf: Implement extended BPF on PPC32 2021-04-03 21:22:21 +11:00