android_kernel_google_msm/fs/ecryptfs
Tyler Hicks 073b1bc26c eCryptfs: Force RO mount when encrypted view is enabled
commit 332b122d39c9cbff8b799007a825d94b2e7c12f2 upstream.

The ecryptfs_encrypted_view mount option greatly changes the
functionality of an eCryptfs mount. Instead of encrypting and decrypting
lower files, it provides a unified view of the encrypted files in the
lower filesystem. The presence of the ecryptfs_encrypted_view mount
option is intended to force a read-only mount and modifying files is not
supported when the feature is in use. See the following commit for more
information:

  e77a56d [PATCH] eCryptfs: Encrypted passthrough

This patch forces the mount to be read-only when the
ecryptfs_encrypted_view mount option is specified by setting the
MS_RDONLY flag on the superblock. Additionally, this patch removes some
broken logic in ecryptfs_open() that attempted to prevent modifications
of files when the encrypted view feature was in use. The check in
ecryptfs_open() was not sufficient to prevent file modifications using
system calls that do not operate on a file descriptor.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Priya Bansal <p.bansal@samsung.com>
[lizf: Backported to 3.4: adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-04-14 17:33:40 +08:00
..
crypto.c eCryptfs: Improve statfs reporting 2012-02-16 16:06:21 -06:00
debug.c
dentry.c eCryptfs: Handle NULL nameidata pointers 2011-02-21 14:45:57 -06:00
ecryptfs_kernel.h eCryptfs: Initialize empty lower files when opening them 2012-10-21 09:28:01 -07:00
file.c eCryptfs: Force RO mount when encrypted view is enabled 2015-04-14 17:33:40 +08:00
inode.c ecryptfs: avoid to access NULL pointer when write metadata in xattr 2015-02-02 17:04:47 +08:00
Kconfig eCryptfs: fix compile error 2011-08-09 13:42:46 -05:00
keystore.c ecryptfs: Fix memory leakage in keystore.c 2014-06-07 16:02:04 -07:00
kthread.c eCryptfs: Properly check for O_RDONLY flag before doing privileged open 2012-07-16 09:04:26 -07:00
main.c eCryptfs: Force RO mount when encrypted view is enabled 2015-04-14 17:33:40 +08:00
Makefile
messaging.c ecryptfs: properly mark init functions 2010-08-27 10:50:52 -05:00
miscdev.c eCryptfs: Fix lockdep warning in miscdev operations 2012-07-16 09:04:26 -07:00
mmap.c eCryptfs: Revert to a writethrough cache model 2012-10-21 09:28:01 -07:00
read_write.c ecryptfs: remove the second argument of k[un]map_atomic() 2012-02-16 16:06:27 -06:00
super.c ecryptfs: don't bother with ->drop_inode() 2012-03-20 21:29:33 -04:00