Re: [PATCH bpf-next 2/2] selftests/bpf: Cover flexible-array allocation rejection
From: Eduard Zingerman
Date: Mon Jun 22 2026 - 14:58:38 EST
On Mon, 2026-06-22 at 04:56 +0000, Yiyang Chen wrote:
> Add a linked_list negative loader case for a program-BTF type whose last
> member is a zero-length flexible array. The program writes through the
> first flexible-array element so an incorrect allocation-time acceptance
> would leave the verifier to approve an access outside the allocated object.
>
> Use the explicit _impl kfunc forms in this negative test so the case is
> scoped to the allocation type check and not to implicit kfunc wrapper
> resolution.
>
> Signed-off-by: Yiyang Chen <chenyy23@xxxxxxxxxxxxxxxxxxxxx>
> ---
Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>
[...]