mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] random: inform about bootloader-provided randomness
@ 2019-10-05 11:36 Dominik Brodowski
  2019-10-15  0:40 ` Will Deacon
  0 siblings, 1 reply; 3+ messages in thread
From: Dominik Brodowski @ 2019-10-05 11:36 UTC (permalink / raw)
  To: Ard Biesheuvel, Hsin-Yi Wang, Stephen Boyd, Rob Herring,
	Theodore Ts'o, Will Deacon
  Cc: linux-kernel

Inform how many bits of randomness were provided by the bootloader,
and whether we trust that input.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Hsin-Yi Wang <hsinyi@chromium.org>
Cc: Stephen Boyd <swboyd@chromium.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Will Deacon <will@kernel.org>

diff --git a/drivers/char/random.c b/drivers/char/random.c
index de434feb873a..673375e05c0d 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -2515,6 +2515,10 @@ EXPORT_SYMBOL_GPL(add_hwgenerator_randomness);
  */
 void add_bootloader_randomness(const void *buf, unsigned int size)
 {
+	pr_notice("random: adding %u bits of %sbootloader-provided randomness",
+		size * 8,
+		IS_ENABLED(CONFIG_RANDOM_TRUST_BOOTLOADER) ? "trusted " : "");
+
 	if (IS_ENABLED(CONFIG_RANDOM_TRUST_BOOTLOADER))
 		add_hwgenerator_randomness(buf, size, size * 8);
 	else

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

end of thread, other threads:[~2019-10-15  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-05 11:36 [PATCH] random: inform about bootloader-provided randomness Dominik Brodowski
2019-10-15  0:40 ` Will Deacon
2019-10-15  9:44   ` Hsin-Yi Wang

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®