aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/riscv/net/bpf_jit_comp64.c
diff options
context:
space:
mode:
authorPu Lehui <pulehui@huawei.com>2023-02-21 22:06:56 +0800
committerAlexei Starovoitov <ast@kernel.org>2023-02-22 13:11:31 -0800
commitd40c3847b485acc3522b62b020f77dcd38ca357f (patch)
tree6864d578604c8050bfd72ef2394727b0834f6657 /arch/riscv/net/bpf_jit_comp64.c
parentbpf: Check for helper calls in check_subprogs() (diff)
downloadwireguard-linux-d40c3847b485acc3522b62b020f77dcd38ca357f.tar.xz
wireguard-linux-d40c3847b485acc3522b62b020f77dcd38ca357f.zip
riscv, bpf: Add kfunc support for RV64
This patch adds kernel function call support for RV64. Since the offset from RV64 kernel and module functions to bpf programs is almost within the range of s32, the current infrastructure of RV64 is already sufficient for kfunc, so let's turn it on. Suggested-by: Björn Töpel <bjorn@rivosinc.com> Signed-off-by: Pu Lehui <pulehui@huawei.com> Acked-by: Björn Töpel <bjorn@rivosinc.com> Link: https://lore.kernel.org/r/20230221140656.3480496-1-pulehui@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'arch/riscv/net/bpf_jit_comp64.c')
-rw-r--r--arch/riscv/net/bpf_jit_comp64.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
index f5a668736c79..a9270366dc57 100644
--- a/arch/riscv/net/bpf_jit_comp64.c
+++ b/arch/riscv/net/bpf_jit_comp64.c
@@ -1751,3 +1751,8 @@ void bpf_jit_build_epilogue(struct rv_jit_context *ctx)
{
__build_epilogue(false, ctx);
}
+
+bool bpf_jit_supports_kfunc_call(void)
+{
+ return true;
+}