bootconfig: Preserve values and key paths during parsing and output
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 0 repliesNew
- v13 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Patch 1: derive brace ownership from the key children.
- Patches 2 and 3: unchanged.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | tools/bootconfig: Close only opened braces in compact outputtools/ tools/ tools/ | +32 | 0 replies | |
| 2/3 | bootconfig: Trim unquoted values at end of filelib/ tools/ | +21 | 0 replies | |
| 3/3 | tools/bootconfig: Preserve values containing both types of quotestools/ tools/ | +19 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/3] bootconfig: Preserve values and key paths during parsing and output
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/[email protected]/
V1: https://lore.kernel.org/all/[email protected]/
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
Signature · 1 line
2.53.0