]> asedeno.scripts.mit.edu Git - linux.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)
commit15ea164ef11abc0a2d3001ca40e5e509cd06091f
tree07afe108034d75851b88732cafebbbfd2910c752
parent5db17c96771ffa735f5cdfbd9b44f52f319f2637
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