Re: [EXT.MSG] [PATCH bpf-next v3 0/4] bpf: Check recursion per task for preemptible programs

From: Mike Bazov

Date: Mon Nov 23 2026 - 07:47:00 EST


A friendly ping on this series.

One update: I measured the per-task array from the v2 review
against walking the chain. It is not faster. The numbers are in the
3/4 thread.

The question from the cover letter is still open:

> One question: the marking is automatic. A flag that the program's
> author sets would avoid the second trade-off, but existing programs
> would keep losing runs until they are rebuilt. Which do you prefer?

Either way the program marks can be reduced later. Each has one reason:

- Timed may_goto: its count and timestamp are per-CPU memory that
every entry resets. Possibel solution would be to keep them per
invocation, in the stack of the main prog.
- Per-CPU maps: a run keeps data in this CPU's slot until it ends.
Turn preemption off from the first per-CPU access to the end of the
run, as Alexei suggested on v2.
- Tail calls and freplace: the target may use a per-CPU map. With the
access itself protected, they need no mark.

Thanks,
Mike