Commit ff590009 authored by Lukas Bulwahn's avatar Lukas Bulwahn Committed by Will Deacon

arm64: adjust KASLR relocation after ARCH_RANDOM removal

Commit aacd149b ("arm64: head: avoid relocating the kernel twice for
KASLR") adds the new file arch/arm64/kernel/pi/kaslr_early.c with a small
code part guarded by '#ifdef CONFIG_ARCH_RANDOM'.

Concurrently, commit 9592eef7 ("random: remove CONFIG_ARCH_RANDOM")
removes the config CONFIG_ARCH_RANDOM and turns all '#ifdef
CONFIG_ARCH_RANDOM' code parts into unconditional code parts, which is
generally safe to do.

Remove a needless ifdef guard after the ARCH_RANDOM removal.
Signed-off-by: default avatarLukas Bulwahn <lukas.bulwahn@gmail.com>
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220721100433.18286-1-lukas.bulwahn@gmail.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 5e1e0874
...@@ -94,11 +94,9 @@ asmlinkage u64 kaslr_early_init(void *fdt) ...@@ -94,11 +94,9 @@ asmlinkage u64 kaslr_early_init(void *fdt)
seed = get_kaslr_seed(fdt); seed = get_kaslr_seed(fdt);
if (!seed) { if (!seed) {
#ifdef CONFIG_ARCH_RANDOM if (!__early_cpu_has_rndr() ||
if (!__early_cpu_has_rndr() || !__arm64_rndr((unsigned long *)&seed))
!__arm64_rndr((unsigned long *)&seed)) return 0;
#endif
return 0;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment