Subject: Re: COPYIN/COPYOUT macro problems Re: IOCTL implementation and
To: None <>
From: YAMAMOTO Takashi <>
List: tech-kern
Date: 08/26/2005 12:28:20
> > I would prefer to see the UIO_*SPACE enums to be used, rather than  
> > just a boolean.
> but then you loose the advantage of just calling
> 	kucopyin(flags & KFIOCTL, from, to, len);
> 	kucopyin(uio.uio_segflg == UIO_SYSSPACE, from, to, len);
> 	kucopyin(ISSET(flags, ...), from, to, len);

what is an advantage?

> or even 
> 	kucopyin(uio.uio_segflg, from, to, len);
> when its allowed to make the assumption that UIO_SYSSPACE != 0.

please don't make such an assumption.

> or go for `aliases' that check specific values in
> 	ioctl_copyin(flag, ...)
> 	uio_copyin(flag, ...)
> functions.

do you mean that these "aliases" convert the flag to
UIO_* and call kucopyin?  i personally prefer it.
(i don't understand what's uio_copyin, tho)