linux/arch
Jason A. Donenfeld 2f14062bb1 random: handle latent entropy and command line from random_init()
Currently, start_kernel() adds latent entropy and the command line to
the entropy bool *after* the RNG has been initialized, deferring when
it's actually used by things like stack canaries until the next time
the pool is seeded. This surely is not intended.

Rather than splitting up which entropy gets added where and when between
start_kernel() and random_init(), just do everything in random_init(),
which should eliminate these kinds of bugs in the future.

While we're at it, rename the awkwardly titled "rand_initialize()" to
the more standard "random_init()" nomenclature.

Reviewed-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2022-05-18 15:53:53 +02:00
..
alpha alpha: define get_cycles macro for arch-override 2022-05-13 23:59:23 +02:00
arc ARC: remove redundant READ_ONCE() in cmpxchg loop 2022-04-18 14:47:05 -07:00
arm arm: use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
arm64 ARM: 2022-05-01 11:49:32 -07:00
csky ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
h8300 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
hexagon ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
ia64 ia64: define get_cycles macro for arch-override 2022-05-13 23:59:22 +02:00
m68k m68k: use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
microblaze Kbuild updates for v5.18 2022-03-31 11:59:03 -07:00
mips mips: use fallback for random_get_entropy() instead of just c0 random 2022-05-13 23:59:23 +02:00
nios2 nios2: use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
openrisc random: handle latent entropy and command line from random_init() 2022-05-18 15:53:53 +02:00
parisc parisc: define get_cycles macro for arch-override 2022-05-13 23:59:23 +02:00
powerpc powerpc: define get_cycles macro for arch-override 2022-05-13 23:59:23 +02:00
riscv riscv: use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
s390 s390: define get_cycles macro for arch-override 2022-05-13 23:59:23 +02:00
sh Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2022-04-01 19:57:03 -07:00
sparc sparc: use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
um um: use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
x86 x86/tsc: Use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
xtensa xtensa: use fallback for random_get_entropy() instead of zero 2022-05-13 23:59:23 +02:00
.gitignore
Kconfig vmalloc: replace VM_NO_HUGE_VMAP with VM_ALLOW_HUGE_VMAP 2022-04-19 12:08:57 -07:00