1. 04 Mar, 2017 6 commits
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 0b94da8d
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
       "A fix and regression test case for nvdimm namespace label
        compatibility.
      
        Details:
      
         - An "nvdimm namespace label" is metadata on an nvdimm that
           provisions dimm capacity into a "namespace" that can host a block
           device / dax-filesytem, or a device-dax character device.
      
           A namespace is an object that other operating environment and
           platform firmware needs to comprehend for capabilities like booting
           from an nvdimm.
      
           The label metadata contains a checksum that Linux was not
           calculating correctly leading to other environments rejecting the
           Linux label.
      
         These have received a build success notification from the kbuild
         robot, and a positive test result from Nick who reported the problem"
      
      * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        nfit, libnvdimm: fix interleave set cookie calculation
        tools/testing/nvdimm: make iset cookie predictable
      0b94da8d
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · e27fd02d
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - fix NULL pointer dereferences in many DesignWare-based drivers due to
         refactoring error
      
       - fix Altera config write breakage due to my refactoring error
      
      * tag 'pci-v4.11-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: altera: Fix TLP_CFG_DW0 for TLP write
        PCI: dwc: Fix crashes seen due to missing assignments
      e27fd02d
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · f47e2db4
      Linus Torvalds authored
      Pull parisc fixes and cleanups from Helge Deller:
       "Nothing really important in this patchset: fix resource leaks in error
        paths, coding style cleanups and code removal"
      
      * 'parisc-4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Remove flush_user_dcache_range and flush_user_icache_range
        parisc: fix a printk
        parisc: ccio-dma: Handle return NULL error from ioremap_nocache
        parisc: Define access_ok() as macro
        parisc: eisa: Fix resource leaks in error paths
        parisc: eisa: Remove coding style errors
      f47e2db4
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20170303' of git://github.com/jcmvbkbc/linux-xtensa · 606ed721
      Linus Torvalds authored
      Pull Xtensa updates from Max Filippov:
      
       - clean up bootable image build targets: provide separate 'Image',
         'zImage' and 'uImage' make targets that only build corresponding
         image type. Make 'all' build all images appropriate for a platform
      
       - allow merging vectors code into .text section as a preparation step
         for XIP support
      
       - fix handling external FDT when the kernel is built without
         BLK_DEV_INITRD support
      
      * tag 'xtensa-20170303' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: allow merging vectors into .text section
        xtensa: clean up bootable image build targets
        xtensa: move parse_tag_fdt out of #ifdef CONFIG_BLK_DEV_INITRD
      606ed721
    • Linus Torvalds's avatar
      Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · a1a0db36
      Linus Torvalds authored
      Pull ARM SoC late DT updates from Arnd Bergmann:
       "These updates have been kept in a separate branch mostly because they
        rely on updates to the respective clk drivers to keep the shared
        header files in sync.
      
        This includes two branches for arm64 dt updates, both following up on
        earlier changes for the same platforms that are already merged:
      
        Samsung:
         - add USB3 support in Exynos7
         - minor PM related updates
      
        Amlogic:
         - new machines: WeTek Set-top-boxes
         - various devices added to DT
      
        There are also a couple of bugfixes that trickled in since the start
        of the merge window:
      
         - The moxart_defconfig was not building the intended platform
         - CPU-hotplug was broken on ux500
         - Coresight was broken on Juno (never worked)"
      
      * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (26 commits)
        ARM: deconfig: fix the moxart defconfig
        ARM: ux500: resume the second core properly
        arm64: dts: juno: update definition for programmable replicator
        arm64: dts: exynos: Add regulators for Vbus and Vbus-Boost
        arm64: dts: exynos: Add USB 3.0 controller node for Exynos7
        arm64: dts: exynos: Use macros for pinctrl configuration on Exynos7
        pinctrl: dt-bindings: samsung: Add Exynos7 specific pinctrl macro definitions
        arm64: dts: exynos: Add initial configuration for DISP clocks for TM2/TM2e
        ARM64: dts: meson-gxbb-p200: add ADC laddered keys
        ARM64: dts: meson: meson-gx: add the SAR ADC
        ARM64: dts: meson-gxl: add the pwm_ao_b pin
        ARM64: dts: meson-gx: add the missing pwm_AO_ab node
        clk: gxbb: fix CLKID_ETH defined twice
        ARM64: dts: meson-gxl: rename Nexbox A95x for consistency
        clk: gxbb: add the SAR ADC clocks and expose them
        dt-bindings: amlogic: Add WeTek boards
        ARM64: dts: meson-gxbb: Add support for WeTek Hub and Play
        dt-bindings: vendor-prefix: Add wetek vendor prefix
        ARM64: dts: meson-gxm: Rename q200 and q201 DT files for consistency
        ARM64: dts: meson-gx: Add HDMI HPD/DDC pinctrl nodes
        ...
      a1a0db36
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 0a040b21
      Linus Torvalds authored
      Pull SMB3 fixes from Steve French:
       "Some small bug fixes as well as SMB2.1/SMB3 enablement for DFS (global
        namespace) which previously was only enabled for CIFS"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        smb2: Enforce sec= mount option
        CIFS: Fix sparse warnings
        CIFS: implement get_dfs_refer for SMB2+
        CIFS: use DFS pathnames in SMB2+ Create requests
        CIFS: set signing flag in SMB2+ TreeConnect if needed
        CIFS: let ses->ipc_tid hold smb2 TreeIds
        CIFS: add use_ipc flag to SMB2_ioctl()
        CIFS: add build_path_from_dentry_optional_prefix()
        CIFS: move DFS response parsing out of SMB1 code
        CIFS: Fix possible use after free in demultiplex thread
      0a040b21
  2. 03 Mar, 2017 34 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse · 4e66c42c
      Linus Torvalds authored
      Pull fuse update from Miklos Szeredi:
       "A bugfix and cleanups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
        fuse: release: private_data cannot be NULL
        fuse: cleanup fuse_file refcounting
        fuse: add missing FR_FORCE
      4e66c42c
    • Linus Torvalds's avatar
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · e58bc927
      Linus Torvalds authored
      Pull overlayfs updates from Miklos Szeredi:
       "Because copy up can take a long time, serialized copy ups could be a
        big performance bottleneck. This update allows concurrent copy up of
        regular files eliminating this potential problem.
      
        There are also minor fixes"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: drop CAP_SYS_RESOURCE from saved mounter's credentials
        ovl: properly implement sync_filesystem()
        ovl: concurrent copy up of regular files
        ovl: introduce copy up waitqueue
        ovl: copy up regular file using O_TMPFILE
        ovl: rearrange code in ovl_copy_up_locked()
        ovl: check if upperdir fs supports O_TMPFILE
      e58bc927
    • Linus Torvalds's avatar
      Merge branch 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 590dce2d
      Linus Torvalds authored
      Pull vfs 'statx()' update from Al Viro.
      
      This adds the new extended stat() interface that internally subsumes our
      previous stat interfaces, and allows user mode to specify in more detail
      what kind of information it wants.
      
      It also allows for some explicit synchronization information to be
      passed to the filesystem, which can be relevant for network filesystems:
      is the cached value ok, or do you need open/close consistency, or what?
      
      From David Howells.
      
      Andreas Dilger points out that the first version of the extended statx
      interface was posted June 29, 2010:
      
          https://www.spinics.net/lists/linux-fsdevel/msg33831.html
      
      * 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        statx: Add a system call to make enhanced file info available
      590dce2d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · e0d07225
      Linus Torvalds authored
      Pull block layer fixes from Jens Axboe:
       "A collection of fixes for this merge window, either fixes for existing
        issues, or parts that were waiting for acks to come in. This pull
        request contains:
      
         - Allocation of nvme queues on the right node from Shaohua.
      
           This was ready long before the merge window, but waiting on an ack
           from Bjorn on the PCI bit. Now that we have that, the three patches
           can go in.
      
         - Two fixes for blk-mq-sched with nvmeof, which uses hctx specific
           request allocations. This caused an oops. One part from Sagi, one
           part from Omar.
      
         - A loop partition scan deadlock fix from Omar, fixing a regression
           in this merge window.
      
         - A three-patch series from Keith, closing up a hole on clearing out
           requests on shutdown/resume.
      
         - A stable fix for nbd from Josef, fixing a leak of sockets.
      
         - Two fixes for a regression in this window from Jan, fixing a
           problem with one of his earlier patches dealing with queue vs bdi
           life times.
      
         - A fix for a regression with virtio-blk, causing an IO stall if
           scheduling is used. From me.
      
         - A fix for an io context lock ordering problem. From me"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        block: Move bdi_unregister() to del_gendisk()
        blk-mq: ensure that bd->last is always set correctly
        block: don't call ioc_exit_icq() with the queue lock held for blk-mq
        block: Initialize bd_bdi on inode initialization
        loop: fix LO_FLAGS_PARTSCAN hang
        nvme: Complete all stuck requests
        blk-mq: Provide freeze queue timeout
        blk-mq: Export blk_mq_freeze_queue_wait
        nbd: stop leaking sockets
        blk-mq: move update of tags->rqs to __blk_mq_alloc_request()
        blk-mq: kill blk_mq_set_alloc_data()
        blk-mq: make blk_mq_alloc_request_hctx() allocate a scheduler request
        blk-mq-sched: Allocate sched reserved tags as specified in the original queue tagset
        nvme: allocate nvme_queue in correct node
        PCI: add an API to get node from vector
        blk-mq: allocate blk_mq_tags and requests in correct node
      e0d07225
    • Linus Torvalds's avatar
      Merge branch 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 1827adb1
      Linus Torvalds authored
      Pull sched.h split-up from Ingo Molnar:
       "The point of these changes is to significantly reduce the
        <linux/sched.h> header footprint, to speed up the kernel build and to
        have a cleaner header structure.
      
        After these changes the new <linux/sched.h>'s typical preprocessed
        size goes down from a previous ~0.68 MB (~22K lines) to ~0.45 MB (~15K
        lines), which is around 40% faster to build on typical configs.
      
        Not much changed from the last version (-v2) posted three weeks ago: I
        eliminated quirks, backmerged fixes plus I rebased it to an upstream
        SHA1 from yesterday that includes most changes queued up in -next plus
        all sched.h changes that were pending from Andrew.
      
        I've re-tested the series both on x86 and on cross-arch defconfigs,
        and did a bisectability test at a number of random points.
      
        I tried to test as many build configurations as possible, but some
        build breakage is probably still left - but it should be mostly
        limited to architectures that have no cross-compiler binaries
        available on kernel.org, and non-default configurations"
      
      * 'WIP.sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (146 commits)
        sched/headers: Clean up <linux/sched.h>
        sched/headers: Remove #ifdefs from <linux/sched.h>
        sched/headers: Remove the <linux/topology.h> include from <linux/sched.h>
        sched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h>
        sched/headers, x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h>
        sched/headers, timers: Remove the <linux/sysctl.h> include from <linux/timer.h>
        sched/headers: Remove <linux/magic.h> from <linux/sched/task_stack.h>
        sched/headers: Remove <linux/sched.h> from <linux/sched/init.h>
        sched/core: Remove unused prefetch_stack()
        sched/headers: Remove <linux/rculist.h> from <linux/sched.h>
        sched/headers: Remove the 'init_pid_ns' prototype from <linux/sched.h>
        sched/headers: Remove <linux/signal.h> from <linux/sched.h>
        sched/headers: Remove <linux/rwsem.h> from <linux/sched.h>
        sched/headers: Remove the runqueue_is_locked() prototype
        sched/headers: Remove <linux/sched.h> from <linux/sched/hotplug.h>
        sched/headers: Remove <linux/sched.h> from <linux/sched/debug.h>
        sched/headers: Remove <linux/sched.h> from <linux/sched/nohz.h>
        sched/headers: Remove <linux/sched.h> from <linux/sched/stat.h>
        sched/headers: Remove the <linux/gfp.h> include from <linux/sched.h>
        sched/headers: Remove <linux/rtmutex.h> from <linux/sched.h>
        ...
      1827adb1
    • Linus Torvalds's avatar
      Merge tag 'linux-kselftest-4.11-rc1-urgent_fix' of... · 78769912
      Linus Torvalds authored
      Merge tag 'linux-kselftest-4.11-rc1-urgent_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
      
      Pull kselftest fix from Shuah Khan:
       "This update consists of an urgent fix for individual test build
        failures introduced in the 4.11-rc1 update"
      
      * tag 'linux-kselftest-4.11-rc1-urgent_fix' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
        selftests: lib.mk Fix individual test builds
      78769912
    • Sachin Prabhu's avatar
      smb2: Enforce sec= mount option · ef65aaed
      Sachin Prabhu authored
      If the security type specified using a mount option is not supported,
      the SMB2 session setup code changes the security type to RawNTLMSSP. We
      should instead fail the mount and return an error.
      
      The patch changes the code for SMB2 to make it similar to the code used
      for SMB1. Like in SMB1, we now use the global security flags to select
      the security method to be used when no security method is specified and
      to return an error when the requested auth method is not available.
      
      For SMB2, we also use ntlmv2 as a synonym for nltmssp.
      Signed-off-by: default avatarSachin Prabhu <sprabhu@redhat.com>
      Acked-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
      Acked-by: default avatarJeff Layton <jlayton@redhat.com>
      Signed-off-by: default avatarSteve French <smfrench@gmail.com>
      ef65aaed
    • Steve French's avatar
      CIFS: Fix sparse warnings · 284316dd
      Steve French authored
      Fix two minor sparse compile check warnings
      Signed-off-by: default avatarSteve French <steve.french@primarydata.com>
      Acked-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
      Reviewed-by: default avatarAurelien Aptel <aaptel@suse.com>
      284316dd
    • David Howells's avatar
      statx: Add a system call to make enhanced file info available · a528d35e
      David Howells authored
      Add a system call to make extended file information available, including
      file creation and some attribute flags where available through the
      underlying filesystem.
      
      The getattr inode operation is altered to take two additional arguments: a
      u32 request_mask and an unsigned int flags that indicate the
      synchronisation mode.  This change is propagated to the vfs_getattr*()
      function.
      
      Functions like vfs_stat() are now inline wrappers around new functions
      vfs_statx() and vfs_statx_fd() to reduce stack usage.
      
      ========
      OVERVIEW
      ========
      
      The idea was initially proposed as a set of xattrs that could be retrieved
      with getxattr(), but the general preference proved to be for a new syscall
      with an extended stat structure.
      
      A number of requests were gathered for features to be included.  The
      following have been included:
      
       (1) Make the fields a consistent size on all arches and make them large.
      
       (2) Spare space, request flags and information flags are provided for
           future expansion.
      
       (3) Better support for the y2038 problem [Arnd Bergmann] (tv_sec is an
           __s64).
      
       (4) Creation time: The SMB protocol carries the creation time, which could
           be exported by Samba, which will in turn help CIFS make use of
           FS-Cache as that can be used for coherency data (stx_btime).
      
           This is also specified in NFSv4 as a recommended attribute and could
           be exported by NFSD [Steve French].
      
       (5) Lightweight stat: Ask for just those details of interest, and allow a
           netfs (such as NFS) to approximate anything not of interest, possibly
           without going to the server [Trond Myklebust, Ulrich Drepper, Andreas
           Dilger] (AT_STATX_DONT_SYNC).
      
       (6) Heavyweight stat: Force a netfs to go to the server, even if it thinks
           its cached attributes are up to date [Trond Myklebust]
           (AT_STATX_FORCE_SYNC).
      
      And the following have been left out for future extension:
      
       (7) Data version number: Could be used by userspace NFS servers [Aneesh
           Kumar].
      
           Can also be used to modify fill_post_wcc() in NFSD which retrieves
           i_version directly, but has just called vfs_getattr().  It could get
           it from the kstat struct if it used vfs_xgetattr() instead.
      
           (There's disagreement on the exact semantics of a single field, since
           not all filesystems do this the same way).
      
       (8) BSD stat compatibility: Including more fields from the BSD stat such
           as creation time (st_btime) and inode generation number (st_gen)
           [Jeremy Allison, Bernd Schubert].
      
       (9) Inode generation number: Useful for FUSE and userspace NFS servers
           [Bernd Schubert].
      
           (This was asked for but later deemed unnecessary with the
           open-by-handle capability available and caused disagreement as to
           whether it's a security hole or not).
      
      (10) Extra coherency data may be useful in making backups [Andreas Dilger].
      
           (No particular data were offered, but things like last backup
           timestamp, the data version number and the DOS archive bit would come
           into this category).
      
      (11) Allow the filesystem to indicate what it can/cannot provide: A
           filesystem can now say it doesn't support a standard stat feature if
           that isn't available, so if, for instance, inode numbers or UIDs don't
           exist or are fabricated locally...
      
           (This requires a separate system call - I have an fsinfo() call idea
           for this).
      
      (12) Store a 16-byte volume ID in the superblock that can be returned in
           struct xstat [Steve French].
      
           (Deferred to fsinfo).
      
      (13) Include granularity fields in the time data to indicate the
           granularity of each of the times (NFSv4 time_delta) [Steve French].
      
           (Deferred to fsinfo).
      
      (14) FS_IOC_GETFLAGS value.  These could be translated to BSD's st_flags.
           Note that the Linux IOC flags are a mess and filesystems such as Ext4
           define flags that aren't in linux/fs.h, so translation in the kernel
           may be a necessity (or, possibly, we provide the filesystem type too).
      
           (Some attributes are made available in stx_attributes, but the general
           feeling was that the IOC flags were to ext[234]-specific and shouldn't
           be exposed through statx this way).
      
      (15) Mask of features available on file (eg: ACLs, seclabel) [Brad Boyer,
           Michael Kerrisk].
      
           (Deferred, probably to fsinfo.  Finding out if there's an ACL or
           seclabal might require extra filesystem operations).
      
      (16) Femtosecond-resolution timestamps [Dave Chinner].
      
           (A __reserved field has been left in the statx_timestamp struct for
           this - if there proves to be a need).
      
      (17) A set multiple attributes syscall to go with this.
      
      ===============
      NEW SYSTEM CALL
      ===============
      
      The new system call is:
      
      	int ret = statx(int dfd,
      			const char *filename,
      			unsigned int flags,
      			unsigned int mask,
      			struct statx *buffer);
      
      The dfd, filename and flags parameters indicate the file to query, in a
      similar way to fstatat().  There is no equivalent of lstat() as that can be
      emulated with statx() by passing AT_SYMLINK_NOFOLLOW in flags.  There is
      also no equivalent of fstat() as that can be emulated by passing a NULL
      filename to statx() with the fd of interest in dfd.
      
      Whether or not statx() synchronises the attributes with the backing store
      can be controlled by OR'ing a value into the flags argument (this typically
      only affects network filesystems):
      
       (1) AT_STATX_SYNC_AS_STAT tells statx() to behave as stat() does in this
           respect.
      
       (2) AT_STATX_FORCE_SYNC will require a network filesystem to synchronise
           its attributes with the server - which might require data writeback to
           occur to get the timestamps correct.
      
       (3) AT_STATX_DONT_SYNC will suppress synchronisation with the server in a
           network filesystem.  The resulting values should be considered
           approximate.
      
      mask is a bitmask indicating the fields in struct statx that are of
      interest to the caller.  The user should set this to STATX_BASIC_STATS to
      get the basic set returned by stat().  It should be noted that asking for
      more information may entail extra I/O operations.
      
      buffer points to the destination for the data.  This must be 256 bytes in
      size.
      
      ======================
      MAIN ATTRIBUTES RECORD
      ======================
      
      The following structures are defined in which to return the main attribute
      set:
      
      	struct statx_timestamp {
      		__s64	tv_sec;
      		__s32	tv_nsec;
      		__s32	__reserved;
      	};
      
      	struct statx {
      		__u32	stx_mask;
      		__u32	stx_blksize;
      		__u64	stx_attributes;
      		__u32	stx_nlink;
      		__u32	stx_uid;
      		__u32	stx_gid;
      		__u16	stx_mode;
      		__u16	__spare0[1];
      		__u64	stx_ino;
      		__u64	stx_size;
      		__u64	stx_blocks;
      		__u64	__spare1[1];
      		struct statx_timestamp	stx_atime;
      		struct statx_timestamp	stx_btime;
      		struct statx_timestamp	stx_ctime;
      		struct statx_timestamp	stx_mtime;
      		__u32	stx_rdev_major;
      		__u32	stx_rdev_minor;
      		__u32	stx_dev_major;
      		__u32	stx_dev_minor;
      		__u64	__spare2[14];
      	};
      
      The defined bits in request_mask and stx_mask are:
      
      	STATX_TYPE		Want/got stx_mode & S_IFMT
      	STATX_MODE		Want/got stx_mode & ~S_IFMT
      	STATX_NLINK		Want/got stx_nlink
      	STATX_UID		Want/got stx_uid
      	STATX_GID		Want/got stx_gid
      	STATX_ATIME		Want/got stx_atime{,_ns}
      	STATX_MTIME		Want/got stx_mtime{,_ns}
      	STATX_CTIME		Want/got stx_ctime{,_ns}
      	STATX_INO		Want/got stx_ino
      	STATX_SIZE		Want/got stx_size
      	STATX_BLOCKS		Want/got stx_blocks
      	STATX_BASIC_STATS	[The stuff in the normal stat struct]
      	STATX_BTIME		Want/got stx_btime{,_ns}
      	STATX_ALL		[All currently available stuff]
      
      stx_btime is the file creation time, stx_mask is a bitmask indicating the
      data provided and __spares*[] are where as-yet undefined fields can be
      placed.
      
      Time fields are structures with separate seconds and nanoseconds fields
      plus a reserved field in case we want to add even finer resolution.  Note
      that times will be negative if before 1970; in such a case, the nanosecond
      fields will also be negative if not zero.
      
      The bits defined in the stx_attributes field convey information about a
      file, how it is accessed, where it is and what it does.  The following
      attributes map to FS_*_FL flags and are the same numerical value:
      
      	STATX_ATTR_COMPRESSED		File is compressed by the fs
      	STATX_ATTR_IMMUTABLE		File is marked immutable
      	STATX_ATTR_APPEND		File is append-only
      	STATX_ATTR_NODUMP		File is not to be dumped
      	STATX_ATTR_ENCRYPTED		File requires key to decrypt in fs
      
      Within the kernel, the supported flags are listed by:
      
      	KSTAT_ATTR_FS_IOC_FLAGS
      
      [Are any other IOC flags of sufficient general interest to be exposed
      through this interface?]
      
      New flags include:
      
      	STATX_ATTR_AUTOMOUNT		Object is an automount trigger
      
      These are for the use of GUI tools that might want to mark files specially,
      depending on what they are.
      
      Fields in struct statx come in a number of classes:
      
       (0) stx_dev_*, stx_blksize.
      
           These are local system information and are always available.
      
       (1) stx_mode, stx_nlinks, stx_uid, stx_gid, stx_[amc]time, stx_ino,
           stx_size, stx_blocks.
      
           These will be returned whether the caller asks for them or not.  The
           corresponding bits in stx_mask will be set to indicate whether they
           actually have valid values.
      
           If the caller didn't ask for them, then they may be approximated.  For
           example, NFS won't waste any time updating them from the server,
           unless as a byproduct of updating something requested.
      
           If the values don't actually exist for the underlying object (such as
           UID or GID on a DOS file), then the bit won't be set in the stx_mask,
           even if the caller asked for the value.  In such a case, the returned
           value will be a fabrication.
      
           Note that there are instances where the type might not be valid, for
           instance Windows reparse points.
      
       (2) stx_rdev_*.
      
           This will be set only if stx_mode indicates we're looking at a
           blockdev or a chardev, otherwise will be 0.
      
       (3) stx_btime.
      
           Similar to (1), except this will be set to 0 if it doesn't exist.
      
      =======
      TESTING
      =======
      
      The following test program can be used to test the statx system call:
      
      	samples/statx/test-statx.c
      
      Just compile and run, passing it paths to the files you want to examine.
      The file is built automatically if CONFIG_SAMPLES is enabled.
      
      Here's some example output.  Firstly, an NFS directory that crosses to
      another FSID.  Note that the AUTOMOUNT attribute is set because transiting
      this directory will cause d_automount to be invoked by the VFS.
      
      	[root@andromeda ~]# /tmp/test-statx -A /warthog/data
      	statx(/warthog/data) = 0
      	results=7ff
      	  Size: 4096            Blocks: 8          IO Block: 1048576  directory
      	Device: 00:26           Inode: 1703937     Links: 125
      	Access: (3777/drwxrwxrwx)  Uid:     0   Gid:  4041
      	Access: 2016-11-24 09:02:12.219699527+0000
      	Modify: 2016-11-17 10:44:36.225653653+0000
      	Change: 2016-11-17 10:44:36.225653653+0000
      	Attributes: 0000000000001000 (-------- -------- -------- -------- -------- -------- ---m---- --------)
      
      Secondly, the result of automounting on that directory.
      
      	[root@andromeda ~]# /tmp/test-statx /warthog/data
      	statx(/warthog/data) = 0
      	results=7ff
      	  Size: 4096            Blocks: 8          IO Block: 1048576  directory
      	Device: 00:27           Inode: 2           Links: 125
      	Access: (3777/drwxrwxrwx)  Uid:     0   Gid:  4041
      	Access: 2016-11-24 09:02:12.219699527+0000
      	Modify: 2016-11-17 10:44:36.225653653+0000
      	Change: 2016-11-17 10:44:36.225653653+0000
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      a528d35e
    • Linus Torvalds's avatar
      Merge tag 'pm-turbostat-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · c82be9d2
      Linus Torvalds authored
      Pull turbostat utility updates from Rafael Wysocki:
       "Power management turbostat utility updates.
      
        These update turbostat significantly and in particular:
      
         - default output is now verbose, --debug is no longer required to get
           all counters. As a result, some options have been added to specify
           exactly what output is wanted.
      
         - added --quiet to skip system configuration output
      
         - added --list, --show and --hide parameters
      
         - added --cpu parameter
      
         - enhanced Baytrail SoC support
      
         - added Gemini Lake SoC support
      
         - added sysfs C-state columns
      
        Also the symbol definitions in arch/x86/include/asm/intel-family.h and
        arch/x86/include/asm/msr-index.h are updated and the intel_idle and
        intel_pstate drivers are modified to use the updated symbols.
      
        Credits to Len Brown for all of these changes"
      
      * tag 'pm-turbostat-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (44 commits)
        tools/power turbostat: version 17.02.24
        tools/power turbostat: bugfix: --add u32 was printed as u64
        tools/power turbostat: show error on exec
        tools/power turbostat: dump p-state software config
        tools/power turbostat: show package number, even without --debug
        tools/power turbostat: support "--hide C1" etc.
        tools/power turbostat: move --Package and --processor into the --cpu option
        tools/power turbostat: turbostat.8 update
        tools/power turbostat: update --list feature
        tools/power turbostat: use wide columns to display large numbers
        tools/power turbostat: Add --list option to show available header names
        tools/power turbostat: fix zero IRQ count shown in one-shot command mode
        tools/power turbostat: add --cpu parameter
        tools/power turbostat: print sysfs C-state stats
        tools/power turbostat: extend --add option to accept /sys path
        tools/power turbostat: skip unused counters on BDX
        tools/power turbostat: fix decoding for GLM, DNV, SKX turbo-ratio limits
        tools/power turbostat: skip unused counters on SKX
        tools/power turbostat: Denverton: use HW CC1 counter, skip C3, C7
        tools/power turbostat: initial Gemini Lake SOC support
        ...
      c82be9d2
    • Linus Torvalds's avatar
      Merge tag 'acpi-extra-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 3f80dd67
      Linus Torvalds authored
      Pull ACPI fix from Rafael Wysocki:
       "This fixes an apparent, but actually artificial, resource conflict
        between the ACPI NVS memory region and the ACPI BERT (Boot Error
        Record Table) address range (Huang Ying)"
      
      * tag 'acpi-extra-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: APEI: Fix BERT resources conflict with ACPI NVS area
      3f80dd67
    • Linus Torvalds's avatar
      Merge tag 'pm-extra-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 080e4168
      Linus Torvalds authored
      Pull more power management updates deom Rafael Wysocki:
       "These fix two bugs introduced by recent power management updates (in
        the cpuidle menu governor and intel_pstate) and a few other issues,
        clean up things and remove unused code.
      
        Specifics:
      
         - Fix for a cpuidle menu governor problem that started to take an
           unnecessary spinlock after one of the recent updates and that did
           not play well with the RT patch (Rafael Wysocki).
      
         - Fix for the new intel_pstate operation mode switching feature added
           recently that did not reinitialize P-state limits properly when
           switching operation modes (Rafael Wysocki).
      
         - Removal of unused global notifiers from the PM QoS framework
           (Viresh Kumar).
      
         - Generic power domains framework update to make it handle
           asynchronous invocations of PM callbacks in the "noirq" phases of
           system suspend/hibernation correctly (Ulf Hansson).
      
         - Two hibernation core cleanups (Rafael Wysocki).
      
         - intel_idle cleanup related to the sysfs interface (Len Brown).
      
         - Off-by-one bug fix in the OPP (Operating Performance Points)
           framework (Andrzej Hajda).
      
         - OPP framework's documentation fix (Viresh Kumar).
      
         - cpufreq qoriq driver cleanup (Tang Yuantian).
      
         - Fixes for typos in comments in the device runtime PM framework
           (Christophe Jaillet)"
      
      * tag 'pm-extra-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        PM / OPP: Documentation: Fix opp-microvolt in examples
        intel_idle: stop exposing platform acronyms in sysfs
        cpufreq: intel_pstate: Fix limits issue with operation mode switching
        PM / hibernate: Define pr_fmt() and use pr_*() instead of printk()
        PM / hibernate: Untangle power_down()
        cpuidle: menu: Avoid taking spinlock for accessing QoS values
        PM / QoS: Remove global notifiers
        PM / runtime: Fix some typos
        cpufreq: qoriq: clean up unused code
        PM / OPP: fix off-by-one bug in dev_pm_opp_get_max_volt_latency loop
        PM / Domains: Power off masters immediately in the power off sequence
        PM / Domains: Rename is_async to one_dev_on for genpd_power_off()
        PM / Domains: Move genpd_power_off() above genpd_power_on()
      080e4168
    • Ingo Molnar's avatar
      sched/headers: Clean up <linux/sched.h> · 5eca1c10
      Ingo Molnar authored
      Now that <linux/sched.h> dependencies have been sorted out,
      do various trivial cleanups:
      
       - remove unnecessary structure predeclarations
       - fix various typos
       - update comments where necessary
       - remove pointless comments
       - use consistent types
       - tabulate consistently
       - use a consistent comment style
       - clean up the header section a bit
       - use a consistent style of a single field per line
       - remove line-breaks where they make the code look worse
       - etc ...
      
      No change in functionality.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      5eca1c10
    • Ingo Molnar's avatar
      sched/headers: Remove #ifdefs from <linux/sched.h> · 7f5f8e8d
      Ingo Molnar authored
      We can remove two pairs of #ifdefs by defining structures in a smarter way.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      7f5f8e8d
    • Ingo Molnar's avatar
      sched/headers: Remove the <linux/topology.h> include from <linux/sched.h> · ee6a3d19
      Ingo Molnar authored
      It's used only by a single (rarely used) inline function (task_node(p)),
      which we can move to <linux/sched/topology.h>.
      
      ( Add <linux/nodemask.h>, because we rely on that. )
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      ee6a3d19
    • Ingo Molnar's avatar
      sched/headers, hrtimer: Remove the <linux/wait.h> include from <linux/hrtimer.h> · 283cb903
      Ingo Molnar authored
      In our quest to simplify <linux/sched.h>'s header dependencies, remove
      the <linux/wait.h> inclusion from <linux/hrtimer.h> - which does
      not appear to be necessary, as hrtimer.h does not use waitqueues.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      283cb903
    • Ingo Molnar's avatar
      sched/headers, x86/apic: Remove the <linux/pm.h> header inclusion from <asm/apic.h> · 1a79a72c
      Ingo Molnar authored
      We want to simplify <linux/sched.h>'s header dependencies, but one
      roadblock to that is <asm/apic.h>'s inclusion of pm.h,
      which brings in other, problematic headers.
      
      Remove it, as it appears to be entirely spurious, apic.h does not
      actually make use of any PM facilities.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1a79a72c
    • Ingo Molnar's avatar
      sched/headers, timers: Remove the <linux/sysctl.h> include from <linux/timer.h> · b2d5bfea
      Ingo Molnar authored
      So we want to simplify <linux/sched.h>'s header dependencies, but one
      roadblock of that is <linux/timer.h>'s inclusion of sysctl.h,
      which brings in other, problematic headers.
      
      Note that timer.h's inclusion of sysctl.h can be avoided if we
      pre-declare ctl_table - so do that.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b2d5bfea
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/magic.h> from <linux/sched/task_stack.h> · 50ff9d13
      Ingo Molnar authored
      It's not used by any of the scheduler methods, but <linux/sched/task_stack.h>
      needs it to pick up STACK_END_MAGIC.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      50ff9d13
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/sched.h> from <linux/sched/init.h> · 5c0d0f36
      Ingo Molnar authored
      The <linux/sched/init.h> file is a self-contained header and users of
      it either don't need <linux/sched.h> - or have already included it.
      
      This reduces the size of the header dependency graph.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      5c0d0f36
    • Ingo Molnar's avatar
      sched/core: Remove unused prefetch_stack() · 2c873d55
      Ingo Molnar authored
      prefetch_stack() is defined by IA64, but not actually used anywhere anymore.
      
      Remove it.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      2c873d55
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/rculist.h> from <linux/sched.h> · b68070e1
      Ingo Molnar authored
      We don't actually need the full rculist.h header anymore, include
      the smaller rcupdate.h header instead.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b68070e1
    • Ingo Molnar's avatar
      sched/headers: Remove the 'init_pid_ns' prototype from <linux/sched.h> · 1d1954e0
      Ingo Molnar authored
      pid.h already defines it.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1d1954e0
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/signal.h> from <linux/sched.h> · 192c9414
      Ingo Molnar authored
      Instead of including the full <linux/signal.h>, only include the types-only
      <linux/signal_types.h> header in <linux/sched.h>, to further decouple the
      scheduler header from the signal headers.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      192c9414
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/rwsem.h> from <linux/sched.h> · cd9c513b
      Ingo Molnar authored
      This is a stray header that is not needed by anything in sched.h,
      so remove it.
      
      Update files that relied on the stray inclusion.
      
      This reduces the size of the header dependency graph.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      cd9c513b
    • Ingo Molnar's avatar
      sched/headers: Remove the runqueue_is_locked() prototype · fae3c30c
      Ingo Molnar authored
      Remove the runqueue_is_locked() prototype, the function does not exist anymore.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      fae3c30c
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/sched.h> from <linux/sched/hotplug.h> · a906086e
      Ingo Molnar authored
      The <linux/sched/hotplug.h> file is a self-contained header and users of
      it either don't need <linux/sched.h> - or have already included it.
      
      This reduces the size of the header dependency graph.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      a906086e
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/sched.h> from <linux/sched/debug.h> · 4f079e98
      Ingo Molnar authored
      The <linux/sched/debug.h> file is a self-contained header and users of
      it either don't need <linux/sched.h> - or have already included it.
      
      This reduces the size of the header dependency graph.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      4f079e98
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/sched.h> from <linux/sched/nohz.h> · b0145d9b
      Ingo Molnar authored
      The <linux/sched/nohz.h> file is a self-contained header and users of
      it either don't need <linux/sched.h> - or have already included it.
      
      This reduces the size of the header dependency graph.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      b0145d9b
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/sched.h> from <linux/sched/stat.h> · dc199539
      Ingo Molnar authored
      The <linux/sched/stat.h> file is a largely self-contained header and users of
      it either don't need <linux/sched.h> - or have already included it.
      
      ( Keep the <linux/percpu.h> dependency.)
      
      This reduces the size of the header dependency graph.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      dc199539
    • Ingo Molnar's avatar
      sched/headers: Remove the <linux/gfp.h> include from <linux/sched.h> · f0a0eb69
      Ingo Molnar authored
      This reduces sched.h header dependencies.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f0a0eb69
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/rtmutex.h> from <linux/sched.h> · 9c6da181
      Ingo Molnar authored
      This reduces header dependencies.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9c6da181
    • Ingo Molnar's avatar
      sched/headers: Remove <asm/ptrace.h> from <linux/sched.h> · f780d89a
      Ingo Molnar authored
      This reduces header dependencies.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      f780d89a
    • Ingo Molnar's avatar
      sched/headers: Remove <linux/cred.h> inclusion from <linux/sched.h> · e26512fe
      Ingo Molnar authored
      This reduces header dependencies and speeds up the build.
      Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e26512fe