bootloader: cmdline parser change and fixed escaping#432
Merged
yarda merged 1 commit intoredhat-performance:masterfrom Aug 9, 2022
Merged
bootloader: cmdline parser change and fixed escaping#432yarda merged 1 commit intoredhat-performance:masterfrom
yarda merged 1 commit intoredhat-performance:masterfrom
Conversation
The following is now parsed differently: [bootloader] cmdline =+ Previously it was parsed as operator "=" adding symbol "+" to the cmdline, now it is parsed as operator "=+" adding empty string "". For the previous behaviour the leading "+" can now be escaped. It works the following way: cmdline =+ -> operator "=+" adding "" cmdline =\+ -> operator "=" adding "+" cmdline =\\+ -> operator "=" adding "\+" Non leading escaping is ignored, e.g.: cmdline =ab\+ -> operator "=" adding "ab\+" Similarly for the operator "=-". Also the arguments are now correctly escaped when further processed by TuneD and the following problems should be now fixed: cmdline =\n -> corruption of the /etc/tuned/bootcmdline with newlines cmdline =\k -> TuneD traceback cmdline =\1 -> operator "=" adding "TUNED_BOOT_CMDLINE=" There could be more undesired effects and that's why the escaping different from the previously described leading escaping "\\", "\+", "\-" should be now ignored. Resolves: rhbz#1884472 Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
Contributor
Author
|
@jmencak thanks for the review and for noticing the bad escaping in the comment :) I fixed the comment, description in the PR should be OK. |
Contributor
Thank you for the fixes, looks good to me now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following is now parsed differently:
[bootloader]
cmdline =+
Previously it was parsed as operator "=" adding symbol "+" to the cmdline,
now it is parsed as operator "=+" adding empty string "".
For the previous behaviour the leading "+" can now be escaped. It works the
following way:
cmdline =+ -> operator "=+" adding ""
cmdline =\+ -> operator "=" adding "+"
cmdline =\\+ -> operator "=" adding "\+"
Non leading escaping is ignored, e.g.:
cmdline =ab\+ -> operator "=" adding "ab\+"
Similarly for the operator "=-".
Also the arguments are now correctly escaped when further processed by
TuneD and the following problems should be now fixed:
cmdline =\n -> corruption of the /etc/tuned/bootcmdline with newlines
cmdline =\k -> TuneD traceback
cmdline =\1 -> operator "=" adding "TUNED_BOOT_CMDLINE="
There could be more undesired effects and that's why the escaping different
from the previously described leading escaping "\\", "\+", "\-" should be
now ignored.
Resolves: rhbz#1884472
Signed-off-by: Jaroslav Škarvada jskarvad@redhat.com