Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 67234743736a ("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

authored by

Stanislav Fomichev and committed by
Andrii Nakryiko
f9bceaa5 ec7d6dd8

+3
+3
tools/lib/bpf/libbpf.c
··· 3971 3971 }; 3972 3972 int ret; 3973 3973 3974 + if (obj->gen_loader) 3975 + return 0; 3976 + 3974 3977 /* make sure basic loading works */ 3975 3978 3976 3979 memset(&attr, 0, sizeof(attr));