linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: kaslr: Print warning if KASLR is disabled due to lack of seed
@ 2019-11-07 12:12 Mark Brown
  2019-11-08 13:38 ` Catalin Marinas
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2019-11-07 12:12 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon; +Cc: Mark Brown, linux-arm-kernel

It seems to be a relatively common system integration error for system
integrators and administrators to enable KASLR in their configuration but
not provide the seed at runtime, sometimes due to that breaking at some
later point after it is initially enabled. Since KASLR is not announced at
boot time unless it forces on KPTI this can lead to users incorrectly
believing their system has the feature enabled when in fact it does not,
and if they notice the problem the lack of any diagnostics makes it harder
to understand the problem. Provide a warning message to assist in these
situations.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 arch/arm64/kernel/kaslr.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/kernel/kaslr.c b/arch/arm64/kernel/kaslr.c
index 416f537bf614..c2ba5e783ada 100644
--- a/arch/arm64/kernel/kaslr.c
+++ b/arch/arm64/kernel/kaslr.c
@@ -98,8 +98,10 @@ u64 __init kaslr_early_init(u64 dt_phys)
 	 * Retrieve (and wipe) the seed from the FDT
 	 */
 	seed = get_kaslr_seed(fdt);
-	if (!seed)
+	if (!seed) {
+		pr_warn("No seed available for KASLR, disabling\n");
 		return 0;
+	}
 
 	/*
 	 * Check if 'nokaslr' appears on the command line, and
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-08 14:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07 12:12 [PATCH] arm64: kaslr: Print warning if KASLR is disabled due to lack of seed Mark Brown
2019-11-08 13:38 ` Catalin Marinas
2019-11-08 14:14   ` Mark Rutland
2019-11-08 14:35     ` Mark Brown
2019-11-08 14:17   ` Mark Brown

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).