Files
erofs-linux/drivers/char
Jason A. Donenfeld 829d680e82 random: cap jitter samples per bit to factor of HZ
Currently the jitter mechanism will require two timer ticks per
iteration, and it requires N iterations per bit. This N is determined
with a small measurement, and if it's too big, it won't waste time with
jitter entropy because it'd take too long or not have sufficient entropy
anyway.

With the current max N of 32, there are large timeouts on systems with a
small CONFIG_HZ. Rather than set that maximum to 32, instead choose a
factor of CONFIG_HZ. In this case, 1/30 seems to yield sane values for
different configurations of CONFIG_HZ.

Reported-by: Vladimir Murzin <[email protected]>
Fixes: 78c768e619 ("random: vary jitter iterations based on cycle counter speed")
Signed-off-by: Jason A. Donenfeld <[email protected]>
Tested-by: Vladimir Murzin <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2022-07-16 10:42:12 -07:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2022-04-22 16:24:47 +02:00