Received: from eggs.gnu.org ([208.118.235.92]:52917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBWN9-0007UV-9C for qemu-devel@nongnu.org; Fri, 01 Mar 2013 15:16:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UBWN8-00017T-7u for qemu-devel@nongnu.org; Fri, 01 Mar 2013 15:16:03 -0500 Received: from terminus.zytor.com ([2001:1868:205::10]:33065 helo=mail.zytor.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UBWN7-00017H-Sr for qemu-devel@nongnu.org; Fri, 01 Mar 2013 15:16:02 -0500 In-Reply-To: <51310BD6.20708@linux.vnet.ibm.com> References: <512FF819.7050505@redhat.com> <51310365.8040102@zytor.com> <51310BD6.20708@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: "H. Peter Anvin" Date: Fri, 01 Mar 2013 12:15:35 -0800 Message-ID: <0eac3df2-ec48-4784-a681-ff0e04f9b563@email.android.com> Subject: Re: [Qemu-devel] virtio-rng and fd passing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Berger Cc: "qemu-devel@nongnu.org" The guest kernel already provides the PRNG itself. We have been over this... Stefan Berger wrote: >On 03/01/2013 02:37 PM, H. Peter Anvin wrote: >> On 02/28/2013 04:36 PM, Eric Blake wrote: >>> Stefan Berger and I discovered on IRC that virtio-rng is unable to >>> support fd passing. We attempted: >>> >>> qemu-system-x86_64 ... -add-fd >>> set=4,fd=34,opaque=RDONLY:/dev/urandom >> ^^^^^^^^^^^^ >>> -object rng-random,id=rng0,filename=/dev/fdset/4 -device >>> virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x6 >>> >> Unrelated, but you really, really, really don't want to pass >> /dev/urandom there, use /dev/random. > >From what I am reading about /dev/random is that it will start blocking > >once not enough entropy is available anymore. Sounds like this could be > >abused if multiple VMs were using this device and one drains the >entropy.. An alternative may be to pick go through a crypto library >that >seeds itself with entropy and implements random number generators >following NIST 800-90 for example. Freebl would offer at least one such > >implementation: > >http://dxr.mozilla.org/mozilla-central/security/nss/lib/freebl/drbg.c.html > >- search for 'NIST' there > > Stefan -- Sent from my mobile phone. Please excuse brevity and lack of formatting.