Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e35576c4 authored by Jason A. Donenfeld's avatar Jason A. Donenfeld Committed by Greg Kroah-Hartman
Browse files

random: remove unused OUTPUT_POOL constants



commit 0f63702718c91d89c922081ac1e6baeddc2d8b1a upstream.

We no longer have an output pool. Rather, we have just a wakeup bits
threshold for /dev/random reads, presumably so that processes don't
hang. This value, random_write_wakeup_bits, is configurable anyway. So
all the no longer usefully named OUTPUT_POOL constants were doing was
setting a reasonable default for random_write_wakeup_bits. This commit
gets rid of the constants and just puts it all in the default value of
random_write_wakeup_bits.

Reviewed-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: default avatarJason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 74cb3093
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -363,8 +363,6 @@
 */
 */
#define INPUT_POOL_SHIFT	12
#define INPUT_POOL_SHIFT	12
#define INPUT_POOL_WORDS	(1 << (INPUT_POOL_SHIFT-5))
#define INPUT_POOL_WORDS	(1 << (INPUT_POOL_SHIFT-5))
#define OUTPUT_POOL_SHIFT	10
#define OUTPUT_POOL_WORDS	(1 << (OUTPUT_POOL_SHIFT-5))
#define EXTRACT_SIZE		(BLAKE2S_HASH_SIZE / 2)
#define EXTRACT_SIZE		(BLAKE2S_HASH_SIZE / 2)


/*
/*
@@ -382,7 +380,7 @@
 * should wake up processes which are selecting or polling on write
 * should wake up processes which are selecting or polling on write
 * access to /dev/random.
 * access to /dev/random.
 */
 */
static int random_write_wakeup_bits = 28 * OUTPUT_POOL_WORDS;
static int random_write_wakeup_bits = 28 * (1 << 5);


/*
/*
 * Originally, we used a primitive polynomial of degree .poolwords
 * Originally, we used a primitive polynomial of degree .poolwords