From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as7FD-0003xA-7U for qemu-devel@nongnu.org; Mon, 18 Apr 2016 07:21:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1as7FA-0000Ln-1n for qemu-devel@nongnu.org; Mon, 18 Apr 2016 07:21:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1as7F9-0000LJ-RZ for qemu-devel@nongnu.org; Mon, 18 Apr 2016 07:21:28 -0400 From: Hubert Kario Date: Mon, 18 Apr 2016 13:21:25 +0200 Message-ID: <10221566.ARyR4YFMkW@pintsize.usersys.redhat.com> In-Reply-To: <571429D9.2090105@zytor.com> References: <5710C55E.3030000@redhat.com> <1808605284.5070717.1460795498043.JavaMail.zimbra@redhat.com> <571429D9.2090105@zytor.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1885215.UWBeVSpjJ6"; micalg="pgp-sha512"; protocol="application/pgp-signature" Subject: Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "H. Peter Anvin" Cc: Paolo Bonzini , Eric Blake , Cole Robinson , libvirt-list@redhat.com, qemu-devel , "Richard W.M. Jones" , "Daniel P. Berrange" , Peter Krempa , Amit Shah , mik@miknet.net, jjaburek@redhat.com, sgrubb@redhat.com --nextPart1885215.UWBeVSpjJ6 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On Sunday 17 April 2016 17:27:05 H. Peter Anvin wrote: > On 04/16/16 01:31, Paolo Bonzini wrote: > > Right, but there's always the point about people that use > > heterogeneous hosts and cannot pass rdrand/rdseed to the guest.=20 > > For these, we should add a QEMU driver that uses rdrand/rdseed, and= > > thus decouples virtio-rng from the host /dev/* completely. > >=20 > > From the libvirt POV there are various possibilities: > >=20 > > - Libvirt can have a libvirt.conf parameter that says "ignore > > whatever is specified in the guest XML if rdrand/rdseed is > > available, and instead use rdrand/rdseed". > >=20 > > - Libvirt can allow specifying rdrand/rdseed _and_ an additional > > backend,>=20 > > like this: > > > > /dev/random > >=20 > > and fallback to the second if rdrand/rdseed are not available. >=20 > The other thing, and this is one area where there is some legitimacy > to the /dev/urandom argument: on a fresh boot, it would be highly > desirable to get a seed value from virtio-rng even if that is > "entropyless". The backwards-compatible way would be to provide, > say, 64 bytes of /dev/urandom before switching to /dev/random, but it= > might be desirable to give the guest OS some way to cause that to > reset, explicitly requesting a new seed after an in-VM guest reboot, > kexec et al. it's unnecessary complex, which means it is more likely to have bugs in= =20 it besides, it's still feeding CSPRNG output to CSPRNG, no matter if it=20= reads the bits from /dev/random or /dev/urandom kernel will not provide you with raw random values it gathered so again, why block users from setting the randomness source to value=20= they think is sufficient for their use case? =2D-=20 Regards, Hubert Kario Senior Quality Engineer, QE BaseOS Security team Web: www.cz.redhat.com Red Hat Czech s.r.o., Purky=C5=88ova 99/71, 612 45, Brno, Czech Republi= c --nextPart1885215.UWBeVSpjJ6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCgAGBQJXFMM1AAoJEJKo0bgB0vX1MHgP/ji30pgLIXmYl5yTWNDvbmhD n+w42WmMOaqrUdwdOo3a+gNywXm2GLzs35JNypRPtFg6bskW3ID9PqU1lV08MS9I /Hza2gcd3cnUQunTC/QZyYmjamIB3c9fYCy1NWR0mNHWqDPvG0QwWIK1t8O4805g Iuv+lNlFDmTzna0kDqClQvAPmQEPEdC0rz5cxxIk/kOl6vlnRQGSLVXE6HmOUXGi 2KTk+LvjyjMljiyzABKtNSMJ33Utok0HyEb1P9kc+5tK0YWqdkT9VyylLe9Rtzpn HYutXiIy4D8cLPmRwZWatSu7FdLoEs75NNfgX7jnvYTnf8dk4OjomQryxbOTxDdx U6VdhyQm96qaCEI00RrNyhjTvzH4H9481i/gc3e/kPZ22Ul33t7u/jlkCw9qzk5F Hnb2PI1MPYglLG74cyag1CUHnPutZtJkHNwRZGABdjZLRHkkvybKcvW/2u38DzL8 kzO4yBDhTzEIxLzDbZEk5r7DCsgVDQNWUn5E7MOtuzE5QEP0E3Eq5f+hqII4OCuj 8GV2vQWph15S0VdINLghifKhTRsalGNsRgfDaBgJy/cZ+dT9XAhi/niJSyuhOnrk jbhK5PYaToDCxrCM5b55Avm3cesqTwwRubvPSsONO6Zh6JPLWyqHIzfe7hoLJsYF GPn5F7yMXJqamF3R4Dfs =hYBC -----END PGP SIGNATURE----- --nextPart1885215.UWBeVSpjJ6--