]> 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)
commit2a851b07352f4677303f4f67c9e1b7cdb981a13c
tree2d5b812a9cb024a671bcda37431505d6dded1c47
parent49a0e93258ecfa58e7dbfdaa2be0c14c2de32081
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