Re: [PATCH bpf-next v4 15/18] bpf,x86: Implement JIT support for stack arguments

Yonghong Song
2026-04-13T21:11:00Z

On 4/13/26 1:38 PM, Alexei Starovoitov wrote:
> On Mon, Apr 13, 2026 at 1:32 PM Yonghong Song <yonghong.song@linux.dev> wrote:
>>
>>
>> On 4/13/26 12:59 PM, Alexei Starovoitov wrote:
>>> On Mon, Apr 13, 2026 at 10:26 AM Yonghong Song <yonghong.song@linux.dev> wrote:
>>>> Yes, we can do something like below:
>>>>
>>>> case BPF_ST | BPF_MEM | BPF_DW:
>>>> - if (adjust_stack_arg_off && insn->off == -outgoing_stack_arg_depth) {
>>>> + if (dst_reg == BPF_REG_STACK_ARG_BASE && insn->off == -outgoing_stack_arg_depth) {
>>> Something like that, but use BPF_REG_ARG_PTR name ?
>>> here and in the verifier?
>> We have a bunch of ARG_PTR_* (e.g. ARG_PTR_TO_MAP_VALUE, ...).
>> So maybe BPF_REG_STACK_ARG_PTR to distinguish ARG_PTR_*?
>> BPF_REG_STACK_ARG_BASE_PTR seems a better name as it does represents
>> the base pointer for stack arguments of a particular function.
>> But BPF_REG_STACK_ARG_BASE_PTR seems too long so BPF_REG_STACK_ARG_PTR?
> both are too long.
> I reacted to BPF_REG_STACK_ARG_BASE. Since it was already too long.
> BPF_REG_PARAMS ?

BPF_REG_PARAMS should be okay considering we do not want a longer name.