Subject: Re: IOCTL implementation and kernel/userland addresses
To: Bill Studenmund <wrstuden@netbsd.org>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 02/13/2005 19:52:53
On Sun, Feb 13, 2005 at 07:35:56PM -0800, Bill Studenmund wrote:
> On Sat, Feb 12, 2005 at 04:10:07PM +0100, Reinoud Zandijk wrote:
> > On Sat, Feb 12, 2005 at 02:25:17PM +0100, Reinoud Zandijk wrote:
> > > > Won't this cause problems if the ioctl wants to sleep ?
> > > 
> > > that might be an issue yes.... a solution could be to add a flag to the 
> > > `flag' int as passed in the ioctl handler: 
> > > 
> > > ...ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, proc *p)
> > > 
> > > Since its not documentated wich values this `flag' argument can have, i 
> > > can't add it now for a test-patch.
> > 
> > AHUM, reading <sys/fcntl.h> i read that its FREAD, FWRITE flags and 
> > friends.... so a FKERNELADDR could be added indeed.
> 
> Yes, it's the flags on the file descriptor. So you'd need to add 
> "FKERNELADDR" (though please do NOT use that name) to there. That way you 
> avoid anyone ever adding a duplicate use of the name.
> 
> Maybe "FKADDR".

in solaris it's called FKIOCTL, how about we use that?

-Chuck