diff options
author | Björn Töpel <bjorn@kernel.org> | 2021-11-03 14:54:53 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-11-05 18:52:34 +0300 |
commit | f47d4ffe3a84ae11fc4bddc37939b9719467042c (patch) | |
tree | df613c10795304aa34485fef29ea044b97ef82b5 /arch/riscv/net | |
parent | 8955c1a329873385775081e029d9a7c6aa9037e1 (diff) | |
download | linux-f47d4ffe3a84ae11fc4bddc37939b9719467042c.tar.xz |
riscv, bpf: Fix RV32 broken build, and silence RV64 warning
Commit 252c765bd764 ("riscv, bpf: Add BPF exception tables") only addressed
RV64, and broke the RV32 build [1]. Fix by gating the exception tables code
with CONFIG_ARCH_RV64I.
Further, silence a "-Wmissing-prototypes" warning [2] in the RV64 BPF JIT.
[1] https://lore.kernel.org/llvm/202111020610.9oy9Rr0G-lkp@intel.com/
[2] https://lore.kernel.org/llvm/202110290334.2zdMyRq4-lkp@intel.com/
Fixes: 252c765bd764 ("riscv, bpf: Add BPF exception tables")
Signed-off-by: Björn Töpel <bjorn@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Tong Tiangen <tongtiangen@huawei.com>
Link: https://lore.kernel.org/bpf/20211103115453.397209-1-bjorn@kernel.org
Diffstat (limited to 'arch/riscv/net')
-rw-r--r-- | arch/riscv/net/bpf_jit_comp64.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c index 2ca345c7b0bf..f2a779c7e225 100644 --- a/arch/riscv/net/bpf_jit_comp64.c +++ b/arch/riscv/net/bpf_jit_comp64.c @@ -460,6 +460,8 @@ static int emit_call(bool fixed, u64 addr, struct rv_jit_context *ctx) #define BPF_FIXUP_REG_MASK GENMASK(31, 27) int rv_bpf_fixup_exception(const struct exception_table_entry *ex, + struct pt_regs *regs); +int rv_bpf_fixup_exception(const struct exception_table_entry *ex, struct pt_regs *regs) { off_t offset = FIELD_GET(BPF_FIXUP_OFFSET_MASK, ex->fixup); |