diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-12-13 17:43:25 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-12-15 15:58:04 -0800 |
commit | 0d13bfce023ac7cef4d0a50b83750254ce31c479 (patch) | |
tree | 2a0b25e703e11009c64ec522b6e00eef85ac701c /tools/testing/selftests | |
parent | aa915931ac3e53ccf371308e6750da510e3591dd (diff) |
libbpf: Don't require root for bpf_object__open()
Reorganize bpf_object__open and bpf_object__load steps such that
bpf_object__open doesn't need root access. This was previously done for
feature probing and BTF sanitization. This doesn't have to happen on open,
though, so move all those steps into the load phase.
This is important, because it makes it possible for tools like bpftool, to
just open BPF object file and inspect their contents: programs, maps, BTF,
etc. For such operations it is prohibitive to require root access. On the
other hand, there is a lot of custom libbpf logic in those steps, so its best
avoided for tools to reimplement all that on their own.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20191214014341.3442258-2-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests')
0 files changed, 0 insertions, 0 deletions