bpf, arm64: Enable kfunc call
authorHou Tao <houtao1@huawei.com>
Sun, 30 Jan 2022 09:29:15 +0000 (17:29 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 Feb 2022 15:37:13 +0000 (16:37 +0100)
commitb5e975d256dbfebd62413eb04fbff6803f02a43c
treea7024e8626aeec544e70dab7265c7906db61a02a
parent227a0713b319e7a8605312dee1c97c97a719a9fc
bpf, arm64: Enable kfunc call

Since commit b2eed9b58811 ("arm64/kernel: kaslr: reduce module
randomization range to 2 GB"), for arm64 whether KASLR is enabled
or not, the module is placed within 2GB of the kernel region, so
s32 in bpf_kfunc_desc is sufficient to represente the offset of
module function relative to __bpf_call_base. The only thing needed
is to override bpf_jit_supports_kfunc_call().

Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220130092917.14544-2-hotforest@gmail.com
arch/arm64/net/bpf_jit_comp.c