Hi Steve,

On Thu, 11 Mar 2021 09:04:39 -0500
Steven Rostedt <[email protected]> wrote:

> On Thu, 11 Mar 2021 18:50:21 +0900
> Masami Hiramatsu <[email protected]> wrote:
> 
> > On Thu, 11 Mar 2021 16:52:13 +0800
> > Cao jin <[email protected]> wrote:
> > 
> > > Parameter "cmdline" has no use, drop it.  
> > 
> > OK, this looks good to me.
> 
> Why is this using boot_command_line instead of what is passed in, which
> might be different?

I think you may know the reason...

commit f61872bb58a1cd8f0422aab1940eeee8be579d38
Author: Steven Rostedt (VMware) <[email protected]>
Date:   Fri Feb 7 19:07:37 2020 -0500

    bootconfig: Use parse_args() to find bootconfig and '--'
...
-       p = strstr(cmdline, "bootconfig");
-       if (!p || (p != cmdline && !isspace(*(p-1))) ||
-           (p[10] && !isspace(p[10])))
+       strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE);
+       parse_args("bootconfig", tmp_cmdline, NULL, 0, 0, 0, NULL,
+                  bootconfig_params);
+
+       if (!bootconfig_found)

I guess since the boot_command_line has fixed length, it is safer to
allocate fixed length memory for tmp_cmdline. Is that correct?

Thank you,

-- 
Masami Hiramatsu <[email protected]>

Reply via email to