What I don't see is how anything becomes different whether that part
is implemented in kernel or not. For ioctls, only the implementing
code knows what the data structure should look like that's why we
can't handle 64/32 bit problems generically and has ->compat_ioctl
hook. To me, splitting it to two pieces looks like more maintenance
overhead than the other way around.
I don't think that's a possible goal in generic manner. We can't even
do that for read/writes. At least not at FUSE's level. We need
higher abstraction for that. e.g. /dev/oss via CUSE, ioctl specified
machine endian 16bit format. Supporting that in the way you described
would require a lot of logic in the kernel and I don't really see any
benefit over, say, forward the sound via pulseaudio after getting it
to userland. I don't think the problem can or should be solved at
FUSE interface level.
The difference is that FUSE servers depend on FUSE and each server
doesn't require separate new pieces to get working and ioctl is poorly
defined by nature.
How about adding whole FSes w/o a review? That's the whole point of
FUSE. Seriously, there are infinite number of ways to break the
regular defined filesystem semantics using FUSE. FUSE should provide
mechanism and protects against certain fundamental things. It can't
enforce correct semantics on everything.
ioctls is most likely to be used to emulate legacy or proprietary
devices. If you're worried about filesystems abusing it, maybe the
solution is to only allow CUSE to use ioctls but I really don't see
what the problem is here. If the userland FS server wants to shoot
itself in the foot, it's not really the kernel's problem.
Aieee.. The same goes for the whole FUSE.
Thanks.
--
tejun
--