Skip to content

Commit ade2105

Browse files
elijah-wrightrostedt
authored andcommitted
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>
1 parent 1d67d67 commit ade2105

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/trace_seq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
(sizeof(struct seq_buf) + sizeof(size_t) + sizeof(int)))
2222

2323
struct trace_seq {
24-
char buffer[TRACE_SEQ_BUFFER_SIZE];
2524
struct seq_buf seq;
2625
size_t readpos;
2726
int full;
27+
char buffer[TRACE_SEQ_BUFFER_SIZE];
2828
};
2929

3030
static inline void

0 commit comments

Comments
 (0)