[PATCH bpf-next 2/3] bpf, arm64: Add JIT support for stack arguments
Alexei Starovoitov
alexei.starovoitov at gmail.com
Mon Apr 20 19:58:23 PDT 2026
On Mon, Apr 20, 2026 at 8:36 AM Puranjay Mohan <puranjay at kernel.org> wrote:
>
nice and clean. I like how it maps to arm64 calling convention.
> + if (prog->aux->stack_arg_depth > prog->aux->incoming_stack_arg_depth) {
> + u16 outgoing = prog->aux->stack_arg_depth - prog->aux->incoming_stack_arg_depth;
> + int nr_on_stack = outgoing / sizeof(u64) - NR_STACK_ARG_REGS;
> +
> + if (nr_on_stack > 0)
> + ctx.stack_arg_size = round_up(nr_on_stack * sizeof(u64), 16);
> + }
I'm struggling to understand this part.
Why do this when this func calls more than what callee passed in?
Looks fishy. I'd like to see selftests with more than 6,7,8 args.
Because only then this logic will kick in?
More information about the linux-arm-kernel
mailing list