• Tejun Heo's avatar
    fuse: implement ioctl support · 59efec7b
    Tejun Heo authored
    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: default avatarTejun Heo <tj@kernel.org>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    59efec7b
file.c 43.6 KB