]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
libbpf: Fix powerpc's stack register definition in bpf_tracing.h
authorAndrii Nakryiko <andrii@kernel.org>
Mon, 20 Oct 2025 20:36:43 +0000 (13:36 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 23 Oct 2025 18:25:16 +0000 (11:25 -0700)
commit7221b9caf84b3294688228a19273d74ea19a2ee4
tree32412058534857982a2543dffc0b50800f1db140
parent881a9c9cb7856b24e390fad9f59acfd73b98b3b2
libbpf: Fix powerpc's stack register definition in bpf_tracing.h

retsnoop's build on powerpc (ppc64le) architecture ([0]) failed due to
wrong definition of PT_REGS_SP() macro. Looking at powerpc's
implementation of stack unwinding in perf_callchain_user_64() clearly
shows that stack pointer register is gpr[1].

Fix libbpf's definition of __PT_SP_REG for powerpc to fix all this.

  [0] https://kojipkgs.fedoraproject.org/work/tasks/1544/137921544/build.log

Fixes: 138d6153a139 ("samples/bpf: Enable powerpc support")
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Naveen N Rao (AMD) <naveen@kernel.org>
Link: https://lore.kernel.org/r/20251020203643.989467-1-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/bpf_tracing.h