OSDN Git Service

x86: reinitialize RNG seed on system reboot
authorJason A. Donenfeld <Jason@zx2c4.com>
Wed, 21 Sep 2022 09:31:33 +0000 (11:31 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 27 Sep 2022 09:30:59 +0000 (11:30 +0200)
commit763a2828bf313ed55878b09759dc435355035f2e
tree151fab0b966105101675bda0f0d351a4192394d9
parenteebb38a5633a77f5fa79d6486d5b2fcf8fbe3c07
x86: reinitialize RNG seed on system reboot

Since this is read from fw_cfg on each boot, the kernel zeroing it out
alone is insufficient to prevent it from being used twice. And indeed on
reboot we always want a new seed, not the old one. So re-fill it in this
circumstance.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Message-Id: <20220921093134.2936487-3-Jason@zx2c4.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/i386/x86.c