summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator.rs
diff options
context:
space:
mode:
authorEduardo Mucelli Rezende Oliveira <edumucelli@gmail.com>2026-11-10 20:08:46 +0100
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-11-13 14:15:27 +0900
commit381b391bfaa3f10d52da4740529804b0b6b8160d (patch)
tree4ce6b7d09119180f3bb0db756bb494c85cb0a375 /rust/kernel/alloc/allocator.rs
parent26fa92f351d4993428268afebf6c60c987477af5 (diff)
bootconfig: Trim unquoted values at end of file
__xbc_parse_value() trims an unquoted value when it encounters a delimiter, but leaves trailing whitespace intact when it reaches the end of the input. Thus "key = value " has a different value depending on whether the file ends with a newline. The extra whitespace also reaches the rendered kernel command line. Trim unquoted values after the scan finishes, including at end of input. Skip trimming after a closing quote so intentional whitespace in quoted values remains unchanged. Add checks for scalars, arrays and quoted values without a final newline. Link: https://lore.kernel.org/all/31f248f330e716b925add3a0ba76f62826527312.1794337724.git.edumucelli@gmail.com/ Fixes: 76db5a27a827 ("bootconfig: Add Extra Boot Config support") 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