lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20260131111951.99058146c69f2a729f7be643@kernel.org>
Date: Sat, 31 Jan 2026 11:19:51 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Julius Werner <jwerner@...gle.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, "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

On Fri, 30 Jan 2026 15:26:46 -0800
Julius Werner <jwerner@...gle.com> wrote:

> > > 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.

But we already accept that example in the tree.

  tools/bootconfig/samples/good-array-space-comment.bconf

So it is hard to change this syntax. But without comment, the
document defines the value is terminated with a newline. Thus
it needs to be fixed.


> 
> 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

Oops, good catch! I should add this as a good sample.

> 
> 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().

OK, let me fix it.

Thanks,

-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ