mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
	Theodore Ts'o <tytso@mit.edu>,
	"Jason A . Donenfeld" <Jason@zx2c4.com>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 0/2] random: tracing: Expose last boot ID on persistent instance
Date: Thu, 21 May 2026 10:59:50 -0400	[thread overview]
Message-ID: <7f96531f-0f7a-4ec5-bbf3-f7dca7c97c2a@efficios.com> (raw)
In-Reply-To: <177937541909.2596845.17729857441826694760.stgit@mhiramat.tok.corp.google.com>

On 2026-05-21 10:56, Masami Hiramatsu (Google) wrote:
> Hi,
> 
> Here is an RFC series to expose the boot ID (random UUID for each
> boot) in the last_boot_info of the persistent ring buffer instance.
> 
> The persistent ring buffer can hold trace data beyond reboot/crashes.
> This means the recorded data does not always come from the last boot.
> Currently we just assume that the data comes from the last boot.
> 
> On the other hand, the kernel provides a random generated UUID for
> each boot time, called "boot ID". If you record the logs with the
> boot ID, it is easy to do cross-referencing it with other logs.
> 
> Similarly, recording the Boot ID for persistent ring buffer
> instances would make it easier to determine which boot the read
> data came from.
> 
> For example:
> 
>   # cat /proc/sys/kernel/random/boot_id
>   df152e7a-c0a7-4d32-9f0b-7f5c39fb7b68
> 
> (enable tracing on persistent instance and reboot)
> 
>   # cat /sys/kernel/tracing/instances/ptracingtest/last_boot_info
> # boot_id: df152e7a-c0a7-4d32-9f0b-7f5c39fb7b68
> ffffffff81000000       [kernel]
> 

FWIW, we've used boot id to uniquely identify traces belonging
to a given kernel execution and allow validation that traces
can indeed be correlated across CPU and across kernel vs userspace
for years in LTTng.

Good to see this approach proposed for Ftrace as well.

Thanks,

Mathieu

> 
> Thank you,
> 
> ---
> 
> Masami Hiramatsu (Google) (2):
>        random: Expose boot ID to other subsystems
>        tracing: Record and show boot ID in last_boot_info
> 
> 
>   drivers/char/random.c  |   27 +++++++++++++++++++++------
>   include/linux/random.h |    9 +++++++++
>   kernel/trace/trace.c   |   14 ++++++++++++--
>   3 files changed, 42 insertions(+), 8 deletions(-)
> 
> --
> Masami Hiramatsu (Google) <mhiramat@kernel.org>


-- 
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com

      parent reply	other threads:[~2026-05-21 14:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 14:56 Masami Hiramatsu (Google)
2026-05-21 14:57 ` [RFC PATCH 1/2] random: Expose boot ID to other subsystems Masami Hiramatsu (Google)
2026-06-12 17:04   ` Jason A. Donenfeld
2026-06-22  4:52     ` Masami Hiramatsu
2026-05-21 14:57 ` [RFC PATCH 2/2] tracing: Record and show boot ID in last_boot_info Masami Hiramatsu (Google)
2026-05-21 15:16   ` Steven Rostedt
2026-05-24  1:44     ` Masami Hiramatsu
2026-05-28 20:36       ` Steven Rostedt
2026-06-01  4:38         ` Masami Hiramatsu
2026-05-21 14:59 ` Mathieu Desnoyers [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=7f96531f-0f7a-4ec5-bbf3-f7dca7c97c2a@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=Jason@zx2c4.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tytso@mit.edu \
    /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

all inboxes | Powered by JetHome®