From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v3] tracing: Record trace_clock and recover when reboot
Date: Wed, 14 May 2025 08:49:46 -0400 [thread overview]
Message-ID: <20250514084946.17c3ffd7@batman.local.home> (raw)
In-Reply-To: <20250514101431.e1363d1a60ed2548feb4cef0@kernel.org>
On Wed, 14 May 2025 10:14:31 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> > 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
prev parent reply other threads:[~2025-05-14 12:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 0:31 [PATCH v3] tracing: Record trace_clock and recover when reboot Masami Hiramatsu (Google)
2025-05-13 17:56 ` Steven Rostedt
2025-05-14 1:14 ` Masami Hiramatsu
2025-05-14 12:49 ` Steven Rostedt [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250514084946.17c3ffd7@batman.local.home \
--to=rostedt@goodmis.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox