Re: [PATCH v14 12/19] unwind_user/sframe: Add .sframe validation option

Steven Rostedt <[email protected]> Wed, 13 May 2026 08:30:42 -0400
Newsgroups dev.linux.lists.sashiko,org.kernel.vger.bpf
Message-ID <20260513083042.56087bc4@fedora>
On Tue, 12 May 2026 16:23:34 +0200
Jens Remus <[email protected]> wrote:

> Given the wort case complexity of the validation is
> O(#FDE) * O(log2(#FRE_per_FDE)), should it perform the following after
> having processed a FDE including all of its potentially 2^16-1 FREs?
> 
> 	if (need_resched())
> 		cond_resched();

BTW, you would only need:

	cond_resched();

as that checks need_resched(), no need to do it twice.

> 
> What about the unwinding?  Given the worst case complexity is
> O(log2(#FDE)) + O(#FRE_per_FDE), should it perform the above after
> having performed the binary search for the FDE (before performing
> the linear search for the FRE)?

That said, I'm holding off of adding new cond_resched() as PREEMPT_LAZY
is becoming the default, and there should be no more PREEMPT_NONE or
VOLUNTARY.

I think you can ignore this for now.

-- Steve