Subject: Re: IOCTL implementation and kernel/userland addresses
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 02/13/2005 19:35:56
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 ?
> >=20
> > that might be an issue yes.... a solution could be to add a flag to the=
=20
> > `flag' int as passed in the ioctl handler:=20
> >=20
> > ...ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, proc *p)
> >=20
> > Since its not documentated wich values this `flag' argument can have, i=
=20
> > can't add it now for a test-patch.
>=20
> AHUM, reading <sys/fcntl.h> i read that its FREAD, FWRITE flags and=20
> friends.... so a FKERNELADDR could be added indeed.

Yes, it's the flags on the file descriptor. So you'd need to add=20
"FKERNELADDR" (though please do NOT use that name) to there. That way you=
=20
avoid anyone ever adding a duplicate use of the name.

Maybe "FKADDR".

Take care,

Bill

--qMm9M+Fa2AknHoGS
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQFCEBycWz+3JHUci9cRAsj0AJ4wXLBbRiFRp0Xgtk8ShcMU7y4d0gCfSIQt
jfXcz4JNITowKKpTlSsx2uQ=
=TPEd
-----END PGP SIGNATURE-----

--qMm9M+Fa2AknHoGS--