Kernel throws message about unknown command line parameter
This document (000021796) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 15 SP5
SUSE Linux Enterprise Server 15 SP6
Situation
We believe that kernel args that are handled by cmdline_find_option_bool() exhibit this issue: It seems that command handling part of the kernel does not recognise the argument, however it is handled correctly.
It throws this warning:
Unknown kernel command line parameters "[...] nospectre_v2 no5lvl [...]", will be passed to user space.
Resolution
Note that this is merely an informational text, it's neither error nor warning at all.
It was introduced for example to check when you mistyped a boot option.
Cause
Generally speaking: those parameters are indeed passed to init as arguments and environment variables. The message rather informs you about that fact.
The boot options are usually handled via early_param() or such macros in the code, and the options specified there are trimmed from the command line printed as unknown.
Similarly, the module options or some sysctl aliases are reduced, too.
For example, there are no check for both nospectre_v2 and no5lvl, in the code; there is a check withcmdline_find_option_bool("no5lvl")
but there is no validation before that piece of code execution with early_param(), because no5lvl is x86_64 specific, not a module option so not in Kconfig.
For example, nospectre_v2 is not handled via early_param() also, hence it will appear as unknown options; no5lvl option isn't handled via eary_param() but referred only via cmdline_find_option_bool() on x86, and this might slip into the unknown option list, indeed.
Meanwhile, no5lvl option on riscv is handled via early_param(), hence it'll be reduced; and also nospectre_v2 on powerpc arch is handled via early_param() so it will not appear as unknown
Additional Information
for example:
nospectre_v2 is handled in the code below
and the various function of handling cmdline parameters not recognize it, but it works because it is checked there
arch/x86/kernel/cpu/bugs.c:
if (cmdline_find_option_bool(boot_command_line, "nospectre_v2") ||
cpu_mitigations_off())
return SPECTRE_V2_CMD_NONE;
the informational messagge was added from SLE12 to SLE15 kernel and was introduced from upstream in this function in the init/main of kernel src code:
pr_notice("Unknown kernel command line parameters \"%s\", will be passed to user space.\n", &unknown_options[1]);
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021796
- Creation Date: 17-Apr-2025
- Modified Date:17-Apr-2025
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com