From: Steven Rostedt <rostedt@goodmis.org>
To: Wesley Atwell <atwellwea@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v6] tracing: Preserve repeated boot-time tracing parameters
Date: Mon, 30 Mar 2026 12:37:43 -0400 [thread overview]
Message-ID: <20260330123743.5cd30e56@gandalf.local.home> (raw)
In-Reply-To: <20260330104322.7403c660@gandalf.local.home>
On Mon, 30 Mar 2026 10:43:22 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 9928da636c9d..7754a8adb58a 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -3677,20 +3677,24 @@ static struct boot_triggers {
> } bootup_triggers[MAX_BOOT_TRIGGERS];
>
> static char bootup_trigger_buf[COMMAND_LINE_SIZE];
> +static int boot_trigger_buf_len;
> static int nr_boot_triggers;
>
> static __init int setup_trace_triggers(char *str)
> {
> char *trigger;
> char *buf;
> + int len = boot_trigger_buf_len;
> int i;
>
> - strscpy(bootup_trigger_buf, str, COMMAND_LINE_SIZE);
> + strscpy(bootup_trigger_buf + len , str, COMMAND_LINE_SIZE - len);
> trace_set_ring_buffer_expanded(NULL);
> disable_tracing_selftest("running event triggers");
>
> - buf = bootup_trigger_buf;
> - for (i = 0; i < MAX_BOOT_TRIGGERS; i++) {
> + buf = bootup_trigger_buf + len;
> + boot_trigger_buf_len += strlen(buf);
The above needs to skip the '\0' too:
boot_trigger_buf_len += strlen(buf) + 1;
> +
> + for (i = nr_boot_triggers; i < MAX_BOOT_TRIGGERS; i++) {
> trigger = strsep(&buf, ",");
> if (!trigger)
> break;
next prev parent reply other threads:[~2026-03-30 16:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 22:13 [PATCH v4 0/2] tracing: Preserve repeated boot-time parameters and drain deferred trigger frees Wesley Atwell
2026-03-24 22:13 ` [PATCH v4 1/2] tracing: Preserve repeated boot-time tracing parameters Wesley Atwell
2026-03-28 17:53 ` Steven Rostedt
2026-03-28 20:18 ` [PATCH v5] " Wesley Atwell
2026-03-29 15:49 ` Steven Rostedt
2026-03-29 18:42 ` [PATCH v6] " Wesley Atwell
2026-03-30 14:43 ` Steven Rostedt
2026-03-30 16:37 ` Steven Rostedt [this message]
2026-03-30 16:42 ` Steven Rostedt
2026-03-24 22:13 ` [PATCH v4 2/2] tracing: Drain deferred trigger frees if kthread creation fails Wesley Atwell
2026-03-27 19:06 ` Steven Rostedt
2026-03-27 22:41 ` Wesley Atwell
2026-03-28 2:30 ` Steven Rostedt
2026-03-28 4:56 ` Wesley Atwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260330123743.5cd30e56@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=atwellwea@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox