]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: add __weak hook for allocating executable memory
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 23 Nov 2018 22:18:03 +0000 (23:18 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 5 Dec 2018 15:36:28 +0000 (16:36 +0100)
commitbd4015f0335ade9d399ffdec91b76acd61c5e94b
tree2d5b812a9cb024a671bcda37431505d6dded1c47
parent43e0f0a7c14b0f829bfb9657b809c5ced75b17b0
bpf: add __weak hook for allocating executable memory

By default, BPF uses module_alloc() to allocate executable memory,
but this is not necessary on all arches and potentially undesirable
on some of them.

So break out the module_alloc() and module_memfree() calls into __weak
functions to allow them to be overridden in arch code.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/core.c