[PATCH 0/1] User space notifications about VM cloning

Babis Chalios posted 1 patch 2 years, 8 months ago
drivers/virt/vmgenid.c | 2 ++
1 file changed, 2 insertions(+)
[PATCH 0/1] User space notifications about VM cloning
Posted by Babis Chalios 2 years, 8 months ago
This patch revisits the story of user space notification about VM
events. It uses uevents to send a notification to user space that the
VMGENID has changed, thus we are now in a new VM.

Please note, that this is not a "you need to reseed your PRNGs" event,
which was what the previous RFC [1] was trying to do. It is, explicitly,
meant to be a "you are now running in a new VM" event for the user space
to consume, so it can do things like regenerating its MAC addresses and
refreshing DHCP. For these cases, we do not want to tie on the "you need
to reseed your PRNGs" event, since these do not necessarily get emitted
only when VMs get cloned.

[1] https://lore.kernel.org/lkml/65d872db2e1be29bb03b43ed606e7cc9e74ec08d.camel@infradead.org/T/

Babis Chalios (1):
  vmgenid: emit uevent when VMGENID updates

 drivers/virt/vmgenid.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.39.2
Re: [PATCH 0/1] User space notifications about VM cloning
Posted by Babis Chalios 2 years, 7 months ago
Hello all,

Some time has passed since I sent this. Any comments/thoughts?

On 31/5/23 11:51, Babis Chalios wrote:
> This patch revisits the story of user space notification about VM
> events. It uses uevents to send a notification to user space that the
> VMGENID has changed, thus we are now in a new VM.
>
> Please note, that this is not a "you need to reseed your PRNGs" event,
> which was what the previous RFC [1] was trying to do. It is, explicitly,
> meant to be a "you are now running in a new VM" event for the user space
> to consume, so it can do things like regenerating its MAC addresses and
> refreshing DHCP. For these cases, we do not want to tie on the "you need
> to reseed your PRNGs" event, since these do not necessarily get emitted
> only when VMs get cloned.
>
> [1] https://lore.kernel.org/lkml/65d872db2e1be29bb03b43ed606e7cc9e74ec08d.camel@infradead.org/T/
>
> Babis Chalios (1):
>    vmgenid: emit uevent when VMGENID updates
>
>   drivers/virt/vmgenid.c | 2 ++
>   1 file changed, 2 insertions(+)
>

Cheers,
Babis
Re: [PATCH 0/1] User space notifications about VM cloning
Posted by Alexander Graf 2 years, 7 months ago
Hi folks,

On 16.06.23 17:07, Babis Chalios wrote:
> Hello all,
>
> Some time has passed since I sent this. Any comments/thoughts?


Can we please get this merged somehow? Greg, any advise?

This is purely a device notification event to user space, similar to 
network link change events and the likes and has nothing to do with 
Jason's envisioned random reseed event exposure. We can happily send RFC 
patches for the latter after this is merged too.


Alex




Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879


Re: [PATCH 0/1] User space notifications about VM cloning
Posted by Greg KH 2 years, 7 months ago
On Wed, Jun 28, 2023 at 01:13:40PM +0200, Alexander Graf wrote:
> Hi folks,
> 
> On 16.06.23 17:07, Babis Chalios wrote:
> > Hello all,
> > 
> > Some time has passed since I sent this. Any comments/thoughts?
> 
> 
> Can we please get this merged somehow? Greg, any advise?
> 
> This is purely a device notification event to user space, similar to network
> link change events and the likes and has nothing to do with Jason's
> envisioned random reseed event exposure. We can happily send RFC patches for
> the latter after this is merged too.

Sure, I can take it, but it's the middle of the merge window and it's
too late for anything new right now, sorry.

I'll pick it up after 6.5-rc1 is out.

thanks,

greg k-h
Re: [PATCH 0/1] User space notifications about VM cloning
Posted by Jason A. Donenfeld 2 years, 7 months ago
On Wed, Jun 28, 2023 at 1:22 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Wed, Jun 28, 2023 at 01:13:40PM +0200, Alexander Graf wrote:
> > Hi folks,
> >
> > On 16.06.23 17:07, Babis Chalios wrote:
> > > Hello all,
> > >
> > > Some time has passed since I sent this. Any comments/thoughts?
> >
> >
> > Can we please get this merged somehow? Greg, any advise?
> >
> > This is purely a device notification event to user space, similar to network
> > link change events and the likes and has nothing to do with Jason's
> > envisioned random reseed event exposure. We can happily send RFC patches for
> > the latter after this is merged too.
>
> Sure, I can take it, but it's the middle of the merge window and it's
> too late for anything new right now, sorry.
>
> I'll pick it up after 6.5-rc1 is out.

Please do *NOT* do that. I'm still unconvinced that this isn't just a
subset of the vmclone work that needs to be done in conjunction with
the RNG, and I'd like to get those recent virtio patches merged first
before we move onto this, so we can see where this fits in
holistically. I would not be happy if this got merged prematurely.
Re: [PATCH 0/1] User space notifications about VM cloning
Posted by Greg KH 2 years, 7 months ago
On Wed, Jun 28, 2023 at 01:36:51PM +0200, Jason A. Donenfeld wrote:
> On Wed, Jun 28, 2023 at 1:22 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Wed, Jun 28, 2023 at 01:13:40PM +0200, Alexander Graf wrote:
> > > Hi folks,
> > >
> > > On 16.06.23 17:07, Babis Chalios wrote:
> > > > Hello all,
> > > >
> > > > Some time has passed since I sent this. Any comments/thoughts?
> > >
> > >
> > > Can we please get this merged somehow? Greg, any advise?
> > >
> > > This is purely a device notification event to user space, similar to network
> > > link change events and the likes and has nothing to do with Jason's
> > > envisioned random reseed event exposure. We can happily send RFC patches for
> > > the latter after this is merged too.
> >
> > Sure, I can take it, but it's the middle of the merge window and it's
> > too late for anything new right now, sorry.
> >
> > I'll pick it up after 6.5-rc1 is out.
> 
> Please do *NOT* do that. I'm still unconvinced that this isn't just a
> subset of the vmclone work that needs to be done in conjunction with
> the RNG, and I'd like to get those recent virtio patches merged first
> before we move onto this, so we can see where this fits in
> holistically. I would not be happy if this got merged prematurely.

Ok, will hold off on this until you all work it out.  The changelog text
discusses entropy, so it makes sense that this looks like it is related
to this topic.

thanks,

greg k-h
Re: [PATCH 0/1] User space notifications about VM cloning
Posted by Greg KH 2 years, 7 months ago
On Wed, Jun 28, 2023 at 01:22:11PM +0200, Greg KH wrote:
> On Wed, Jun 28, 2023 at 01:13:40PM +0200, Alexander Graf wrote:
> > Hi folks,
> > 
> > On 16.06.23 17:07, Babis Chalios wrote:
> > > Hello all,
> > > 
> > > Some time has passed since I sent this. Any comments/thoughts?
> > 
> > 
> > Can we please get this merged somehow? Greg, any advise?
> > 
> > This is purely a device notification event to user space, similar to network
> > link change events and the likes and has nothing to do with Jason's
> > envisioned random reseed event exposure. We can happily send RFC patches for
> > the latter after this is merged too.
> 
> Sure, I can take it, but it's the middle of the merge window and it's
> too late for anything new right now, sorry.
> 
> I'll pick it up after 6.5-rc1 is out.

Wait, no, I'm not the maintainer of this, Jason is.  And he already
rejected it (and based on the changelog text, I would too), so why are
you asking me a month later to take this?

Work with the maintainer please, don't try to route around them, you
both know better than this.

greg k-h
Re: [PATCH 0/1] User space notifications about VM cloning
Posted by Jason A. Donenfeld 2 years, 7 months ago
Just so you guys know, roughly the order of operations here are going to be:

- vdso vgetrandom v+1
- virtio fork driver
- exposing fork events to userspace

I'll keep you posted on those.

Jason
Re: [PATCH 0/1] User space notifications about VM cloning
Posted by Amit Shah 2 years, 7 months ago
On Wed, 2023-06-28 at 18:27 +0200, Jason A. Donenfeld wrote:
> Just so you guys know, roughly the order of operations here are going to be:
> 
> - vdso vgetrandom v+1
> - virtio fork driver
> - exposing fork events to userspace
> 
> I'll keep you posted on those.

Thank you!

One of the things I've struggled with is the lack of updates or
direction from Jason to Babis - he's had patches out for a while, and
Jason has said he's going to drive it, but we didn't see follow-ups.

At least this conversation has the signs of progress.

Thanks!

		Amit