aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/random.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-05-15 15:06:18 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2022-05-19 16:54:15 +0200
commit6701de6c51c172b5de5633374479503c81fefc0b (patch)
tree5abaea08a755fac6972811c2ff2b098fdcbe6d1a /include/linux/random.h
parentrandom: remove get_random_bytes_arch() and add rng_has_arch_random() (diff)
downloadlinux-dev-6701de6c51c172b5de5633374479503c81fefc0b.tar.xz
linux-dev-6701de6c51c172b5de5633374479503c81fefc0b.zip
random: remove mostly unused async readiness notifier
The register_random_ready_notifier() notifier is somewhat complicated, and was already recently rewritten to use notifier blocks. It is only used now by one consumer in the kernel, vsprintf.c, for which the async mechanism is really overly complex for what it actually needs. This commit removes register_random_ready_notifier() and unregister_random_ ready_notifier(), because it just adds complication with little utility, and changes vsprintf.c to just check on `!rng_is_initialized() && !rng_has_arch_random()`, which will eventually be true. Performance- wise, that code was already using a static branch, so there's basically no overhead at all to this change. Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Sergey Senozhatsky <senozhatsky@chromium.org> Acked-by: Petr Mladek <pmladek@suse.com> # for vsprintf.c Reviewed-by: Petr Mladek <pmladek@suse.com> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'include/linux/random.h')
-rw-r--r--include/linux/random.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index 6af130c6edb9..d2360b2825b6 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -78,8 +78,6 @@ int __init random_init(const char *command_line);
bool rng_is_initialized(void);
bool rng_has_arch_random(void);
int wait_for_random_bytes(void);
-int register_random_ready_notifier(struct notifier_block *nb);
-int unregister_random_ready_notifier(struct notifier_block *nb);
/* Calls wait_for_random_bytes() and then calls get_random_bytes(buf, nbytes).
* Returns the result of the call to wait_for_random_bytes. */