Re: [PATCH 5/7] FUSE: implement ioctl support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Wednesday, September 3, 2008 - 2:51 pm

Tejun Heo <tj@kernel.org> writes:


Maintenance.  What happens if I go 128bit, if I have some processes
that are big endian and some that are little endian.  Or if I have
some processes that are running a completely different instruction
set with a completely different ABI than other processes.  Or
perhaps different perhaps the processes is in a different network
namespace than your filesystem and so it's arguments refer
to something different entirely.  Is it a userspace bug if userspace
does not anticipate how the kernel will change in the future?

If we don't look at ioctl as a set of system calls that should
be put into an appropriate format for a filesystem we have
a maintenance problem.

If we don't have an interface clean enough we can push data
out to a server on a remote machine have it processes the
arguments and send the data back.  We actually have failed
to properly abstract the interface.


Of course FUSE has specific kernel dependencies.  It depends
on the implementation of fusefs in the kernel to talk to it.
The reason you don't need a specific kernel today is that
the kernel dependencies are well defined.  You are talking
about using a very poorly defined interface to talk to the
filesystem.  At which point it would be better to open
a separate channel and talk to the filsystem directly.

Being able to add a kernel system call (ioctl) with no review is a
total maintenance disaster.  It is impossible to maintain because
there is not a process to even discover what is going on.

We have to have a kernel stub to support other system calls
and I don't see why individual ioctls should be different.

If you want to support forwards compatibility reserving
some ioctl numbers and saying these numbers will always
be parsed this way.  Which would allow you to write
a common stub that can be implemented before the ioctls
are implemented.

If you really don't want new kernel dependencies you can hook up to
the process via ptrace and intercept the ioctls before they even get
to the kernel.  If you can open /proc/<pid>/mem you have the rights
to ptrace the process.

Eric
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/7] FUSE: add include protectors, Tejun Heo, (Thu Aug 28, 10:40 am)
[PATCH 2/7] FUSE: pass nonblock flag to client, Tejun Heo, (Thu Aug 28, 10:40 am)
[PATCH 3/7] FUSE: implement nonseekable open, Tejun Heo, (Thu Aug 28, 10:40 am)
[PATCH 4/7] FUSE: implement direct lseek support, Tejun Heo, (Thu Aug 28, 10:41 am)
[PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 10:41 am)
[PATCH 6/7] FUSE: implement unsolicited notification, Tejun Heo, (Thu Aug 28, 10:41 am)
[PATCH 7/7] FUSE: implement poll support, Tejun Heo, (Thu Aug 28, 10:41 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Greg KH, (Thu Aug 28, 10:51 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 10:59 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 11:01 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 11:02 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Thu Aug 28, 11:13 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Greg KH, (Thu Aug 28, 11:14 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 11:17 am)
Re: [PATCHSET] FUSE: extend FUSE to support more operations, Miklos Szeredi, (Thu Aug 28, 11:20 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, H. Peter Anvin, (Thu Aug 28, 11:20 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Thu Aug 28, 11:23 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 11:25 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 11:28 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 11:34 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, H. Peter Anvin, (Thu Aug 28, 12:08 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Thu Aug 28, 12:18 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Thu Aug 28, 12:25 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 12:42 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Thu Aug 28, 1:02 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, H. Peter Anvin, (Thu Aug 28, 1:21 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Alan Cox, (Thu Aug 28, 1:48 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Thu Aug 28, 1:55 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, H. Peter Anvin, (Thu Aug 28, 2:27 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Thu Aug 28, 7:19 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Fri Aug 29, 12:32 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Fri Aug 29, 12:59 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Fri Aug 29, 1:12 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Fri Aug 29, 1:29 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Fri Aug 29, 2:03 am)
Re: [fuse-devel] [PATCH 5/7] FUSE: implement ioctl support, Roger Willcocks, (Fri Aug 29, 4:31 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Eric W. Biederman, (Fri Aug 29, 12:17 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Arnd Bergmann, (Fri Aug 29, 12:47 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Sat Aug 30, 4:40 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Miklos Szeredi, (Mon Sep 1, 4:57 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Mon Sep 1, 5:03 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Eric W. Biederman, (Wed Sep 3, 7:32 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Wed Sep 3, 7:40 am)
Re: [PATCH 5/7] FUSE: implement ioctl support, Eric W. Biederman, (Wed Sep 3, 2:51 pm)
Re: [PATCH 5/7] FUSE: implement ioctl support, Tejun Heo, (Wed Sep 3, 5:09 pm)
Re: [fuse-devel] [PATCHSET] FUSE: extend FUSE to support m ..., Szabolcs Szakacsits, (Tue Oct 14, 5:16 am)
Re: [PATCHSET] FUSE: extend FUSE to support more operations, Christoph Hellwig, (Wed Nov 12, 2:14 am)