1. 01 4月, 2014 1 次提交
  2. 25 1月, 2014 1 次提交
  3. 09 11月, 2013 4 次提交
  4. 25 10月, 2013 2 次提交
  5. 05 7月, 2013 1 次提交
  6. 29 6月, 2013 1 次提交
  7. 26 2月, 2013 1 次提交
  8. 18 1月, 2013 1 次提交
  9. 15 9月, 2012 1 次提交
    • T
      eCryptfs: Copy up attributes of the lower target inode after rename · 8335eafc
      Tyler Hicks 提交于
      After calling into the lower filesystem to do a rename, the lower target
      inode's attributes were not copied up to the eCryptfs target inode. This
      resulted in the eCryptfs target inode staying around, rather than being
      evicted, because i_nlink was not updated for the eCryptfs inode. This
      also meant that eCryptfs didn't do the final iput() on the lower target
      inode so it stayed around, as well. This would result in a failure to
      free up space occupied by the target file in the rename() operation.
      Both target inodes would eventually be evicted when the eCryptfs
      filesystem was unmounted.
      
      This patch calls fsstack_copy_attr_all() after the lower filesystem
      does its ->rename() so that important inode attributes, such as i_nlink,
      are updated at the eCryptfs layer. ecryptfs_evict_inode() is now called
      and eCryptfs can drop its final reference on the lower inode.
      
      http://launchpad.net/bugs/561129Signed-off-by: NTyler Hicks <tyhicks@canonical.com>
      Tested-by: NColin Ian King <colin.king@canonical.com>
      Cc: <stable@vger.kernel.org> [2.6.39+]
      8335eafc
  10. 30 7月, 2012 2 次提交
  11. 23 7月, 2012 1 次提交
  12. 14 7月, 2012 4 次提交
    • A
      don't pass nameidata * to vfs_create() · 312b63fb
      Al Viro 提交于
      all we want is a boolean flag, same as the method gets now
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      312b63fb
    • A
      don't pass nameidata to ->create() · ebfc3b49
      Al Viro 提交于
      boolean "does it have to be exclusive?" flag is passed instead;
      Local filesystem should just ignore it - the object is guaranteed
      not to be there yet.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      ebfc3b49
    • A
      stop passing nameidata to ->lookup() · 00cd8dd3
      Al Viro 提交于
      Just the flags; only NFS cares even about that, but there are
      legitimate uses for such argument.  And getting rid of that
      completely would require splitting ->lookup() into a couple
      of methods (at least), so let's leave that alone for now...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      00cd8dd3
    • T
      eCryptfs: Revert to a writethrough cache model · 821f7494
      Tyler Hicks 提交于
      A change was made about a year ago to get eCryptfs to better utilize its
      page cache during writes. The idea was to do the page encryption
      operations during page writeback, rather than doing them when initially
      writing into the page cache, to reduce the number of page encryption
      operations during sequential writes. This meant that the encrypted page
      would only be written to the lower filesystem during page writeback,
      which was a change from how eCryptfs had previously wrote to the lower
      filesystem in ecryptfs_write_end().
      
      The change caused a few eCryptfs-internal bugs that were shook out.
      Unfortunately, more grave side effects have been identified that will
      force changes outside of eCryptfs. Because the lower filesystem isn't
      consulted until page writeback, eCryptfs has no way to pass lower write
      errors (ENOSPC, mainly) back to userspace. Additionaly, it was reported
      that quotas could be bypassed because of the way eCryptfs may sometimes
      open the lower filesystem using a privileged kthread.
      
      It would be nice to resolve the latest issues, but it is best if the
      eCryptfs commits be reverted to the old behavior in the meantime.
      
      This reverts:
      32001d6f "eCryptfs: Flush file in vma close"
      5be79de2 "eCryptfs: Flush dirty pages in setattr"
      57db4e8d "ecryptfs: modify write path to encrypt page in writepage"
      Signed-off-by: NTyler Hicks <tyhicks@canonical.com>
      Tested-by: NColin King <colin.king@canonical.com>
      Cc: Colin King <colin.king@canonical.com>
      Cc: Thieu Le <thieule@google.com>
      821f7494
  13. 09 7月, 2012 2 次提交
    • T
      eCryptfs: Initialize empty lower files when opening them · e3ccaa97
      Tyler Hicks 提交于
      Historically, eCryptfs has only initialized lower files in the
      ecryptfs_create() path. Lower file initialization is the act of writing
      the cryptographic metadata from the inode's crypt_stat to the header of
      the file. The ecryptfs_open() path already expects that metadata to be
      in the header of the file.
      
      A number of users have reported empty lower files in beneath their
      eCryptfs mounts. Most of the causes for those empty files being left
      around have been addressed, but the presence of empty files causes
      problems due to the lack of proper cryptographic metadata.
      
      To transparently solve this problem, this patch initializes empty lower
      files in the ecryptfs_open() error path. If the metadata is unreadable
      due to the lower inode size being 0, plaintext passthrough support is
      not in use, and the metadata is stored in the header of the file (as
      opposed to the user.ecryptfs extended attribute), the lower file will be
      initialized.
      
      The number of nested conditionals in ecryptfs_open() was getting out of
      hand, so a helper function was created. To avoid the same nested
      conditional problem, the conditional logic was reversed inside of the
      helper function.
      
      https://launchpad.net/bugs/911507Signed-off-by: NTyler Hicks <tyhicks@canonical.com>
      Cc: John Johansen <john.johansen@canonical.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      e3ccaa97
    • T
      eCryptfs: Unlink lower inode when ecryptfs_create() fails · 8bc2d3cf
      Tyler Hicks 提交于
      ecryptfs_create() creates a lower inode, allocates an eCryptfs inode,
      initializes the eCryptfs inode and cryptographic metadata attached to
      the inode, and then writes the metadata to the header of the file.
      
      If an error was to occur after the lower inode was created, an empty
      lower file would be left in the lower filesystem. This is a problem
      because ecryptfs_open() refuses to open any lower files which do not
      have the appropriate metadata in the file header.
      
      This patch properly unlinks the lower inode when an error occurs in the
      later stages of ecryptfs_create(), reducing the chance that an empty
      lower file will be left in the lower filesystem.
      
      https://launchpad.net/bugs/872905Signed-off-by: NTyler Hicks <tyhicks@canonical.com>
      Cc: John Johansen <john.johansen@canonical.com>
      Cc: Colin Ian King <colin.king@canonical.com>
      8bc2d3cf
  14. 30 5月, 2012 1 次提交
  15. 17 2月, 2012 1 次提交
  16. 26 1月, 2012 1 次提交
    • T
      eCryptfs: Check inode changes in setattr · a261a039
      Tyler Hicks 提交于
      Most filesystems call inode_change_ok() very early in ->setattr(), but
      eCryptfs didn't call it at all. It allowed the lower filesystem to make
      the call in its ->setattr() function. Then, eCryptfs would copy the
      appropriate inode attributes from the lower inode to the eCryptfs inode.
      
      This patch changes that and actually calls inode_change_ok() on the
      eCryptfs inode, fairly early in ecryptfs_setattr(). Ideally, the call
      would happen earlier in ecryptfs_setattr(), but there are some possible
      inode initialization steps that must happen first.
      
      Since the call was already being made on the lower inode, the change in
      functionality should be minimal, except for the case of a file extending
      truncate call. In that case, inode_newsize_ok() was never being
      called on the eCryptfs inode. Rather than inode_newsize_ok() catching
      maximum file size errors early on, eCryptfs would encrypt zeroed pages
      and write them to the lower filesystem until the lower filesystem's
      write path caught the error in generic_write_checks(). This patch
      introduces a new function, called ecryptfs_inode_newsize_ok(), which
      checks if the new lower file size is within the appropriate limits when
      the truncate operation will be growing the lower file.
      
      In summary this change prevents eCryptfs truncate operations (and the
      resulting page encryptions), which would exceed the lower filesystem
      limits or FSIZE rlimits, from ever starting.
      Signed-off-by: NTyler Hicks <tyhicks@canonical.com>
      Reviewed-by: NLi Wang <liwang@nudt.edu.cn>
      Cc: <stable@vger.kernel.org>
      a261a039
  17. 04 1月, 2012 5 次提交
  18. 24 11月, 2011 1 次提交
    • T
      eCryptfs: Prevent file create race condition · b59db43a
      Tyler Hicks 提交于
      The file creation path prematurely called d_instantiate() and
      unlock_new_inode() before the eCryptfs inode info was fully
      allocated and initialized and before the eCryptfs metadata was written
      to the lower file.
      
      This could result in race conditions in subsequent file and inode
      operations leading to unexpected error conditions or a null pointer
      dereference while attempting to use the unallocated memory.
      
      https://launchpad.net/bugs/813146Signed-off-by: NTyler Hicks <tyhicks@canonical.com>
      Cc: stable@kernel.org
      b59db43a
  19. 02 11月, 2011 1 次提交
  20. 29 7月, 2011 1 次提交
  21. 20 7月, 2011 3 次提交
  22. 30 5月, 2011 4 次提交