mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] x86, efi/random: invoke EFI_RNG_PROTOCOL in the x86 EFI stub
@ 2019-11-06  7:06 Dominik Brodowski
  2019-11-06  7:06 ` [PATCH 1/2] efi/random: use arch-independent efi_call_proto() Dominik Brodowski
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dominik Brodowski @ 2019-11-06  7:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: Ard Biesheuvel, Matt Fleming, Catalin Marinas, Ingo Molnar,
	Peter Zijlstra, Kees Cook, Linus Torvalds, Hsin-Yi Wang,
	Stephen Boyd, Rob Herring, Theodore Ts'o, Thomas Gleixner,
	Borislav Petkov, H. Peter Anvin, x86, linux-efi,
	Mario Limonciello

EFI v2.4 and later may provide for a EFI_RNG_PROTOCOL, which can be called
from the EFI stubs to seed the kernel entropy pool. So far, this feature has
only been implemented on arm/arm64. This series makes the relevant EFI
libstub code arch-independent and enables the feature also on x86.

Please note that this feature only works if Linux is booted as an EFI stub,
and that the EFI-provided randomness is not credited as entropy unless
RANDOM_TRUST_BOOTLOADER is set.

Thanks to Ard Biesheuvel for his hints on how to test the EFI_RNG_PROTOCOL
from the UEFI shell ( RngTest-X64.efi ), and especially to Mario Limonciello:
he gave me highly useful hints on the implementation of the EFI_RNG_PROTOCOL
which ultimately helped me to determine why the earlier RFC patch did not
work out as expected.

The patches are also available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git/ random

Dominik Brodowski (2):
  efi/random: use arch-independent efi_call_proto()
  x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table

 arch/x86/boot/compressed/eboot.c       |  3 +++
 drivers/firmware/efi/libstub/Makefile  |  5 +++--
 drivers/firmware/efi/libstub/efistub.h |  2 --
 drivers/firmware/efi/libstub/random.c  | 21 ++++++++++++++++-----
 include/linux/efi.h                    |  2 ++
 5 files changed, 24 insertions(+), 9 deletions(-)

-- 
2.24.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-11-06 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06  7:06 [PATCH 0/2] x86, efi/random: invoke EFI_RNG_PROTOCOL in the x86 EFI stub Dominik Brodowski
2019-11-06  7:06 ` [PATCH 1/2] efi/random: use arch-independent efi_call_proto() Dominik Brodowski
2019-11-06  7:06 ` [PATCH 2/2] x86: efi/random: Invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table Dominik Brodowski
2019-11-06 14:38 ` [PATCH 0/2] x86, efi/random: invoke EFI_RNG_PROTOCOL in the x86 EFI stub Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®