Skip to content

Commit a2a83eb

Browse files
Pavankumar Kondetiwilldeacon
authored andcommitted
arm64: kernel: Fix kernel warning when nokaslr is passed to commandline
'Unknown kernel command line parameters "nokaslr", will be passed to user space' message is noticed in the dmesg when nokaslr is passed to the kernel commandline on ARM64 platform. This is because nokaslr param is handled by early cpufeature detection infrastructure and the parameter is never consumed by a kernel param handler. Fix this warning by providing a dummy kernel param handler for nokaslr. Signed-off-by: Pavankumar Kondeti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent af6c0bd commit a2a83eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

arch/arm64/kernel/idreg-override.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,13 @@ static const struct {
178178
{ "nokaslr", "kaslr.disabled=1" },
179179
};
180180

181+
static int __init parse_nokaslr(char *unused)
182+
{
183+
/* nokaslr param handling is done by early cpufeature code */
184+
return 0;
185+
}
186+
early_param("nokaslr", parse_nokaslr);
187+
181188
static int __init find_field(const char *cmdline,
182189
const struct ftr_set_desc *reg, int f, u64 *v)
183190
{

0 commit comments

Comments
 (0)