[PATCH v5 17/17] powerpc64/bpf: Add support for bpf trampolines

Alexei Starovoitov alexei.starovoitov at gmail.com
Tue Sep 17 17:50:33 AEST 2024


On Sun, Sep 15, 2024 at 10:58 PM Hari Bathini <hbathini at linux.ibm.com> wrote:
>
> +
> +       /*
> +        * Generated stack layout:
> +        *
> +        * func prev back chain         [ back chain        ]
> +        *                              [                   ]
> +        * bpf prog redzone/tailcallcnt [ ...               ] 64 bytes (64-bit powerpc)
> +        *                              [                   ] --
...
> +
> +       /* Dummy frame size for proper unwind - includes 64-bytes red zone for 64-bit powerpc */
> +       bpf_dummy_frame_size = STACK_FRAME_MIN_SIZE + 64;

What is the goal of such a large "red zone" ?
The kernel stack is a limited resource.
Why reserve 64 bytes ?
tail call cnt can probably be optional as well.


More information about the Linuxppc-dev mailing list