Skip to content

Commit 1111e9b

Browse files
RichardCaorostedt
authored andcommitted
ring-buffer: Report header_page overwrite as char
The header_page tracefs metadata currently reports overwrite as an int field with size 1. That makes parsers warn about a type and size mismatch even though the field is only used as a one-byte flag within commit. Keep the shared offset with commit as-is, but report overwrite as char so the declared type matches the hardcoded size. The signedness is already carried separately by the emitted signed field. Link: https://patch.msgid.link/20260406165333.46052-1-create0818@163.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=216999 Signed-off-by: Cao Ruichuang <create0818@163.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 3515572 commit 1111e9b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/trace/ring_buffer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -597,11 +597,11 @@ int ring_buffer_print_page_header(struct trace_buffer *buffer, struct trace_seq
597597
(unsigned int)sizeof(field.commit),
598598
(unsigned int)is_signed_type(long));
599599

600-
trace_seq_printf(s, "\tfield: int overwrite;\t"
600+
trace_seq_printf(s, "\tfield: char overwrite;\t"
601601
"offset:%u;\tsize:%u;\tsigned:%u;\n",
602602
(unsigned int)offsetof(typeof(field), commit),
603603
1,
604-
(unsigned int)is_signed_type(long));
604+
(unsigned int)is_signed_type(char));
605605

606606
trace_seq_printf(s, "\tfield: char data;\t"
607607
"offset:%u;\tsize:%u;\tsigned:%u;\n",

0 commit comments

Comments
 (0)