Skip to content
Commit a89474aa authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Ard Biesheuvel
Browse files

efi: stub: use random seed from EFI variable



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>
parent 63ffb573
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