]> git.baikalelectronics.ru Git - kernel.git/commit
efi/random: Treat EFI_RNG_PROTOCOL output as bootloader randomness
authorDominik Brodowski <linux@dominikbrodowski.net>
Tue, 29 Oct 2019 17:37:52 +0000 (18:37 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 31 Oct 2019 08:40:18 +0000 (09:40 +0100)
commit459c76e7eea826ea8e08bfbe134e5ed3725c6bbf
tree8e08693c75f40126ca1e18a35b2262b3bc96d263
parente43657eaf49ff0dbd838866ce0f4ef46a9682cdb
efi/random: Treat EFI_RNG_PROTOCOL output as bootloader randomness

Commit 69788ded7904 ("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 <bhsharma@redhat.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191029173755.27149-4-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/firmware/efi/efi.c