diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-10-04 15:40:34 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-10-05 18:09:47 -0700 |
commit | 5e61f27070292d4ad3af51dc68eebab6c1df69d3 (patch) | |
tree | 7ebdbfd2ca26562c10862f6d80967b21fd0af5a3 /tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c | |
parent | a53ba15d81995868651dd28a85d8045aef3d4e20 (diff) | |
download | linux-stable-5e61f27070292d4ad3af51dc68eebab6c1df69d3.tar.gz linux-stable-5e61f27070292d4ad3af51dc68eebab6c1df69d3.tar.bz2 linux-stable-5e61f27070292d4ad3af51dc68eebab6c1df69d3.zip |
libbpf: stop enforcing kern_version, populate it for users
Kernel version enforcement for kprobes/kretprobes was removed from
5.0 kernel in 6c4fc209fcf9 ("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: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c')
-rw-r--r-- | tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c b/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c index 6cc4479ac9df..6a4a8f57f174 100644 --- a/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c +++ b/tools/testing/selftests/bpf/progs/test_get_stack_rawtp.c @@ -99,4 +99,3 @@ int bpf_prog1(void *ctx) } char _license[] SEC("license") = "GPL"; -__u32 _version SEC("version") = 1; /* ignored by tracepoints, required by libbpf.a */ |