splitting fnctl(), ioctl()
dillon at apollo.backplane.com
Fri Oct 10 13:03:31 PDT 2003
:In splitting syscalls like fcntl() and ioctl(), I am considering doing
:something like the following:
:fcntl(stuct fcntl_args *uap)
: fcntl_copyin(uap->cmd, uap->arg, &buf);
: kern_fcntl(uap->fd, uap->arg, &buf);
: fcntl_copyout(uap->cmd, uap->arg, &buf);
:The buffer would be the size of the largest argument for fcntl.
:The emulators would then implement their own versions of the copyin/
:copyout functions. While this does separate the copyin/copyout,
:it places code for the same fcntl in three different places.
:The ioctl() syscall will be a little more trouble. I don't like the
:fact that drivers can copyin at their own discression, especially from
:pointers stored in uap->arg.
:>From a syscall hacker's standpoint, I don't like the ioctl() interface.
: David P. Reese, Jr. daver at xxxxxxxxxxxx
This could be a tough nut to crack. Have you coded up fcntl_copyin()
and fcntl_copyout() yet? I'd like to see what they would contain.
<dillon at xxxxxxxxxxxxx>
More information about the Kernel