Description of problem: nm-initrd-generator segfaults with certain dyndbg options on the kernel command-line: kernel: Command line: BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.5.16-200.fc31.x86_64 root=UUID=[removed] ro "dyndbg=module xhci_hcd =p; module usbcore =p" Tested in a VM. Version-Release number of selected component (if applicable): NetworkManager-1.20.10-1.fc31.x86_64 How reproducible: Always. See, also, the attachment in Bug 1818952, Comment 137. Steps to Reproduce: 1. In grub2, manually add this to the kernel command-line: dyndbg="module xhci_hcd =p; module usbcore =p" Or add this to /etc/default/grub and run grub2-mkconfig: GRUB_CMDLINE_LINUX="dyndbg='module xhci_hcd =p ; module usbcore =p'" Actual results: A segfault is logged: ... kernel: nm-initrd-gener[333]: segfault at 0 ip 000055ab5be56d24 sp 00007ffcd6c5a200 error 4 in nm-initrd-generator[55ab5be51000+64000] Expected results: No segfault. Additional info: The kernel command-line posted above appears to have the first quote in the wrong place. That's what it really looks like in the log. See the examples at the end of this doc: Dynamic debug https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html
Here is a simpler reproducer: Boot to the grub2 menu. Press "e" to edit the kernel command-line. Append the following string to the kernel command-line: "foo =bar" ^ ^ ^ Include the quotes and the space. Press "ctrl-x" to boot and login. $ journalctl -b | grep segfault Apr 13 08:53:31 fedora31-test kernel: nm-initrd-gener[333]: segfault at 0 ip 0000559e03f23d24 sp 00007ffc8eedd000 error 4 in nm-initrd-generator[559e03f1e000+64000] $ cat /proc/cmdline BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.5.16-200.fc31.x86_64 root=UUID=54f79645-f858-46e0-af7a-97aecc88ff87 ro "foo =bar"
The kernel's own command-line parsing code is here: $ git grep -l get_option lib/cmdline.c lib/cmdline.c https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/lib/cmdline.c If there isn't a library function that can parse the kernel command-line for apps, there really should be, because that is non-trivial code.
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.