qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [Bug 1811758] [NEW] virtio-rng backend should use getentropy() syscall when available
@ 2019-01-15  6:47 dkg
  2019-01-15  6:49 ` [Qemu-devel] [Bug 1811758] " dkg
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: dkg @ 2019-01-15  6:47 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

According to https://wiki.qemu.org/Features/VirtIORNG the default
backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
can point it to a different backend file, like `/dev/urandom`.

However, both of these files have suboptimal behavior in one way or
another, as documented in `random(7)`.  Instead, the default behavior
should be to pull the requested octets from the `getrandom()` system
call, if available, called with no flags set.

** Affects: qemu
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  New

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-01-15  6:47 [Qemu-devel] [Bug 1811758] [NEW] virtio-rng backend should use getentropy() syscall when available dkg
@ 2019-01-15  6:49 ` dkg
  2019-04-16  2:16 ` dkg
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: dkg @ 2019-01-15  6:49 UTC (permalink / raw)
  To: qemu-devel

To be clear, the problem with using /dev/urandom as a backend is that
it's possible to feed data from an uninitialized pool into the guest.

and the problem with using /dev/random as a backend is that it's
possible for a guest to starve the other host (and other guests) of
entropy, since it pulls from the blocking pool.

getrandom() only blocks when the CSPRNG is not initialized, otherwise it
never blocks.  this is the right behavior by default.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  New

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-01-15  6:47 [Qemu-devel] [Bug 1811758] [NEW] virtio-rng backend should use getentropy() syscall when available dkg
  2019-01-15  6:49 ` [Qemu-devel] [Bug 1811758] " dkg
@ 2019-04-16  2:16 ` dkg
  2019-04-16  2:16   ` dkg
  2019-04-16  5:37 ` Thomas Huth
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: dkg @ 2019-04-16  2:16 UTC (permalink / raw)
  To: qemu-devel

any word on this?  If this is not considered for adoption, i would like
to know the reason, so that we can have better predictions about what to
do for entropy in a QEMU system.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  New

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-04-16  2:16 ` dkg
@ 2019-04-16  2:16   ` dkg
  0 siblings, 0 replies; 10+ messages in thread
From: dkg @ 2019-04-16  2:16 UTC (permalink / raw)
  To: qemu-devel

any word on this?  If this is not considered for adoption, i would like
to know the reason, so that we can have better predictions about what to
do for entropy in a QEMU system.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  New

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-01-15  6:47 [Qemu-devel] [Bug 1811758] [NEW] virtio-rng backend should use getentropy() syscall when available dkg
  2019-01-15  6:49 ` [Qemu-devel] [Bug 1811758] " dkg
  2019-04-16  2:16 ` dkg
@ 2019-04-16  5:37 ` Thomas Huth
  2019-04-16  5:37   ` Thomas Huth
  2019-04-17 16:54 ` Amit Shah
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 10+ messages in thread
From: Thomas Huth @ 2019-04-16  5:37 UTC (permalink / raw)
  To: qemu-devel

Feel free to send some patches to implement this! Alternatively, you
could also try to write a mail to the virtio-rng maintainer (see the
MAINTAINER file in the top directory of the sources), maybe he can help.

** Changed in: qemu
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  New

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-04-16  5:37 ` Thomas Huth
@ 2019-04-16  5:37   ` Thomas Huth
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2019-04-16  5:37 UTC (permalink / raw)
  To: qemu-devel

Feel free to send some patches to implement this! Alternatively, you
could also try to write a mail to the virtio-rng maintainer (see the
MAINTAINER file in the top directory of the sources), maybe he can help.

** Changed in: qemu
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  New

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-01-15  6:47 [Qemu-devel] [Bug 1811758] [NEW] virtio-rng backend should use getentropy() syscall when available dkg
                   ` (2 preceding siblings ...)
  2019-04-16  5:37 ` Thomas Huth
@ 2019-04-17 16:54 ` Amit Shah
  2019-04-17 16:54   ` Amit Shah
  2019-11-13  9:34 ` Laurent Vivier
  2020-01-09 13:45 ` Thomas Huth
  5 siblings, 1 reply; 10+ messages in thread
From: Amit Shah @ 2019-04-17 16:54 UTC (permalink / raw)
  To: qemu-devel

Yes, using getrandom() in qemu by default on systems that support it
will be an improvement, and is the right approach.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  New

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Qemu-devel] [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-04-17 16:54 ` Amit Shah
@ 2019-04-17 16:54   ` Amit Shah
  0 siblings, 0 replies; 10+ messages in thread
From: Amit Shah @ 2019-04-17 16:54 UTC (permalink / raw)
  To: qemu-devel

Yes, using getrandom() in qemu by default on systems that support it
will be an improvement, and is the right approach.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  New

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-01-15  6:47 [Qemu-devel] [Bug 1811758] [NEW] virtio-rng backend should use getentropy() syscall when available dkg
                   ` (3 preceding siblings ...)
  2019-04-17 16:54 ` Amit Shah
@ 2019-11-13  9:34 ` Laurent Vivier
  2020-01-09 13:45 ` Thomas Huth
  5 siblings, 0 replies; 10+ messages in thread
From: Laurent Vivier @ 2019-11-13  9:34 UTC (permalink / raw)
  To: qemu-devel

rng-builtin is the new RNG default backend for virtio-rng and is based
on getrandom().

0198c2621a1e virtio-rng: change default backend to rng-builtin
5f7655f6ef15 virtio-rng: Keep the default backend out of VirtIORNGConf
6c4e9d487fea rng-builtin: add an RNG backend that uses qemu_guest_getrandom()

** Changed in: qemu
       Status: New => Fix Committed

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  Fix Committed

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug 1811758] Re: virtio-rng backend should use getentropy() syscall when available
  2019-01-15  6:47 [Qemu-devel] [Bug 1811758] [NEW] virtio-rng backend should use getentropy() syscall when available dkg
                   ` (4 preceding siblings ...)
  2019-11-13  9:34 ` Laurent Vivier
@ 2020-01-09 13:45 ` Thomas Huth
  5 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2020-01-09 13:45 UTC (permalink / raw)
  To: qemu-devel

** Changed in: qemu
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1811758

Title:
  virtio-rng backend should use getentropy() syscall when available

Status in QEMU:
  Fix Released

Bug description:
  According to https://wiki.qemu.org/Features/VirtIORNG the default
  backend for `virtio-rng-pci` is `/dev/random`.  Alternately, the user
  can point it to a different backend file, like `/dev/urandom`.

  However, both of these files have suboptimal behavior in one way or
  another, as documented in `random(7)`.  Instead, the default behavior
  should be to pull the requested octets from the `getrandom()` system
  call, if available, called with no flags set.

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1811758/+subscriptions


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-09 13:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15  6:47 [Qemu-devel] [Bug 1811758] [NEW] virtio-rng backend should use getentropy() syscall when available dkg
2019-01-15  6:49 ` [Qemu-devel] [Bug 1811758] " dkg
2019-04-16  2:16 ` dkg
2019-04-16  2:16   ` dkg
2019-04-16  5:37 ` Thomas Huth
2019-04-16  5:37   ` Thomas Huth
2019-04-17 16:54 ` Amit Shah
2019-04-17 16:54   ` Amit Shah
2019-11-13  9:34 ` Laurent Vivier
2020-01-09 13:45 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).