x86: re-initialize RNG seed when selecting kernel
commitcc63374a5a7c240b7d3be734ef589dabbefc7527
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 22 Sep 2022 15:28:47 +0000 (22 17:28 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 1 Oct 2022 19:16:36 +0000 (1 21:16 +0200)
treec699a9e982ce11aa29dcf6082a536e30e2b456d3
parentc4ef867f2949bf2a2ae18a4e27cf1a34bbc8aecb
x86: re-initialize RNG seed when selecting kernel

We don't want it to be possible to re-read the RNG seed after ingesting
it, because this ruins forward secrecy. Currently, however, the setup
data section can just be re-read. Since the kernel is always read after
the setup data, use the selection of the kernel as a trigger to
re-initialize the RNG seed, just like we do on reboot, to preserve
forward secrecy.

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