]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: don't fail when feature probing fails
authorStanislav Fomichev <sdf@google.com>
Wed, 15 May 2019 03:38:49 +0000 (20:38 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 15 May 2019 23:32:19 +0000 (01:32 +0200)
commitcd41f19a77c31874be65c54c554425d363e46f8f
tree07afe108034d75851b88732cafebbbfd2910c752
parentbc9bdf6354fe21350d0040bd1efdc715622abe81
libbpf: don't fail when feature probing fails

Otherwise libbpf is unusable from unprivileged process with
kernel.kernel.unprivileged_bpf_disabled=1.
All I get is EPERM from the probes, even if I just want to
open an ELF object and look at what progs/maps it has.

Instead of dying on probes, let's just pr_debug the error and
try to continue.

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/lib/bpf/libbpf.c