[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support |
Date: |
Fri, 26 Oct 2012 11:08:48 -0400 (EDT) |
> This series implements the backend and frontend infrastructure for virtio-rng.
> This is similar to previous series sent out by both Amit and myself
> although it has been trimmed down considerably.
>
> In terms of backends, a file and EGD backend are supported. The file defaults
> to /dev/random based on the feedback from Peter. It's still possible
> to support /dev/urandom though as an entropy source by overriding the file
> name.
>
> I think this series is ready to merge.
Is /dev/random even appropriate to feed rngd?
rngd needs _a lot_ of entropy to even start working. Its randomness test works
in groups of 20000 bits. On a system without an hardware RNG, /dev/random can
hardly produce 4000 bits/minute. This means a guest will not get any entropy
boost for 5 minutes after it's started, even if we allow it to exhaust the
parent's entropy.
At this point, /dev/hwrng (or rdrand) seems just as good as /dev/random as a
source for virtio-rng (and even better, it is not starved as easily).
I think RngBackend is over-engineered. What other backends do you plan on
adding? Maybe rdrand, but that's just a chardev---so why isn't this enough:
-chardev file,source=on,path=/dev/hwrng,id=chr0 -device
virtio-rng-pci,file=chr0
-chardev rdrand,id=chr0 -device
virtio-rng-pci,file=chr0
-chardev socket,host=localhost,port=1024,id=chr0 -device
virtio-rng-pci,rng=chr0,egd=on
(which I suggested in my reply to Amit)?
Paolo
- [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, Anthony Liguori, 2012/10/26
- [Qemu-devel] [PATCH 3/6] rng: add RndBackend abstract object class, Anthony Liguori, 2012/10/26
- [Qemu-devel] [PATCH 5/6] rng-egd: introduce EGD compliant RNG backend, Anthony Liguori, 2012/10/26
- [Qemu-devel] [PATCH 2/6] object: add object_property_add_bool (v2), Anthony Liguori, 2012/10/26
- [Qemu-devel] [PATCH 6/6] virtio-rng: hardware random number generator device, Anthony Liguori, 2012/10/26
- [Qemu-devel] [PATCH 1/6] vl: add -object option to create QOM objects from the command line, Anthony Liguori, 2012/10/26
- [Qemu-devel] [PATCH 4/6] rng-random: add an RNG backend that uses /dev/random, Anthony Liguori, 2012/10/26
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, Anthony Liguori, 2012/10/26
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, H. Peter Anvin, 2012/10/26
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, Anthony Liguori, 2012/10/26
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, H. Peter Anvin, 2012/10/26
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, Amit Shah, 2012/10/29
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, H. Peter Anvin, 2012/10/30
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, Paolo Bonzini, 2012/10/26
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, H. Peter Anvin, 2012/10/26
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, Paolo Bonzini, 2012/10/26
- Re: [Qemu-devel] [PATCH 0/6] add paravirtualization hwrng support, H. Peter Anvin, 2012/10/26