linux/arch/powerpc/net
Hari Bathini 35a4b8ce4a powerpc/bpf: populate extable entries only during the last pass
Since commit 85e031154c ("powerpc/bpf: Perform complete extra passes
to update addresses"), two additional passes are performed to avoid
space and CPU time wastage on powerpc. But these extra passes led to
WARN_ON_ONCE() hits in bpf_add_extable_entry() as extable entries are
populated again, during the extra pass, without resetting the index.
Fix it by resetting entry index before repopulating extable entries,
if and when there is an additional pass.

Fixes: 85e031154c ("powerpc/bpf: Perform complete extra passes to update addresses")
Cc: stable@vger.kernel.org # v6.3+
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230425065829.18189-1-hbathini@linux.ibm.com
2023-05-15 15:40:31 +10:00
..
bpf_jit_comp32.c powerpc/bpf/32: perform three operands ALU operations 2023-02-10 22:17:35 +11:00
bpf_jit_comp64.c powerpc/64: vmlinux support building with PCREL addresing 2023-04-20 12:59:21 +10:00
bpf_jit_comp.c powerpc/bpf: populate extable entries only during the last pass 2023-05-15 15:40:31 +10:00
bpf_jit.h powerpc/64: vmlinux support building with PCREL addresing 2023-04-20 12:59:21 +10:00
Makefile powerpc/bpf: Implement extended BPF on PPC32 2021-04-03 21:22:21 +11:00