ring-buffer: Add magic and struct size to boot up meta data
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 15 Aug 2024 15:50:32 +0000 (11:50 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 26 Aug 2024 17:34:22 +0000 (13:34 -0400)
commitd0f2d6e9512ecf4306c4432761f04bd35cf9e3a6
tree384ff8e3b59b174a4d3c6add233074608eb2ff93
parentbca704f62db2e2bb644fa845e98b08cf1e22f814
ring-buffer: Add magic and struct size to boot up meta data

Add a magic number as well as save the struct size of the ring_buffer_meta
structure in the meta data to also use as validation. Updating the magic
number could be used to force a invalidation between kernel versions, and
saving the structure size is also a good method to make sure the content
is what is expected.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Vincent Donnefort <vdonnefort@google.com>
Link: https://lore.kernel.org/20240815115032.0c197b32@rorschach.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c