[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAODwPW90ALuMy6kFPqQSj_vN7krRz6cpksAUm2WHJNYwRNxHnA@mail.gmail.com>
Date: Fri, 30 Jan 2026 15:26:46 -0800
From: Julius Werner <jwerner@...gle.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>, linux-trace-kernel@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] bootconfig: Fix to terminate value search if it hits a newline
> > Note that if the line has a comment, it still keep searching the
> > value to the next line::
> >
> > foo = # comment
> > value
This seems inconsistent to me tbh. I think someone could reasonably
write a bootconfig like this:
foo = # We leave foo empty here because <reason>
bar = value
and expect it to work. There's nothing in the documentation that
suggests empty values would behave differently if there is a comment
behind them.
Also, I believe your patch might inadvertently break this case (which
I think(?) is supposed to work):
foo = first array value,
second array value,
third array value
Because __xbc_parse_value() returns from the first value with `&next`
pointing at the newline behind the comma, and that is passed to the
next iteration of __xbc_parse_value() which will now no longer skip
it. I think an already started array may need to be treated as a
special case here and you may want to add another
skip_spaces()/skip_comment() to the loop in xbc_parse_array().
Download attachment "smime.p7s" of type "application/pkcs7-signature" (5279 bytes)
Powered by blists - more mailing lists