Subject: Re: IOCTL implementation and kernel/userland addresses
To: SODA Noriyuki <soda@sra.co.jp>
From: Frank van der Linden <fvdl@netbsd.org>
List: tech-kern
Date: 02/05/2005 00:51:14
On Sat, Feb 05, 2005 at 07:17:07AM +0900, SODA Noriyuki wrote:
> Well, there are some places that filesystems are calling VOP_IOCTL(),
> are those wrong?

Ok, so I forgot about VOP_IOCTL :-) I dislike it, maybe I pushed it from
my mind.

The problem with the ioctl Reinoud specifically mentions is that the
_IOR/_IOW/_IOWR trick only works for single-level indirection. If you
pass a structure that has a (userspace) pointer in it, it can't deal
with that, and there's no way to fix it.. It's also hard to see if
a caller wants userspace or not (since a userspace program could
pass in any pointer value).

That's why a common backend function still would work out best.

- Frank