bpf: Add per-program recursion prevention mechanism
authorAlexei Starovoitov <ast@kernel.org>
Wed, 10 Feb 2021 03:36:29 +0000 (19:36 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 11 Feb 2021 15:19:13 +0000 (16:19 +0100)
commitca06f55b90020cd97f4cc6d52db95436162e7dcf
tree8b26786ccefbcd4c87f9229ddc680f6feb4004a2
parentf2dd3b39467411c53703125a111f45b3672c1771
bpf: Add per-program recursion prevention mechanism

Since both sleepable and non-sleepable programs execute under migrate_disable
add recursion prevention mechanism to both types of programs when they're
executed via bpf trampoline.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210210033634.62081-5-alexei.starovoitov@gmail.com
arch/x86/net/bpf_jit_comp.c
include/linux/bpf.h
include/linux/filter.h
kernel/bpf/core.c
kernel/bpf/trampoline.c
tools/testing/selftests/bpf/prog_tests/fexit_stress.c
tools/testing/selftests/bpf/prog_tests/trampoline_count.c