Skip to content

Commit 882ad2a

Browse files
committed
Merge tag 'random-6.1-rc3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random
Pull random number generator fix from Jason Donenfeld: "One fix from Jean-Philippe Brucker, addressing a regression in which early boot code on ARM64 would use the non-_early variant of the arch_get_random family of functions, resulting in the architectural random number generator appearing unavailable during that early phase of boot. The fix simply changes arch_get_random*() to arch_get_random*_early(). This distinction between these two functions is a bit of an old wart I'm not a fan of, and for 6.2 I'll see if I can make obsolete the _early variant, so that one function does the right thing in all contexts without overhead" * tag 'random-6.1-rc3-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/crng/random: random: use arch_get_random*_early() in random_init()
2 parents 83633ed + f5e4ec1 commit 882ad2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/char/random.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,13 +791,13 @@ void __init random_init_early(const char *command_line)
791791
#endif
792792

793793
for (i = 0, arch_bits = sizeof(entropy) * 8; i < ARRAY_SIZE(entropy);) {
794-
longs = arch_get_random_seed_longs(entropy, ARRAY_SIZE(entropy) - i);
794+
longs = arch_get_random_seed_longs_early(entropy, ARRAY_SIZE(entropy) - i);
795795
if (longs) {
796796
_mix_pool_bytes(entropy, sizeof(*entropy) * longs);
797797
i += longs;
798798
continue;
799799
}
800-
longs = arch_get_random_longs(entropy, ARRAY_SIZE(entropy) - i);
800+
longs = arch_get_random_longs_early(entropy, ARRAY_SIZE(entropy) - i);
801801
if (longs) {
802802
_mix_pool_bytes(entropy, sizeof(*entropy) * longs);
803803
i += longs;

0 commit comments

Comments
 (0)