ARM: BPF: xdpdump unknown opcode 21
From: Michael Graichen <hidden>
Date: 2022-03-11 09:12:11
From: Michael Graichen <hidden>
Date: 2022-03-11 09:12:11
Hey all, I try to teach myself how BPF, XDP and JIT are working. So, while doing this I started 'xdpdump' to attach to a running program on a 32-bit ARM (i.MX7) xdpdump wants to load /lib/bpf/xdpdump_bpf.o but ends up with the error: libbpf: prog 'trace_on_entry': failed to attach: ERROR: strerror_r(-524)=22 ERROR: Can't attach XDP trace fentry function: Unknown error 524 and dmesg tells me "unknown opcode 21" I have checked the Kernel source code under arch/arm/net/bpf_jit_32.c and figured out that opcode 0x21 should be BPF_LDX | BPF_W | BPF_ABS but it is not implemented. Well, it was in Kernel 4.1 until 4.13. Can someone help me / guide me to reimplement this opcode? Best regards Michael