Re: [PATCH] bpf: test_run: reduce kernel stack usage

From: Alexei Starovoitov

Date: Fri May 15 2026 - 10:49:07 EST


On Fri, May 15, 2026 at 4:31 AM Arnd Bergmann <arnd@xxxxxxxxxx> wrote:
>
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The xdp_test_data structure is really too large to put on the stack
> and results in one of the largest stack frames in the kernel:
>
> net/bpf/test_run.c: In function 'bpf_test_run_xdp_live':
> net/bpf/test_run.c:387:1: error: the frame size of 1608 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]
>
> Reduce this using dynamic allocation, which avoids around 1KB of
> stack usage.

1k?
pahole -C xdp_test_data
/* size: 192, cachelines: 3, members: 9 */
/* sum members: 120, holes: 1, sum holes: 56 */
/* padding: 16 */
/* paddings: 1, sum paddings: 36 */

what s390 doing to make it huge?

Probably better to rearrange the field and fix the root cause.

pw-bot: cr