diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-05-01 13:51:34 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2022-05-13 23:59:23 +0200 |
commit | b7b67d1391a831eb9de133e85a2230e2e81a2ce4 (patch) | |
tree | d37773c22f6184d8731df0b27c88387bf45967b8 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 78c768e619fbd5157b3544915aad5158af0c5809 (diff) |
random: mix in timestamps and reseed on system restore
Since the RNG loses freshness with system suspend/hibernation, when we
resume, immediately reseed using whatever data we can, which for this
particular case is the various timestamps regarding system suspend time,
in addition to more generally the RDSEED/RDRAND/RDTSC values that happen
whenever the crng reseeds.
On systems that suspend and resume automatically all the time -- such as
Android -- we skip the reseeding on suspend resumption, since that could
wind up being far too busy. This is the same trade-off made in
WireGuard.
In addition to reseeding upon resumption always mix into the pool these
various stamps on every power notification event.
Cc: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions