* [PATCH bpf-next] libbpf: skip bpf_object__probe_loading for light skeleton
@ 2021-05-21 3:06 Stanislav Fomichev
2021-05-24 19:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Fomichev @ 2021-05-21 3:06 UTC (permalink / raw)
To: netdev, bpf; +Cc: ast, daniel, andrii, Stanislav Fomichev
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>
---
tools/lib/bpf/libbpf.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index dc4d5fe6d9d2..b396e45b17ea 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -3971,6 +3971,9 @@ bpf_object__probe_loading(struct bpf_object *obj)
};
int ret;
+ if (obj->gen_loader)
+ return 0;
+
/* make sure basic loading works */
memset(&attr, 0, sizeof(attr));
--
2.31.1.818.g46aad6cb9e-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf-next] libbpf: skip bpf_object__probe_loading for light skeleton
2021-05-21 3:06 [PATCH bpf-next] libbpf: skip bpf_object__probe_loading for light skeleton Stanislav Fomichev
@ 2021-05-24 19:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-24 19:30 UTC (permalink / raw)
To: Stanislav Fomichev; +Cc: netdev, bpf, ast, daniel, andrii
Hello:
This patch was applied to bpf/bpf-next.git (refs/heads/master):
On Thu, 20 May 2021 20:06:53 -0700 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [bpf-next] libbpf: skip bpf_object__probe_loading for light skeleton
https://git.kernel.org/bpf/bpf-next/c/f9bceaa59c5c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-24 19:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 3:06 [PATCH bpf-next] libbpf: skip bpf_object__probe_loading for light skeleton Stanislav Fomichev
2021-05-24 19:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).