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

Re: splitting fnctl(), ioctl()

From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Oct 2003 13:03:03 -0700 (PDT)

: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@xxxxxxxxxxxx
:                                               http://www.gomerbud.com/daver/

    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.

					Matthew Dillon 

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