FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 03-01-2012, 03:52 PM
Colin King
 
Default eCryptfs: Handle failed metadata read in lookup

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

SRU Justification:

When failing to read the lower file's crypto metadata during a lookup,
eCryptfs must continue on without throwing an error. For example, there
may be a plaintext file in the lower mount point that the user wants to
delete through the eCryptfs mount.

If an error is encountered while reading the metadata in lookup(), the
eCryptfs inode's size could be incorrect. We must be sure to reread the
plaintext inode size from the metadata when performing an open() or
setattr(). The metadata is already being read in those paths, so this
adds minimal performance overhead.

BugLink: http://bugs.launchpad.net/bugs/509180

Note:

This patch is a backport by Tim Gardner that was SRU'd back in 20 Jul 2011
but wasn't tested and so was reverted as part of the SRU process. I'm
sending back to the list again as I think it should be included.

Test:

See https://bugs.launchpad.net/ecryptfs/+bug/509180/comments/50,
without this patch, the file as garbage at the end of the, file. With
the fix, the file contains just the expected data with no garbage at
the end.

I've also got a suitable test working for the ecryptfs test suite
which I hope will be included fairly shortly.

Tim Gardner (1):
eCryptfs: Handle failed metadata read in lookup

fs/ecryptfs/crypto.c | 21 +++++++++++++++++++++
fs/ecryptfs/ecryptfs_kernel.h | 2 ++
fs/ecryptfs/file.c | 3 ++-
fs/ecryptfs/inode.c | 18 +++---------------
4 files changed, 28 insertions(+), 16 deletions(-)


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 03-01-2012, 06:22 PM
Colin King
 
Default eCryptfs: Handle failed metadata read in lookup

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

SRU Justification:

When failing to read the lower file's crypto metadata during a lookup,
eCryptfs must continue on without throwing an error. For example, there
may be a plaintext file in the lower mount point that the user wants to
delete through the eCryptfs mount.

If an error is encountered while reading the metadata in lookup(), the
eCryptfs inode's size could be incorrect. We must be sure to reread the
plaintext inode size from the metadata when performing an open() or
setattr(). The metadata is already being read in those paths, so this
adds minimal performance overhead.

BugLink: http://bugs.launchpad.net/bugs/509180

Note:

This patch is from a backport by Tim Gardner that was SRU'd back in
20 Jul 2011 but wasn't tested and so was reverted as part of the SRU
process. I'm sending back to the list again as I think it should be
included.

Test:

See https://bugs.launchpad.net/ecryptfs/+bug/509180/comments/50,
without this patch, the file as garbage at the end of the, file. With
the fix, the file contains just the expected data with no garbage at
the end.

I've also got a suitable test working for the ecryptfs test suite
which I hope will be included fairly shortly.

Colin Ian King (1):
eCryptfs: Handle failed metadata read in lookup

fs/ecryptfs/crypto.c | 21 +++++++++++++++++++++
fs/ecryptfs/ecryptfs_kernel.h | 2 ++
fs/ecryptfs/file.c | 3 ++-
fs/ecryptfs/inode.c | 18 +++---------------
4 files changed, 28 insertions(+), 16 deletions(-)

--
1.7.4.1


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 02:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org