]> 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)
commitc23259504d2d3510ebce8f436083719a4b0992f6
tree07afe108034d75851b88732cafebbbfd2910c752
parent1caf961bdb97272c44e013067be98630f184f167
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