Re: [PATCH bpf-next v8 2/6] bpf: Attribute async callback instructions to verification roots
Eduard Zingerman <[email protected]>
| Newsgroups | org.kernel.vger.bpf |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 2026-08-13 at 00:19 +0200, Kumar Kartikeya Dwivedi wrote: > Asynchronous callbacks are explored as fresh frame-zero verifier states, > so normal callee-to-caller accounting cannot propagate their instruction > budget to the main or global subprogram whose verification scheduled them. > > The callback exploration still happens within the same do_check_common() > invocation as that independent verification root. Record > env->insn_processed at do_check_common() entry and override the root's > inclusive count with the delta before returning. This includes all directly > and transitively scheduled asynchronous callbacks in the root's total > without maintaining a separate accounting call stack. > > Static subprogram and callback totals remain local to their synchronous call > paths. Their self counts continue to account for each processed instruction > exactly once. > > Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> > --- Acked-by: Eduard Zingerman <[email protected]> ...