It is code snippet from Linux kernel (arch/arm64/kernel/kaslr.c) how kaslr seeed is obtained:
u64 __init kaslr_early_init(u64 dt_phys) { ... /* * Retrieve (and wipe) the seed from the FDT */ seed = get_kaslr_seed(fdt); /* * Mix in any entropy obtainable architecturally if enabled * and supported. */ if (arch_get_random_seed_long_early(&raw)) seed ^= raw; ... }
Does someone can explain why seed is xor'ed with output of arch random instruction (RNDR instruction that appears in ARMV8.5 Random extensions). If we already have bootloader's entropy then why need additionally get arch random?
I think it combines boot time and runtime generated random number, and should make it more secure.