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

Displaying 20 results from an estimated 1000 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 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 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.
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
On Tue, Aug 11, 2020 at 02:07:23PM +0200, Martin Wilck wrote: > On Tue, 2020-08-11 at 07:26 -0400, Michael S. Tsirkin wrote: > > On Wed, Jul 15, 2020 at 03:32:55PM +0200, mwilck at suse.com wrote: > > > drivers/char/hw_random/virtio-rng.c | 14 ++++++++++++++ > > > 1 file changed, 14 insertions(+) > > > > > > diff --git
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(+) >>>>>>
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
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
2018 Dec 09
2
[PATCH] Enable ConnectTimeout with ConnectionAttempts
Fix bug ConnectTimeout=N only works on the first ConnectionAttempts https://bugzilla.mindrot.org/show_bug.cgi?id=2918 --- sshconnect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sshconnect.c b/sshconnect.c index 4862da5e..b837a83a 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -454,11 +454,12 @@ waitrfd(int fd, int *timeoutp) { struct pollfd pfd; struct timeval
2015 Feb 26
4
Call for testing: OpenSSH 6.8
On Thu, 26 Feb 2015, Damien Miller wrote: > > Yes I saw that later. > > > > The testsuite build fails on Solaris 2.6 thusly: > [...] > > regress/netcat.c:1037: error: 'struct msghdr' has no member named > > 'msg_control' > > ah, looks like we need to copy some bits from monitor_fdpass.c Perhaps like this: diff --git regress/netcat.c
2011 Jun 02
2
preauth privsep logging via monitor
Hi, This diff (for portable) makes the chrooted preauth privsep process log via the monitor using a shared socketpair. It removes the need for /dev/log inside /var/empty and makes mandatory sandboxing of the privsep child easier down the road (no more socket() syscall required). Please test. -d Index: log.c =================================================================== RCS file:
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
2014 Sep 10
0
[PATCH v3 1/2] 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. Signed-off-by: Amos Kong <akong at redhat.com> Cc: stable at
2014 Aug 06
2
[PATCH] virtio-rng: complete have_data completion in removing device
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 > > wait_for_completion_killable(). > > > > This patch fixed the hang by completing have_data completion