]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Support sleepable progs
authorAlexei Starovoitov <ast@kernel.org>
Thu, 27 Aug 2020 22:01:13 +0000 (15:01 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 28 Aug 2020 19:20:33 +0000 (21:20 +0200)
commit693d901594129e77a4f39b1daeddf64b8df9c640
treee8580afd3ccfba2986f1a1451985c798edaea25a
parentc308ff44a0497fe55e2f54508b31c330327b3bf3
libbpf: Support sleepable progs

Pass request to load program as sleepable via ".s" suffix in the section name.
If it happens in the future that all map types and helpers are allowed with
BPF_F_SLEEPABLE flag "fmod_ret/" and "lsm/" can be aliased to "fmod_ret.s/" and
"lsm.s/" to make all lsm and fmod_ret programs sleepable by default. The fentry
and fexit programs would always need to have sleepable vs non-sleepable
distinction, since not all fentry/fexit progs will be attached to sleepable
kernel functions.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: KP Singh <kpsingh@google.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/20200827220114.69225-5-alexei.starovoitov@gmail.com
tools/lib/bpf/libbpf.c