On Mon, Jul 18, 2011 at 11:29 PM, John Reiser <[email protected]> wrote: > On Linux the only syscalls that can block for a FUSE file-system > are ones that implement the kernel's VFS layer (Virtual File System), > which uses a struct of function pointers for each relevant syscall. > So, just find that initialized struct in the Linux kernel sources, > and there is the list of syscalls that can block. From linux/fs/fuse/file.c: > ----- > static const struct file_operations fuse_file_operations = { > .llseek = fuse_file_llseek, > .read = do_sync_read, > .aio_read = fuse_file_aio_read, > .write = do_sync_write, > .aio_write = fuse_file_aio_write, > .mmap = fuse_file_mmap, > .open = fuse_open, > .flush = fuse_flush, > .release = fuse_release, ### last 'close' > .fsync = fuse_fsync, > .lock = fuse_file_lock, > .flock = fuse_file_flock, > .splice_read = generic_file_splice_read, > .unlocked_ioctl = fuse_file_ioctl, > .compat_ioctl = fuse_file_compat_ioctl, > .poll = fuse_file_poll, > }; > > static const struct file_operations fuse_direct_io_file_operations = { > .llseek = fuse_file_llseek, > .read = fuse_direct_read, > .write = fuse_direct_write, > .mmap = fuse_direct_mmap, > .open = fuse_open, > .flush = fuse_flush, > .release = fuse_release, > .fsync = fuse_fsync, > .lock = fuse_file_lock, > .flock = fuse_file_flock, > .unlocked_ioctl = fuse_file_ioctl, > .compat_ioctl = fuse_file_compat_ioctl, > .poll = fuse_file_poll, > /* no splice_read */ > };
This is a good idea, but unfortunately there are some other syscalls that use the file-system API, but don't correspond directly to functions in this structure. For example, chdir() isn't handled by the file-system API, but the kernel will use the file-system API to see if permissions on the directory are sufficient before updating the working directory. I tried to use the patch attached to the bug that provides the --fuse-compatible=yes option, but valgrind would still hang on sys_chdir() and sys_stat64 in my tests. I added those in a new patch. -Mike ------------------------------------------------------------------------------ 10 Tips for Better Web Security Learn 10 ways to better secure your business today. Topics covered include: Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, security Microsoft Exchange, secure Instant Messaging, and much more. http://www.accelacomm.com/jaw/sfnl/114/51426210/ _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
