Thread (3 messages) 3 messages, 3 authors, 2026-06-24

Re: [PATCH v3] tracing: Use seq_buf for string concatenation

From: Markus Elfring <hidden>
Date: 2026-06-24 07:15:53
Also in: linux-hardening, linux-kernel-mentees, lkml

quoted hunk ↗ jump to hunk
+++ b/kernel/trace/trace_events.c
quoted hunk ↗ jump to hunk
@@ -4501,13 +4502,20 @@ extern struct trace_event_call *__start_ftrace_events[];
 static __init int setup_trace_event(char *str)
 {
-	if (bootup_event_buf[0] != '\0')
-		strlcat(bootup_event_buf, ",", COMMAND_LINE_SIZE);
+	if (seq_buf_used(&bootup_event_seq) > 0)
+		seq_buf_puts(&bootup_event_seq, ",");
…

I suggest to use the function “seq_buf_putc” instead at this source code place.
https://elixir.bootlin.com/linux/v7.1.1/source/lib/seq_buf.c#L203-L221

Is there a need for corresponding error detection?

Regards,
Markus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help