* Regression with *bootconfig: Fix to remove bootconfig data from initrd while boot*
@ 2020-05-10 17:16 Paul Menzel
2020-05-11 0:57 ` Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: Paul Menzel @ 2020-05-10 17:16 UTC (permalink / raw)
To: Masami Hiramatsu
Cc: Borislav Petkov, Kees Cook, Ingo Molnar, Andrew Morton, stable,
Steven Rostedt (VMware),
LKML
Dear Masami,
Commit de462e5f10 (bootconfig: Fix to remove bootconfig data from initrd
while boot) causes a cosmetic regression on my x86 system with Debian
Sid/unstable.
Despite having no `bootconfig` parameter on the Linux CLI, the warning
below is shown.
'bootconfig' found on command line, but no bootconfig found
Reverting the commit fixes it.
Kind regards,
Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Regression with *bootconfig: Fix to remove bootconfig data from initrd while boot*
2020-05-10 17:16 Regression with *bootconfig: Fix to remove bootconfig data from initrd while boot* Paul Menzel
@ 2020-05-11 0:57 ` Masami Hiramatsu
2020-05-11 1:39 ` [PATCH] bootconfig: Fix to prevent warning message if no bootconfig option Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2020-05-11 0:57 UTC (permalink / raw)
To: Paul Menzel
Cc: Borislav Petkov, Kees Cook, Ingo Molnar, Andrew Morton, stable,
Steven Rostedt (VMware),
LKML
On Sun, 10 May 2020 19:16:47 +0200
Paul Menzel <pmenzel@molgen.mpg.de> wrote:
> Dear Masami,
>
>
> Commit de462e5f10 (bootconfig: Fix to remove bootconfig data from initrd
> while boot) causes a cosmetic regression on my x86 system with Debian
> Sid/unstable.
>
> Despite having no `bootconfig` parameter on the Linux CLI, the warning
> below is shown.
>
> 'bootconfig' found on command line, but no bootconfig found
>
> Reverting the commit fixes it.
Oops, sorry about that.
I'll fix it soon.
Thanks!
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] bootconfig: Fix to prevent warning message if no bootconfig option
2020-05-11 0:57 ` Masami Hiramatsu
@ 2020-05-11 1:39 ` Masami Hiramatsu
0 siblings, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2020-05-11 1:39 UTC (permalink / raw)
To: Steven Rostedt
Cc: Paul Menzel, Borislav Petkov, Kees Cook, Ingo Molnar,
Andrew Morton, stable, LKML
Commit de462e5f1071 ("bootconfig: Fix to remove bootconfig
data from initrd while boot") causes a cosmetic regression
on dmesg, which warns "no bootconfig data" message without
bootconfig cmdline option.
Fix setup_boot_config() by moving no bootconfig check after
commandline option check.
Fixes: de462e5f1071 ("bootconfig: Fix to remove bootconfig data from initrd while boot")
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
init/main.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/init/main.c b/init/main.c
index 1a5da2c2660c..5803ecb411ab 100644
--- a/init/main.c
+++ b/init/main.c
@@ -400,9 +400,8 @@ static void __init setup_boot_config(const char *cmdline)
char *data, *copy;
int ret;
+ /* Cut out the bootconfig data even if we have no bootconfig option */
data = get_boot_config_from_initrd(&size, &csum);
- if (!data)
- goto not_found;
strlcpy(tmp_cmdline, boot_command_line, COMMAND_LINE_SIZE);
parse_args("bootconfig", tmp_cmdline, NULL, 0, 0, 0, NULL,
@@ -411,6 +410,11 @@ static void __init setup_boot_config(const char *cmdline)
if (!bootconfig_found)
return;
+ if (!data) {
+ pr_err("'bootconfig' found on command line, but no bootconfig found\n");
+ return;
+ }
+
if (size >= XBC_DATA_MAX) {
pr_err("bootconfig size %d greater than max size %d\n",
size, XBC_DATA_MAX);
@@ -446,8 +450,6 @@ static void __init setup_boot_config(const char *cmdline)
extra_init_args = xbc_make_cmdline("init");
}
return;
-not_found:
- pr_err("'bootconfig' found on command line, but no bootconfig found\n");
}
#else
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-11 1:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 17:16 Regression with *bootconfig: Fix to remove bootconfig data from initrd while boot* Paul Menzel
2020-05-11 0:57 ` Masami Hiramatsu
2020-05-11 1:39 ` [PATCH] bootconfig: Fix to prevent warning message if no bootconfig option Masami Hiramatsu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).