Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-11-02 Thread Babis Chalios
On 2/11/23 12:51, Michael S. Tsirkin wrote: On Thu, Nov 02, 2023 at 12:38:28PM +0100, Babis Chalios wrote: On 2/11/23 12:20, Michael S. Tsirkin wrote: On Thu, Sep 28, 2023 at 08:16:11PM +0200, Babis Chalios wrote: On 27/9/23 23:47, Michael S. Tsirkin wrote: On Wed, Sep 27, 2023 at 12:43:20PM

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-11-02 Thread Michael S. Tsirkin
On Thu, Nov 02, 2023 at 12:38:28PM +0100, Babis Chalios wrote: > > On 2/11/23 12:20, Michael S. Tsirkin wrote: > > > > On Thu, Sep 28, 2023 at 08:16:11PM +0200, Babis Chalios wrote: > > > > > > On 27/9/23 23:47, Michael S. Tsirkin wrote: > > > > On Wed, Sep 27, 2023 at 12:43:20PM +0200, Babis Ch

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-11-02 Thread Babis Chalios
On 2/11/23 12:25, Michael S. Tsirkin wrote: On Fri, Sep 22, 2023 at 05:40:50PM +0200, Babis Chalios wrote: On 22/9/23 17:06, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 12:11:37PM +0200, Babis Chalios wrote: On 19/9/23 12:01, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 09:32

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-11-02 Thread Babis Chalios
On 2/11/23 12:20, Michael S. Tsirkin wrote: On Thu, Sep 28, 2023 at 08:16:11PM +0200, Babis Chalios wrote: On 27/9/23 23:47, Michael S. Tsirkin wrote: On Wed, Sep 27, 2023 at 12:43:20PM +0200, Babis Chalios wrote: On 22/9/23 18:01, Michael S. Tsirkin wrote: On Fri, Sep 22, 2023 at 05:40:5

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-11-02 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 05:40:50PM +0200, Babis Chalios wrote: > > > On 22/9/23 17:06, Michael S. Tsirkin wrote: > > On Tue, Sep 19, 2023 at 12:11:37PM +0200, Babis Chalios wrote: > > > On 19/9/23 12:01, Michael S. Tsirkin wrote: > > > > On Tue, Sep 19, 2023 at 09:32:08AM +0200, Babis Chalios wro

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-11-02 Thread Michael S. Tsirkin
On Thu, Sep 28, 2023 at 08:16:11PM +0200, Babis Chalios wrote: > > > On 27/9/23 23:47, Michael S. Tsirkin wrote: > > On Wed, Sep 27, 2023 at 12:43:20PM +0200, Babis Chalios wrote: > > > On 22/9/23 18:01, Michael S. Tsirkin wrote: > > > > On Fri, Sep 22, 2023 at 05:40:50PM +0200, Babis Chalios wro

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-10-13 Thread Michael S. Tsirkin
On Fri, Oct 13, 2023 at 09:49:40AM +0200, Babis Chalios wrote: > > > On 28/9/23 20:16, Babis Chalios wrote: > > > > > > On 27/9/23 23:47, Michael S. Tsirkin wrote: > > > On Wed, Sep 27, 2023 at 12:43:20PM +0200, Babis Chalios wrote: > > > > On 22/9/23 18:01, Michael S. Tsirkin wrote: > > > > >

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-10-13 Thread Babis Chalios
On 28/9/23 20:16, Babis Chalios wrote: On 27/9/23 23:47, Michael S. Tsirkin wrote: On Wed, Sep 27, 2023 at 12:43:20PM +0200, Babis Chalios wrote: On 22/9/23 18:01, Michael S. Tsirkin wrote: On Fri, Sep 22, 2023 at 05:40:50PM +0200, Babis Chalios wrote: On 22/9/23 17:06, Michael S. Tsirki

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-28 Thread Babis Chalios
On 27/9/23 23:47, Michael S. Tsirkin wrote: On Wed, Sep 27, 2023 at 12:43:20PM +0200, Babis Chalios wrote: On 22/9/23 18:01, Michael S. Tsirkin wrote: On Fri, Sep 22, 2023 at 05:40:50PM +0200, Babis Chalios wrote: On 22/9/23 17:06, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 12:11:37

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 12:43:20PM +0200, Babis Chalios wrote: > On 22/9/23 18:01, Michael S. Tsirkin wrote: > > On Fri, Sep 22, 2023 at 05:40:50PM +0200, Babis Chalios wrote: > > > > > > On 22/9/23 17:06, Michael S. Tsirkin wrote: > > > > On Tue, Sep 19, 2023 at 12:11:37PM +0200, Babis Chalios wr

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-27 Thread Babis Chalios
On 22/9/23 18:01, Michael S. Tsirkin wrote: On Fri, Sep 22, 2023 at 05:40:50PM +0200, Babis Chalios wrote: On 22/9/23 17:06, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 12:11:37PM +0200, Babis Chalios wrote: On 19/9/23 12:01, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 09:32:08AM

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-22 Thread Michael S. Tsirkin
On Fri, Sep 22, 2023 at 05:40:50PM +0200, Babis Chalios wrote: > > > On 22/9/23 17:06, Michael S. Tsirkin wrote: > > On Tue, Sep 19, 2023 at 12:11:37PM +0200, Babis Chalios wrote: > > > On 19/9/23 12:01, Michael S. Tsirkin wrote: > > > > On Tue, Sep 19, 2023 at 09:32:08AM +0200, Babis Chalios wro

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-22 Thread Babis Chalios
On 22/9/23 17:06, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 12:11:37PM +0200, Babis Chalios wrote: On 19/9/23 12:01, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 09:32:08AM +0200, Babis Chalios wrote: Resending to fix e-mail formatting issues (sorry for the spam) On 18/9/23 18

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-22 Thread Michael S. Tsirkin
On Tue, Sep 19, 2023 at 12:11:37PM +0200, Babis Chalios wrote: > On 19/9/23 12:01, Michael S. Tsirkin wrote: > > On Tue, Sep 19, 2023 at 09:32:08AM +0200, Babis Chalios wrote: > > > Resending to fix e-mail formatting issues (sorry for the spam) > > > > > > On 18/9/23 18:30, Babis Chalios wrote: >

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-22 Thread Babis Chalios
Hi Michael, On 19/9/23 12:11, Babis Chalios wrote: On 19/9/23 12:01, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 09:32:08AM +0200, Babis Chalios wrote: Resending to fix e-mail formatting issues (sorry for the spam) On 18/9/23 18:30, Babis Chalios wrote: Yes, that's what the driver does

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-19 Thread Babis Chalios
On 19/9/23 12:01, Michael S. Tsirkin wrote: On Tue, Sep 19, 2023 at 09:32:08AM +0200, Babis Chalios wrote: Resending to fix e-mail formatting issues (sorry for the spam) On 18/9/23 18:30, Babis Chalios wrote: Yes, that's what the driver does now in the RFC patch. However, this just decreases t

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-19 Thread Michael S. Tsirkin
On Tue, Sep 19, 2023 at 09:32:08AM +0200, Babis Chalios wrote: > Resending to fix e-mail formatting issues (sorry for the spam) > > On 18/9/23 18:30, Babis Chalios wrote: > > > > > > Yes, that's what the driver does now in the RFC patch. > > > > > > However, this just > > > > > > decreases > > > >

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-19 Thread Babis Chalios
Resending to fix e-mail formatting issues (sorry for the spam) On 18/9/23 18:30, Babis Chalios wrote: Yes, that's what the driver does now in the RFC patch. However, this just decreases the race window, it doesn't eliminate it. If a third leak event happens it might not find any buffers to us

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-18 Thread Babis Chalios
Yes, that's what the driver does now in the RFC patch. However, this just decreases the race window, it doesn't eliminate it. If a third leak event happens it might not find any buffers to use: 1. available buffers to queue 1-X 2. available buffers to queue X 3. poll queue X 4. used buffers in

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-18 Thread Michael S. Tsirkin
On Mon, Sep 18, 2023 at 04:02:54PM +0200, Babis Chalios wrote: > On 18/9/23 15:58, Michael S. Tsirkin wrote: > > On Mon, Sep 18, 2023 at 03:00:43PM +0200, Babis Chalios wrote: > > > > > Right, so I think that there is a race condition between the time the > > > > > driver > > > > > sees the used b

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-18 Thread Babis Chalios
On 18/9/23 15:58, Michael S. Tsirkin wrote: On Mon, Sep 18, 2023 at 03:00:43PM +0200, Babis Chalios wrote: Right, so I think that there is a race condition between the time the driver sees the used buffers of the first batch and until it adds the second batch on the next leak queue. 1. driver a

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-18 Thread Michael S. Tsirkin
On Mon, Sep 18, 2023 at 03:00:43PM +0200, Babis Chalios wrote: > > > > Right, so I think that there is a race condition between the time the > > > driver > > > sees the used buffers of the first > > > batch and until it adds the second batch on the next leak queue. > > > > > > 1. driver adds bat

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-18 Thread Babis Chalios
Right, so I think that there is a race condition between the time the driver sees the used buffers of the first batch and until it adds the second batch on the next leak queue. 1. driver adds batch 1 2. leak event 3. device uses batch 1 4. driver sees the used buffers and a. switches leak

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-18 Thread Michael S. Tsirkin
On Wed, Sep 13, 2023 at 01:19:49PM +0200, Babis Chalios wrote: > > > On 13/9/23 11:37, Michael S. Tsirkin wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the sender and know > > the content is safe. >

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-18 Thread Babis Chalios
yes, the queue switch is used as a barrier to detect a new leak event. Right, so I think that there is a race condition between the time the driver sees the used buffers of the first batch and until it adds the second batch on the next leak queue. 1. driver adds batch 1 2. leak event 3. de

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-13 Thread Babis Chalios
On 13/9/23 11:37, Michael S. Tsirkin wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. On Wed, Sep 13, 2023 at 11:32:57AM +0200, Babis Chalios wrote: I do not unde

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-13 Thread Michael S. Tsirkin
On Wed, Sep 13, 2023 at 11:32:57AM +0200, Babis Chalios wrote: > > I do not understand why this matters though. we know there was a leak, > > why does it matter whether there was one or two leaks? > > > > > In the last RFC implementing this in Linux we sent to LKML [1] we avoid > the > > > issue by

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-13 Thread Babis Chalios
> I do not understand why this matters though. we know there was a leak, > why does it matter whether there was one or two leaks? > > > In the last RFC implementing this in Linux we sent to LKML [1] we avoid the > > issue by pre-populating both > > queues, but that does not solve the problem if

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-09-12 Thread Michael S. Tsirkin
On Thu, Aug 31, 2023 at 12:16:22PM +0200, Babis Chalios wrote: > Hi Michael, > > On 21/11/22 17:30, Michael S. Tsirkin wrote: > > Add virtqueues to support reporting entropy leaks (similar to virtio based > > vmgenid). > > > > Signed-off-by: Michael S. Tsirkin > > --- > > virtio-rng.tex | 61

Re: [virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2023-08-31 Thread Babis Chalios
Hi Michael, On 21/11/22 17:30, Michael S. Tsirkin wrote: Add virtqueues to support reporting entropy leaks (similar to virtio based vmgenid). Signed-off-by: Michael S. Tsirkin --- virtio-rng.tex | 61 +- 1 file changed, 60 insertions(+), 1 de

[virtio-dev] [PATCH RFC 3/3] rng: leak detection support

2022-11-21 Thread Michael S. Tsirkin
Add virtqueues to support reporting entropy leaks (similar to virtio based vmgenid). Signed-off-by: Michael S. Tsirkin --- virtio-rng.tex | 61 +- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/virtio-rng.tex b/virtio-rng.tex index