All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: tytso@mit.edu
Cc: linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org>
Subject: [PATCH] random: Document add_hwgenerator_randomness() with other input functions
Date: Wed, 13 Jan 2021 17:10:14 +0000	[thread overview]
Message-ID: <20210113171014.2830-1-broonie@kernel.org> (raw)

The section at the top of random.c which documents the input functions
available does not document add_hwgenerator_randomness() which might lead
a reader to overlook it. Add a brief note about it.

Signed-off-by: Mark Brown <broonie@kernel.org>
---

This patch is almost a year old at this point...

 drivers/char/random.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/char/random.c b/drivers/char/random.c
index 5f3b8ac9d97b..3e17e04c3cef 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -228,6 +228,14 @@
  * particular randomness source.  They do this by keeping track of the
  * first and second order deltas of the event timings.
  *
+ * There is also an interface for true hardware RNGs:
+ *
+ *	void add_hwgenerator_randomness(const char *buffer, size_t count,
+ *				size_t entropy);
+ *
+ * This will credit entropy as specified by the caller, if the entropy
+ * pool is full it will block until more entropy is needed.
+ *
  * Ensuring unpredictability at system startup
  * ============================================
  *
-- 
2.20.1


             reply	other threads:[~2021-01-13 17:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 17:10 Mark Brown [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-12-01 17:44 [PATCH] random: Document add_hwgenerator_randomness() with other input functions Mark Brown
2021-12-02  4:48 ` Jason A. Donenfeld
2021-11-15 17:42 Mark Brown
2021-10-15 13:34 Mark Brown
2021-09-21 21:39 Mark Brown
2021-07-12 12:07 Mark Brown
2021-05-11 17:29 Mark Brown
2020-07-01 17:15 Mark Brown
2020-04-24 12:39 Mark Brown
2020-04-24 16:03 ` Randy Dunlap
2020-01-24 13:41 Mark Brown
2020-01-24 20:23 ` Randy Dunlap

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=20210113171014.2830-1-broonie@kernel.org \
    --to=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.