random: trigger reseeding DRBG on more occasions
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2131988
Upstream Status: RHEL only
To adhere to the new requirements in the FIPS140-3 Implementation
Guidance, This patch enforces getrandom syscall to trigger reseeding
DRBG, if the previous getrandom syscall requested reseeding with the
GRND_RANDOM flag. That is implemented by making the internal flag
(CRYPTO_TFM_REQ_NEED_RESEED) retain after the getrandom(GRND_RANDOM)
call until the next generate operation.
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Edited by Daiki Ueno