]> 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)
commitc0bacf7d8a2c803aab021406d422428f74784842
tree847e835edec9208565b8116d338f7e45290bccd3
parente8275d44772ab0bfd2c19ac2a18fa1dd4cf58340
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