Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Daniel P . Berrangé
On Thu, Nov 07, 2019 at 02:44:11PM +0100, Laszlo Ersek wrote: > On 11/07/19 13:47, Paolo Bonzini wrote: > > On 07/11/19 12:52, Daniel P. Berrangé wrote: > >> > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb5530e4082446aac3a3d69780cd4dbfa4520013 > >> > >> Is it

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 14:58, Paolo Bonzini wrote: > On 07/11/19 14:27, Laszlo Ersek wrote: >> The VirtioRngDxe driver is a UEFI driver that follows the UEFI driver >> model. Meaning (in this context), it is connected to the virtio-rng >> device in the BDS phase, by platform BDS code. >> >> Put differently,

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Ard Biesheuvel
On Thu, 7 Nov 2019 at 14:44, Laszlo Ersek wrote: > > On 11/07/19 13:47, Paolo Bonzini wrote: > > On 07/11/19 12:52, Daniel P. Berrangé wrote: > >> > >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb5530e4082446aac3a3d69780cd4dbfa4520013 > >> > >> Is it practical

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Paolo Bonzini
On 07/11/19 14:27, Laszlo Ersek wrote: > The VirtioRngDxe driver is a UEFI driver that follows the UEFI driver > model. Meaning (in this context), it is connected to the virtio-rng > device in the BDS phase, by platform BDS code. > > Put differently, the non-privileged driver that's the source of

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 13:47, Paolo Bonzini wrote: > On 07/11/19 12:52, Daniel P. Berrangé wrote: >> >> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb5530e4082446aac3a3d69780cd4dbfa4520013 >> >> Is it practical to provide a jitter entropy source for EDK2 >> too ? > > The

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 13:50, Paolo Bonzini wrote: > On 07/11/19 12:55, Daniel P. Berrangé wrote: >>> Yes, I would make SMM use a cryptographic pseudo-random number generator >>> and seed it from virtio-rng from DXE, way before the OS starts and can >>> "attack" it. >>> >>> Once you've gotten a seed, you

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 12:37, Paolo Bonzini wrote: > On 07/11/19 11:25, Ard Biesheuvel wrote: >>> This looks problematic on QEMU. Entropy is a valuable resource, and >>> whatever resource SMM drivers depend on, should not be possible for e.g. >>> a 3rd party UEFI driver (or even for the runtime OS) to

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Paolo Bonzini
On 07/11/19 12:55, Daniel P. Berrangé wrote: >> Yes, I would make SMM use a cryptographic pseudo-random number generator >> and seed it from virtio-rng from DXE, way before the OS starts and can >> "attack" it. >> >> Once you've gotten a seed, you can create a CSPRNG with a stream cipher >>

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Paolo Bonzini
On 07/11/19 12:52, Daniel P. Berrangé wrote: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bb5530e4082446aac3a3d69780cd4dbfa4520013 > > Is it practical to provide a jitter entropy source for EDK2 > too ? The hard part is not collecting jitter (though the

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Daniel P . Berrangé
On Thu, Nov 07, 2019 at 12:37:11PM +0100, Paolo Bonzini wrote: > On 07/11/19 11:25, Ard Biesheuvel wrote: > >> This looks problematic on QEMU. Entropy is a valuable resource, and > >> whatever resource SMM drivers depend on, should not be possible for e.g. > >> a 3rd party UEFI driver (or even for

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Daniel P . Berrangé
On Thu, Nov 07, 2019 at 11:10:57AM +0100, Laszlo Ersek wrote: > Hi, > > related TianoCore BZ: > > https://bugzilla.tianocore.org/show_bug.cgi?id=1871 > > (I'm starting this thread separately because at least some of the topics > are specific to QEMU, and I didn't want to litter the BZ with a

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 11:25, Ard Biesheuvel wrote: > On Thu, 7 Nov 2019 at 11:11, Laszlo Ersek wrote: >> (1) For UEFI HTTPS boot, TLS would likely benefit from good quality >> entropy. If the VM config includes virtio-rng (hence the guest firmware >> has EFI_RNG_PROTOCOL), then it should be used as a part

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Dr. David Alan Gilbert
* Laszlo Ersek (ler...@redhat.com) wrote: > On 11/07/19 11:18, Dr. David Alan Gilbert wrote: > > * Laszlo Ersek (ler...@redhat.com) wrote: > >> Hi, > >> > >> related TianoCore BZ: > >> > >> https://bugzilla.tianocore.org/show_bug.cgi?id=1871 > >> > >> (I'm starting this thread separately because

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Paolo Bonzini
On 07/11/19 11:25, Ard Biesheuvel wrote: >> This looks problematic on QEMU. Entropy is a valuable resource, and >> whatever resource SMM drivers depend on, should not be possible for e.g. >> a 3rd party UEFI driver (or even for the runtime OS) to exhaust. >> Therefore, it's not *only* the case

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
On 11/07/19 11:18, Dr. David Alan Gilbert wrote: > * Laszlo Ersek (ler...@redhat.com) wrote: >> Hi, >> >> related TianoCore BZ: >> >> https://bugzilla.tianocore.org/show_bug.cgi?id=1871 >> >> (I'm starting this thread separately because at least some of the topics >> are specific to QEMU, and I

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Dr. David Alan Gilbert
* Laszlo Ersek (ler...@redhat.com) wrote: > Hi, > > related TianoCore BZ: > > https://bugzilla.tianocore.org/show_bug.cgi?id=1871 > > (I'm starting this thread separately because at least some of the topics > are specific to QEMU, and I didn't want to litter the BZ with a > discussion that

Re: [edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Ard Biesheuvel
Hi Laszlo, Thanks for starting this thread. On Thu, 7 Nov 2019 at 11:11, Laszlo Ersek wrote: > > Hi, > > related TianoCore BZ: > > https://bugzilla.tianocore.org/show_bug.cgi?id=1871 > > (I'm starting this thread separately because at least some of the topics > are specific to QEMU, and I

[edk2-devel] privileged entropy sources in QEMU/KVM guests

2019-11-07 Thread Laszlo Ersek
Hi, related TianoCore BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1871 (I'm starting this thread separately because at least some of the topics are specific to QEMU, and I didn't want to litter the BZ with a discussion that may not be interesting to all participants CC'd on the BZ. I