[PATCH 0/1][Lucid][SRU] eCryptfs: Initialize empty lower files when opening them

Colin King colin.king at canonical.com
Wed Aug 22 10:44:34 UTC 2012

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

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

SRU justification:


eCryptfs only initialized lower files in the ecryptfs_create() path.
A number of users have reported empty lower files in beneath their
eCryptfs mounts.  The presence of empty files causes problems due to
the lack of proper cryptographic metadata.


Backport upstream commit e3ccaa9761200952cc269b1f4b7d7bb77a5e071b



sudo ./tests/run_tests.sh -K -c safe -b 1000000 -D /tmp/image -l /lower -u /upper \
 -f ext2,ext3,ext4,xfs,btrfs -t lp-911507.sh

Without the fix, this test fails. With the fix, it passes.

Note: Tested this against all other eCryptfs tests to ensure we don't regress
plus did 1+ hour soak test of multiple parallel builds.

Colin Ian King (1):
  eCryptfs: Initialize empty lower files when opening them

 fs/ecryptfs/ecryptfs_kernel.h |    1 +
 fs/ecryptfs/file.c            |   71 ++++++++++++++++++++++++++---------------
 fs/ecryptfs/inode.c           |    2 +-
 3 files changed, 47 insertions(+), 27 deletions(-)


More information about the kernel-team mailing list