1. 20 Mar, 2019 7 commits
    • David Howells's avatar
      vfs: syscall: Add fsconfig() for configuring and managing a context · ecdab150
      David Howells authored
      Add a syscall for configuring a filesystem creation context and triggering
      actions upon it, to be used in conjunction with fsopen, fspick and fsmount.
      
          long fsconfig(int fs_fd, unsigned int cmd, const char *key,
      		  const void *value, int aux);
      
      Where fs_fd indicates the context, cmd indicates the action to take, key
      indicates the parameter name for parameter-setting actions and, if needed,
      value points to a buffer containing the value and aux can give more
      information for the value.
      
      The following command IDs are proposed:
      
       (*) FSCONFIG_SET_FLAG: No value is specified.  The parameter must be
           boolean in nature.  The key may be prefixed with "no" to invert the
           setting. value must be NULL and aux must be 0.
      
       (*) FSCONFIG_SET_STRING: A string value is specified.  The parameter can
           be expecting boolean, integer, string or take a path.  A conversion to
           an appropriate type will be attempted (which may include looking up as
           a path).  value points to a NUL-terminated string and aux must be 0.
      
       (*) FSCONFIG_SET_BINARY: A binary blob is specified.  value points to
           the blob and aux indicates its size.  The parameter must be expecting
           a blob.
      
       (*) FSCONFIG_SET_PATH: A non-empty path is specified.  The parameter must
           be expecting a path object.  value points to a NUL-terminated string
           that is the path and aux is a file descriptor at which to start a
           relative lookup or AT_FDCWD.
      
       (*) FSCONFIG_SET_PATH_EMPTY: As fsconfig_set_path, but with AT_EMPTY_PATH
           implied.
      
       (*) FSCONFIG_SET_FD: An open file descriptor is specified.  value must
           be NULL and aux indicates the file descriptor.
      
       (*) FSCONFIG_CMD_CREATE: Trigger superblock creation.
      
       (*) FSCONFIG_CMD_RECONFIGURE: Trigger superblock reconfiguration.
      
      For the "set" command IDs, the idea is that the file_system_type will point
      to a list of parameters and the types of value that those parameters expect
      to take.  The core code can then do the parse and argument conversion and
      then give the LSM and FS a cooked option or array of options to use.
      
      Source specification is also done the same way same way, using special keys
      "source", "source1", "source2", etc..
      
      [!] Note that, for the moment, the key and value are just glued back
      together and handed to the filesystem.  Every filesystem that uses options
      uses match_token() and co. to do this, and this will need to be changed -
      but not all at once.
      
      Example usage:
      
          fd = fsopen("ext4", FSOPEN_CLOEXEC);
          fsconfig(fd, fsconfig_set_path, "source", "/dev/sda1", AT_FDCWD);
          fsconfig(fd, fsconfig_set_path_empty, "journal_path", "", journal_fd);
          fsconfig(fd, fsconfig_set_fd, "journal_fd", "", journal_fd);
          fsconfig(fd, fsconfig_set_flag, "user_xattr", NULL, 0);
          fsconfig(fd, fsconfig_set_flag, "noacl", NULL, 0);
          fsconfig(fd, fsconfig_set_string, "sb", "1", 0);
          fsconfig(fd, fsconfig_set_string, "errors", "continue", 0);
          fsconfig(fd, fsconfig_set_string, "data", "journal", 0);
          fsconfig(fd, fsconfig_set_string, "context", "unconfined_u:...", 0);
          fsconfig(fd, fsconfig_cmd_create, NULL, NULL, 0);
          mfd = fsmount(fd, FSMOUNT_CLOEXEC, MS_NOEXEC);
      
      or:
      
          fd = fsopen("ext4", FSOPEN_CLOEXEC);
          fsconfig(fd, fsconfig_set_string, "source", "/dev/sda1", 0);
          fsconfig(fd, fsconfig_cmd_create, NULL, NULL, 0);
          mfd = fsmount(fd, FSMOUNT_CLOEXEC, MS_NOEXEC);
      
      or:
      
          fd = fsopen("afs", FSOPEN_CLOEXEC);
          fsconfig(fd, fsconfig_set_string, "source", "#grand.central.org:root.cell", 0);
          fsconfig(fd, fsconfig_cmd_create, NULL, NULL, 0);
          mfd = fsmount(fd, FSMOUNT_CLOEXEC, MS_NOEXEC);
      
      or:
      
          fd = fsopen("jffs2", FSOPEN_CLOEXEC);
          fsconfig(fd, fsconfig_set_string, "source", "mtd0", 0);
          fsconfig(fd, fsconfig_cmd_create, NULL, NULL, 0);
          mfd = fsmount(fd, FSMOUNT_CLOEXEC, MS_NOEXEC);
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: linux-api@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ecdab150
    • David Howells's avatar
      vfs: Implement logging through fs_context · 007ec26c
      David Howells authored
      Implement the ability for filesystems to log error, warning and
      informational messages through the fs_context.  These can be extracted by
      userspace by reading from an fd created by fsopen().
      
      Error messages are prefixed with "e ", warnings with "w " and informational
      messages with "i ".
      
      Inside the kernel, formatted messages are malloc'd but unformatted messages
      are not copied if they're either in the core .rodata section or in the
      .rodata section of the filesystem module pinned by fs_context::fs_type.
      The messages are only good till the fs_type is released.
      
      Note that the logging object is shared between duplicated fs_context
      structures.  This is so that such as NFS which do a mount within a mount
      can get at least some of the errors from the inner mount.
      
      Five logging functions are provided for this:
      
       (1) void logfc(struct fs_context *fc, const char *fmt, ...);
      
           This logs a message into the context.  If the buffer is full, the
           earliest message is discarded.
      
       (2) void errorf(fc, fmt, ...);
      
           This wraps logfc() to log an error.
      
       (3) void invalf(fc, fmt, ...);
      
           This wraps errorf() and returns -EINVAL for convenience.
      
       (4) void warnf(fc, fmt, ...);
      
           This wraps logfc() to log a warning.
      
       (5) void infof(fc, fmt, ...);
      
           This wraps logfc() to log an informational message.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      007ec26c
    • David Howells's avatar
      vfs: syscall: Add fsopen() to prepare for superblock creation · 24dcb3d9
      David Howells authored
      Provide an fsopen() system call that starts the process of preparing to
      create a superblock that will then be mountable, using an fd as a context
      handle.  fsopen() is given the name of the filesystem that will be used:
      
      	int mfd = fsopen(const char *fsname, unsigned int flags);
      
      where flags can be 0 or FSOPEN_CLOEXEC.
      
      For example:
      
      	sfd = fsopen("ext4", FSOPEN_CLOEXEC);
      	fsconfig(sfd, FSCONFIG_SET_PATH, "source", "/dev/sda1", AT_FDCWD);
      	fsconfig(sfd, FSCONFIG_SET_FLAG, "noatime", NULL, 0);
      	fsconfig(sfd, FSCONFIG_SET_FLAG, "acl", NULL, 0);
      	fsconfig(sfd, FSCONFIG_SET_FLAG, "user_xattr", NULL, 0);
      	fsconfig(sfd, FSCONFIG_SET_STRING, "sb", "1", 0);
      	fsconfig(sfd, FSCONFIG_CMD_CREATE, NULL, NULL, 0);
      	fsinfo(sfd, NULL, ...); // query new superblock attributes
      	mfd = fsmount(sfd, FSMOUNT_CLOEXEC, MS_RELATIME);
      	move_mount(mfd, "", sfd, AT_FDCWD, "/mnt", MOVE_MOUNT_F_EMPTY_PATH);
      
      	sfd = fsopen("afs", -1);
      	fsconfig(fd, FSCONFIG_SET_STRING, "source",
      		 "#grand.central.org:root.cell", 0);
      	fsconfig(fd, FSCONFIG_CMD_CREATE, NULL, NULL, 0);
      	mfd = fsmount(sfd, 0, MS_NODEV);
      	move_mount(mfd, "", sfd, AT_FDCWD, "/mnt", MOVE_MOUNT_F_EMPTY_PATH);
      
      If an error is reported at any step, an error message may be available to be
      read() back (ENODATA will be reported if there isn't an error available) in
      the form:
      
      	"e <subsys>:<problem>"
      	"e SELinux:Mount on mountpoint not permitted"
      
      Once fsmount() has been called, further fsconfig() calls will incur EBUSY,
      even if the fsmount() fails.  read() is still possible to retrieve error
      information.
      
      The fsopen() syscall creates a mount context and hangs it of the fd that it
      returns.
      
      Netlink is not used because it is optional and would make the core VFS
      dependent on the networking layer and also potentially add network
      namespace issues.
      
      Note that, for the moment, the caller must have SYS_CAP_ADMIN to use
      fsopen().
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: linux-api@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      24dcb3d9
    • David Howells's avatar
      Make anon_inodes unconditional · dadd2299
      David Howells authored
      Make the anon_inodes facility unconditional so that it can be used by core
      VFS code.
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      dadd2299
    • David Howells's avatar
      teach move_mount(2) to work with OPEN_TREE_CLONE · 44dfd84a
      David Howells authored
      Allow a detached tree created by open_tree(..., OPEN_TREE_CLONE) to be
      attached by move_mount(2).
      
      If by the time of final fput() of OPEN_TREE_CLONE-opened file its tree is
      not detached anymore, it won't be dissolved.  move_mount(2) is adjusted
      to handle detached source.
      
      That gives us equivalents of mount --bind and mount --rbind.
      
      Thanks also to Alan Jenkins <alan.christopher.jenkins@gmail.com> for
      providing a whole bunch of ways to break things using this interface.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      44dfd84a
    • David Howells's avatar
      vfs: syscall: Add move_mount(2) to move mounts around · 2db154b3
      David Howells authored
      Add a move_mount() system call that will move a mount from one place to
      another and, in the next commit, allow to attach an unattached mount tree.
      
      The new system call looks like the following:
      
      	int move_mount(int from_dfd, const char *from_path,
      		       int to_dfd, const char *to_path,
      		       unsigned int flags);
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: linux-api@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      2db154b3
    • Al Viro's avatar
      vfs: syscall: Add open_tree(2) to reference or clone a mount · a07b2000
      Al Viro authored
      open_tree(dfd, pathname, flags)
      
      Returns an O_PATH-opened file descriptor or an error.
      dfd and pathname specify the location to open, in usual
      fashion (see e.g. fstatat(2)).  flags should be an OR of
      some of the following:
      	* AT_PATH_EMPTY, AT_NO_AUTOMOUNT, AT_SYMLINK_NOFOLLOW -
      same meanings as usual
      	* OPEN_TREE_CLOEXEC - make the resulting descriptor
      close-on-exec
      	* OPEN_TREE_CLONE or OPEN_TREE_CLONE | AT_RECURSIVE -
      instead of opening the location in question, create a detached
      mount tree matching the subtree rooted at location specified by
      dfd/pathname.  With AT_RECURSIVE the entire subtree is cloned,
      without it - only the part within in the mount containing the
      location in question.  In other words, the same as mount --rbind
      or mount --bind would've taken.  The detached tree will be
      dissolved on the final close of obtained file.  Creation of such
      detached trees requires the same capabilities as doing mount --bind.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      cc: linux-api@vger.kernel.org
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      a07b2000
  2. 17 Mar, 2019 14 commits
  3. 16 Mar, 2019 9 commits
    • Linus Torvalds's avatar
      Merge tag 'pidfd-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · a9dce667
      Linus Torvalds authored
      Pull pidfd system call from Christian Brauner:
       "This introduces the ability to use file descriptors from /proc/<pid>/
        as stable handles on struct pid. Even if a pid is recycled the handle
        will not change. For a start these fds can be used to send signals to
        the processes they refer to.
      
        With the ability to use /proc/<pid> fds as stable handles on struct
        pid we can fix a long-standing issue where after a process has exited
        its pid can be reused by another process. If a caller sends a signal
        to a reused pid it will end up signaling the wrong process.
      
        With this patchset we enable a variety of use cases. One obvious
        example is that we can now safely delegate an important part of
        process management - sending signals - to processes other than the
        parent of a given process by sending file descriptors around via scm
        rights and not fearing that the given process will have been recycled
        in the meantime. It also allows for easy testing whether a given
        process is still alive or not by sending signal 0 to a pidfd which is
        quite handy.
      
        There has been some interest in this feature e.g. from systems
        management (systemd, glibc) and container managers. I have requested
        and gotten comments from glibc to make sure that this syscall is
        suitable for their needs as well. In the future I expect it to take on
        most other pid-based signal syscalls. But such features are left for
        the future once they are needed.
      
        This has been sitting in linux-next for quite a while and has not
        caused any issues. It comes with selftests which verify basic
        functionality and also test that a recycled pid cannot be signaled via
        a pidfd.
      
        Jon has written about a prior version of this patchset. It should
        cover the basic functionality since not a lot has changed since then:
      
            https://lwn.net/Articles/773459/
      
        The commit message for the syscall itself is extensively documenting
        the syscall, including it's functionality and extensibility"
      
      * tag 'pidfd-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        selftests: add tests for pidfd_send_signal()
        signal: add pidfd_send_signal() syscall
      a9dce667
    • Linus Torvalds's avatar
      Merge tag 'devdax-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · f67e3fb4
      Linus Torvalds authored
      Pull device-dax updates from Dan Williams:
       "New device-dax infrastructure to allow persistent memory and other
        "reserved" / performance differentiated memories, to be assigned to
        the core-mm as "System RAM".
      
        Some users want to use persistent memory as additional volatile
        memory. They are willing to cope with potential performance
        differences, for example between DRAM and 3D Xpoint, and want to use
        typical Linux memory management apis rather than a userspace memory
        allocator layered over an mmap() of a dax file. The administration
        model is to decide how much Persistent Memory (pmem) to use as System
        RAM, create a device-dax-mode namespace of that size, and then assign
        it to the core-mm. The rationale for device-dax is that it is a
        generic memory-mapping driver that can be layered over any "special
        purpose" memory, not just pmem. On subsequent boots udev rules can be
        used to restore the memory assignment.
      
        One implication of using pmem as RAM is that mlock() no longer keeps
        data off persistent media. For this reason it is recommended to enable
        NVDIMM Security (previously merged for 5.0) to encrypt pmem contents
        at rest. We considered making this recommendation an actively enforced
        requirement, but in the end decided to leave it as a distribution /
        administrator policy to allow for emulation and test environments that
        lack security capable NVDIMMs.
      
        Summary:
      
         - Replace the /sys/class/dax device model with /sys/bus/dax, and
           include a compat driver so distributions can opt-in to the new ABI.
      
         - Allow for an alternative driver for the device-dax address-range
      
         - Introduce the 'kmem' driver to hotplug / assign a device-dax
           address-range to the core-mm.
      
         - Arrange for the device-dax target-node to be onlined so that the
           newly added memory range can be uniquely referenced by numa apis"
      
      NOTE! I'm not entirely happy with the whole "PMEM as RAM" model because
      we currently have special - and very annoying rules in the kernel about
      accessing PMEM only with the "MC safe" accessors, because machine checks
      inside the regular repeat string copy functions can be fatal in some
      (not described) circumstances.
      
      And apparently the PMEM modules can cause that a lot more than regular
      RAM.  The argument is that this happens because PMEM doesn't necessarily
      get scrubbed at boot like RAM does, but that is planned to be added for
      the user space tooling.
      
      Quoting Dan from another email:
       "The exposure can be reduced in the volatile-RAM case by scanning for
        and clearing errors before it is onlined as RAM. The userspace tooling
        for that can be in place before v5.1-final. There's also runtime
        notifications of errors via acpi_nfit_uc_error_notify() from
        background scrubbers on the DIMM devices. With that mechanism the
        kernel could proactively clear newly discovered poison in the volatile
        case, but that would be additional development more suitable for v5.2.
      
        I understand the concern, and the need to highlight this issue by
        tapping the brakes on feature development, but I don't see PMEM as RAM
        making the situation worse when the exposure is also there via DAX in
        the PMEM case. Volatile-RAM is arguably a safer use case since it's
        possible to repair pages where the persistent case needs active
        application coordination"
      
      * tag 'devdax-for-5.1' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        device-dax: "Hotplug" persistent memory for use like normal RAM
        mm/resource: Let walk_system_ram_range() search child resources
        mm/memory-hotplug: Allow memory resources to be children
        mm/resource: Move HMM pr_debug() deeper into resource code
        mm/resource: Return real error codes from walk failures
        device-dax: Add a 'modalias' attribute to DAX 'bus' devices
        device-dax: Add a 'target_node' attribute
        device-dax: Auto-bind device after successful new_id
        acpi/nfit, device-dax: Identify differentiated memory with a unique numa-node
        device-dax: Add /sys/class/dax backwards compatibility
        device-dax: Add support for a dax override driver
        device-dax: Move resource pinning+mapping into the common driver
        device-dax: Introduce bus + driver model
        device-dax: Start defining a dax bus model
        device-dax: Remove multi-resource infrastructure
        device-dax: Kill dax_region base
        device-dax: Kill dax_region ida
      f67e3fb4
    • Linus Torvalds's avatar
      Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 477558d7
      Linus Torvalds authored
      Pull more SCSI updates from James Bottomley:
       "This is the final round of mostly small fixes and performance
        improvements to our initial submit.
      
        The main regression fix is the ia64 simscsi build failure which was
        missed in the serial number elimination conversion"
      
      * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (24 commits)
        scsi: ia64: simscsi: use request tag instead of serial_number
        scsi: aacraid: Fix performance issue on logical drives
        scsi: lpfc: Fix error codes in lpfc_sli4_pci_mem_setup()
        scsi: libiscsi: Hold back_lock when calling iscsi_complete_task
        scsi: hisi_sas: Change SERDES_CFG init value to increase reliability of HiLink
        scsi: hisi_sas: Send HARD RESET to clear the previous affiliation of STP target port
        scsi: hisi_sas: Set PHY linkrate when disconnected
        scsi: hisi_sas: print PHY RX errors count for later revision of v3 hw
        scsi: hisi_sas: Fix a timeout race of driver internal and SMP IO
        scsi: hisi_sas: Change return variable type in phy_up_v3_hw()
        scsi: qla2xxx: check for kstrtol() failure
        scsi: lpfc: fix 32-bit format string warning
        scsi: lpfc: fix unused variable warning
        scsi: target: tcmu: Switch to bitmap_zalloc()
        scsi: libiscsi: fall back to sendmsg for slab pages
        scsi: qla2xxx: avoid printf format warning
        scsi: lpfc: resolve static checker warning in lpfc_sli4_hba_unset
        scsi: lpfc: Correct __lpfc_sli_issue_iocb_s4 lockdep check
        scsi: ufs: hisi: fix ufs_hba_variant_ops passing
        scsi: qla2xxx: Fix panic in qla_dfs_tgt_counters_show
        ...
      477558d7
    • Linus Torvalds's avatar
      Merge tag 'for-5.1/block-post-20190315' of git://git.kernel.dk/linux-block · 11efae35
      Linus Torvalds authored
      Pull more block layer changes from Jens Axboe:
       "This is a collection of both stragglers, and fixes that came in after
        I finalized the initial pull. This contains:
      
         - An MD pull request from Song, with a few minor fixes
      
         - Set of NVMe patches via Christoph
      
         - Pull request from Konrad, with a few fixes for xen/blkback
      
         - pblk fix IO calculation fix (Javier)
      
         - Segment calculation fix for pass-through (Ming)
      
         - Fallthrough annotation for blkcg (Mathieu)"
      
      * tag 'for-5.1/block-post-20190315' of git://git.kernel.dk/linux-block: (25 commits)
        blkcg: annotate implicit fall through
        nvme-tcp: support C2HData with SUCCESS flag
        nvmet: ignore EOPNOTSUPP for discard
        nvme: add proper write zeroes setup for the multipath device
        nvme: add proper discard setup for the multipath device
        nvme: remove nvme_ns_config_oncs
        nvme: disable Write Zeroes for qemu controllers
        nvmet-fc: bring Disconnect into compliance with FC-NVME spec
        nvmet-fc: fix issues with targetport assoc_list list walking
        nvme-fc: reject reconnect if io queue count is reduced to zero
        nvme-fc: fix numa_node when dev is null
        nvme-fc: use nr_phys_segments to determine existence of sgl
        nvme-loop: init nvmet_ctrl fatal_err_work when allocate
        nvme: update comment to make the code easier to read
        nvme: put ns_head ref if namespace fails allocation
        nvme-trace: fix cdw10 buffer overrun
        nvme: don't warn on block content change effects
        nvme: add get-feature to admin cmds tracer
        md: Fix failed allocation of md_register_thread
        It's wrong to add len to sector_nr in raid10 reshape twice
        ...
      11efae35
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-5.1-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 465c209d
      Linus Torvalds authored
      Pull NFS client bugfixes from Trond Myklebust:
       "Highlights include:
      
        Bugfixes:
         - Fix an Oops in SUNRPC back channel tracepoints
         - Fix a SUNRPC client regression when handling oversized replies
         - Fix the minimal size for SUNRPC reply buffer allocation
         - rpc_decode_header() must always return a non-zero value on error
         - Fix a typo in pnfs_update_layout()
      
        Cleanup:
         - Remove redundant check for the reply length in call_decode()"
      
      * tag 'nfs-for-5.1-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        SUNRPC: Remove redundant check for the reply length in call_decode()
        SUNRPC: Handle the SYSTEM_ERR rpc error
        SUNRPC: rpc_decode_header() must always return a non-zero value on error
        SUNRPC: Use the ENOTCONN error on socket disconnect
        SUNRPC: Fix the minimal size for reply buffer allocation
        SUNRPC: Fix a client regression when handling oversized replies
        pNFS: Fix a typo in pnfs_update_layout
        fix null pointer deref in tracepoints in back channel
      465c209d
    • Linus Torvalds's avatar
      Merge tag 'powerpc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · a9c55d58
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "One fix to prevent runtime allocation of 16GB pages when running in a
        VM (as opposed to bare metal), because it doesn't work.
      
        A small fix to our recently added KCOV support to exempt some more
        code from being instrumented.
      
        Plus a few minor build fixes, a small dead code removal and a
        defconfig update.
      
        Thanks to: Alexey Kardashevskiy, Aneesh Kumar K.V, Christophe Leroy,
        Jason Yan, Joel Stanley, Mahesh Salgaonkar, Mathieu Malaterre"
      
      * tag 'powerpc-5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64s: Include <asm/nmi.h> header file to fix a warning
        powerpc/powernv: Fix compile without CONFIG_TRACEPOINTS
        powerpc/mm: Disable kcov for SLB routines
        powerpc: remove dead code in head_fsl_booke.S
        powerpc/configs: Sync skiroot defconfig
        powerpc/hugetlb: Don't do runtime allocation of 16G pages in LPAR configuration
      a9c55d58
    • Linus Torvalds's avatar
      Merge branch 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · 92497350
      Linus Torvalds authored
      Pull vfs mount infrastructure fix from Al Viro:
       "Fixup for sysfs braino.
      
        Capabilities checks for sysfs mount do include those on netns, but
        only if CONFIG_NET_NS is enabled. Sorry, should've caught that
        earlier..."
      
      * 'work.mount' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        fix sysfs_init_fs_context() in !CONFIG_NET_NS case
      92497350
    • Al Viro's avatar
      fix sysfs_init_fs_context() in !CONFIG_NET_NS case · ab81dabd
      Al Viro authored
      Permission checks on current's netns should be done only when
      netns are enabled.
      Reported-by: default avatarDominik Brodowski <linux@dominikbrodowski.net>
      Fixes: 23bf1b6bSigned-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      ab81dabd
    • Linus Torvalds's avatar
      Merge tag '5.1-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6 · 9c7dc824
      Linus Torvalds authored
      Pull more smb3 updates from Steve French:
       "Various tracing and debugging improvements, crediting fixes, some
        cleanup, and important fallocate fix (fixes three xfstests) and lock
        fix.
      
        Summary:
      
         - Various additional dynamic tracing tracepoints
      
         - Debugging improvements (including ability to query the server via
           SMB3 fsctl from userspace tools which can help with stats and
           debugging)
      
         - One minor performance improvement (root directory inode caching)
      
         - Crediting (SMB3 flow control) fixes
      
         - Some cleanup (docs and to mknod)
      
         - Important fixes: one to smb3 implementation of fallocate zero range
           (which fixes three xfstests) and a POSIX lock fix"
      
      * tag '5.1-rc-smb3' of git://git.samba.org/sfrench/cifs-2.6: (22 commits)
        CIFS: fix POSIX lock leak and invalid ptr deref
        SMB3: Allow SMB3 FSCTL queries to be sent to server from tools
        cifs: fix incorrect handling of smb2_set_sparse() return in smb3_simple_falloc
        smb2: fix typo in definition of a few error flags
        CIFS: make mknod() an smb_version_op
        cifs: minor documentation updates
        cifs: remove unused value pointed out by Coverity
        SMB3: passthru query info doesn't check for SMB3 FSCTL passthru
        smb3: add dynamic tracepoints for simple fallocate and zero range
        cifs: fix smb3_zero_range so it can expand the file-size when required
        cifs: add SMB2_ioctl_init/free helpers to be used with compounding
        smb3: Add dynamic trace points for various compounded smb3 ops
        cifs: cache FILE_ALL_INFO for the shared root handle
        smb3: display volume serial number for shares in /proc/fs/cifs/DebugData
        cifs: simplify how we handle credits in compound_send_recv()
        smb3: add dynamic tracepoint for timeout waiting for credits
        smb3: display security information in /proc/fs/cifs/DebugData more accurately
        cifs: add a timeout argument to wait_for_free_credits
        cifs: prevent starvation in wait_for_free_credits for multi-credit requests
        cifs: wait_for_free_credits() make it possible to wait for >=1 credits
        ...
      9c7dc824
  4. 15 Mar, 2019 10 commits
    • Linus Torvalds's avatar
      Merge branch 'for-linus-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml · 6c83d0d5
      Linus Torvalds authored
      Pull UML updates from Richard Weinberger:
       "Bugfix for the UML block device driver"
      
      * 'for-linus-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml:
        um: Fix for a possible OOPS in ubd initialization
        um: Remove duplicated include from vector_user.c
      6c83d0d5
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 636deed6
      Linus Torvalds authored
      Pull KVM updates from Paolo Bonzini:
       "ARM:
         - some cleanups
         - direct physical timer assignment
         - cache sanitization for 32-bit guests
      
        s390:
         - interrupt cleanup
         - introduction of the Guest Information Block
         - preparation for processor subfunctions in cpu models
      
        PPC:
         - bug fixes and improvements, especially related to machine checks
           and protection keys
      
        x86:
         - many, many cleanups, including removing a bunch of MMU code for
           unnecessary optimizations
         - AVIC fixes
      
        Generic:
         - memcg accounting"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (147 commits)
        kvm: vmx: fix formatting of a comment
        KVM: doc: Document the life cycle of a VM and its resources
        MAINTAINERS: Add KVM selftests to existing KVM entry
        Revert "KVM/MMU: Flush tlb directly in the kvm_zap_gfn_range()"
        KVM: PPC: Book3S: Add count cache flush parameters to kvmppc_get_cpu_char()
        KVM: PPC: Fix compilation when KVM is not enabled
        KVM: Minor cleanups for kvm_main.c
        KVM: s390: add debug logging for cpu model subfunctions
        KVM: s390: implement subfunction processor calls
        arm64: KVM: Fix architecturally invalid reset value for FPEXC32_EL2
        KVM: arm/arm64: Remove unused timer variable
        KVM: PPC: Book3S: Improve KVM reference counting
        KVM: PPC: Book3S HV: Fix build failure without IOMMU support
        Revert "KVM: Eliminate extra function calls in kvm_get_dirty_log_protect()"
        x86: kvmguest: use TSC clocksource if invariant TSC is exposed
        KVM: Never start grow vCPU halt_poll_ns from value below halt_poll_ns_grow_start
        KVM: Expose the initial start value in grow_halt_poll_ns() as a module parameter
        KVM: grow_halt_poll_ns() should never shrink vCPU halt_poll_ns
        KVM: x86/mmu: Consolidate kvm_mmu_zap_all() and kvm_mmu_zap_mmio_sptes()
        KVM: x86/mmu: WARN if zapping a MMIO spte results in zapping children
        ...
      636deed6
    • Linus Torvalds's avatar
      Merge tag 'trace-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · aa2e3ac6
      Linus Torvalds authored
      Pull tracing fixes and cleanups from Steven Rostedt:
       "This contains a series of last minute clean ups, small fixes and error
        checks"
      
      * tag 'trace-v5.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing/probe: Verify alloc_trace_*probe() result
        tracing/probe: Check event/group naming rule at parsing
        tracing/probe: Check the size of argument name and body
        tracing/probe: Check event name length correctly
        tracing/probe: Check maxactive error cases
        tracing: kdb: Fix ftdump to not sleep
        trace/probes: Remove kernel doc style from non kernel doc comment
        tracing/probes: Make reserved_field_names static
      aa2e3ac6
    • Linus Torvalds's avatar
      Merge tag 'iommu-fix-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 323ea40f
      Linus Torvalds authored
      Pull IOMMU fix from Joerg Roedel:
       "Fix a NULL-pointer dereference issue in the ACPI device matching code
        of the AMD IOMMU driver"
      
      * tag 'iommu-fix-v5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix NULL dereference bug in match_hid_uid
      323ea40f
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm · 0be28863
      Linus Torvalds authored
      Pull ARM updates from Russell King:
      
       - An improvement from Ard Biesheuvel, who noted that the identity map
         setup was taking a long time due to flush_cache_louis().
      
       - Update a comment about dma_ops from Wolfram Sang.
      
       - Remove use of "-p" with ld, where this flag has been a no-op since
         2004.
      
       - Remove the printing of the virtual memory layout, which is no longer
         useful since we hide pointers.
      
       - Correct SCU help text.
      
       - Remove legacy TWD registration method.
      
       - Add pgprot_device() implementation for mapping PCI sysfs resource
         files.
      
       - Initialise PFN limits earlier for kmemleak.
      
       - Fix argument count to match macro definition (affects clang builds)
      
       - Use unified assembler language almost everywhere for clang, and other
         clang improvements (from Stefan Agner, Nathan Chancellor).
      
       - Support security extension for noMMU and other noMMU cleanups (from
         Vladimir Murzin).
      
       - Remove unnecessary SMP bringup code (which was incorrectly copy'n'
         pasted from the ARM platform implementations) and remove it from the
         arch code to discourge further copys of it appearing.
      
       - Add Cortex A9 erratum preventing kexec working on some SoCs.
      
       - AMBA bus identification updates from Mike Leach.
      
       - More use of raw spinlocks to avoid -RT kernel issues (from Yang Shi
         and Sebastian Andrzej Siewior).
      
       - MCPM hyp/svc mode mismatch fixes from Marek Szyprowski.
      
      * tag 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: (32 commits)
        ARM: 8849/1: NOMMU: Fix encodings for PMSAv8's PRBAR4/PRLAR4
        ARM: 8848/1: virt: Align GIC version check with arm64 counterpart
        ARM: 8847/1: pm: fix HYP/SVC mode mismatch when MCPM is used
        ARM: 8845/1: use unified assembler in c files
        ARM: 8844/1: use unified assembler in assembly files
        ARM: 8843/1: use unified assembler in headers
        ARM: 8841/1: use unified assembler in macros
        ARM: 8840/1: use a raw_spinlock_t in unwind
        ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t
        ARM: 8837/1: coresight: etmv4: Update ID register table to add UCI support
        ARM: 8836/1: drivers: amba: Update component matching to use the CoreSight UCI values.
        ARM: 8838/1: drivers: amba: Updates to component identification for driver matching.
        ARM: 8833/1: Ensure that NEON code always compiles with Clang
        ARM: avoid Cortex-A9 livelock on tight dmb loops
        ARM: smp: remove arch-provided "pen_release"
        ARM: actions: remove boot_lock and pen_release
        ARM: oxnas: remove CPU hotplug implementation
        ARM: qcom: remove unnecessary boot_lock
        ARM: 8832/1: NOMMU: Limit visibility for CONFIG_FLASH_{MEM_BASE,SIZE}
        ARM: 8831/1: NOMMU: pmsa-v8: remove unneeded semicolon
        ...
      0be28863
    • Linus Torvalds's avatar
      Merge tag 'ntb-5.1' of git://github.com/jonmason/ntb · e8a71a38
      Linus Torvalds authored
      Pull NTB updates from Jon Mason:
      
       - fixes for switchtec debugability and mapping table entries
      
       - NTB transport improvements
      
       - a reworking of the peer_db_addr for better abstraction
      
      * tag 'ntb-5.1' of git://github.com/jonmason/ntb:
        NTB: add new parameter to peer_db_addr() db_bit and db_data
        NTB: ntb_transport: Ensure the destination buffer is mapped for TX DMA
        NTB: ntb_transport: Free MWs in ntb_transport_link_cleanup()
        ntb_hw_switchtec: Added support of >=4G memory windows
        ntb_hw_switchtec: NT req id mapping table register entry number should be 512
        ntb_hw_switchtec: debug print 64bit aligned crosslink BAR Numbers
      e8a71a38
    • Linus Torvalds's avatar
      Merge tag 'fbdev-v5.1' of git://github.com/bzolnier/linux · 2b9c272c
      Linus Torvalds authored
      Pull fbdev updates from Bartlomiej Zolnierkiewicz:
       "Just a couple of small fixes and cleanups:
      
         - fix memory access if logo is bigger than the screen (Manfred
           Schlaegl)
      
         - silence fbcon logo on 'quiet' boots (Prarit Bhargava)
      
         - use kvmalloc() for scrollback buffer in fbcon (Konstantin Khorenko)
      
         - misc fixes (Colin Ian King, YueHaibing, Matteo Croce, Mathieu
           Malaterre, Anders Roxell, Arnd Bergmann)
      
         - misc cleanups (Rob Herring, Lubomir Rintel, Greg Kroah-Hartman,
           Jani Nikula, Michal Vokáč)"
      
      * tag 'fbdev-v5.1' of git://github.com/bzolnier/linux:
        fbdev: mbx: fix a misspelled variable name
        fbdev: omap2: fix warnings in dss core
        video: fbdev: Fix potential NULL pointer dereference
        fbcon: Silence fbcon logo on 'quiet' boots
        printk: Export console_printk
        ARM: dts: imx28-cfa10036: Fix the reset gpio signal polarity
        video: ssd1307fb: Do not hard code active-low reset sequence
        dt-bindings: display: ssd1307fb: Remove reset-active-low from examples
        fbdev: fbmem: fix memory access if logo is bigger than the screen
        video/fbdev: refactor video= cmdline parsing
        fbdev: mbx: fix up debugfs file creation
        fbdev: omap2: no need to check return value of debugfs_create functions
        video: fbdev: geode: remove ifdef OLPC noise
        video: offb: annotate implicit fall throughs
        omapfb: fix typo
        fbdev: Use of_node_name_eq for node name comparisons
        fbcon: use kvmalloc() for scrollback buffer
        fbdev: chipsfb: remove set but not used variable 'size'
        fbdev/via: fix spelling mistake "Expandsion" -> "Expansion"
      2b9c272c
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 51b1ac0f
      Linus Torvalds authored
      Pull i2c fixes from Wolfram Sang:
       "A set of driver bugfixes and an improvement for a core helper"
      
      * 'i2c/for-current-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: i2c-designware-platdrv: Always use a dynamic adapter number
        i2c: i2c-designware-platdrv: Cleanup setting of the adapter number
        i2c: add extra check to safe DMA buffer helper
        i2c: i2c-stm32f7: Fix SDADEL minimum formula
        i2c: rcar: explain the lockless design
        i2c: rcar: fix concurrency issue related to ICDMAER
        i2c: sis630: correct format strings
        i2c: mediatek: modify threshold passed to i2c_get_dma_safe_msg_buf()
      51b1ac0f
    • Linus Torvalds's avatar
      Merge tag 'sound-fix-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 2dbb0e6c
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Some cleaning after the first batch; mostly about HD-audio quirks but
        also some NULL dereference fixes in corner cases and a random build
        error fix, too"
      
      * tag 'sound-fix-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek - Add support headset mode for New DELL WYSE NB
        ALSA: hda/realtek - Add support headset mode for DELL WYSE AIO
        ALSA: hda/realtek: merge alc_fixup_headset_jack to alc295_fixup_chromebook
        ALSA: pcm: Fix function name in kernel-doc comment
        ALSA: hda: hdmi - add Icelake support
        ALSA: hda - add more quirks for HP Z2 G4 and HP Z240
        ALSA: hda/realtek - Fixed Headset Mic JD not stable
        ALSA: hda/realtek: Enable headset MIC of Acer TravelMate X514-51T with ALC255
        ALSA: hda/tegra: avoid build error without CONFIG_PM
        ALSA: usx2y: Fix potential NULL pointer dereference
        ALSA: hda: Avoid NULL pointer dereference at snd_hdac_stream_start()
      2dbb0e6c
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2019-03-15' of git://anongit.freedesktop.org/drm/drm · 8264fd04
      Linus Torvalds authored
      Pull drm fixes and updates from Dave Airlie:
       "A few various fixes pulls and one late etnaviv pull but it was nearly
        all fixes anyways.
      
        etnaviv:
         - late next pull
         - mmu mapping fix
         - build non-ARM arches
         - misc fixes
      
        i915:
         - HDCP state handling fix
         - shrinker interaction fix
         - atomic state leak fix
      
        qxl:
         - kick out framebuffers early fix
      
        amdgpu:
         - Powerplay fixes
         - DC fixes
         - BACO turned off for now on vega20
         - Locking fix
         - KFD MQD fix
         - gfx9 golden register updates"
      
      * tag 'drm-next-2019-03-15' of git://anongit.freedesktop.org/drm/drm: (43 commits)
        drm/amdgpu: Update gc golden setting for vega family
        drm/amd/powerplay: correct power reading on fiji
        drm/amd/powerplay: set max fan target temperature as 105C
        drm/i915: Relax mmap VMA check
        drm/i915: Fix atomic state leak when resetting HDMI link
        drm/i915: Acquire breadcrumb ref before cancelling
        drm/i915/selftests: Always free spinner on __sseu_prepare error
        drm/i915: Reacquire priolist cache after dropping the engine lock
        drm/i915: Protect i915_active iterators from the shrinker
        drm/i915: HDCP state handling in ddi_update_pipe
        drm/qxl: remove conflicting framebuffers earlier
        drm/fb-helper: call vga_remove_vgacon automatically.
        drm: move i915_kick_out_vgacon to vgaarb
        drm/amd/display: don't call dm_pp_ function from an fpu block
        drm: add __user attribute to ptr_to_compat()
        drm/amdgpu: clear PDs/PTs only after initializing them
        drm/amd/display: Pass app_tf by value rather than by reference
        Revert "drm/amdgpu: use BACO reset on vega20 if platform support"
        drm/amd/powerplay: show the right override pcie parameters
        drm/amd/powerplay: honor the OD settings
        ...
      8264fd04