Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Move buffer in trace_seq to end of struct

TRACE_SEQ_BUFFER_SIZE is dependent on the architecture for its size. on 64-bit
systems, it is 8148 bytes. forced 8-byte alignment in size_t and seq_buf means
that trace_seq is 8200 bytes on 64-bit systems. moving the buffer to the end
of the struct fixes the issue. there shouldn't be any side effects, i.e.
pointer arithmetic on trace_seq

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250821053917.23301-1-git@elijahs.space
Signed-off-by: Elijah Wright <git@elijahs.space>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Elijah Wright and committed by
Steven Rostedt (Google)
ade2105e 1d67d67a

+1 -1
+1 -1
include/linux/trace_seq.h
··· 21 21 (sizeof(struct seq_buf) + sizeof(size_t) + sizeof(int))) 22 22 23 23 struct trace_seq { 24 - char buffer[TRACE_SEQ_BUFFER_SIZE]; 25 24 struct seq_buf seq; 26 25 size_t readpos; 27 26 int full; 27 + char buffer[TRACE_SEQ_BUFFER_SIZE]; 28 28 }; 29 29 30 30 static inline void