From 09ffa35b682ecfa80de274c05500e38f132d61f8 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Mon, 13 Jan 2025 11:25:13 -0500 Subject: [PATCH] random: Revert back to the default fortuna minpool size This hack should no longer be needed since we use the virtio-random PV device to provide entropy to QEMU instances. This reverts commit a0603450a1423c387539e21b039b9ab20e8fc116. --- sys/dev/random/fortuna.c | 2 +- sys/dev/random/fortuna.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/random/fortuna.c b/sys/dev/random/fortuna.c index d1d83d3e4fd4..c4282c723a44 100644 --- a/sys/dev/random/fortuna.c +++ b/sys/dev/random/fortuna.c @@ -81,7 +81,7 @@ CTASSERT(RANDOM_FORTUNA_BLOCKS_PER_KEY * RANDOM_BLOCKSIZE == * Making RANDOM_FORTUNA_DEFPOOLSIZE too large will mean a long time between reseeds, * and too small may compromise initial security but get faster reseeds. */ -#define RANDOM_FORTUNA_MINPOOLSIZE 1 +#define RANDOM_FORTUNA_MINPOOLSIZE 16 #define RANDOM_FORTUNA_MAXPOOLSIZE INT_MAX CTASSERT(RANDOM_FORTUNA_MINPOOLSIZE <= RANDOM_FORTUNA_DEFPOOLSIZE); CTASSERT(RANDOM_FORTUNA_DEFPOOLSIZE <= RANDOM_FORTUNA_MAXPOOLSIZE); diff --git a/sys/dev/random/fortuna.h b/sys/dev/random/fortuna.h index adbfcf5306d0..7378edb9238c 100644 --- a/sys/dev/random/fortuna.h +++ b/sys/dev/random/fortuna.h @@ -29,7 +29,7 @@ /* Defined in FS&K */ #define RANDOM_FORTUNA_NPOOLS 32 /* The number of accumulation pools */ -#define RANDOM_FORTUNA_DEFPOOLSIZE 1 /* The default pool size/length for a (re)seed */ +#define RANDOM_FORTUNA_DEFPOOLSIZE 64 /* The default pool size/length for a (re)seed */ #ifdef _KERNEL typedef struct mtx mtx_t;