xdp fails to attach dispatcher
gizahNL opened this issue · comments
And unfortunately doesn't fall back to single program mode.
libbpf: elf: skipping unrecognized data section(7) .xdp_run_config
libbpf: elf: skipping unrecognized data section(7) xdp_metadata
libbpf: prog 'xdp_dispatcher': BPF program load failed: Invalid argument
libbpf: prog 'xdp_dispatcher': -- BEGIN PROG LOAD LOG --
Validating prog0() func#1...
btf_vmlinux is malformed
Arg#0 type PTR in prog0() is not supported yet.
processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
-- END PROG LOAD LOG --
libbpf: failed to load program 'xdp_dispatcher'
libbpf: failed to load object './xdp-dispatcher.o'
libxdp: Failed to load dispatcher: Invalid argument
Kernel version is: 5.10.109
Gijs Peskens @.***> writes:
And unfortunately doesn't fall back to single program mode.libbpf: elf: skipping unrecognized data section(7) .xdp_run_config libbpf: elf: skipping unrecognized data section(7) xdp_metadata libbpf: prog 'xdp_dispatcher': BPF program load failed: Invalid argument libbpf: prog 'xdp_dispatcher': -- BEGIN PROG LOAD LOG -- Validating prog0() func#1... btf_vmlinux is malformed Arg#0 type PTR in prog0() is not supported yet. processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0 -- END PROG LOAD LOG -- libbpf: failed to load program 'xdp_dispatcher' libbpf: failed to load object './xdp-dispatcher.o' libxdp: Failed to load dispatcher: Invalid argument
What kernel version are you running this on?
Sorry, ninja edited before you replied.. Kernel is 5.10.109
Yes it's compiled part of a custom video broadcast based distribution.
Arg#0 type PTR in prog0() is not supported yet.
I believe that's the cause btw. With the patch I submitted via the PR it is successful in attaching both the default XDP sock program and our custom program.
Ah, the fallback fails because libbpf is once again changing things in a non-backwards-compatible manner; see 2eda2145ebfc ("libbpf: Preserve kernel error code and remove kprobe prog type guessing")
. So the check we have to detect the verifier error fails...
Ah, the fallback fails because libbpf is once again changing things in a non-backwards-compatible manner; see
2eda2145ebfc ("libbpf: Preserve kernel error code and remove kprobe prog type guessing")
. So the check we have to detect the verifier error fails...
Oh joy... If the kernel verifier can throw more errors than the one I checked against than my patch might not be sufficient :/