07 Jun, 2008

1 commit

  • The page decrypt calls in ecryptfs_write() are both pointless and buggy.
    Pointless because ecryptfs_get_locked_page() has already brought the page
    up to date, and buggy because prior mmap writes will just be blown away by
    the decrypt call.

    This patch also removes the declaration of a now-nonexistent function
    ecryptfs_write_zeros().

    Thanks to Eric Sandeen and David Kleikamp for helping to track this
    down.

    Eric said:

    fsx w/ mmap dies quickly ( < 100 ops) without this, and survives
    nicely (to millions of ops+) with it in place.

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

    Michael Halcrow
     

29 Apr, 2008

1 commit


07 Feb, 2008

1 commit

  • - make the following needlessly global code static:
    - crypto.c:ecryptfs_lower_offset_for_extent()
    - crypto.c:key_tfm_list
    - crypto.c:key_tfm_list_mutex
    - inode.c:ecryptfs_getxattr()
    - main.c:ecryptfs_init_persistent_file()

    - remove the no longer used mmap.c:ecryptfs_lower_page_cache

    - #if 0 the unused read_write.c:ecryptfs_read()

    Signed-off-by: Adrian Bunk
    Cc: Michael Halcrow
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

18 Dec, 2007

1 commit

  • 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
     

15 Nov, 2007

1 commit


17 Oct, 2007

4 commits

  • 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
     
  • 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
     
  • 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