• Andrii Nakryiko's avatar
    libbpf: stop enforcing kern_version, populate it for users · 5e61f270
    Andrii Nakryiko authored
    Kernel version enforcement for kprobes/kretprobes was removed from
    5.0 kernel in 6c4fc209 ("bpf: remove useless version check for prog load").
    Since then, BPF programs were specifying SEC("version") just to please
    libbpf. We should stop enforcing this in libbpf, if even kernel doesn't
    care. Furthermore, libbpf now will pre-populate current kernel version
    of the host system, in case we are still running on old kernel.
    
    This patch also removes __bpf_object__open_xattr from libbpf.h, as
    nothing in libbpf is relying on having it in that header. That function
    was never exported as LIBBPF_API and even name suggests its internal
    version. So this should be safe to remove, as it doesn't break ABI.
    Signed-off-by: default avatarAndrii Nakryiko <andriin@fb.com>
    Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
    5e61f270
test_perf_buffer.c 561 Bytes