similar to: [PATCH v2] virtio-rng: return available data with O_NONBLOCK

Displaying 20 results from an estimated 2000 matches similar to: "[PATCH v2] virtio-rng: return available data with O_NONBLOCK"

2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On 11/08/2020 12:37, Philippe Mathieu-Daud? wrote: > You Cc'ed qemu-devel, so Cc'ing the virtio-rng maintainers. > > On 7/15/20 3:32 PM, mwilck at suse.com wrote: >> From: Martin Wilck <mwilck at suse.com> >> >> If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and >> non-blocking read() to retrieve random data, it ends up in a tight
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On Wed, Jul 15, 2020 at 03:32:55PM +0200, mwilck at suse.com wrote: > From: Martin Wilck <mwilck at suse.com> > > If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and > non-blocking read() to retrieve random data, it ends up in a tight > loop with poll() always returning POLLIN and read() returning EAGAIN. > This repeats forever until some process makes a
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On 11/08/2020 14:22, Martin Wilck wrote: > On Tue, 2020-08-11 at 14:02 +0200, Laurent Vivier wrote: >> >>>> drivers/char/hw_random/virtio-rng.c | 14 ++++++++++++++ >>>> 1 file changed, 14 insertions(+) >>>> >>>> diff --git a/drivers/char/hw_random/virtio-rng.c >>>> b/drivers/char/hw_random/virtio-rng.c >>>> index
2020 Aug 11
2
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On 11/08/2020 14:53, Martin Wilck wrote: > On Tue, 2020-08-11 at 14:39 +0200, Laurent Vivier wrote: >> On 11/08/2020 14:22, Martin Wilck wrote: >>> On Tue, 2020-08-11 at 14:02 +0200, Laurent Vivier wrote: >>>>>> drivers/char/hw_random/virtio-rng.c | 14 ++++++++++++++ >>>>>> 1 file changed, 14 insertions(+) >>>>>>
2020 Aug 11
2
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On 11/08/2020 14:53, Martin Wilck wrote: > On Tue, 2020-08-11 at 14:39 +0200, Laurent Vivier wrote: >> On 11/08/2020 14:22, Martin Wilck wrote: >>> On Tue, 2020-08-11 at 14:02 +0200, Laurent Vivier wrote: >>>>>> drivers/char/hw_random/virtio-rng.c | 14 ++++++++++++++ >>>>>> 1 file changed, 14 insertions(+) >>>>>>
2020 Aug 31
0
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
On 28/08/2020 23:34, Martin Wilck wrote: > On Wed, 2020-08-26 at 08:26 -0400, Michael S. Tsirkin wrote: >> On Tue, Aug 11, 2020 at 04:42:32PM +0200, Laurent Vivier wrote: >>> On 11/08/2020 16:28, mwilck at suse.com wrote: >>>> From: Martin Wilck <mwilck at suse.com> >>>> >>>> If a program opens /dev/hwrng with O_NONBLOCK and uses poll()
2020 Aug 11
3
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
On 11/08/2020 16:28, mwilck at suse.com wrote: > From: Martin Wilck <mwilck at suse.com> > > If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and > non-blocking read() to retrieve random data, it ends up in a tight > loop with poll() always returning POLLIN and read() returning EAGAIN. > This repeats forever until some process makes a blocking read() call.
2020 Aug 11
3
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
On 11/08/2020 16:28, mwilck at suse.com wrote: > From: Martin Wilck <mwilck at suse.com> > > If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and > non-blocking read() to retrieve random data, it ends up in a tight > loop with poll() always returning POLLIN and read() returning EAGAIN. > This repeats forever until some process makes a blocking read() call.
2014 Sep 10
0
[PATCH v3 2/2] virtio-rng: skip reading when we start to remove the device
Before we really unregister the hwrng device, reading will get stuck if the virtio device is reset. We should return error for reading when we start to remove the device. Signed-off-by: Amos Kong <akong at redhat.com> Cc: stable at vger.kernel.org --- drivers/char/hw_random/virtio-rng.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/char/hw_random/virtio-rng.c
2017 Sep 26
0
[PATCH v5 REPOST 1/6] hw_random: place mutex around read functions and buffers.
> > A bit late to a party, but: > > On Mon, Dec 8, 2014 at 12:50 AM, Amos Kong <akong at redhat.com> wrote: > > From: Rusty Russell <rusty at rustcorp.com.au> > > > > There's currently a big lock around everything, and it means that we > > can't query sysfs (eg /sys/devices/virtual/misc/hw_random/rng_current) > > while the rng is
2014 Apr 25
1
[PATCH] virtio-rng: support multiple virtio-rng devices
Current hwrng core supports to register multiple hwrng devices, and there is only one device really works in the same time. QEMU alsu supports to have multiple virtio-rng backends. This patch changes virtio-rng driver to support multiple virtio-rng devices. ]# cat /sys/class/misc/hw_random/rng_available virtio_rng.0 virtio_rng.1 ]# cat /sys/class/misc/hw_random/rng_current virtio_rng.0 ]# echo
2014 Apr 25
1
[PATCH] virtio-rng: support multiple virtio-rng devices
Current hwrng core supports to register multiple hwrng devices, and there is only one device really works in the same time. QEMU alsu supports to have multiple virtio-rng backends. This patch changes virtio-rng driver to support multiple virtio-rng devices. ]# cat /sys/class/misc/hw_random/rng_available virtio_rng.0 virtio_rng.1 ]# cat /sys/class/misc/hw_random/rng_current virtio_rng.0 ]# echo
2014 Sep 08
0
[PATCH] virtio-rng: complete have_data completion in removing device
On Wed, Aug 06, 2014 at 01:55:29PM +0530, Amit Shah wrote: > On (Wed) 06 Aug 2014 [16:05:41], Amos Kong wrote: > > On Wed, Aug 06, 2014 at 01:35:15AM +0800, Amos Kong wrote: > > > When we try to hot-remove a busy virtio-rng device from QEMU monitor, > > > the device can't be hot-removed. Because virtio-rng driver hangs at > > >
2014 Sep 09
2
[PATCH v2] virtio-rng: fix stuck of hot-unplugging busy device
When we try to hot-remove a busy virtio-rng device from QEMU monitor, the device can't be hot-removed. Because virtio-rng driver hangs at wait_for_completion_killable(). This patch exits the waiting by completing have_data completion before unregistering, resets data_avail to avoid the hwrng core use wrong buffer bytes. Before real unregistering we should return -ENODEV for reading. When we
2014 Sep 09
2
[PATCH v2] virtio-rng: fix stuck of hot-unplugging busy device
When we try to hot-remove a busy virtio-rng device from QEMU monitor, the device can't be hot-removed. Because virtio-rng driver hangs at wait_for_completion_killable(). This patch exits the waiting by completing have_data completion before unregistering, resets data_avail to avoid the hwrng core use wrong buffer bytes. Before real unregistering we should return -ENODEV for reading. When we
2014 Sep 10
4
[PATCH v3 0/2] virtio-rng: fix hotunplug
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1121540 When we try to hot-unplugging a busy virtio-rng device, the device can't be removed. And the reading process in guest gets stuck. Those two patches fixed this issue by completing have_data completion and preventing invalid reading. Thanks for the help of Amit. Cc: stable at vger.kernel.org V2: reset data_avail (Amit) adjust
2014 Sep 10
4
[PATCH v3 0/2] virtio-rng: fix hotunplug
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1121540 When we try to hot-unplugging a busy virtio-rng device, the device can't be removed. And the reading process in guest gets stuck. Those two patches fixed this issue by completing have_data completion and preventing invalid reading. Thanks for the help of Amit. Cc: stable at vger.kernel.org V2: reset data_avail (Amit) adjust
2014 Aug 11
2
[3.16 stable PATCH 1/1] virtio-rng: fix multi-device startup
This is a 3.16-only patch. The linux.git fix is 5c06273401f2eb7b290cadbae18ee00f8f65e893, which fixes this issue in a different way. Amos reported using multiple virtio-rng devices cause boot to freeze even after the recent fixes. We need the probe_done test per device rather than just once for the driver. Reported-by: Amos Kong <akong at redhat.com> Signed-off-by: Amit Shah
2014 Aug 11
2
[3.16 stable PATCH 1/1] virtio-rng: fix multi-device startup
This is a 3.16-only patch. The linux.git fix is 5c06273401f2eb7b290cadbae18ee00f8f65e893, which fixes this issue in a different way. Amos reported using multiple virtio-rng devices cause boot to freeze even after the recent fixes. We need the probe_done test per device rather than just once for the driver. Reported-by: Amos Kong <akong at redhat.com> Signed-off-by: Amit Shah
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On Tue, Aug 11, 2020 at 03:53:54PM +0200, Laurent Vivier wrote: > On 11/08/2020 15:14, Michael S. Tsirkin wrote: > > On Tue, Aug 11, 2020 at 03:00:14PM +0200, Laurent Vivier wrote: > >> No problem. This code is tricky and it took me several months to really > >> start to understand it ... > > > > Oh great, we actually have someone who understands the code!