diff options
| author | Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com> | 2026-11-10 20:08:45 +0100 |
|---|---|---|
| committer | Masami Hiramatsu (Google) <mhiramat@kernel.org> | 2026-11-13 14:03:03 +0900 |
| commit | 26fa92f351d4993428268afebf6c60c987477af5 (patch) | |
| tree | 779683013f471d7ce0d7f5471b58aecd71ccd87b /rust/kernel/alloc/allocator.rs | |
| parent | f734e5deff81aa7f33b16963461f23aec95b9a68 (diff) | |
tools/bootconfig: Close only opened braces in compact output
A key may have both a value and subkeys. When it has only one subkey,
xbc_show_compact_tree() can print that subkey using dotted notation
without opening a brace. During backtracking, however, it treats the
value node followed by a subkey as evidence that a brace was opened.
For example, a.b=v, a.b.c=w and a.z=q are printed with the brace for a
closed before z. Reading that output back changes a.z into the root key
z, silently changing the configuration.
Check the key children when deciding whether to close a brace. Skip the
value child, and account for a sole subkey that itself has both a value
and subkeys, since that combination is not compacted. This follows the
conditions used to open braces without keeping a depth-indexed array.
Extend the mixed-value/subkey sample to cover the lost sibling.
Link: https://lore.kernel.org/all/6ad67e4cda05238cd173c99e820a85de2c13f5fc.1794337724.git.edumucelli@gmail.com/
Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
Cc: stable@vger.kernel.org
Signed-off-by: Eduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/allocator.rs')
0 files changed, 0 insertions, 0 deletions
