https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119731
Bug ID: 119731 Summary: bpf verifier failure with systemd's restrict-fs Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Target: bpf Created attachment 61075 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61075&action=edit restrict-fs-clang.bpf.i.xz Been discussing this with Cupertino today -- filing a bug to put attachments in. systemd-257.5's bpf-restrict-fs fails to load, in dmesg: ``` [ 7641.179562] systemd[1]: bpf-restrict-fs: Failed to load BPF object: Invalid argument ``` To build with both GCC and Clang for comparison: ``` #!/bin/bash set -x build_gcc() { /usr/bin/bpf-unknown-none-gcc -std=gnu11 -fno-stack-protector -fno-ssa-phiopt -O2 -mcpu=v3 -mco-re -gbtf \ -mlittle-endian \ restrict-fs-gcc.bpf.i \ -o restrict-fs-gcc.bpf.unstripped.o } build_clang() { /usr/lib/llvm/19/bin/clang -std=gnu11 -Wno-compare-distinct-pointer-types -fno-stack-protector -O2 -target bpf -g \ -c restrict-fs-clang.bpf.i \ -o restrict-fs-clang.bpf.unstripped.o } build_gcc build_clang ```