I'm targeting Linux 5.14 on AlmaLinux 9, and intending to use older LSM hooks, and everything basically works fine except that the generated bindings include some unsupported symbols, with errors like
gen_type_bindings.c: In function 'main':
gen_type_bindings.c:555:58: error: 'BPF_MAP_TYPE_USER_RINGBUF' undeclared (first use in this function); did you mean 'BPF_MAP_TYPE_RINGBUF'?
555 | enum { check_BPF_MAP_TYPE_USER_RINGBUF_const = (int)BPF_MAP_TYPE_USER_RINGBUF };
| ^~~~~~~~~~~~~~~~~~~~~~~~~
| BPF_MAP_TYPE_RINGBUF
gen_type_bindings.c:555:58: note: each undeclared identifier is reported only once for each function it appears in
Quick workaround: adding print_endline "#define BPF_MAP_TYPE_USER_RINGBUF 0"; to the top of src/bindings/stubgen/gen_type_bindings.ml
In jrfondren@45bd02b I added the kernel filtering I need for this target, but a more thorough solution could associate a kernel version with everything from https://github.com/isovalent/ebpf-docs/blob/master/docs/linux/timeline/index.md
I'm targeting Linux 5.14 on AlmaLinux 9, and intending to use older LSM hooks, and everything basically works fine except that the generated bindings include some unsupported symbols, with errors like
Quick workaround: adding
print_endline "#define BPF_MAP_TYPE_USER_RINGBUF 0";to the top of src/bindings/stubgen/gen_type_bindings.mlIn jrfondren@45bd02b I added the kernel filtering I need for this target, but a more thorough solution could associate a kernel version with everything from https://github.com/isovalent/ebpf-docs/blob/master/docs/linux/timeline/index.md