[PATCH 0/1][Oneiric,Natty][SRU] eCryptfs: Improve statfs reporting

Colin King colin.king at canonical.com
Wed Mar 14 12:57:20 UTC 2012


From: Colin Ian King <colin.king at canonical.com>

BugLink: https://launchpad.net/bugs/885744

SRU justification:

Impact:

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.

Fix:

Backport of upstream commit 4a26620df451ad46151ad21d711ed43e963c004e

Testcase:

http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/revision/640
http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/revision/625
[ see test: tests/kernel/lp-885744 ]

Colin Ian King (1):
  eCryptfs: Improve statfs reporting

 fs/ecryptfs/crypto.c          |   68 ++++++++++++++++++++++++++++++++++++----
 fs/ecryptfs/ecryptfs_kernel.h |   11 ++++++
 fs/ecryptfs/keystore.c        |    9 ++---
 fs/ecryptfs/super.c           |   14 ++++++++-
 4 files changed, 88 insertions(+), 14 deletions(-)

-- 
1.7.5.4





More information about the kernel-team mailing list