Skip to content

daemon: handle quoted values in kargs deletion#5562

Closed
kairosci wants to merge 2 commits into
coreos:mainfrom
kairosci:fix-kargs-quote-deletion
Closed

daemon: handle quoted values in kargs deletion#5562
kairosci wants to merge 2 commits into
coreos:mainfrom
kairosci:fix-kargs-quote-deletion

Conversation

@kairosci
Copy link
Copy Markdown

Fixes issue #2159. The daemon now handles unquoted inputs for kernel arguments that were quoted in the boot config due to spaces.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses the issue of deleting kernel arguments that may be quoted. The introduction of smart_kernel_args_delete and the modifications in kernel_arg_apply_patching provide a way to handle kernel arguments with spaces, whether they are quoted or not. The SAST Reconnaissance Pass did not find any vulnerabilities. I have a couple of suggestions to refactor duplicated code blocks into loops, which should improve maintainability without changing the logic.

Comment thread src/daemon/rpmostreed-transaction-types.cxx Outdated
Comment thread src/daemon/rpmostreed-transaction-types.cxx Outdated
@cgwalters
Copy link
Copy Markdown
Member

cgwalters commented Feb 26, 2026

Thanks for the PR. Offhand...it feels quite heuristic - and also arguably the fix should land in the ostree kargs code.

I think we actually implicitly handle this today in https://bootc-dev.github.io/bootc/internals/bootc_kernel_cmdline/index.html - so another angle is to try rebasing on top of that crate.

@kairosci kairosci force-pushed the fix-kargs-quote-deletion branch 7 times, most recently from ff056c3 to 9dd68be Compare February 26, 2026 21:21
This replaces the heuristic quote-handling workaround with proper kernel
command line parsing from the bootc-kernel-cmdline crate, which correctly
handles quoted values during comparison.

Fixes issue #2159.
@kairosci kairosci force-pushed the fix-kargs-quote-deletion branch from 9dd68be to dcf87bf Compare February 26, 2026 21:33
@kairosci
Copy link
Copy Markdown
Author

@cgwalters could you take another look? Thank you!

@kairosci kairosci closed this by deleting the head repository May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants