]> git.itanic.dy.fi Git - linux-stable/commitdiff
random: modernize documentation comment on get_random_bytes()
authorJason A. Donenfeld <Jason@zx2c4.com>
Fri, 4 Nov 2022 11:47:43 +0000 (12:47 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 18 Nov 2022 01:18:10 +0000 (02:18 +0100)
The prior text was very old and made outdated references to TCP sequence
numbers, which should use one of the integer functions instead, since
batched entropy was introduced. The current way of describing the
quality of functions is just to say that it's as good as /dev/urandom,
which now all the functions are.

Fixes: f5b98461cb81 ("random: use chacha20 for get_random_int/long")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
drivers/char/random.c

index e5e66e8fc1183d7cbf1603399c178cad1ce7ed15..a8476154d47eedeb80446fe634cc2f015fd1b392 100644 (file)
@@ -386,11 +386,11 @@ static void _get_random_bytes(void *buf, size_t len)
 }
 
 /*
- * This function is the exported kernel interface. It returns some number of
- * good random numbers, suitable for key generation, seeding TCP sequence
- * numbers, etc. In order to ensure that the randomness returned by this
- * function is okay, the function wait_for_random_bytes() should be called and
- * return 0 at least once at any point prior.
+ * This returns random bytes in arbitrary quantities. The quality of the
+ * random bytes is good as /dev/urandom. In order to ensure that the
+ * randomness provided by this function is okay, the function
+ * wait_for_random_bytes() should be called and return 0 at least once
+ * at any point prior.
  */
 void get_random_bytes(void *buf, size_t len)
 {