aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/Kconfig
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2022-07-13 17:11:15 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2022-07-16 10:42:12 -0700
commit829d680e82a961c5370d9636130b43009ac36eb8 (patch)
treeb346e911932ceeacb15919a66574a2a70c2ffc8e /arch/s390/Kconfig
parentefi/x86: use naked RET on mixed mode call wrapper (diff)
downloadlinux-dev-829d680e82a961c5370d9636130b43009ac36eb8.tar.xz
linux-dev-829d680e82a961c5370d9636130b43009ac36eb8.zip
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 <vladimir.murzin@arm.com> Fixes: 78c768e619fb ("random: vary jitter iterations based on cycle counter speed") Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Tested-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/s390/Kconfig')
0 files changed, 0 insertions, 0 deletions