Re: [PATCH bpf 2/2] selftests/bpf: Cover fastcall helper stack reads

From: Eduard Zingerman

Date: Thu Jun 25 2026 - 14:35:59 EST


On Wed, 2026-06-24 at 16:39 +0800, Nuoqi Gui wrote:
> Add verifier_bpf_fastcall test where a spill/fill pair initializes a stack
> slot. bpf_csum_diff() later reads it through ARG_PTR_TO_MEM | MEM_RDONLY.
>
> The translated program must keep the spill and fill materialized. Otherwise
> the helper reads stack bytes that no longer match the verifier model.
>
> Signed-off-by: Nuoqi Gui <gnq25@xxxxxxxxxxxxxxxxxxxxx>
> ---

Could you please add a kfunc based test case as well?

[...]