summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-02-28 15:57:57 +0300
committerJason A. Donenfeld <Jason@zx2c4.com>2022-03-13 04:00:56 +0300
commitd0efdf35a6a71d307a250199af6fce122a7c7e11 (patch)
treef331b896b79886667184914d0b16a43fe0349649 /drivers/char
parent6f98a4bfee72c22f50aedb39fb761567969865fe (diff)
downloadlinux-d0efdf35a6a71d307a250199af6fce122a7c7e11.tar.xz
random: give sysctl_random_min_urandom_seed a more sensible value
This isn't used by anything or anywhere, but we can't delete it due to compatibility. So at least give it the correct value of what it's supposed to be instead of a garbage one. Cc: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/random.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 9831797e0699..612e45e88077 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1581,7 +1581,7 @@ const struct file_operations random_fops = {
* to avoid breaking old userspaces, but writing to it does not
* change any behavior of the RNG.
*
- * - urandom_min_reseed_secs - fixed to the meaningless value "60".
+ * - urandom_min_reseed_secs - fixed to the value CRNG_RESEED_INTERVAL.
* It is writable to avoid breaking old userspaces, but writing
* to it does not change any behavior of the RNG.
*
@@ -1591,7 +1591,7 @@ const struct file_operations random_fops = {
#include <linux/sysctl.h>
-static int sysctl_random_min_urandom_seed = 60;
+static int sysctl_random_min_urandom_seed = CRNG_RESEED_INTERVAL / HZ;
static int sysctl_random_write_wakeup_bits = POOL_MIN_BITS;
static int sysctl_poolsize = POOL_BITS;
static u8 sysctl_bootid[UUID_SIZE];