vmd(4) close vmm parent socket

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

vmd(4) close vmm parent socket

Martijn van Duren-5
Hello tech@,

Playing with vmd I noticed that a vm process has vmm's socket to the
parent process still open.

Patch below works for me.

OK?

martijn@

Index: vmm.c
===================================================================
RCS file: /cvs/src/usr.sbin/vmd/vmm.c,v
retrieving revision 1.80
diff -u -p -r1.80 vmm.c
--- vmm.c 5 Feb 2018 05:01:08 -0000 1.80
+++ vmm.c 13 Apr 2018 09:27:14 -0000
@@ -664,6 +664,7 @@ vmm_start_vm(struct imsg *imsg, uint32_t
  } else {
  /* Child */
  close(fds[0]);
+ close(PROC_PARENT_SOCK_FILENO);
 
  ret = start_vm(vm, fds[1]);
 

Reply | Threaded
Open this post in threaded view
|

Re: vmd(4) close vmm parent socket

Carlos Cardenas
On Fri, Apr 13, 2018 at 11:29:06AM +0200, Martijn van Duren wrote:

> Hello tech@,
>
> Playing with vmd I noticed that a vm process has vmm's socket to the
> parent process still open.
>
> Patch below works for me.
>
> OK?
>
> martijn@

Nice find.

Ok ccardenas@

+--+
Carlos

>
> Index: vmm.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/vmd/vmm.c,v
> retrieving revision 1.80
> diff -u -p -r1.80 vmm.c
> --- vmm.c 5 Feb 2018 05:01:08 -0000 1.80
> +++ vmm.c 13 Apr 2018 09:27:14 -0000
> @@ -664,6 +664,7 @@ vmm_start_vm(struct imsg *imsg, uint32_t
>   } else {
>   /* Child */
>   close(fds[0]);
> + close(PROC_PARENT_SOCK_FILENO);
>  
>   ret = start_vm(vm, fds[1]);
>  
>

Reply | Threaded
Open this post in threaded view
|

Re: vmd(4) close vmm parent socket

Mike Larkin
In reply to this post by Martijn van Duren-5
On Fri, Apr 13, 2018 at 11:29:06AM +0200, Martijn van Duren wrote:

> Hello tech@,
>
> Playing with vmd I noticed that a vm process has vmm's socket to the
> parent process still open.
>
> Patch below works for me.
>
> OK?
>
> martijn@
>
> Index: vmm.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/vmd/vmm.c,v
> retrieving revision 1.80
> diff -u -p -r1.80 vmm.c
> --- vmm.c 5 Feb 2018 05:01:08 -0000 1.80
> +++ vmm.c 13 Apr 2018 09:27:14 -0000
> @@ -664,6 +664,7 @@ vmm_start_vm(struct imsg *imsg, uint32_t
>   } else {
>   /* Child */
>   close(fds[0]);
> + close(PROC_PARENT_SOCK_FILENO);
>  
>   ret = start_vm(vm, fds[1]);
>  
>

sure