[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1bd8ef12-3770-5075-6fe1-a3f0ceed1b39@infradead.org>
Date: Tue, 1 Mar 2022 07:50:02 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: John Ogness <john.ogness@...utronix.de>,
linux-kernel@...r.kernel.org
Cc: Igor Zhbanov <i.zhbanov@...russia.ru>,
Borislav Petkov <bp@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [PATCH] printk: fix return value of printk.devkmsg __setup
handler
On 3/1/22 04:58, John Ogness wrote:
> On 2022-02-28, Randy Dunlap <rdunlap@...radead.org> wrote:
>> If an invalid option value is used with "printk.devkmsg=<value>",
>> it is silently ignored.
>> If a valid option value is used, it is honored but the wrong return
>> value (0) is used, indicating that the command line option had an
>> error and was not handled. This string is not added to init's
>> environment strings due to init/main.c::unknown_bootoption()
>> checking for a '.' in the boot option string and then considering
>> that string to be an "Unused module parameter".
>>
>> Print a warning message if a bad option string is used.
>> Always return 1 from the __setup handler to indicate that the command
>> line option has been handled.
>>
>> Fixes: 750afe7babd1 ("printk: add kernel parameter to control writes to /dev/kmsg")
>> Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
>> Reported-by: Igor Zhbanov <i.zhbanov@...russia.ru>
>
> Reviewed-by: John Ogness <john.ogness@...utronix.de>
>
>> Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@...russia.ru
>
> The message at this link is very helpful in explaining the state of
> declaring kernel parameters. Hopefully someday someone will document
> and/or comment this stuff.
I have added some docs to include/linux/init.h.
Andrew has it in his mmotm queue.
--
~Randy
Powered by blists - more mailing lists