Index | Thread | Search

From:
"Theo de Raadt" <deraadt@openbsd.org>
Subject:
Re: vmd: checksum offloading
To:
Alexander Bluhm <bluhm@openbsd.org>
Cc:
Mike Larkin <mlarkin@nested.page>, Jan Klemkow <j.klemkow@wemelug.de>, dv@openbsd.org, claudio@openbsd.org, dlg@openbsd.org, tech@openbsd.org
Date:
Mon, 21 Sep 2026 10:10:38 -0600

Download raw body.

Thread
It only reaches tun_set_capabilities()

Shrug.


> > > -	if (pledge("stdio", NULL) == -1)
> > > +	if (pledge("stdio vmm", NULL) == -1)
> 
> I connot review the vmd part, but I like it.
> 
> > > Index: sys/kern/kern_pledge.c
> > > ===================================================================
> > > RCS file: /cvs/src/sys/kern/kern_pledge.c,v
> > > diff -u -p -r1.368 kern_pledge.c
> > > --- sys/kern/kern_pledge.c	19 Sep 2026 17:21:52 -0000	1.368
> > > +++ sys/kern/kern_pledge.c	20 Sep 2026 04:06:14 -0000
> > > @@ -48,6 +48,7 @@
> > >  #include <net/route.h>
> > >  #include <net/if.h>
> > >  #include <net/if_var.h>
> > > +#include <net/if_tun.h>
> > >  #include <netinet/in.h>
> > >  #include <netinet6/in6_var.h>
> > >  #include <netinet6/nd6.h>
> > > @@ -1380,6 +1381,12 @@ pledge_ioctl(struct proc *p, long com, s
> > >  			case VMM_IOC_CREATE:
> > >  				return (0);
> > >  			}
> > > +		}
> > > +		if ((fp->f_type == DTYPE_VNODE) &&
> > > +		    (vp->v_type == VCHR) &&
> > > +		    (cdevsw[major(vp->v_rdev)].d_open == tapopen)) {
> > > +			if (com == TUNSCAP)
> > > +				return 0;
> > >  		}
> > >  	}
> > >  #endif