]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Use kvmalloc for map values in syscall
authorStanislav Fomichev <sdf@google.com>
Wed, 18 Aug 2021 23:52:15 +0000 (16:52 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 19 Aug 2021 22:09:38 +0000 (00:09 +0200)
commite146567800a8dfb9b6c0648e5f00e75c3571a25d
tree847e835edec9208565b8116d338f7e45290bccd3
parent843cd6629641e346f067252aa0d3a00c08196d75
bpf: Use kvmalloc for map values in syscall

Use kvmalloc/kvfree for temporary value when manipulating a map via
syscall. kmalloc might not be sufficient for percpu maps where the value
is big (and further multiplied by hundreds of CPUs).

Can be reproduced with netcnt test on qemu with "-smp 255".

Signed-off-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20210818235216.1159202-1-sdf@google.com
kernel/bpf/syscall.c