Re: [PATCH v5 17/17] powerpc64/bpf: Add support for bpf trampolines
From: Alexei Starovoitov
Date: Tue Sep 17 2024 - 03:50:57 EST
On Sun, Sep 15, 2024 at 10:58 PM Hari Bathini <hbathini@xxxxxxxxxxxxx> 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.