Re: [PATCH v2 0/3] bootconfig: Preserve values and key paths during parsing and output
From: Masami Hiramatsu (Google)
Date: Thu Nov 12 2026 - 22:05:33 EST
On Fri, 13 Nov 2026 11:28:52 +0900, Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:
> On Tue, 10 Nov 2026 20:08:44 +0100, Eduardo Mucelli Rezende Oliveira <edumucelli@xxxxxxxxx> wrote:
> > Hi Masami,
> >
> > Thanks again for reviewing the earlier fixes. This v2 addresses the
> > issue Sashiko reported in the first patch.
> >
> > The parent array in v1 assumed that the parser always enforced
> > XBC_DEPTH_MAX. I reproduced the reported overflow with AddressSanitizer
> > using a 20-component chain where each parent also has a value. The
> > existing verifier skips the subkeys in that case, so the parser accepts
> > a deeper tree than the formatter's array can hold.
> >
> > Patch 1 now checks the key children to determine whether a node opened
> > braces, using the same conditions as the forward walk. It no longer
> > keeps a depth-indexed array. The existing verifier gap is a separate
> > issue; this revision removes the formatter's dependency on that check.
> >
> > Changes in v2:
> > - Patch 1: derive brace ownership from the key children.
> > - Patches 2 and 3: unchanged.
> >
> > I tested this on my Ubuntu machine. All 137 focused checks pass for the
> > combined series, and the full bootconfig suite passes after each patch
> > (86 passed, zero failed for the complete series). I also checked the
> > revised first patch and the combined series with AddressSanitizer and
> > UBSan using value-bearing chains up to 95 components.
> >
> > Review: https://lore.kernel.org/all/sashiko-outbox-207566@xxxxxxxxxx/
> > V1: https://lore.kernel.org/all/cover.1794333957.git.edumucelli@xxxxxxxxx/
>
> These looks good to me too.
Wait, let me re-review it.
Thanks,
--
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx>