From: Dominik Brodowski <linux@dominikbrodowski.net>
To: linux-kernel@vger.kernel.org
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Matt Fleming <matt@codeblueprint.co.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Kees Cook <keescook@chromium.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Hsin-Yi Wang <hsinyi@chromium.org>,
Stephen Boyd <swboyd@chromium.org>, Rob Herring <robh@kernel.org>,
Theodore Ts'o <tytso@mit.edu>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-efi@vger.kernel.org,
Mario Limonciello <Mario.Limonciello@dell.com>
Subject: [PATCH 0/2] x86, efi/random: invoke EFI_RNG_PROTOCOL in the x86 EFI stub
Date: Wed, 6 Nov 2019 08:06:11 +0100 [thread overview]
Message-ID: <20191106070613.227833-1-linux@dominikbrodowski.net> (raw)
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
next reply other threads:[~2019-11-06 7:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-06 7:06 Dominik Brodowski [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191106070613.227833-1-linux@dominikbrodowski.net \
--to=linux@dominikbrodowski.net \
--cc=Mario.Limonciello@dell.com \
--cc=ard.biesheuvel@linaro.org \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=hpa@zytor.com \
--cc=hsinyi@chromium.org \
--cc=keescook@chromium.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=robh@kernel.org \
--cc=swboyd@chromium.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®