]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Skip bpf_object__probe_loading for light skeleton
authorStanislav Fomichev <sdf@google.com>
Fri, 21 May 2021 03:06:53 +0000 (20:06 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Mon, 24 May 2021 19:22:09 +0000 (12:22 -0700)
commit7c7308e0a9ed713e94ff14b4bb9beafcb6161622
tree3bb06244789135bb4f40556ea6af1cae66a3f798
parent4685cc6d6ca2305c182ef9f35c961d10802a3868
libbpf: Skip bpf_object__probe_loading for light skeleton

I'm getting the following error when running 'gen skeleton -L' as
regular user:

libbpf: Error in bpf_object__probe_loading():Operation not permitted(1).
Couldn't load trivial BPF program. Make sure your kernel supports BPF
(CONFIG_BPF_SYSCALL=y) and/or that RLIMIT_MEMLOCK is set to big enough
value.

Fixes: b424201fbcd7 ("libbpf: Generate loader program out of BPF ELF file.")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210521030653.2626513-1-sdf@google.com
tools/lib/bpf/libbpf.c