Skip to content

Commit 18b915a

Browse files
Dominik BrodowskiIngo Molnar
Dominik Brodowski
authored and
Ingo Molnar
committed
efi/random: Treat EFI_RNG_PROTOCOL output as bootloader randomness
Commit 428826f ("fdt: add support for rng-seed") introduced add_bootloader_randomness(), permitting randomness provided by the bootloader or firmware to be credited as entropy. However, the fact that the UEFI support code was already wired into the RNG subsystem via a call to add_device_randomness() was overlooked, and so it was not converted at the same time. Note that this UEFI (v2.4 or newer) feature is currently only implemented for EFI stub booting on ARM, and further note that CONFIG_RANDOM_TRUST_BOOTLOADER must be enabled, and this should be done only if there indeed is sufficient trust in the bootloader _and_ its source of randomness. [ ardb: update commit log ] Tested-by: Bhupesh Sharma <[email protected]> Signed-off-by: Dominik Brodowski <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 2bb6a81 commit 18b915a

File tree

1 file changed

+1
-1
lines changed
  • drivers/firmware/efi

1 file changed

+1
-1
lines changed

drivers/firmware/efi/efi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz,
554554
sizeof(*seed) + size);
555555
if (seed != NULL) {
556556
pr_notice("seeding entropy pool\n");
557-
add_device_randomness(seed->bits, seed->size);
557+
add_bootloader_randomness(seed->bits, seed->size);
558558
early_memunmap(seed, sizeof(*seed) + size);
559559
} else {
560560
pr_err("Could not map UEFI random seed!\n");

0 commit comments

Comments
 (0)