1. 29 Jul, 2016 40 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · b5f00d18
      Linus Torvalds authored
      Pull ARM updates from Russell King:
       "Included in this update are:
      
         - Patches from Gregory Clement to fix the coherent DMA cases in our
           dma-mapping code.
      
         - A number of CPU errata updates and fixes.
      
         - ARM cpuidle improvements from Jisheng Zhang.
      
         - Fix from Kees for the location of _etext.
      
         - Cleanups from Masahiro Yamada to avoid duplicated messages during
           the kernel build, and remove CONFIG_ARCH_HAS_BARRIERS.
      
         - Remove a udelay loop limitation, allowing for faster CPUs to
           calibrate the delay correctly.
      
         - Cleanup some left-overs from the SW PAN implementation.
      
         - Ensure that a modified address limit is not visible to exception
           handlers"
      
      * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (21 commits)
        ARM: 8586/1: cpuidle: make arm_cpuidle_suspend() a bit more efficient
        ARM: 8585/1: cpuidle: fix !cpuidle_ops[cpu].init case during init
        ARM: 8561/4: dma-mapping: Fix the coherent case when iommu is used
        ARM: 8561/3: dma-mapping: Don't use outer_flush_range when the L2C is coherent
        ARM: 8560/1: errata: Workaround errata A12 825619 / A17 852421
        ARM: 8559/1: errata: Workaround erratum A12 821420
        ARM: 8558/1: errata: Workaround errata A12 818325/852422 A17 852423
        ARM: save and reset the address limit when entering an exception
        ARM: 8577/1: Fix Cortex-A15 798181 errata initialization
        ARM: 8584/1: floppy: avoid gcc-6 warning
        ARM: 8583/1: mm: fix location of _etext
        ARM: 8582/1: remove unused CONFIG_ARCH_HAS_BARRIERS
        ARM: 8306/1: loop_udelay: remove bogomips value limitation
        ARM: 8581/1: add missing <asm/prom.h> to arch/arm/kernel/devtree.c
        ARM: 8576/1: avoid duplicating "Kernel: arch/arm/boot/*Image is ready"
        ARM: 8556/1: on a generic DT system: do not touch l2x0
        ARM: uaccess: remove put_user() code duplication
        ARM: 8580/1: Remove orphaned __addr_ok() definition
        ARM: get rid of horrible *(unsigned int *)(regs + 1)
        ARM: introduce svc_pt_regs structure
        ...
      b5f00d18
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 27ae0c41
      Linus Torvalds authored
      Pull fuse updates from Miklos Szeredi:
       "This fixes error propagation from writeback to fsync/close for
        writeback cache mode as well as adding a missing capability flag to
        the INIT message.  The rest are cleanups.
      
        (The commits are recent but all the code actually sat in -next for a
        while now.  The recommits are due to conflict avoidance and the
        addition of Cc: stable@...)"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: use filemap_check_errors()
        mm: export filemap_check_errors() to modules
        fuse: fix wrong assignment of ->flags in fuse_send_init()
        fuse: fuse_flush must check mapping->flags for errors
        fuse: fsync() did not return IO errors
        fuse: don't mess with blocking signals
        new helper: wait_event_killable_exclusive()
        fuse: improve aio directIO write performance for size extending writes
      27ae0c41
    • Linus Torvalds's avatar
      Revert "vfs: add lookup_hash() helper" · 20d00ee8
      Linus Torvalds authored
      This reverts commit 3c9fe8cd.
      
      As Miklos points out in commit c1b2cc1a, the "lookup_hash()" helper
      is now unused, and in fact, with the hash salting changes, since the
      hash of a dentry name now depends on the directory dentry it is in, the
      helper function isn't even really likely to be useful.
      
      So rather than keep it around in case somebody else might end up finding
      a use for it, let's just remove the helper and not trick people into
      thinking it might be a useful thing.
      
      For example, I had obviously completely missed how the helper didn't
      follow the normal dentry hashing patterns, and how the hash salting
      patch broke overlayfs.  Things would quietly build and look sane, but
      not work.
      Suggested-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      20d00ee8
    • Linus Torvalds's avatar
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · e7b4f2d8
      Linus Torvalds authored
      Pull overlayfs update from Miklos Szeredi:
       "First of all, this fixes a regression in overlayfs introduced by the
        dentry hash salting.  I've moved the patch fixing this to the front of
        the queue, so if (god forbid) something needs to be bisected in
        overlayfs this regression won't interfere with that.
      
        The biggest part is preparation for selinux support, done by Vivek
        Goyal.  Essentially this makes all operations on underlying
        filesystems be done with credentials of mounter.  This makes
        everything nicely consistent.
      
        There are also fixes for a number of known and recently discovered
        non-standard behavior (thanks to Eryu Guan for testing and improving
        the test suites)"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: (23 commits)
        ovl: simplify empty checking
        qstr: constify instances in overlayfs
        ovl: clear nlink on rmdir
        ovl: disallow overlayfs as upperdir
        ovl: fix warning
        ovl: remove duplicated include from super.c
        ovl: append MAY_READ when diluting write checks
        ovl: dilute permission checks on lower only if not special file
        ovl: fix POSIX ACL setting
        ovl: share inode for hard link
        ovl: store real inode pointer in ->i_private
        ovl: permission: return ECHILD instead of ENOENT
        ovl: update atime on upper
        ovl: fix sgid on directory
        ovl: simplify permission checking
        ovl: do not require mounter to have MAY_WRITE on lower
        ovl: do operations on underlying file system in mounter's context
        ovl: modify ovl_permission() to do checks on two inodes
        ovl: define ->get_acl() for overlay inodes
        ovl: move some common code in a function
        ...
      e7b4f2d8
    • Linus Torvalds's avatar
      Merge tag 'freevxfs-for-4.8' of git://git.infradead.org/users/hch/freevxfs · 0a7736d0
      Linus Torvalds authored
      Pull freevxfs updates from Christoph Hellwig:
       "Support for foreign endianess and HP-UP superblocks from
        Krzysztof Błaszkowski"
      
      * tag 'freevxfs-for-4.8' of git://git.infradead.org/users/hch/freevxfs:
        freevxfs: update Kconfig information
        freevxfs: refactor readdir and lookup code
        freevxfs: fix lack of inode initialization
        freevxfs: fix memory leak in vxfs_read_fshead()
        freevxfs: update documentation and cresdits for HP-UX support
        freevxfs: implement ->alloc_inode and ->destroy_inode
        freevxfs: avoid the need for forward declaring the super operations
        freevxfs: move VFS inode allocation into vxfs_blkiget and vxfs_stiget
        freevxfs: remove vxfs_put_fake_inode
        freevxfs: handle big endian HP-UX file systems
      0a7736d0
    • Linus Torvalds's avatar
      Merge tag 'configfs-for-4.8' of git://git.infradead.org/users/hch/configfs · a54809f1
      Linus Torvalds authored
      Pull configfs update from Christoph Hellwig:
       "A simple error handling fix from Tal Shorer"
      
      * tag 'configfs-for-4.8' of git://git.infradead.org/users/hch/configfs:
        configfs: don't set buffer_needs_fill to zero if show() returns error
      a54809f1
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · b0c4e2ac
      Linus Torvalds authored
      Pull CIFS/SMB3 fixes from Steve French:
       "Various CIFS/SMB3 fixes, most for stable"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        CIFS: Fix a possible invalid memory access in smb2_query_symlink()
        fs/cifs: make share unaccessible at root level mountable
        cifs: fix crash due to race in hmac(md5) handling
        cifs: unbreak TCP session reuse
        cifs: Check for existing directory when opening file with O_CREAT
        Add MF-Symlinks support for SMB 2.0
      b0c4e2ac
    • Miklos Szeredi's avatar
      fuse: use filemap_check_errors() · 4a7f4e88
      Miklos Szeredi authored
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      4a7f4e88
    • Miklos Szeredi's avatar
      mm: export filemap_check_errors() to modules · d72d9e2a
      Miklos Szeredi authored
      Can be used by fuse, btrfs and f2fs to replace opencoded variants.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      d72d9e2a
    • Wei Fang's avatar
      fuse: fix wrong assignment of ->flags in fuse_send_init() · 9446385f
      Wei Fang authored
      FUSE_HAS_IOCTL_DIR should be assigned to ->flags, it may be a typo.
      Signed-off-by: default avatarWei Fang <fangwei1@huawei.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Fixes: 69fe05c9 ("fuse: add missing INIT flags")
      Cc: <stable@vger.kernel.org>
      9446385f
    • Maxim Patlasov's avatar
      fuse: fuse_flush must check mapping->flags for errors · 9ebce595
      Maxim Patlasov authored
      fuse_flush() calls write_inode_now() that triggers writeback, but actual
      writeback will happen later, on fuse_sync_writes(). If an error happens,
      fuse_writepage_end() will set error bit in mapping->flags. So, we have to
      check mapping->flags after fuse_sync_writes().
      Signed-off-by: default avatarMaxim Patlasov <mpatlasov@virtuozzo.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Fixes: 4d99ff8f ("fuse: Turn writeback cache on")
      Cc: <stable@vger.kernel.org> # v3.15+
      9ebce595
    • Alexey Kuznetsov's avatar
      fuse: fsync() did not return IO errors · ac7f052b
      Alexey Kuznetsov authored
      Due to implementation of fuse writeback filemap_write_and_wait_range() does
      not catch errors. We have to do this directly after fuse_sync_writes()
      Signed-off-by: default avatarAlexey Kuznetsov <kuznet@virtuozzo.com>
      Signed-off-by: default avatarMaxim Patlasov <mpatlasov@virtuozzo.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Fixes: 4d99ff8f ("fuse: Turn writeback cache on")
      Cc: <stable@vger.kernel.org> # v3.15+
      ac7f052b
    • Miklos Szeredi's avatar
      ovl: simplify empty checking · 30c17ebf
      Miklos Szeredi authored
      The empty checking logic is duplicated in ovl_check_empty_and_clear() and
      ovl_remove_and_whiteout(), except the condition for clearing whiteouts is
      different:
      
      ovl_check_empty_and_clear() checked for being upper
      
      ovl_remove_and_whiteout() checked for merge OR lower
      
      Move the intersection of those checks (upper AND merge) into
      ovl_check_empty_and_clear() and simplify ovl_remove_and_whiteout().
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      30c17ebf
    • Al Viro's avatar
      qstr: constify instances in overlayfs · 29c42e80
      Al Viro authored
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      29c42e80
    • Miklos Szeredi's avatar
      ovl: clear nlink on rmdir · dbc816d0
      Miklos Szeredi authored
      To make delete notification work on fa/inotify.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      dbc816d0
    • Miklos Szeredi's avatar
      ovl: disallow overlayfs as upperdir · 76bc8e28
      Miklos Szeredi authored
      This does not work and does not make sense.  So instead of fixing it
      (probably not hard) just disallow.
      Reported-by: default avatarAndrei Vagin <avagin@gmail.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Cc: <stable@vger.kernel.org>
      76bc8e28
    • Miklos Szeredi's avatar
      ovl: fix warning · 656189d2
      Miklos Szeredi authored
      There's a superfluous newline in the warning message in ovl_d_real().
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      656189d2
    • Wei Yongjun's avatar
      ovl: remove duplicated include from super.c · 5f215013
      Wei Yongjun authored
      Remove duplicated include.
      Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      5f215013
    • Vivek Goyal's avatar
      ovl: append MAY_READ when diluting write checks · 500cac3c
      Vivek Goyal authored
      Right now we remove MAY_WRITE/MAY_APPEND bits from mask if realfile is on
      lower/. This is done as files on lower will never be written and will be
      copied up. But to copy up a file, mounter should have MAY_READ permission
      otherwise copy up will fail. So set MAY_READ in mask when MAY_WRITE is
      reset.
      
      Dan Walsh noticed this when he did access(lowerfile, W_OK) and it returned
      True (context mounts) but when he tried to actually write to file, it
      failed as mounter did not have permission on lower file.
      
      [SzM] don't set MAY_READ if only MAY_APPEND is set without MAY_WRITE; this
      won't trigger a copy-up.
      Reported-by: default avatarDan Walsh <dwalsh@redhat.com>
      Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      500cac3c
    • Vivek Goyal's avatar
      ovl: dilute permission checks on lower only if not special file · e29841a0
      Vivek Goyal authored
      Right now if file is on lower/, we remove MAY_WRITE/MAY_APPEND bits from
      mask as lower/ will never be written and file will be copied up. But this
      is not true for special files. These files are not copied up and are opened
      in place. So don't dilute the checks for these types of files.
      Reported-by: default avatarDan Walsh <dwalsh@redhat.com>
      Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      e29841a0
    • Miklos Szeredi's avatar
      ovl: fix POSIX ACL setting · d837a49b
      Miklos Szeredi authored
      Setting POSIX ACL needs special handling:
      
      1) Some permission checks are done by ->setxattr() which now uses mounter's
      creds ("ovl: do operations on underlying file system in mounter's
      context").  These permission checks need to be done with current cred as
      well.
      
      2) Setting ACL can fail for various reasons.  We do not need to copy up in
      these cases.
      
      In the mean time switch to using generic_setxattr.
      
      [Arnd Bergmann] Fix link error without POSIX ACL. posix_acl_from_xattr()
      doesn't have a 'static inline' implementation when CONFIG_FS_POSIX_ACL is
      disabled, and I could not come up with an obvious way to do it.
      
      This instead avoids the link error by defining two sets of ACL operations
      and letting the compiler drop one of the two at compile time depending
      on CONFIG_FS_POSIX_ACL. This avoids all references to the ACL code,
      also leading to smaller code.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      d837a49b
    • Miklos Szeredi's avatar
      ovl: share inode for hard link · 51f7e52d
      Miklos Szeredi authored
      Inode attributes are copied up to overlay inode (uid, gid, mode, atime,
      mtime, ctime) so generic code using these fields works correcty.  If a hard
      link is created in overlayfs separate inodes are allocated for each link.
      If chmod/chown/etc. is performed on one of the links then the inode
      belonging to the other ones won't be updated.
      
      This patch attempts to fix this by sharing inodes for hard links.
      
      Use inode hash (with real inode pointer as a key) to make sure overlay
      inodes are shared for hard links on upper.  Hard links on lower are still
      split (which is not user observable until the copy-up happens, see
      Documentation/filesystems/overlayfs.txt under "Non-standard behavior").
      
      The inode is only inserted in the hash if it is non-directoy and upper.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      51f7e52d
    • Miklos Szeredi's avatar
      ovl: store real inode pointer in ->i_private · 39b681f8
      Miklos Szeredi authored
      To get from overlay inode to real inode we currently use 'struct
      ovl_entry', which has lifetime connected to overlay dentry.  This is okay,
      since each overlay dentry had a new overlay inode allocated.
      
      Following patch will break that assumption, so need to leave out ovl_entry.
      This patch stores the real inode directly in i_private, with the lowest bit
      used to indicate whether the inode is upper or lower.
      
      Lifetime rules remain, using ovl_inode_real() must only be done while
      caller holds ref on overlay dentry (and hence on real dentry), or within
      RCU protected regions.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      39b681f8
    • Miklos Szeredi's avatar
      ovl: permission: return ECHILD instead of ENOENT · a999d7e1
      Miklos Szeredi authored
      The error is due to RCU and is temporary.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      a999d7e1
    • Miklos Szeredi's avatar
      ovl: update atime on upper · d719e8f2
      Miklos Szeredi authored
      Fix atime update logic in overlayfs.
      
      This patch adds an i_op->update_time() handler to overlayfs inodes.  This
      forwards atime updates to the upper layer only.  No atime updates are done
      on lower layers.
      
      Remove implicit atime updates to underlying files and directories with
      O_NOATIME.  Remove explicit atime update in ovl_readlink().
      
      Clear atime related mnt flags from cloned upper mount.  This means atime
      updates are controlled purely by overlayfs mount options.
      
      Reported-by: Konstantin Khlebnikov <koct9i@gmail.com> 
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      d719e8f2
    • Miklos Szeredi's avatar
      ovl: fix sgid on directory · bb0d2b8a
      Miklos Szeredi authored
      When creating directory in workdir, the group/sgid inheritance from the
      parent dir was omitted completely.  Fix this by calling inode_init_owner()
      on overlay inode and using the resulting uid/gid/mode to create the file.
      
      Unfortunately the sgid bit can be stripped off due to umask, so need to
      reset the mode in this case in workdir before moving the directory in
      place.
      Reported-by: default avatarEryu Guan <eguan@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      bb0d2b8a
    • Miklos Szeredi's avatar
      ovl: simplify permission checking · 9c630ebe
      Miklos Szeredi authored
      The fact that we always do permission checking on the overlay inode and
      clear MAY_WRITE for checking access to the lower inode allows cruft to be
      removed from ovl_permission().
      
      1) "default_permissions" option effectively did generic_permission() on the
      overlay inode with i_mode, i_uid and i_gid updated from underlying
      filesystem.  This is what we do by default now.  It did the update using
      vfs_getattr() but that's only needed if the underlying filesystem can
      change (which is not allowed).  We may later introduce a "paranoia_mode"
      that verifies that mode/uid/gid are not changed.
      
      2) splitting out the IS_RDONLY() check from inode_permission() also becomes
      unnecessary once we remove the MAY_WRITE from the lower inode check.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      9c630ebe
    • Vivek Goyal's avatar
      ovl: do not require mounter to have MAY_WRITE on lower · 754f8cb7
      Vivek Goyal authored
      Now we have two levels of checks in ovl_permission(). overlay inode
      is checked with the creds of task while underlying inode is checked
      with the creds of mounter.
      
      Looks like mounter does not have to have WRITE access to files on lower/.
      So remove the MAY_WRITE from access mask for checks on underlying
      lower inode.
      
      This means task should still have the MAY_WRITE permission on lower
      inode and mounter is not required to have MAY_WRITE.
      
      It also solves the problem of read only NFS mounts being used as lower.
      If __inode_permission(lower_inode, MAY_WRITE) is called on read only
      NFS, it fails. By resetting MAY_WRITE, check succeeds and case of
      read only NFS shold work with overlay without having to specify any
      special mount options (default permission).
      Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      754f8cb7
    • Vivek Goyal's avatar
      ovl: do operations on underlying file system in mounter's context · 1175b6b8
      Vivek Goyal authored
      Given we are now doing checks both on overlay inode as well underlying
      inode, we should be able to do checks and operations on underlying file
      system using mounter's context.
      
      So modify all operations to do checks/operations on underlying dentry/inode
      in the context of mounter.
      Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      1175b6b8
    • Vivek Goyal's avatar
      ovl: modify ovl_permission() to do checks on two inodes · c0ca3d70
      Vivek Goyal authored
      Right now ovl_permission() calls __inode_permission(realinode), to do
      permission checks on real inode and no checks are done on overlay inode.
      
      Modify it to do checks both on overlay inode as well as underlying inode.
      Checks on overlay inode will be done with the creds of calling task while
      checks on underlying inode will be done with the creds of mounter.
      Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      c0ca3d70
    • Vivek Goyal's avatar
      ovl: define ->get_acl() for overlay inodes · 39a25b2b
      Vivek Goyal authored
      Now we are planning to do DAC permission checks on overlay inode
      itself. And to make it work, we will need to make sure we can get acls from
      underlying inode. So define ->get_acl() for overlay inodes and this in turn
      calls into underlying filesystem to get acls, if any.
      Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      39a25b2b
    • Vivek Goyal's avatar
      ovl: move some common code in a function · 72e48481
      Vivek Goyal authored
      ovl_create_upper() and ovl_create_over_whiteout() seem to be sharing some
      common code which can be moved into a separate function.  No functionality
      change.
      Signed-off-by: default avatarVivek Goyal <vgoyal@redhat.com>
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      72e48481
    • Andreas Gruenbacher's avatar
      ovl: store ovl_entry in inode->i_private for all inodes · 58ed4e70
      Andreas Gruenbacher authored
      Previously this was only done for directory inodes.  Doing so for all
      inodes makes for a nice cleanup in ovl_permission at zero cost.
      
      Inodes are not shared for hard links on the overlay, so this works fine.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      58ed4e70
    • Miklos Szeredi's avatar
      ovl: use generic_delete_inode · eead4f2d
      Miklos Szeredi authored
      No point in keeping overlay inodes around since they will never be reused.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      eead4f2d
    • Miklos Szeredi's avatar
      ovl: check mounter creds on underlying lookup · c1b2cc1a
      Miklos Szeredi authored
      The hash salting changes meant that we can no longer reuse the hash in the
      overlay dentry to look up the underlying dentry.
      
      Instead of lookup_hash(), use lookup_one_len_unlocked() and swith to
      mounter's creds (like we do for all other operations later in the series).
      
      Now the lookup_hash() export introduced in 4.6 by 3c9fe8cd ("vfs: add
      lookup_hash() helper") is unused and can possibly be removed; its
      usefulness negated by the hash salting and the idea that mounter's creds
      should be used on operations on underlying filesystems.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
      Fixes: 8387ff25 ("vfs: make the string hashes salt the hash")
      c1b2cc1a
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · c624c866
      Linus Torvalds authored
      Pull tracing updates from Steven Rostedt:
       "This is mostly clean ups and small fixes.  Some of the more visible
        changes are:
      
         - The function pid code uses the event pid filtering logic
         - [ku]probe events have access to current->comm
         - trace_printk now has sample code
         - PCI devices now trace physical addresses
         - stack tracing has less unnessary functions traced"
      
      * tag 'trace-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        printk, tracing: Avoiding unneeded blank lines
        tracing: Use __get_str() when manipulating strings
        tracing, RAS: Cleanup on __get_str() usage
        tracing: Use outer () on __get_str() definition
        ftrace: Reduce size of function graph entries
        tracing: Have HIST_TRIGGERS select TRACING
        tracing: Using for_each_set_bit() to simplify trace_pid_write()
        ftrace: Move toplevel init out of ftrace_init_tracefs()
        tracing/function_graph: Fix filters for function_graph threshold
        tracing: Skip more functions when doing stack tracing of events
        tracing: Expose CPU physical addresses (resource values) for PCI devices
        tracing: Show the preempt count of when the event was called
        tracing: Add trace_printk sample code
        tracing: Choose static tp_printk buffer by explicit nesting count
        tracing: expose current->comm to [ku]probe events
        ftrace: Have set_ftrace_pid use the bitmap like events do
        tracing: Move pid_list write processing into its own function
        tracing: Move the pid_list seq_file functions to be global
        tracing: Move filtered_pid helper functions into trace.c
        tracing: Make the pid filtering helper functions global
      c624c866
    • Linus Torvalds's avatar
      Merge tag 'vfio-v4.8-rc1' of git://github.com/awilliam/linux-vfio · e55884d2
      Linus Torvalds authored
      Pull VFIO updates from Alex Williamson:
       - Enable no-iommu mode for platform devices (Peng Fan)
       - Sub-page mmap for exclusive pages (Yongji Xie)
       - Use-after-free fix (Ilya Lesokhin)
       - Support for ACPI-based platform devices (Sinan Kaya)
      
      * tag 'vfio-v4.8-rc1' of git://github.com/awilliam/linux-vfio:
        vfio: platform: check reset call return code during release
        vfio: platform: check reset call return code during open
        vfio, platform: make reset driver a requirement by default
        vfio: platform: call _RST method when using ACPI
        vfio: platform: add extra debug info argument to call reset
        vfio: platform: add support for ACPI probe
        vfio: platform: determine reset capability
        vfio: platform: move reset call to a common function
        vfio: platform: rename reset function
        vfio: fix possible use after free of vfio group
        vfio-pci: Allow to mmap sub-page MMIO BARs if the mmio page is exclusive
        vfio: platform: support No-IOMMU mode
      e55884d2
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md · 867900b5
      Linus Torvalds authored
      Pull MD updates from Shaohua Li:
       - A bunch of patches from Neil Brown to fix RCU usage
       - Two performance improvement patches from Tomasz Majchrzak
       - Alexey Obitotskiy fixes module refcount issue
       - Arnd Bergmann fixes time granularity
       - Cong Wang fixes a list corruption issue
       - Guoqing Jiang fixes a deadlock in md-cluster
       - A null pointer deference fix from me
       - Song Liu fixes misuse of raid6 rmw
       - Other trival/cleanup fixes from Guoqing Jiang and Xiao Ni
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: (28 commits)
        MD: fix null pointer deference
        raid10: improve random reads performance
        md: add missing sysfs_notify on array_state update
        Fix kernel module refcount handling
        md: use seconds granularity for error logging
        md: reduce the number of synchronize_rcu() calls when multiple devices fail.
        md: be extra careful not to take a reference to a Faulty device.
        md/multipath: add rcu protection to rdev access in multipath_status.
        md/raid5: add rcu protection to rdev accesses in raid5_status.
        md/raid5: add rcu protection to rdev accesses in want_replace
        md/raid5: add rcu protection to rdev accesses in handle_failed_sync.
        md/raid1: add rcu protection to rdev in fix_read_error
        md/raid1: small code cleanup in end_sync_write
        md/raid1: small cleanup in raid1_end_read/write_request
        md/raid10: simplify print_conf a little.
        md/raid10: minor code improvement in fix_read_error()
        md/raid10: add rcu protection to rdev access during reshape.
        md/raid10: add rcu protection to rdev access in raid10_sync_request.
        md/raid10: add rcu protection in raid10_status.
        md/raid10: fix refounct imbalance when resyncing an array with a replacement device.
        ...
      867900b5
    • Linus Torvalds's avatar
      Merge tag 'libnvdimm-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · f0c98ebc
      Linus Torvalds authored
      Pull libnvdimm updates from Dan Williams:
      
       - Replace pcommit with ADR / directed-flushing.
      
         The pcommit instruction, which has not shipped on any product, is
         deprecated.  Instead, the requirement is that platforms implement
         either ADR, or provide one or more flush addresses per nvdimm.
      
         ADR (Asynchronous DRAM Refresh) flushes data in posted write buffers
         to the memory controller on a power-fail event.
      
         Flush addresses are defined in ACPI 6.x as an NVDIMM Firmware
         Interface Table (NFIT) sub-structure: "Flush Hint Address Structure".
         A flush hint is an mmio address that when written and fenced assures
         that all previous posted writes targeting a given dimm have been
         flushed to media.
      
       - On-demand ARS (address range scrub).
      
         Linux uses the results of the ACPI ARS commands to track bad blocks
         in pmem devices.  When latent errors are detected we re-scrub the
         media to refresh the bad block list, userspace can also request a
         re-scrub at any time.
      
       - Support for the Microsoft DSM (device specific method) command
         format.
      
       - Support for EDK2/OVMF virtual disk device memory ranges.
      
       - Various fixes and cleanups across the subsystem.
      
      * tag 'libnvdimm-for-4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (41 commits)
        libnvdimm-btt: Delete an unnecessary check before the function call "__nd_device_register"
        nfit: do an ARS scrub on hitting a latent media error
        nfit: move to nfit/ sub-directory
        nfit, libnvdimm: allow an ARS scrub to be triggered on demand
        libnvdimm: register nvdimm_bus devices with an nd_bus driver
        pmem: clarify a debug print in pmem_clear_poison
        x86/insn: remove pcommit
        Revert "KVM: x86: add pcommit support"
        nfit, tools/testing/nvdimm/: unify shutdown paths
        libnvdimm: move ->module to struct nvdimm_bus_descriptor
        nfit: cleanup acpi_nfit_init calling convention
        nfit: fix _FIT evaluation memory leak + use after free
        tools/testing/nvdimm: add manufacturing_{date|location} dimm properties
        tools/testing/nvdimm: add virtual ramdisk range
        acpi, nfit: treat virtual ramdisk SPA as pmem region
        pmem: kill __pmem address space
        pmem: kill wmb_pmem()
        libnvdimm, pmem: use nvdimm_flush() for namespace I/O writes
        fs/dax: remove wmb_pmem()
        libnvdimm, pmem: flush posted-write queues on shutdown
        ...
      f0c98ebc
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · d94ba9e7
      Linus Torvalds authored
      Pull pin control updates from Linus Walleij:
       "This is the bulk of pin control changes for the v4.8 kernel cycle.
      
        Nothing stands out as especially exiting: new drivers, new subdrivers,
        lots of cleanups and incremental features.
      
        Business as usual.
      
        New drivers:
      
         - New driver for Oxnas pin control and GPIO.  This ARM-based chipset
           is used in a few storage (NAS) type devices.
      
         - New driver for the MAX77620/MAX20024 pin controller portions.
      
         - New driver for the Intel Merrifield pin controller.
      
        New subdrivers:
      
         - New subdriver for the Qualcomm MDM9615
      
         - New subdriver for the STM32F746 MCU
      
         - New subdriver for the Broadcom NSP SoC.
      
        Cleanups:
      
         - Demodularization of bool compiled-in drivers.
      
        Apart from this there is just regular incremental improvements to a
        lot of drivers, especially Uniphier and PFC"
      
      * tag 'pinctrl-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (131 commits)
        pinctrl: fix pincontrol definition for marvell
        pinctrl: xway: fix typo
        Revert "pinctrl: amd: make it explicitly non-modular"
        pinctrl: iproc: Add NSP and Stingray GPIO support
        pinctrl: Update iProc GPIO DT bindings
        pinctrl: bcm: add OF dependencies
        pinctrl: ns2: remove redundant dev_err call in ns2_pinmux_probe()
        pinctrl: Add STM32F746 MCU support
        pinctrl: intel: Protect set wake flow by spin lock
        pinctrl: nsp: remove redundant dev_err call in nsp_pinmux_probe()
        pinctrl: uniphier: add Ethernet pin-mux settings
        sh-pfc: Use PTR_ERR_OR_ZERO() to simplify the code
        pinctrl: ns2: fix return value check in ns2_pinmux_probe()
        pinctrl: qcom: update DT bindings with ebi2 groups
        pinctrl: qcom: establish proper EBI2 pin groups
        pinctrl: imx21: Remove the MODULE_DEVICE_TABLE() macro
        Documentation: dt: Add new compatible to STM32 pinctrl driver bindings
        includes: dt-bindings: Add STM32F746 pinctrl DT bindings
        pinctrl: sunxi: fix nand0 function name for sun8i
        pinctrl: uniphier: remove pointless pin-mux settings for PH1-LD11
        ...
      d94ba9e7