lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250226-rigorous-idealistic-lemming-2fe868-mkl@pengutronix.de>
Date: Wed, 26 Feb 2025 17:01:05 +0100
From: Marc Kleine-Budde <mkl@...gutronix.de>
To: Eduard Zingerman <eddyz87@...il.com>
Cc: Chris Ward <tjcw01@...il.com>, Alexei Starovoitov <ast@...nel.org>, 
	Daniel Borkmann <daniel@...earbox.net>, John Fastabend <john.fastabend@...il.com>, 
	linux-kernel@...r.kernel.org, Chris Ward <tjcw@...ibm.com>, bpf@...r.kernel.org
Subject: Re: eBPF verifier does not load libxdp dispatcher eBPF program

On 25.02.2025 23:57:47, Marc Kleine-Budde wrote:

[...]

> With the CONFIG_DEBUG_INFO_BTF=y kernel the verifier seems to be more
> happy. Now it fails with "-22":
> 
> | sudo ./xdp_pass_user -d lan0
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | libbpf: prog 'xdp_pass': BPF program load failed: Invalid argument
> | libbpf: prog 'xdp_pass': -- BEGIN PROG LOAD LOG --
> | Extension programs should be JITed
> | processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
> | -- END PROG LOAD LOG --
> | libbpf: prog 'xdp_pass': failed to load: -22
> | libbpf: failed to load object 'xdp-dispatcher.o'
> | libxdp: Compatibility check for dispatcher program failed: Invalid argument
> | libxdp: Falling back to loading single prog without dispatcher
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | Success: Loading XDP prog name:xdp_prog_simple(id:20) on device:lan0(ifindex:4)
> 
> 
> After unloading and enabling the JIT...
> 
> | ➜ (pts/0) frogger@...t:xdp-tutorial/basic01-xdp-pass (main✗) echo 1 |sudo tee /proc/sys/net/core/bpf_jit_enable                                   
> 
> ... the dispatcher fails to load with "524". Yes, the number is
> positive.
> 
> | ➜ (pts/0) frogger@...t:xdp-tutorial/basic01-xdp-pass (main✗) sudo ./xdp_pass_user -d lan0 --unload-all
> | Success: Unloading XDP prog name: xdp_prog_simple
> | ➜ (pts/0) frogger@...t:xdp-tutorial/basic01-xdp-pass (main✗) sudo ./xdp_pass_user -d lan0             
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | libxdp: Compatibility check for dispatcher program failed: Unknown error 524
> | libxdp: Falling back to loading single prog without dispatcher
> | libbpf: elf: skipping unrecognized data section(7) xdp_metadata
> | Success: Loading XDP prog name:xdp_prog_simple(id:48) on device:lan0(ifindex:4)
> 
> strace indicates this syscalls fails:
> 
> | bpf(BPF_RAW_TRACEPOINT_OPEN, {raw_tracepoint={name=NULL, prog_fd=17}}, 16) = -1 ENOTSUPP (Unknown error 524)
> 
> I'm on a armv7l, i.e. a 32 bit ARM system. Maybe I'm missing some kernel
> option or BPF_RAW_TRACEPOINT_OPEN is not supported on armv7l. Will look
> deeper into the kernel config options tomorrow.

FTR: I figured out that the dispatcher needs eBPF trampoline support,
which doesn't exist on ARM.

| https://docs.ebpf.io/linux/concepts/trampolines/

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ