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.

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>

authored by

Cao Ruichuang and committed by
Steven Rostedt (Google)
1111e9bd 3515572d

+2 -2
+2 -2
kernel/trace/ring_buffer.c
··· 597 597 (unsigned int)sizeof(field.commit), 598 598 (unsigned int)is_signed_type(long)); 599 599 600 - trace_seq_printf(s, "\tfield: int overwrite;\t" 600 + trace_seq_printf(s, "\tfield: char overwrite;\t" 601 601 "offset:%u;\tsize:%u;\tsigned:%u;\n", 602 602 (unsigned int)offsetof(typeof(field), commit), 603 603 1, 604 - (unsigned int)is_signed_type(long)); 604 + (unsigned int)is_signed_type(char)); 605 605 606 606 trace_seq_printf(s, "\tfield: char data;\t" 607 607 "offset:%u;\tsize:%u;\tsigned:%u;\n",