Re: [PATCH v3] ring-buffer: Skip time delta validation for the counter clock

From: Steven Rostedt

Date: Fri Nov 20 2026 - 10:04:59 EST


On Thu, 5 Nov 2026 06:19:54 -0800
Kirtikumar Anandrao Ramchandani <kirtiar15502@xxxxxxxxx> wrote:

> The counter trace clock increments on every read. Time delta validation
> assumes that the clock values read while reserving and checking an event
> can be reconciled with the deltas stored in the page. With the counter
> clock, this assumption can fail for an intact ring buffer and report a
> spurious TIME DOES NOT MATCH warning.
>
> Skip time delta validation while the buffer uses trace_clock_counter().
> Clock selection already resets the buffer, so events recorded under a
> previous clock are not retained for this check. Recording and reading
> counter-clock events are unchanged.
>
> Link: https://lore.kernel.org/all/20260920161648.7d9fda60@fedora/
> Reported-by: syzbot+eb74dca0d1eb3ec227a7@xxxxxxxxxxxxxxxxxxxxxxxxx
> Closes: https://syzkaller.appspot.com/bug?extid=eb74dca0d1eb3ec227a7
> Signed-off-by: Kirtikumar Anandrao Ramchandani <kirtiar15502@xxxxxxxxx>

I'm going to hold off on applying this because I'm not fully convinced that
this isn't hiding a real bug.

I remember looking into this in the past and thinking I found the reason
the counter breaks the check, but when looking at the code again, I'm not
so sure. There may be a real bug here that only the counter can trigger. Or
at least trigger more reliably.

Until I'm sure there's not a real bug being hidden by this patch, I'm going
to keep allowing this to trigger on the counter clock.

Thanks,

-- Steve