diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2019-11-06 08:06:13 +0100 |
---|---|---|
committer | Ard Biesheuvel <ardb@kernel.org> | 2019-11-07 10:18:45 +0100 |
commit | 0d95981438c3bdb53cc99b0fb656d24d7a80e1f3 (patch) | |
tree | 7c3dd2d573b2d2210eb4c87b5a62d705bf2da312 /arch/x86/boot | |
parent | efi/random: use arch-independent efi_call_proto() (diff) | |
download | linux-0d95981438c3bdb53cc99b0fb656d24d7a80e1f3.tar.xz linux-0d95981438c3bdb53cc99b0fb656d24d7a80e1f3.zip |
x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table
Invoke the EFI_RNG_PROTOCOL protocol in the context of the x86 EFI stub,
same as is done on arm/arm64 since commit 568bc4e87033 ("efi/arm*/libstub:
Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table"). Within the stub,
a Linux-specific RNG seed UEFI config table will be seeded. The EFI routines
in the core kernel will pick that up later, yet still early during boot,
to seed the kernel entropy pool. If CONFIG_RANDOM_TRUST_BOOTLOADER, entropy
is credited for this seed.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/compressed/eboot.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 82bc60c8acb2..68945c5700bf 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -782,6 +782,9 @@ efi_main(struct efi_config *c, struct boot_params *boot_params) /* Ask the firmware to clear memory on unclean shutdown */ efi_enable_reset_attack_mitigation(sys_table); + + efi_random_get_seed(sys_table); + efi_retrieve_tpm2_eventlog(sys_table); setup_graphics(boot_params); |