Re: [PATCH bpf-next v1 0/6] bpf: Scope callback arguments to their frame

From: Eduard Zingerman

Date: Thu Sep 24 2026 - 03:09:30 EST


On Tue, 2026-09-22 at 15:41 -0700, Andrii Nakryiko wrote:

...

> It does seem like we miss a reference representing single frame
> lifetime which we can then use as a parent for all things that
> shouldn't survive past the current frame. There is a separate fix
> right now to invalidate dynptr created in subprog's frame. Seems like
> that one should be expressible the same way: local dynptr's parent is
> "frame lifetime" reference.
>
> We can even relax this "cannot spill pointers to stack into stack
> frame of the caller" error, potentially, by just turning that
> PTR_TO_STACK into SCALAR at exit from current frame and let program
> verification go, no harm.
>
> So for me it seems like a necessary and useful addition.

I shared some feedback about unnecessary bit mask manipulation with
Ihor off list, but overall I think that this series makes sense.