1. 19 Oct, 2018 1 commit
  2. 02 Oct, 2018 1 commit
  3. 05 Sep, 2018 1 commit
  4. 14 Aug, 2018 5 commits
  5. 23 May, 2018 1 commit
  6. 04 Apr, 2018 1 commit
  7. 23 Jan, 2018 2 commits
  8. 16 Nov, 2017 1 commit
  9. 05 Oct, 2017 2 commits
  10. 06 Apr, 2017 3 commits
  11. 08 Mar, 2017 1 commit
  12. 10 Jan, 2017 4 commits
  13. 06 Dec, 2016 1 commit
  14. 15 Sep, 2016 2 commits
  15. 18 Aug, 2016 2 commits
  16. 16 May, 2016 1 commit
    • Jan Kara's avatar
      ext4: fix races between page faults and hole punching · c882bba8
      Jan Kara authored
      BugLink: http://bugs.launchpad.net/bugs/1578798
      
      commit ea3d7209
      
       upstream.
      
      Currently, page faults and hole punching are completely unsynchronized.
      This can result in page fault faulting in a page into a range that we
      are punching after truncate_pagecache_range() has been called and thus
      we can end up with a page mapped to disk blocks that will be shortly
      freed. Filesystem corruption will shortly follow. Note that the same
      race is avoided for truncate by checking page fault offset against
      i_size but there isn't similar mechanism available for punching holes.
      
      Fix the problem by creating new rw semaphore i_mmap_sem in inode and
      grab it for writing over truncate, hole punching, and other functions
      removing blocks from extent tree and for read over page faults. We
      cannot easily use i_data_sem for this since that ranks below transaction
      start and we need something ranking above it so that it can be held over
      the whole truncate / hole punching operation. Also remove various
      workarounds we had in the code to reduce race window when page fault
      could have created pages with stale mapping information.
      Signed-off-by: default avatarJan Kara <jack@suse.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      c882bba8
  17. 21 Apr, 2016 2 commits
  18. 06 Apr, 2016 2 commits
    • Seth Forshee's avatar
      UBUNTU: SAUCE: ext4: Add module parameter to enable user namespace mounts · 41d8f9b2
      Seth Forshee authored
      
      This is still an experimental feature, so disable it by default
      and allow it only when the system administrator supplies the
      userns_mounts=true module parameter.
      Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
      41d8f9b2
    • Seth Forshee's avatar
      UBUNTU: SAUCE: ext4: Add support for unprivileged mounts from user namespaces · 7a5ab85b
      Seth Forshee authored
      
      Support unprivileged mounting of ext4 volumes from user
      namespaces. This requires the following changes:
      
       - Perform all uid and gid conversions to/from disk relative to
         s_user_ns. In many cases this will already be handled by the
         vfs helper functions. This also requires updates to handle
         cases where ids may not map into s_user_ns.
      
       - Update most capability checks to check for capabilities in
         s_user_ns rather than init_user_ns. These mostly reflect
         changes to the filesystem that a user in s_user_ns could
         already make externally by virtue of having write access to
         the backing device.
      
       - Restrict unsafe options in either the mount options or the
         ext4 superblock. Currently the only concerning option is
         errors=panic, and this is made to require CAP_SYS_ADMIN in
         init_user_ns.
      
       - Verify that unprivileged users have the required access to the
         journal device at the path passed via the journal_path mount
         option.
      
         Note that for the journal_path and the journal_dev mount
         options, and for external journal devices specified in the
         ext4 superblock, devcgroup restrictions will be enforced by
         __blkdev_get(), (via blkdev_get_by_dev()), ensuring that the
         user has been granted appropriate access to the block device.
      
       - Set the FS_USERNS_MOUNT flag on the filesystem types supported
         by ext4.
      
      sysfs attributes for ext4 mounts remain writable only by real
      root.
      Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
      7a5ab85b
  19. 16 Nov, 2015 1 commit
    • Dan Williams's avatar
      ext2, ext4: warn when mounting with dax enabled · ef83b6e8
      Dan Williams authored
      
      Similar to XFS warn when mounting DAX while it is still considered under
      development.  Also, aspects of the DAX implementation, for example
      synchronization against multiple faults and faults causing block
      allocation, depend on the correct implementation in the filesystem.  The
      maturity of a given DAX implementation is filesystem specific.
      
      Cc: <stable@vger.kernel.org>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Matthew Wilcox <willy@linux.intel.com>
      Cc: linux-ext4@vger.kernel.org
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Reported-by: default avatarDave Chinner <david@fromorbit.com>
      Acked-by: default avatarJan Kara <jack@suse.com>
      Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
      ef83b6e8
  20. 07 Nov, 2015 1 commit
    • Mel Gorman's avatar
      mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep... · d0164adc
      Mel Gorman authored
      mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd
      
      __GFP_WAIT has been used to identify atomic context in callers that hold
      spinlocks or are in interrupts.  They are expected to be high priority and
      have access one of two watermarks lower than "min" which can be referred
      to as the "atomic reserve".  __GFP_HIGH users get access to the first
      lower watermark and can be called the "high priority reserve".
      
      Over time, callers had a requirement to not block when fallback options
      were available.  Some have abused __GFP_WAIT leading to a situation where
      an optimisitic allocation with a fallback option can access atomic
      reserves.
      
      This patch uses __GFP_ATOMIC to identify callers that are truely atomic,
      cannot sleep and have no alternative.  High priority users continue to use
      __GFP_HIGH.  __GFP_DIRECT_RECLAIM identifies callers that can sleep and
      are willing to enter direct reclaim.  __GFP_KSWAPD_RECLAIM to identify
      callers that want to wake kswapd for backgrou...
      d0164adc
  21. 19 Oct, 2015 2 commits
  22. 18 Oct, 2015 1 commit
    • Daeho Jeong's avatar
      ext4, jbd2: ensure entering into panic after recording an error in superblock · 4327ba52
      Daeho Jeong authored
      
      If a EXT4 filesystem utilizes JBD2 journaling and an error occurs, the
      journaling will be aborted first and the error number will be recorded
      into JBD2 superblock and, finally, the system will enter into the
      panic state in "errors=panic" option.  But, in the rare case, this
      sequence is little twisted like the below figure and it will happen
      that the system enters into panic state, which means the system reset
      in mobile environment, before completion of recording an error in the
      journal superblock. In this case, e2fsck cannot recognize that the
      filesystem failure occurred in the previous run and the corruption
      wouldn't be fixed.
      
      Task A                        Task B
      ext4_handle_error()
      -> jbd2_journal_abort()
        -> __journal_abort_soft()
          -> __jbd2_journal_abort_hard()
          | -> journal->j_flags |= JBD2_ABORT;
          |
          |                         __ext4_abort()
          |                         -> jbd2_journal_abort()
          |                         | -> __journal_abort_soft()
          |                         |   -> if (journal->j_flags & JBD2_ABORT)
          |                         |           return;
          |                         -> panic()
          |
          -> jbd2_journal_update_sb_errno()
      Tested-by: default avatarHobin Woo <hobin.woo@samsung.com>
      Signed-off-by: default avatarDaeho Jeong <daeho.jeong@samsung.com>
      Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
      Cc: stable@vger.kernel.org
      4327ba52
  23. 17 Oct, 2015 2 commits