linux/fs/ecryptfs
Tyler Hicks 5e6f0d7690 eCryptfs: Make truncate path killable
ecryptfs_write() handles the truncation of eCryptfs inodes. It grabs a
page, zeroes out the appropriate portions, and then encrypts the page
before writing it to the lower filesystem. It was unkillable and due to
the lack of sparse file support could result in tying up a large portion
of system resources, while encrypting pages of zeros, with no way for
the truncate operation to be stopped from userspace.

This patch adds the ability for ecryptfs_write() to detect a pending
fatal signal and return as gracefully as possible. The intent is to
leave the lower file in a useable state, while still allowing a user to
break out of the encryption loop. If a pending fatal signal is detected,
the eCryptfs inode size is updated to reflect the modified inode size
and then -EINTR is returned.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Cc: <stable@vger.kernel.org>
2012-01-25 14:43:40 -06:00
..
Kconfig eCryptfs: fix compile error 2011-08-09 13:42:46 -05:00
Makefile eCryptfs: remove netlink transport 2008-10-16 11:21:39 -07:00
crypto.c ecryptfs: Remove unnecessary variable initialization 2012-01-25 14:43:38 -06:00
debug.c eCryptfs: update comment and debug statement 2007-10-16 09:43:11 -07:00
dentry.c eCryptfs: Handle NULL nameidata pointers 2011-02-21 14:45:57 -06:00
ecryptfs_kernel.h eCryptfs: Replace miscdev read/write magic numbers 2012-01-25 14:43:40 -06:00
file.c eCryptfs: Flush file in vma close 2011-11-23 15:40:09 -06:00
inode.c fs: propagate umode_t, misc bits 2012-01-03 22:55:10 -05:00
keystore.c eCryptfs: Replace miscdev read/write magic numbers 2012-01-25 14:43:40 -06:00
kthread.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00
main.c Ecryptfs: Add mount option to check uid of device being mounted = expect uid 2011-08-09 23:29:01 -05:00
messaging.c ecryptfs: properly mark init functions 2010-08-27 10:50:52 -05:00
miscdev.c eCryptfs: Replace miscdev read/write magic numbers 2012-01-25 14:43:40 -06:00
mmap.c eCryptfs: Unlock page in write_begin error path 2011-03-28 01:47:46 -05:00
read_write.c eCryptfs: Make truncate path killable 2012-01-25 14:43:40 -06:00
super.c vfs: switch ->show_options() to struct dentry * 2012-01-06 23:19:54 -05:00