linux-stable/init
Jason A. Donenfeld 11cce5040c random: handle latent entropy and command line from random_init()
commit 2f14062bb1 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-05-30 09:29:16 +02:00
..
calibrate.c
do_mounts.c init: don't panic if mount_nodev_root failed 2021-09-19 22:24:52 -04:00
do_mounts.h
do_mounts_initrd.c
do_mounts_rd.c
init_task.c sched: Introduce task_struct::user_cpus_ptr to track requested affinity 2021-08-20 12:33:00 +02:00
initramfs.c init: move usermodehelper_enable() to populate_rootfs() 2021-09-08 11:50:27 -07:00
Kconfig kbuild: Only default to -Werror if COMPILE_TEST 2021-09-07 18:47:04 -07:00
main.c random: handle latent entropy and command line from random_init() 2022-05-30 09:29:16 +02:00
Makefile init: use $(call cmd,) for generating include/generated/compile.h 2021-05-27 04:01:50 +09:00
noinitramfs.c init: move usermodehelper_enable() to populate_rootfs() 2021-09-08 11:50:27 -07:00
version.c