diff options
author | Pavankumar Kondeti <[email protected]> | 2023-04-12 10:02:58 +0530 |
---|---|---|
committer | Will Deacon <[email protected]> | 2023-04-14 14:32:04 +0100 |
commit | a2a83eb40fbdeee3ed9c6fcc7bb015a2dd1a3e93 (patch) | |
tree | 57f57c6c2da0d2021b3a30ba8970cbf2b4ad9f89 | |
parent | af6c0bd59f4f3ad5daad2f7b777954b1954551d5 (diff) |
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]>
-rw-r--r-- | arch/arm64/kernel/idreg-override.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm64/kernel/idreg-override.c b/arch/arm64/kernel/idreg-override.c index d833d78a7f31..964ba6efc7a0 100644 --- a/arch/arm64/kernel/idreg-override.c +++ b/arch/arm64/kernel/idreg-override.c @@ -178,6 +178,13 @@ static const struct { { "nokaslr", "kaslr.disabled=1" }, }; +static int __init parse_nokaslr(char *unused) +{ + /* nokaslr param handling is done by early cpufeature code */ + return 0; +} +early_param("nokaslr", parse_nokaslr); + static int __init find_field(const char *cmdline, const struct ftr_set_desc *reg, int f, u64 *v) { |