On Thu, Oct 29, 2026 at 10:32:19AM +0100, Peter Zijlstra wrote:
Urgh, so much crazy.
So WARNs in noinstr code are 'fine'. That is, they should not happen, if
they do, bad things have happened and we need the warning out ASAP, if
it takes the machine down, too bad. See the
instrumentation_{begin,end}() markers in x86 asm/bug.h.
But yes, the tracing needs to go. But moving that around should not be
this ugly and also, that will give you the opportunity to fix
preempt_{en,dis}able_notrace(), since they currently also skip the bound
checks.
Yes, that's a good direction.
I checked the call chain and DEBUG_LOCKS_WARN_ON() is already fine in
noinstr. arm64 just needs __always_inline on preempt_count() and
should_resched() so Clang doesn't outline them.
I will work on that.
Thanks,
Karl