Skip to contentSkip to conversation

random: Document add_hwgenerator_randomness() with other input functions

PATCH In review Mark Brown 2 participants 2 messages Dec 1, 2021 – Dec 2, 2021 Random number driver

lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 random: Document add_hwgenerator_randomness() with other input functions

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.

---

Ted, I've been sending this for almost two years at this point and you've not commented on it - if there's some issue please let me know.

 drivers/char/random.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/char/random.c +8 -0
index 35fcc09c0228..9192da308f87 100644
@@ -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
  * ============================================
  *
Signature · 1 line
2.30.2
#1 lore raw

Hi Mark,

Quoted 9 lines · Mark Brown

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.

---

Ted, I've been sending this for almost two years at this point and you've not commented on it - if there's some issue please let me know.

Sorry for the delay. I've queued this up in my random tree now after incorporating Randy's punctuation suggestion from two of the former posts:

https://git.kernel.org/zx2c4/random-linux/c/91995de6b6dd91

This will transition through the various trees next time I send a pull.

Regards,
Jason