]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
random: remove unused OUTPUT_POOL constants
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 13 Jan 2022 14:51:06 +0000 (15:51 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:22:52 +0000 (09:22 +0200)
BugLink: https://bugs.launchpad.net/bugs/1981649
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: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/char/random.c

index be103e3dfe24c481373b294426b0465d1f228c14..6aaacf6df7eb2eeddff62f7d9c49686f8e4cac66 100644 (file)
  */
 #define INPUT_POOL_SHIFT       12
 #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)
 
 /*
  * should wake up processes which are selecting or polling on write
  * 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