Thread (6 messages) 6 messages, 3 authors, 2021-02-15

Re: [PATCH 2/4] libkmod-config: re-quote option from kernel cmdline

From: Lucas De Marchi <hidden>
Date: 2021-02-15 20:19:10

On Mon, Feb 15, 2021 at 7:33 AM Jessica Yu [off-list ref] wrote:
quoted hunk ↗ jump to hunk
+++ Lucas De Marchi [12/02/21 01:45 -0800]:
quoted
It was reported that grub mangles the kernel cmdline. It turns

      acpi_cpufreq.dyndbg="file drivers/cpufreq/acpi-cpufreq.c +mpf"

      into

      "acpi_cpufreq.dyndbg=file drivers/cpufreq/acpi-cpufreq.c +mpf"

However, even though we could blame grub for doing that, the kernel
happily accepts and re-quotes it when the module is built-in.
So, it's better if kmod also understands it this way and does the same.

Here we basically add additional code to un-mangle it, moving the quote
in way that is acceptable to pass through init_module(). Note that the
interface [f]init_module() gives us mandates the quote to be part of the
value: the module name is not passed and the options are separated by
space.

Reported-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://bugzilla.suse.com/show_bug.cgi?id=1181111#c10
Hi Lucas,

Thanks a lot for working on this. I applied this patchset on top of
kmod master and after some light testing it appears to be able to
handle the mangled quoting from grub now:

     Tested-by: Jessica Yu [off-list ref]

thanks!

Applied
Lucas De Marchi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help