]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
fuse: implement ioctl support
authorTejun Heo <tj@kernel.org>
Wed, 26 Nov 2008 11:03:55 +0000 (12:03 +0100)
committerMiklos Szeredi <miklos@szeredi.hu>
Wed, 26 Nov 2008 11:03:55 +0000 (12:03 +0100)
commit59efec7b903987dcb60b9ebc85c7acd4443a11a1
tree1287e817201fcb4008917b2bffd378c36540622b
parente9bb09dd6c5b8ec6a971ed6251df5eba3a4c8d3c
fuse: implement ioctl support

Generic ioctl support is tricky to implement because only the ioctl
implementation itself knows which memory regions need to be read
and/or written.  To support this, fuse client can request retry of
ioctl specifying memory regions to read and write.  Deep copying
(nested pointers) can be implemented by retrying multiple times
resolving one depth of dereference at a time.

For security and cleanliness considerations, ioctl implementation has
restricted mode where the kernel determines data transfer directions
and sizes using the _IOC_*() macros on the ioctl command.  In this
mode, retry is not allowed.

For all FUSE servers, restricted mode is enforced.  Unrestricted ioctl
will be used by CUSE.

Plese read the comment on top of fs/fuse/file.c::fuse_file_do_ioctl()
for more information.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/file.c
include/linux/fuse.h