Add support for bpf iterators in our release CI step
Right now the release
step is running in Fedora 37 to accommodate for glibc being old enough that most distributions can directly take the binary output.
In kernel v6.4, bpf iterators have been introduced (bpf_for
and bpf_for_each
), which allows to have loops that are not unrolled by the bpf verifier.
However, Fedora 37 seems to be missing both the bpf_iter_next()
helper and the bpf_for
and bpf_for_each
definitions.
So several options are available:
- switch to a different distribution when building the release
- build the release in 2 steps:
- one for the rust part in fedora 37
- one for the bpf objects in fedora "whatever is latest"
- make use of
musl
(and bump fedora)? - blindly import the headers from a more recent kernel and hope for the best.
FWIW, the oldest LTS kernel supporting HID-BPF is v6.6, so I expect those iterators to be in most distributions already.