diff options
author | Björn Töpel <bjorn@rivosinc.com> | 2023-10-04 14:07:06 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2023-10-09 15:21:25 +0200 |
commit | 7112cd26e606c7ba51f9cc5c1905f06039f6f379 (patch) | |
tree | 53241bbd7ef75cbe08f16d114043797a0e895311 /CREDITS | |
parent | 2f1b0d3d733169eb11680bfa97c266ae5e757148 (diff) |
riscv, bpf: Track both a0 (RISC-V ABI) and a5 (BPF) return values
The RISC-V BPF uses a5 for BPF return values, which are zero-extended,
whereas the RISC-V ABI uses a0 which is sign-extended. In other words,
a5 and a0 can differ, and are used in different context.
The BPF trampoline are used for both BPF programs, and regular kernel
functions.
Make sure that the RISC-V BPF trampoline saves, and restores both a0
and a5.
Fixes: 49b5e77ae3e2 ("riscv, bpf: Add bpf trampoline support for RV64")
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20231004120706.52848-3-bjorn@kernel.org
Diffstat (limited to 'CREDITS')
0 files changed, 0 insertions, 0 deletions