Linux Trace Kernel
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] random: tracing: Expose last boot ID on persistent instance
@ 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)
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Masami Hiramatsu (Google) @ 2026-05-21 14:56 UTC (permalink / raw)
  To: Theodore Ts'o, Jason A . Donenfeld, Steven Rostedt
  Cc: Masami Hiramatsu, Mathieu Desnoyers, linux-kernel,
	linux-trace-kernel

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]


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>

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-12 17:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21 14:56 [RFC PATCH 0/2] random: tracing: Expose last boot ID on persistent instance 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-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 ` [RFC PATCH 0/2] random: tracing: Expose last boot ID on persistent instance Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox