From: Jonathan Gray Subject: Re: [EXT] AMD SEV 1/5: ccp(4): pledge for ioctl(2 To: Hans-Jörg Höxer , tech@openbsd.org Date: Thu, 29 Aug 2024 10:14:12 +1000 On Thu, Aug 29, 2024 at 09:28:50AM +1000, Jonathan Gray wrote: > > > > +#if NCCP > 0 > > +#if NVMM > 0 > > can't this be only #if NCCP > 0? > > if it can't, #if NCCP > 0 && NVMM > 0 would be better pspopen is under #ifdef __amd64__ #if defined(__amd64__) && NCCP > 0 to make this build if arm64 gets vmm (or drop the ifdef in ccp.c) > > > + if ((pledge & PLEDGE_VMM)) { > > + if ((fp->f_type == DTYPE_VNODE) && > > + (vp->v_type == VCHR) && > > + (cdevsw[major(vp->v_rdev)].d_open == pspopen)) { > > + error = pledge_ioctl_psp(p, com); > > + if (error == 0) > > + return (0); > > + } > > + } > > +#endif > > +#endif