29 Jan, 2008

1 commit


25 Jan, 2008

8 commits


09 Jan, 2008

1 commit

  • This patch corrects some erroneous dentry handling in eCryptfs.

    If there is a problem creating the lower file, then there is nothing that
    the persistent lower file can do to really help us. This patch makes a
    vfs_create() failure in the lower filesystem always lead to an
    unconditional do_create failure in eCryptfs.

    Under certain sequences of operations, the eCryptfs dentry can remain in
    the dcache after an unlink. This patch calls d_drop() on the eCryptfs
    dentry to correct this.

    eCryptfs has no business calling d_delete() directly on a lower
    filesystem's dentry. This patch removes the call to d_delete() on the
    lower persistent file's dentry in ecryptfs_destroy_inode().

    (Thanks to David Kleikamp, Eric Sandeen, and Jeff Moyer for helping
    identify and resolve this issue)

    Signed-off-by: Michael Halcrow
    Cc: Dave Kleikamp
    Cc: Eric Sandeen
    Cc: Jeff Moyer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     

24 Dec, 2007

3 commits

  • Thanks to Jeff Moyer for pointing this out.

    If the RDWR dentry_open() in ecryptfs_init_persistent_file fails,
    it will do a dput/mntput. Need to re-take references if we
    retry as RDONLY.

    Signed-off-by: Eric Sandeen
    Acked-by: Mike Halcrow
    Signed-off-by: Jeff Moyer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • Thanks to Josef Bacik for finding these.

    A couple of ecryptfs error paths don't properly unlock things they locked.

    Signed-off-by: Eric Sandeen
    Cc: Josef Bacik
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • Passing a cipher name > 32 chars on mount results in an overflow when the
    cipher name is printed, because the last character in the struct
    ecryptfs_key_tfm's cipher_name string was never zeroed.

    Signed-off-by: Eric Sandeen
    Acked-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     

18 Dec, 2007

3 commits

  • ecryptfs in 2.6.24-rc3 wasn't surviving fsx for me at all, dying after 4
    ops. Generally, encountering problems with stale data and improperly
    zeroed pages. An extending truncate + write for example would expose stale
    data.

    With the changes below I got to a million ops and beyond with all mmap ops
    disabled - mmap still needs work. (A version of this patch on a RHEL5
    kernel ran for over 110 million fsx ops)

    I added a few comments as well, to the best of my understanding
    as I read through the code.

    Signed-off-by: Eric Sandeen
    Acked-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • eCryptfs wasn't setting s_blocksize in it's superblock; just pick it up
    from the lower FS. Having an s_blocksize of 0 made things like "filefrag"
    which call FIGETBSZ unhappy.

    Signed-off-by: Eric Sandeen
    Acked-by: Mike Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • ecryptfs_destroy_mount_crypt_stat() checks whether each
    auth_tok->global_auth_tok_key is nonzero and if so puts that key. However,
    in some early mount error paths nothing has initialized the pointer, and we
    try to key_put() garbage. Running the bad cipher tests in the testsuite
    exposes this, and it's happy with the following change.

    Signed-off-by: Eric Sandeen
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     

15 Nov, 2007

1 commit


06 Nov, 2007

2 commits


27 Oct, 2007

1 commit


24 Oct, 2007

1 commit


23 Oct, 2007

1 commit


19 Oct, 2007

1 commit

  • Make sure ecryptfs doesn't trip the BUG() in notify_change. This also allows
    the lower filesystem to interpret ATTR_KILL_S*ID in its own way.

    Signed-off-by: Jeff Layton
    Cc: Michael Halcrow
    Cc: Christoph Hellwig
    Cc: Neil Brown
    Cc: "J. Bruce Fields"
    Cc: Chris Mason
    Cc: Jeff Mahoney
    Cc: "Vladimir V. Saveliev"
    Cc: Josef 'Jeff' Sipek
    Cc: Trond Myklebust
    Cc: Steven French
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton
     

17 Oct, 2007

17 commits

  • This patch cleans up duplicate includes in
    fs/ecryptfs/

    Signed-off-by: Jesper Juhl
    Cc: Michael A Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • Slab constructors currently have a flags parameter that is never used. And
    the order of the arguments is opposite to other slab functions. The object
    pointer is placed before the kmem_cache pointer.

    Convert

    ctor(void *object, struct kmem_cache *s, unsigned long flags)

    to

    ctor(struct kmem_cache *s, void *object)

    throughout the kernel

    [akpm@linux-foundation.org: coupla fixes]
    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • The functions that eventually call down to ecryptfs_read_lower(),
    ecryptfs_decrypt_page(), and ecryptfs_copy_up_encrypted_with_header()
    should have the responsibility of managing the page Uptodate
    status. This patch gets rid of some of the ugliness that resulted from
    trying to push some of the page flag setting too far down the stack.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Replace some magic numbers with sizeof() equivalents.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • The switch to read_write.c routines and the persistent file make a number of
    functions unnecessary. This patch removes them.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Initialize persistent lower file on inode create.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Update data types and add casts in order to avoid potential overflow
    issues.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Convert readpage, prepare_write, and commit_write to use read_write.c
    routines. Remove sync_page; I cannot think of a good reason for implementing
    that in eCryptfs.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Rather than open a new lower file for every eCryptfs file that is opened,
    truncated, or setattr'd, instead use the existing lower persistent file for
    the eCryptfs inode. Change truncate to use read_write.c functions. Change
    ecryptfs_getxattr() to use the common ecryptfs_getxattr_lower() function.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Update the metadata read/write functions and grow_file() to use the
    read_write.c routines. Do not open another lower file; use the persistent
    lower file instead. Provide a separate function for
    crypto.c::ecryptfs_read_xattr_region() to get to the lower xattr without
    having to go through the eCryptfs getxattr.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • This patch sets up and destroys the persistent lower file for each eCryptfs
    inode.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Replace page encryption and decryption routines and inode size write routine
    with versions that utilize the read_write.c functions.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Add a set of functions through which all I/O to lower files is consolidated.
    This patch adds a new inode_info reference to a persistent lower file for each
    eCryptfs inode; another patch later in this series will set that up. This
    persistent lower file is what the read_write.c functions use to call
    vfs_read() and vfs_write() on the lower filesystem, so even when reads and
    writes come in through aops->readpage and aops->writepage, we can satisfy them
    without resorting to direct access to the lower inode's address space.
    Several function declarations are going to be changing with this patchset.
    For now, in order to keep from breaking the build, I am putting dummy
    parameters in for those functions.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • The error paths and the module exit code need work. sysfs
    unregistration is not the right place to tear down the crypto
    subsystem, and the code to undo subsystem initializations on various
    error paths is unnecessarily duplicated. This patch addresses those
    issues.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Remove assignments in if-statements.

    Signed-off-by: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • There is no point to keeping a separate header_extent_size and an extent_size.
    The total size of the header can always be represented as some multiple of
    the regular data extent size.

    [randy.dunlap@oracle.com: ecryptfs: fix printk format warning]
    Signed-off-by: Michael Halcrow
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • eCryptfs is currently just passing through splice reads to the lower
    filesystem. This is obviously incorrect behavior; the decrypted data is
    what needs to be read, not the lower encrypted data. I cannot think of any
    good reason for eCryptfs to implement splice_read, so this patch points the
    eCryptfs fops splice_read to use generic_file_splice_read.

    Signed-off-by: Michael Halcrow
    Reviewed-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow