Subject: Am I going insane ? (The ioctl_copy*() functions)
To: None <tech-kern@netbsd.org>
From: Robert Elz <kre@munnari.OZ.AU>
List: tech-kern
Date: 02/14/2006 13:06:53
I see that the kernel has had a pair of functions
	ioctl_copyin()
	ioctl_copyout()
since last August.   That's fine, and from what I can see the
implementation of them looks fine.

What I can't find is a single user of those functions anywhere
in the kernel.   That's a pity, as I was kind of hoping to copy
someone else's code rather than having to work it out myself.

[Aside: I would have used copyoutstr() if ioctl_copyout() didn't
exist, it is a slightly better fit for what I need, but I can
cope with that OK - doing my own strlen() processing.]

Never mind, someone has to go first I guess (though I'm not 100%
sure why the functions got added if there wasn't a use for them
(or perhaps there once was, and the functions are dangling ??)

Is it regarded as being safe to use those functions?   That is,
are they expected to remain, or are they an experiment that failed?
For what I'm doing [not relevant right now] I don't absolutely need
that the ioctl's be able to be accessed from inside the kenel, but
I suspect that there could be uses of this stuff, perhaps (the
information isn't hard to find, but using the ioctl might make it
simpler to acquire) so if it is easy to do, and using these functions
(or actually just ioctl_copyout() as I only have data to return)
it looks real simple, so if they're "to be used" I may as well...

kre

ps: answering the question on the Subject line, using evidence not
found in this mail (or derived from it) is cheating ...