diff options
| author | Feng Jiang <jiangfeng@kylinos.cn> | 2026-09-05 08:58:56 +0000 |
|---|---|---|
| committer | Kumar Kartikeya Dwivedi <memxor@gmail.com> | 2026-09-06 16:26:04 +0200 |
| commit | ba754185f90291a0a164ec9adf7ba19737f18d3f (patch) | |
| tree | 18dc5cd4f47f700dd267cf613420f26c259598b8 /scripts/Makefile.thinlto | |
| parent | f80a09c486e7c2a0e4ca43dbff7570df668484c5 (diff) | |
| download | linux-next-ba754185f90291a0a164ec9adf7ba19737f18d3f.tar.gz linux-next-ba754185f90291a0a164ec9adf7ba19737f18d3f.zip | |
riscv, bpf: Add BPF stack arguments support for RV64 JIT
Implement bpf_jit_supports_stack_args() on RV64 JIT to allow bpf
subprogs and kfuncs to pass and receive more than 5 arguments.
In the riscv abi, the first 8 arguments are passed in registers a0 to
a7, and arguments 9+ reside on the stack. To align bpf stack arguments
with this calling convention and unify bpf2bpf calls with kfuncs, map
the first 3 bpf stack arguments (6th to 8th) directly to a5 to a7, and
store or load the remaining arguments (9th+) at SP or FP. Reserve
outgoing stack space in the prologue accordingly when stack_arg_cnt
exceeds 3.
In addition, update kfunc argument sign extension to handle all 8
register arguments as well as any arguments passed on the stack.
Co-developed-by: Pu Lehui <pulehui@huawei.com>
Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Acked-by: Björn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/bpf/20260905085857.14143-3-pulehui@huaweicloud.com
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
