alistair23-linux/fs/ecryptfs
Tyler Hicks 38e3eaeedc eCryptfs: Remove mmap from directory operations
Adrian reported that mkfontscale didn't work inside of eCryptfs mounts.
Strace revealed the following:

open("./", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
open("./fonts.scale", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
getdents(3, /* 80 entries */, 32768) = 2304
open("./.", O_RDONLY) = 5
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
fstat64(5, {st_mode=S_IFDIR|0755, st_size=16384, ...}) = 0
mmap2(NULL, 16384, PROT_READ, MAP_PRIVATE, 5, 0) = 0xb7fcf000
close(5) = 0
--- SIGBUS (Bus error) @ 0 (0) ---
+++ killed by SIGBUS +++

The mmap2() on a directory was successful, resulting in a SIGBUS
signal later.  This patch removes mmap() from the list of possible
ecryptfs_dir_fops so that mmap() isn't possible on eCryptfs directory
files.

https://bugs.launchpad.net/ecryptfs/+bug/400443

Reported-by: Adrian C. <anrxc@sysphere.org>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
2010-01-19 22:32:11 -06:00
..
crypto.c eCryptfs: Propagate vfs_read and vfs_write return codes 2009-09-23 09:10:34 -05:00
debug.c eCryptfs: update comment and debug statement 2007-10-16 09:43:11 -07:00
dentry.c fsstack/ecryptfs: remove unused get_nlinks param to fsstack_copy_attr_all 2009-12-17 10:57:30 -05:00
ecryptfs_kernel.h const: mark remaining address_space_operations const 2009-09-22 07:17:24 -07:00
file.c eCryptfs: Remove mmap from directory operations 2010-01-19 22:32:11 -06:00
inode.c eCryptfs: Add getattr function 2010-01-19 22:32:09 -06:00
Kconfig eCryptfs: Remove Kconfig NET dependency and select MD5 2009-10-08 11:31:36 -05:00
keystore.c eCryptfs: Validate global auth tok keys 2009-09-23 09:10:32 -05:00
kthread.c eCryptfs: Check for O_RDONLY lower inodes when opening lower files 2009-09-23 09:10:32 -05:00
main.c fsstack/ecryptfs: remove unused get_nlinks param to fsstack_copy_attr_all 2009-12-17 10:57:30 -05:00
Makefile eCryptfs: remove netlink transport 2008-10-16 11:21:39 -07:00
messaging.c eCryptfs: NULL pointer dereference in ecryptfs_send_miscdev() 2009-04-22 03:54:13 -05:00
miscdev.c eCryptfs: NULL pointer dereference in ecryptfs_send_miscdev() 2009-04-22 03:54:13 -05:00
mmap.c eCryptfs: Propagate vfs_read and vfs_write return codes 2009-09-23 09:10:34 -05:00
read_write.c eCryptfs: Propagate vfs_read and vfs_write return codes 2009-09-23 09:10:34 -05:00
super.c ecryptfs: Remove unneeded locking that triggers lockdep false positives 2009-09-23 09:10:30 -05:00