]> git.karo-electronics.de Git - karo-tx-linux.git/commit
eCryptfs: Improve statfs reporting
authorTyler Hicks <tyhicks@canonical.com>
Sat, 5 Nov 2011 17:45:08 +0000 (13:45 -0400)
committerTyler Hicks <tyhicks@canonical.com>
Tue, 20 Dec 2011 01:24:02 +0000 (19:24 -0600)
commit7e6aad6853cf1204e639b2a7d20296e3075078c2
tree288fb9177dbc0069459eb8c87dd342a8ce0e6db6
parent511585a28e5b5fd1cac61e601e42efc4c5dd64b5
eCryptfs: Improve statfs reporting

statfs() calls on eCryptfs files returned the wrong filesystem type and,
when using filename encryption, the wrong maximum filename length.

If mount-wide filename encryption is enabled, the cipher block size and
the lower filesystem's max filename length will determine the max
eCryptfs filename length. Pre-tested, known good lengths are used when
the lower filesystem's namelen is 255 and a cipher with 8 or 16 byte
block sizes is used. In other, less common cases, we fall back to a safe
rounded-down estimate when determining the eCryptfs namelen.

https://launchpad.net/bugs/885744

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Reported-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
fs/ecryptfs/crypto.c
fs/ecryptfs/ecryptfs_kernel.h
fs/ecryptfs/keystore.c
fs/ecryptfs/super.c