summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-06-08 10:31:25 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2022-06-10 11:29:48 +0200
commite052a478a7daeca67664f7addd308ff51dd40654 (patch)
tree5c34367f464a6317ab8014e345f734a3ca2ad95d /drivers/char
parent846bb97e131d7938847963cca00657c995b1fce1 (diff)
random: remove rng_has_arch_random()
With arch randomness being used by every distro and enabled in defconfigs, the distinction between rng_has_arch_random() and rng_is_initialized() is now rather small. In fact, the places where they differ are now places where paranoid users and system builders really don't want arch randomness to be used, in which case we should respect that choice, or places where arch randomness is known to be broken, in which case that choice is all the more important. So this commit just removes the function and its one user. Reviewed-by: Petr Mladek <pmladek@suse.com> # for vsprintf.c Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/random.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 0b78b9c4acf5..655e327d425e 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -725,7 +725,6 @@ static void __cold _credit_init_bits(size_t bits)
*
**********************************************************************/
-static bool used_arch_random;
static bool trust_cpu __initdata = IS_ENABLED(CONFIG_RANDOM_TRUST_CPU);
static bool trust_bootloader __initdata = IS_ENABLED(CONFIG_RANDOM_TRUST_BOOTLOADER);
static int __init parse_trust_cpu(char *arg)
@@ -811,7 +810,6 @@ int __init random_init(const char *command_line)
crng_reseed();
else if (trust_cpu)
_credit_init_bits(arch_bits);
- used_arch_random = arch_bits >= POOL_READY_BITS;
WARN_ON(register_pm_notifier(&pm_notifier));
@@ -821,17 +819,6 @@ int __init random_init(const char *command_line)
}
/*
- * Returns whether arch randomness has been mixed into the initial
- * state of the RNG, regardless of whether or not that randomness
- * was credited. Knowing this is only good for a very limited set
- * of uses, such as early init printk pointer obfuscation.
- */
-bool rng_has_arch_random(void)
-{
- return used_arch_random;
-}
-
-/*
* Add device- or boot-specific data to the input pool to help
* initialize it.
*