Closed banditopazzo closed 6 months ago
@vadorovsky right now the check is made on kernel version, do you think we should use bpf_core_enum_value_exists
on enum bpf_func_id
looking for BPF_FUNC_strncmp
? same thing for our LOOP
macro
do you know if this method is reliable?
@vadorovsky right now the check is made on kernel version, do you think we should use
bpf_core_enum_value_exists
onenum bpf_func_id
looking forBPF_FUNC_strncmp
? same thing for ourLOOP
macrodo you know if this method is reliable?
I like the idea!
Yes, I think it should be reliable. The bpf_core_*
helpers mostly rely on compiler intrinsics and the enum-related ones are there since 2020 and kernel 5.10
https://github.com/torvalds/linux/commit/eacaaed784e2c9da69dea3030c81062c1fd66a3 https://lore.kernel.org/bpf/20200819194519.3375898-1-andriin@fb.com/
The patchset doesn't seem to touch kernel-space at all, it's just libbpf
This PR should fix #259 providing an alternative implementation for kernel <
5.17