This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

why output of rndr instruction is mixed with bootloader's entropy to form linux kaslr on arm64

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?