Thread (4 messages) read the whole thread 4 messages, 2 authors, 2025-05-14

Re: [PATCH v3] tracing: Record trace_clock and recover when reboot

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2025-05-14 12:49:56
Also in: lkml

On Wed, 14 May 2025 10:14:31 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
quoted
In case the tscratch->clock_id gets corrupted, we better make sure it
doesn't overflow:

		if (tscratch->clock_id >= ARRAY_SIZE(trace_clocks) ||
		    tracing_set_clock(tr, trace_clocks[tscratch->clock_id].name) < 0) {  
Good catch! BTW, don't we have any check about scratch area?
(e.g. adding a checksum)
We could, but it would require updating every time we update the
scratch area.

Currently, the scratch area is only considered valid if the ring buffer
is proven to be valid. But if this becomes a problem, we probably
should add a checksum or something.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help