From: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
To: mhiramat@kernel.org
Cc: akpm@linux-foundation.org, rostedt@goodmis.org,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/3] bootconfig: Preserve values and key paths during parsing and output
Date: Tue, 10 Nov 2026 20:08:44 +0100 [thread overview]
Message-ID: <cover.1794337724.git.edumucelli@gmail.com> (raw)
In-Reply-To: <cover.1794333957.git.edumucelli@gmail.com>
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@kernel.org/
V1: https://lore.kernel.org/all/cover.1794333957.git.edumucelli@gmail.com/
Feedback is welcome.
Thanks,
Eduardo
Eduardo Mucelli Rezende Oliveira (3):
tools/bootconfig: Close only opened braces in compact output
bootconfig: Trim unquoted values at end of file
tools/bootconfig: Preserve values containing both types of quotes
lib/bootconfig.c | 5 ++-
tools/bootconfig/main.c | 43 +++++++++++++------
.../samples/exp-good-mixed-kv1.bconf | 5 +++
tools/bootconfig/samples/good-mixed-kv1.bconf | 5 +++
tools/bootconfig/test-bootconfig.sh | 29 +++++++++++++
5 files changed, 72 insertions(+), 15 deletions(-)
base-commit: 677f83795fdfc25ddc51b665a9111f5ff199f7ca
--
2.53.0
next prev parent reply other threads:[~2026-11-10 19:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 18:05 [PATCH " Eduardo Mucelli Rezende Oliveira
2026-11-10 18:05 ` [PATCH 1/3] tools/bootconfig: Close only opened braces in compact output Eduardo Mucelli Rezende Oliveira
2026-11-10 18:06 ` [PATCH 2/3] bootconfig: Trim unquoted values at end of file Eduardo Mucelli Rezende Oliveira
2026-11-10 18:06 ` [PATCH 3/3] tools/bootconfig: Preserve values containing both types of quotes Eduardo Mucelli Rezende Oliveira
2026-11-10 19:08 ` Eduardo Mucelli Rezende Oliveira [this message]
2026-11-10 19:08 ` [PATCH v2 1/3] tools/bootconfig: Close only opened braces in compact output Eduardo Mucelli Rezende Oliveira
2026-11-10 19:08 ` [PATCH v2 2/3] bootconfig: Trim unquoted values at end of file Eduardo Mucelli Rezende Oliveira
2026-11-10 19:08 ` [PATCH v2 3/3] tools/bootconfig: Preserve values containing both types of quotes Eduardo Mucelli Rezende Oliveira
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=cover.1794337724.git.edumucelli@gmail.com \
--to=edumucelli@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
/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®