linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] efi: add support for seeding the kernel RNG from UEFI
@ 2016-10-20 11:21 Ard Biesheuvel
       [not found] ` <1476962486-18368-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Ard Biesheuvel @ 2016-10-20 11:21 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-efi-u79uwXL29TY76Z2rM5mHXA, mark.rutland-5wv7dgnIgG8,
	matt-mF/unelCI9GS6iBeEJttW/XRex20P6io,
	keescook-F7+t8E8rja9g9hUCZPvPmw
  Cc: tytso-3s7WtUTddSA, Ard Biesheuvel

This implements generic EFI core kernel code to seed the kernel entropy
pool from a Linux specific UEFI configuration table containing a random seed
supplied by the firmware. (#1)

In addition, it wires it up for ARM and arm64, by invoking the EFI_RNG_PROTOCOL
UEFI protocol from the stub, and populating such a UEFI config table using its
output.

Changes since v1:
- Add a patch to actually build random.c for the ARM version of the stub, so
  that the functionality that patch #3 adds is available on ARM as well as arm64
- Handle the kexec case, by updating the seed in the configuration table on
  reboot.

How to wire this up for x86 is left as an exercise for the Intel developer.

Ard Biesheuvel (3):
  efi: add support for seeding the RNG from a UEFI config table
  efi/libstub: add random.c to ARM build
  efi/arm*: libstub: invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table

 drivers/firmware/efi/efi.c                     | 67 ++++++++++++++++++++
 drivers/firmware/efi/libstub/Makefile          |  4 +-
 drivers/firmware/efi/libstub/arm-stub.c        |  2 +
 drivers/firmware/efi/libstub/efi-stub-helper.c |  9 ---
 drivers/firmware/efi/libstub/efistub.h         | 11 ++++
 drivers/firmware/efi/libstub/random.c          | 48 ++++++++++++++
 include/linux/efi.h                            |  9 +++
 7 files changed, 139 insertions(+), 11 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2016-11-15 15:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-20 11:21 [PATCH v2 0/3] efi: add support for seeding the kernel RNG from UEFI Ard Biesheuvel
     [not found] ` <1476962486-18368-1-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-10-20 11:21   ` [PATCH v2 1/3] efi: add support for seeding the RNG from a UEFI config table Ard Biesheuvel
     [not found]     ` <1476962486-18368-2-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-10-20 11:26       ` Ard Biesheuvel
2016-10-20 11:21   ` [PATCH v2 2/3] efi/libstub: add random.c to ARM build Ard Biesheuvel
     [not found]     ` <1476962486-18368-3-git-send-email-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-11-02  9:37       ` Ard Biesheuvel
     [not found]         ` <CAKv+Gu_=et=2zHBTYOr9thz2kS0cXHHYg96oWGRdD3D10fqXtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-11-15 15:11           ` Arnd Bergmann
2016-11-15 15:19             ` Ard Biesheuvel
2016-10-20 11:21   ` [PATCH v2 3/3] efi/arm*: libstub: invoke EFI_RNG_PROTOCOL to seed the UEFI RNG table Ard Biesheuvel
2016-10-20 18:34   ` [PATCH v2 0/3] efi: add support for seeding the kernel RNG from UEFI Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).