DragonFly BSD
DragonFly kernel List (threaded) for 2003-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

splitting fnctl(), ioctl()

From: "David P. Reese, Jr." <daver@xxxxxxxxxxxx>
Date: 10 Oct 2003 13:24:35 GMT

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.

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]