• Jason A. Donenfeld's avatar
    efi: stub: use random seed from EFI variable · a89474aa
    Jason A. Donenfeld authored
    EFI has a rather unique benefit that it has access to some limited
    non-volatile storage, where the kernel can store a random seed. Read
    that seed in EFISTUB and concatenate it with other seeds we wind up
    passing onward to the kernel in the configuration table. This is
    complementary to the current other two sources - previous bootloaders,
    and the EFI RNG protocol.
    Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
    [ardb: check for non-NULL RNG protocol pointer, call GetVariable()
           without buffer first to obtain the size]
    Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
    a89474aa
random.c 5.16 KB