From: Dominik Brodowski <linux@dominikbrodowski.net>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Hsin-Yi Wang <hsinyi@chromium.org>,
Stephen Boyd <swboyd@chromium.org>, Rob Herring <robh@kernel.org>,
Theodore Ts'o <tytso@mit.edu>, Will Deacon <will@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] random: inform about bootloader-provided randomness
Date: Sat, 5 Oct 2019 13:36:32 +0200 [thread overview]
Message-ID: <20191005113632.GA74715@light.dominikbrodowski.net> (raw)
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
next reply other threads:[~2019-10-05 11:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-05 11:36 Dominik Brodowski [this message]
2019-10-15 0:40 ` Will Deacon
2019-10-15 9:44 ` Hsin-Yi Wang
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=20191005113632.GA74715@light.dominikbrodowski.net \
--to=linux@dominikbrodowski.net \
--cc=ard.biesheuvel@linaro.org \
--cc=hsinyi@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=swboyd@chromium.org \
--cc=tytso@mit.edu \
--cc=will@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®