summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorAndrew Halaney <ahalaney@redhat.com>2021-11-09 05:34:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 21:17:11 +0300
commitacdc5065d9678cc361041cd213da8693ebc26c44 (patch)
treee6b1357ef45b7edee6a3766bdbe8a1c817b72b85 /init
parent2cf82ea0a46d2b962652ad7aa9f0581a3bf284e3 (diff)
downloadlinux-acdc5065d9678cc361041cd213da8693ebc26c44.tar.xz
init: make unknown command line param message clearer
[ Upstream commit 8bc2b3dca7292347d8e715fb723c587134abe013 ] The prior message is confusing users, which is the exact opposite of the goal. If the message is being seen, one of the following situations is happening: 1. the param is misspelled 2. the param is not valid due to the kernel configuration 3. the param is intended for init but isn't after the '--' delineator on the command line To make that more clear to the user, explicitly mention "kernel command line" and also note that the params are still passed to user space to avoid causing any alarm over params intended for init. Link: https://lkml.kernel.org/r/20211013223502.96756-1-ahalaney@redhat.com Fixes: 86d1919a4fb0 ("init: print out unknown kernel parameters") Signed-off-by: Andrew Halaney <ahalaney@redhat.com> Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Cc: Borislav Petkov <bp@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'init')
-rw-r--r--init/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/init/main.c b/init/main.c
index 3c4054a95545..bcd132d4e7bd 100644
--- a/init/main.c
+++ b/init/main.c
@@ -924,7 +924,9 @@ static void __init print_unknown_bootoptions(void)
for (p = &envp_init[2]; *p; p++)
end += sprintf(end, " %s", *p);
- pr_notice("Unknown command line parameters:%s\n", unknown_options);
+ /* Start at unknown_options[1] to skip the initial space */
+ pr_notice("Unknown kernel command line parameters \"%s\", will be passed to user space.\n",
+ &unknown_options[1]);
memblock_free_ptr(unknown_options, len);
}