summaryrefslogtreecommitdiff
path: root/drivers/char/random.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-03-23 07:21:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-30 10:29:11 +0300
commit3967a200367c933bc52b7d32681025f843e77642 (patch)
treeba568e1f579acd36ef81e55f5e78d5848e034fde /drivers/char/random.c
parent25727cbbe9b462ca2ccb9a9de9e122e32328ab8e (diff)
downloadlinux-3967a200367c933bc52b7d32681025f843e77642.tar.xz
random: re-add removed comment about get_random_{u32,u64} reseeding
commit dd7aa36e535797926d8eb311da7151919130139d upstream. The comment about get_random_{u32,u64}() not invoking reseeding got added in an unrelated commit, that then was recently reverted by 0313bc278dac ("Revert "random: block in /dev/urandom""). So this adds that little comment snippet back, and improves the wording a bit too. Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/random.c')
-rw-r--r--drivers/char/random.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index fd7b234c2d3e..d6b8a14c25b6 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -226,9 +226,10 @@ static void _warn_unseeded_randomness(const char *func_name, void *caller, void
*
* These interfaces will return the requested number of random bytes
* into the given buffer or as a return value. This is equivalent to
- * a read from /dev/urandom. The integer family of functions may be
- * higher performance for one-off random integers, because they do a
- * bit of buffering.
+ * a read from /dev/urandom. The u32, u64, int, and long family of
+ * functions may be higher performance for one-off random integers,
+ * because they do a bit of buffering and do not invoke reseeding
+ * until the buffer is emptied.
*
*********************************************************************/