Skip to content

Commit ff59000

Browse files
bulwahnwilldeacon
authored andcommitted
arm64: adjust KASLR relocation after ARCH_RANDOM removal
Commit aacd149 ("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 9592eef ("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: Lukas Bulwahn <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 5e1e087 commit ff59000

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

arch/arm64/kernel/pi/kaslr_early.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,9 @@ asmlinkage u64 kaslr_early_init(void *fdt)
9494

9595
seed = get_kaslr_seed(fdt);
9696
if (!seed) {
97-
#ifdef CONFIG_ARCH_RANDOM
98-
if (!__early_cpu_has_rndr() ||
99-
!__arm64_rndr((unsigned long *)&seed))
100-
#endif
101-
return 0;
97+
if (!__early_cpu_has_rndr() ||
98+
!__arm64_rndr((unsigned long *)&seed))
99+
return 0;
102100
}
103101

104102
/*

0 commit comments

Comments
 (0)