]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Remove prealloc-only restriction for sleepable bpf programs.
authorAlexei Starovoitov <ast@kernel.org>
Fri, 2 Sep 2022 21:10:56 +0000 (14:10 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 5 Sep 2022 13:33:06 +0000 (15:33 +0200)
commit3c775f5ed3a1bc4343db6d2b8d3fa2d0bc5d34c9
tree6621deafbb666f230e4b4836247a9b1113a58f7e
parentce5327112c684801465f85ace483b116670969fc
bpf: Remove prealloc-only restriction for sleepable bpf programs.

Since hash map is now converted to bpf_mem_alloc and it's waiting for rcu and
rcu_tasks_trace GPs before freeing elements into global memory slabs it's safe
to use dynamically allocated hash maps in sleepable bpf programs.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220902211058.60789-15-alexei.starovoitov@gmail.com
kernel/bpf/verifier.c