From: Steven Rostedt <rostedt@goodmis.org>
To: JaeSang Yoo <js.yoo.5b@gmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
JaeSang Yoo <jsyoo5b@gmail.com>
Subject: Re: [PATCH v2] trace: param: fix tp_printk option related with tp_printk_stop_on_boot
Date: Tue, 8 Feb 2022 14:41:11 -0500 [thread overview]
Message-ID: <20220208144111.6d5b5d2d@gandalf.local.home> (raw)
In-Reply-To: <20220208163031.885332-1-jsyoo5b@gmail.com>
On Wed, 9 Feb 2022 01:30:33 +0900
JaeSang Yoo <js.yoo.5b@gmail.com> wrote:
> Kernel param "tp_printk_stop_on_boot" starts with "tp_printk" which is
> the exact as the other kernel param "tp_printk".
> In compile & build process, It may not guaranteed that
> "tp_printk_stop_on_boot" always checked before "tp_printk".
> (By swapping its __setup() macro order, it may not work as expected.)
> Some kernel params which starts with other kernel params consider this
> problem. See commit 745a600cf1a6 ("um: console: Ignore console= option")
> or init/do_mounts.c:45 (setup function of "ro" kernel param)
>
> Kernel param "tp_printk" can be handled with its value(0 or off) or
> it can be handled without its value. (maybe it won't effect anything)
> Fix setup function to ignore when the "tp_printk" becomes prefix of
> other kernel param.
>
> Signed-off-by: JaeSang Yoo <jsyoo5b@gmail.com>
> ---
> kernel/trace/trace.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index c860f582b078..5c8a28d74cf8 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -252,6 +252,8 @@ __setup("trace_clock=", set_trace_boot_clock);
>
> static int __init set_tracepoint_printk(char *str)
> {
> + if (*str == '_')
> + return 0
Did you test this?
Need a space here (besides the obvious bug).
Also, it needs a comment above:
/* Ignore the tp_printk_stop_on_boot */
if (*str == '_')
return 0;
-- Steve
> if ((strcmp(str, "=0") != 0 && strcmp(str, "=off") != 0))
> tracepoint_printk = 1;
> return 1;
next prev parent reply other threads:[~2022-02-08 19:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 16:30 JaeSang Yoo
2022-02-08 19:41 ` Steven Rostedt [this message]
2022-02-08 20:57 ` kernel test robot
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=20220208144111.6d5b5d2d@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=js.yoo.5b@gmail.com \
--cc=jsyoo5b@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/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
all inboxes | Powered by JetHome®