summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2019-11-07 15:18:38 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-31 16:45:06 +0100
commit2170f9d296c87f702391fb5614e08f67632a4cd6 (patch)
tree1f7b5a0ea10238bb2127c809cbc0149802aa0268 /kernel
parentfe3a9c40723235f1c649a1c161011e57a785689d (diff)
s390/bpf: Use kvcalloc for addrs array
[ Upstream commit 166f11d11f6f70439830d09bfa5552ec1b368494 ] A BPF program may consist of 1m instructions, which means JIT instruction-address mapping can be as large as 4m. s390 has FORCE_MAX_ZONEORDER=9 (for memory hotplug reasons), which means maximum kmalloc size is 1m. This makes it impossible to JIT programs with more than 256k instructions. Fix by using kvcalloc, which falls back to vmalloc for larger allocations. An alternative would be to use a radix tree, but that is not supported by bpf_prog_fill_jited_linfo. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20191107141838.92202-1-iii@linux.ibm.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions