summaryrefslogtreecommitdiff
path: root/include/linux/random.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-22 19:17:20 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-22 19:17:20 +0300
commit0313bc278dac7cd9ce83a8d384581dc043156965 (patch)
treebae948239e4a6ffe8917fb4ea045d144d70df971 /include/linux/random.h
parentb47d5a4f6b8d42f8a8fbe891b36215e4fddc53be (diff)
downloadlinux-0313bc278dac7cd9ce83a8d384581dc043156965.tar.xz
Revert "random: block in /dev/urandom"
This reverts commit 6f98a4bfee72c22f50aedb39fb761567969865fe. It turns out we still can't do this. Way too many platforms that don't have any real source of randomness at boot and no jitter entropy because they don't even have a cycle counter. As reported by Guenter Roeck: "This causes a large number of qemu boot test failures for various architectures (arm, m68k, microblaze, sparc32, xtensa are the ones I observed). Common denominator is that boot hangs at 'Saving random seed:'" This isn't hugely unexpected - we tried it, it failed, so now we'll revert it. Link: https://lore.kernel.org/all/20220322155820.GA1745955@roeck-us.net/ Reported-and-bisected-by: Guenter Roeck <linux@roeck-us.net> Cc: Jason Donenfeld <Jason@zx2c4.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/random.h')
-rw-r--r--include/linux/random.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/random.h b/include/linux/random.h
index c0baffe7afb1..f673fbb838b3 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -48,7 +48,7 @@ extern int unregister_random_ready_notifier(struct notifier_block *nb);
extern size_t __must_check get_random_bytes_arch(void *buf, size_t nbytes);
#ifndef MODULE
-extern const struct file_operations random_fops;
+extern const struct file_operations random_fops, urandom_fops;
#endif
u32 get_random_u32(void);