1. 31 Jan, 2020 6 commits
    • Linus Torvalds's avatar
      Merge tag 'mips_5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux · c5951e7c
      Linus Torvalds authored
      Pull MIPS changes from Paul Burton:
       "Nothing too big or scary in here:
      
         - Support mremap() for the VDSO, primarily to allow CRIU to restore
           the VDSO to its checkpointed location.
      
         - Restore the MIPS32 cBPF JIT, after having reverted the enablement
           of the eBPF JIT for MIPS32 systems in the 5.5 cycle.
      
         - Improve cop0 counter synchronization behaviour whilst onlining CPUs
           by running with interrupts disabled.
      
         - Better match FPU behaviour when emulating multiply-accumulate
           instructions on pre-r6 systems that implement IEEE754-2008 style
           MACs.
      
         - Loongson64 kernels now build using the MIPS64r2 ISA, allowing them
           to take advantage of instructions introduced by r2.
      
         - Support for the Ingenic X1000 SoC & the really nice little CU Neo
           development board that's using it.
      
         - Support for WMAC on GARDENA Smart Gateway devices.
      
         - Lots of cleanup & refactoring of SGI IP27 (Origin 2...
      c5951e7c
    • Linus Torvalds's avatar
      Merge tag 'arc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · b7e573bb
      Linus Torvalds authored
      Pull ARC updates from Vineet Gupta:
      
       - Wire up clone3 syscall
      
       - ARCv2 FPU state save/restore across context switch
      
       - AXS10x platform and misc fixes
      
      * tag 'arc-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARCv2: fpu: preserve userspace fpu state
        ARC: fpu: declutter code, move bits out into fpu.h
        ARC: wireup clone3 syscall
        ARC: [plat-axs10x]: Add missing multicast filter number to GMAC node
        ARC: update feature support for jump-labels
      b7e573bb
    • Linus Torvalds's avatar
      Merge tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux · a1084542
      Linus Torvalds authored
      Pull RISC-V updates from Palmer Dabbelt:
       "This contains a handful of patches for this merge window:
      
         - Support for kasan
      
         - 32-bit physical addresses on rv32i-based systems
      
         - Support for CONFIG_DEBUG_VIRTUAL
      
         - DT entry for the FU540 GPIO controller, which has recently had a
           device driver merged
      
        These boot a buildroot-based system on QEMU's virt board for me"
      
      * tag 'riscv-for-linus-5.6-mw0' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
        riscv: dts: Add DT support for SiFive FU540 GPIO driver
        riscv: mm: add support for CONFIG_DEBUG_VIRTUAL
        riscv: keep 32-bit kernel to 32-bit phys_addr_t
        kasan: Add riscv to KASAN documentation.
        riscv: Add KASAN support
        kasan: No KASAN's memmove check if archs don't have it.
      a1084542
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · b70a2d6b
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Misc fixes:
      
         - three fixes and a cleanup for the resctrl code
      
         - a HyperV fix
      
         - a fix to /proc/kcore contents in live debugging sessions
      
         - a fix for the x86 decoder opcode map"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/decoder: Add TEST opcode to Group3-2
        x86/resctrl: Clean up unused function parameter in mkdir path
        x86/resctrl: Fix a deadlock due to inaccurate reference
        x86/resctrl: Fix use-after-free due to inaccurate refcount of rdtgroup
        x86/resctrl: Fix use-after-free when deleting resource groups
        x86/hyper-v: Add "polling" bit to hv_synic_sint
        x86/crash: Define arch_crash_save_vmcoreinfo() if CONFIG_CRASH_CORE=y
      b70a2d6b
    • Linus Torvalds's avatar
      Merge tag 'kvm-5.6-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm · e813e650
      Linus Torvalds authored
      Pull KVM updates from Paolo Bonzini:
       "This is the first batch of KVM changes.
      
        ARM:
         - cleanups and corner case fixes.
      
        PPC:
         - Bugfixes
      
        x86:
         - Support for mapping DAX areas with large nested page table entries.
      
         - Cleanups and bugfixes here too. A particularly important one is a
           fix for FPU load when the thread has TIF_NEED_FPU_LOAD. There is
           also a race condition which could be used in guest userspace to
           exploit the guest kernel, for which the embargo expired today.
      
         - Fast path for IPI delivery vmexits, shaving about 200 clock cycles
           from IPI latency.
      
         - Protect against "Spectre-v1/L1TF" (bring data in the cache via
           speculative out of bound accesses, use L1TF on the sibling
           hyperthread to read it), which unfortunately is an even bigger
           whack-a-mole game than SpectreV1.
      
        Sean continues his mission to rewrite KVM. In addition to a sizable
        number of x86 patches, this time he contributed a pretty large
        refactoring of vCPU creation that affects all architectures but should
        not have any visible effect.
      
        s390 will come next week together with some more x86 patches"
      
      * tag 'kvm-5.6-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (204 commits)
        x86/KVM: Clean up host's steal time structure
        x86/KVM: Make sure KVM_VCPU_FLUSH_TLB flag is not missed
        x86/kvm: Cache gfn to pfn translation
        x86/kvm: Introduce kvm_(un)map_gfn()
        x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit
        KVM: PPC: Book3S PR: Fix -Werror=return-type build failure
        KVM: PPC: Book3S HV: Release lock on page-out failure path
        KVM: arm64: Treat emulated TVAL TimerValue as a signed 32-bit integer
        KVM: arm64: pmu: Only handle supported event counters
        KVM: arm64: pmu: Fix chained SW_INCR counters
        KVM: arm64: pmu: Don't mark a counter as chained if the odd one is disabled
        KVM: arm64: pmu: Don't increment SW_INCR if PMCR.E is unset
        KVM: x86: Use a typedef for fastop functions
        KVM: X86: Add 'else' to unify fastop and execute call path
        KVM: x86: inline memslot_valid_for_gpte
        KVM: x86/mmu: Use huge pages for DAX-backed files
        KVM: x86/mmu: Remove lpage_is_disallowed() check from set_spte()
        KVM: x86/mmu: Fold max_mapping_level() into kvm_mmu_hugepage_adjust()
        KVM: x86/mmu: Zap any compound page when collapsing sptes
        KVM: x86/mmu: Remove obsolete gfn restoration in FNAME(fetch)
        ...
      e813e650
    • Linus Torvalds's avatar
      Merge tag 'mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/daveh/x86-mpx · ccaaaf6f
      Linus Torvalds authored
      Pull x86 MPX removal from Dave Hansen:
       "MPX requires recompiling applications, which requires compiler
        support. Unfortunately, GCC 9.1 is expected to be be released without
        support for MPX. This means that there was only a relatively small
        window where folks could have ever used MPX. It failed to gain wide
        adoption in the industry, and Linux was the only mainstream OS to ever
        support it widely.
      
        Support for the feature may also disappear on future processors.
      
        This set completes the process that we started during the 5.4 merge
        window when the MPX prctl()s were removed. XSAVE support is left in
        place, which allows MPX-using KVM guests to continue to function"
      
      * tag 'mpx-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/daveh/x86-mpx:
        x86/mpx: remove MPX from arch/x86
        mm: remove arch_bprm_mm_init() hook
        x86/mpx: remove bounds exception code
        x86/mpx: remove build infrastructure
        x86/alternatives: add missing insn.h include
      ccaaaf6f
  2. 30 Jan, 2020 34 commits
    • Linus Torvalds's avatar
      Merge tag 'mtd/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux · 35c222fd
      Linus Torvalds authored
      Pull MTD updates from Miquel Raynal:
       "MTD core
         - block2mtd: page index should use pgoff_t
         - maps: physmap: minimal Runtime PM support
         - maps: pcmciamtd: avoid possible sleep-in-atomic-context bugs
         - concat: Fix a comment referring to an unknown symbol
      
        Raw NAND:
         - Macronix: Use match_string() helper
         - Atmel: switch to using devm_fwnode_gpiod_get()
         - Denali: rework the SKIP_BYTES feature and add reset controlling
         - Brcmnand: set appropriate DMA mask
         - Cadence: add unspecified HAS_IOMEM dependency
         - Various cleanup.
      
        Onenand:
         - Rename Samsung and Omap2 drivers to avoid possible build warnings
         - Enable compile testing
         - Various build issues
         - Kconfig cleanup
      
        SPI-NAND:
         - Support for Toshiba TC58CVG2S0HRAIJ
      
        SPI-NOR:
         - Add support for TB selection using SR bit 6,
         - Add support for few flashes"
      
      * tag 'mtd/for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: (41 commits)
        mtd: concat: Fix a comment referring to an unknown symbol
        mtd: rawnand: add unspecified HAS_IOMEM dependency
        mtd: block2mtd: page index should use pgoff_t
        mtd: maps: physmap: Add minimal Runtime PM support
        mtd: maps: pcmciamtd: fix possible sleep-in-atomic-context bugs in pcmciamtd_set_vpp()
        mtd: onenand: Rename omap2 driver to avoid a build warning
        mtd: onenand: Use a better name for samsung driver
        mtd: rawnand: atmel: switch to using devm_fwnode_gpiod_get()
        mtd: spinand: add support for Toshiba TC58CVG2S0HRAIJ
        mtd: rawnand: macronix: Use match_string() helper to simplify the code
        mtd: sharpslpart: Fix unsigned comparison to zero
        mtd: onenand: Enable compile testing of OMAP and Samsung drivers
        mtd: onenand: samsung: Fix printing format for size_t on 64-bit
        mtd: onenand: samsung: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit
        mtd: rawnand: denali: remove hard-coded DENALI_DEFAULT_OOB_SKIP_BYTES
        mtd: rawnand: denali_dt: add reset controlling
        dt-bindings: mtd: denali_dt: document reset property
        mtd: rawnand: denali_dt: Add support for configuring SPARE_AREA_SKIP_BYTES
        mtd: rawnand: denali_dt: error out if platform has no associated data
        mtd: rawnand: brcmnand: Set appropriate DMA mask
        ...
      35c222fd
    • Linus Torvalds's avatar
      Merge tag 'upstream-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs · e84bcd61
      Linus Torvalds authored
      Pull UBI/UBIFS updates from Miquel Raynal:
       "This pull request contains mostly fixes for UBI and UBIFS:
      
        UBI:
         - Fixes for memory leaks in error paths
         - Fix for an logic error in a fastmap selfcheck
      
        UBIFS:
         - Fix for FS_IOC_SETFLAGS related to fscrypt flag
         - Support for FS_ENCRYPT_FL
         - Fix for a dead lock in bulk-read mode"
      
      Sent on behalf of Richard Weinberger who is traveling.
      
      * tag 'upstream-5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/ubifs:
        ubi: Fix an error pointer dereference in error handling code
        ubifs: Fix memory leak from c->sup_node
        ubifs: Fix ino_t format warnings in orphan_delete()
        ubifs: Fix deadlock in concurrent bulk-read and writepage
        ubifs: Fix wrong memory allocation
        ubi: Free the normal volumes in error paths of ubi_attach_mtd_dev()
        ubi: Check the presence of volume before call ubi_fastmap_destroy_checkmap()
        ubifs: Add support for FS_ENCRYPT_FL
        ubifs: Fix FS_IOC_SETFLAGS unexpectedly clearing encrypt flag
        ubi: wl: Remove set but not used variable 'prev_e'
        ubi: fastmap: Fix inverted logic in seen selfcheck
      e84bcd61
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 6e135bae
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this series, we've implemented transparent compression
        experimentally. It supports LZO and LZ4, but will add more later as we
        investigate in the field more.
      
        At this point, the feature doesn't expose compressed space to user
        directly in order to guarantee potential data updates later to the
        space. Instead, the main goal is to reduce data writes to flash disk
        as much as possible, resulting in extending disk life time as well as
        relaxing IO congestion.
      
        Alternatively, we're also considering to add ioctl() to reclaim
        compressed space and show it to user after putting the immutable bit.
      
        Enhancements:
         - add compression support
         - avoid unnecessary locks in quota ops
         - harden power-cut scenario for zoned block devices
         - use private bio_set to avoid IO congestion
         - replace GC mutex with rwsem to serialize callers
      
        Bug fixes:
         - fix dentry consistency and memory corruption in rename()'s error case
         - fix wrong swap extent reports
         - fix casefolding bugs
         - change lock coverage to avoid deadlock
         - avoid GFP_KERNEL under f2fs_lock_op
      
        And, we've cleaned up sysfs entries to prepare no debugfs"
      
      * tag 'f2fs-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (31 commits)
        f2fs: fix race conditions in ->d_compare() and ->d_hash()
        f2fs: fix dcache lookup of !casefolded directories
        f2fs: Add f2fs stats to sysfs
        f2fs: delete duplicate information on sysfs nodes
        f2fs: change to use rwsem for gc_mutex
        f2fs: update f2fs document regarding to fsync_mode
        f2fs: add a way to turn off ipu bio cache
        f2fs: code cleanup for f2fs_statfs_project()
        f2fs: fix miscounted block limit in f2fs_statfs_project()
        f2fs: show the CP_PAUSE reason in checkpoint traces
        f2fs: fix deadlock allocating bio_post_read_ctx from mempool
        f2fs: remove unneeded check for error allocating bio_post_read_ctx
        f2fs: convert inline_dir early before starting rename
        f2fs: fix memleak of kobject
        f2fs: fix to add swap extent correctly
        f2fs: run fsck when getting bad inode during GC
        f2fs: support data compression
        f2fs: free sysfs kobject
        f2fs: declare nested quota_sem and remove unnecessary sems
        f2fs: don't put new_page twice in f2fs_rename
        ...
      6e135bae
    • Linus Torvalds's avatar
      Merge tag 'for_v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 0196be12
      Linus Torvalds authored
      Pull UDF, quota, reiserfs, ext2 fixes and cleanups from Jan Kara:
       "A few assorted fixes and cleanups for udf, quota, reiserfs, and ext2"
      
      * tag 'for_v5.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fs/reiserfs: remove unused macros
        fs/quota: remove unused macro
        udf: Clarify meaning of f_files in udf_statfs
        udf: Allow writing to 'Rewritable' partitions
        udf: Disallow R/W mode for disk with Metadata partition
        udf: Fix meaning of ENTITYID_FLAGS_* macros to be really bitwise-or flags
        udf: Fix free space reporting for metadata and virtual partitions
        udf: Update header files to UDF 2.60
        udf: Move OSTA Identifier Suffix macros from ecma_167.h to osta_udf.h
        udf: Fix spelling in EXT_NEXT_EXTENT_ALLOCDESCS
        ext2: Adjust indentation in ext2_fill_super
        quota: avoid time_t in v1_disk_dqblk definition
        reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling
        reiserfs: F...
      0196be12
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.6-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · 91f1a956
      Linus Torvalds authored
      Pull xfs updates from Darrick Wong:
       "In this release we clean out the last of the old 32-bit timestamp
        code, fix a number of bugs and memory corruptions on 32-bit platforms,
        and a refactoring of some of the extended attribute code.
      
        I think I'll be back next week with some refactoring of how the XFS
        buffer code returns error codes, however I prefer to hold onto that
        for another week to let it soak a while longer
      
        Summary:
      
         - Get rid of compat_time_t
      
         - Convert time_t to time64_t in quota code
      
         - Remove shadow variables
      
         - Prevent ATTR_ flag misuse in the attrmulti ioctls
      
         - Clean out strlen in the attr code
      
         - Remove some bogus asserts
      
         - Fix various file size limit calculation errors with 32-bit kernels
      
         - Pack xfs_dir2_sf_entry_t to fix build errors on arm oabi
      
         - Fix nowait inode locking calls for directio aio reads
      
         - Fix memory corruption bugs when invalidating remote xattr value
           buffers
      
         - Streamline remote attr value removal
      
         - Make the buffer log format size consistent across platforms
      
         - Strengthen buffer log format size checking
      
         - Fix messed up return types of xfs_inode_need_cow
      
         - Fix some unused variable warnings"
      
      * tag 'xfs-5.6-merge-6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (24 commits)
        xfs: remove unused variable 'done'
        xfs: fix uninitialized variable in xfs_attr3_leaf_inactive
        xfs: change return value of xfs_inode_need_cow to int
        xfs: check log iovec size to make sure it's plausibly a buffer log format
        xfs: make struct xfs_buf_log_format have a consistent size
        xfs: complain if anyone tries to create a too-large buffer log item
        xfs: clean up xfs_buf_item_get_format return value
        xfs: streamline xfs_attr3_leaf_inactive
        xfs: fix memory corruption during remote attr value buffer invalidation
        xfs: refactor remote attr value buffer invalidation
        xfs: fix IOCB_NOWAIT handling in xfs_file_dio_aio_read
        xfs: Add __packed to xfs_dir2_sf_entry_t definition
        xfs: fix s_maxbytes computation on 32-bit kernels
        xfs: truncate should remove all blocks, not just to the end of the page cache
        xfs: introduce XFS_MAX_FILEOFF
        xfs: remove bogus assertion when online repair isn't enabled
        xfs: Remove all strlen in all xfs_attr_* functions for attr names.
        xfs: fix misuse of the XFS_ATTR_INCOMPLETE flag
        xfs: also remove cached ACLs when removing the underlying attr
        xfs: reject invalid flags combinations in XFS_IOC_ATTRMULTI_BY_HANDLE
        ...
      91f1a956
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · e5da4c93
      Linus Torvalds authored
      Pull ext4 updates from Ted Ts'o:
       "This merge window, we've added some performance improvements in how we
        handle inode locking in the read/write paths, and improving the
        performance of Direct I/O overwrites.
      
        We also now record the error code which caused the first and most
        recent ext4_error() report in the superblock, to make it easier to
        root cause problems in production systems.
      
        There are also many of the usual cleanups and miscellaneous bug fixes"
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (49 commits)
        jbd2: clean __jbd2_journal_abort_hard() and __journal_abort_soft()
        jbd2: make sure ESHUTDOWN to be recorded in the journal superblock
        ext4, jbd2: ensure panic when aborting with zero errno
        jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record
        jbd2_seq_info_next should increase position index
        jbd2: remove pointless assertion in __journal_remove_journal_head
        ext4,jbd2: fix comment and code style
        jbd2: delete the duplicated words in the comments
        ext4: fix extent_status trace points
        ext4: fix symbolic enum printing in trace output
        ext4: choose hardlimit when softlimit is larger than hardlimit in ext4_statfs_project()
        ext4: fix race conditions in ->d_compare() and ->d_hash()
        ext4: make dioread_nolock the default
        ext4: fix extent_status fragmentation for plain files
        jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal
        ext4: drop ext4_kvmalloc()
        ext4: Add EXT4_IOC_FSGETXATTR/EXT4_IOC_FSSETXATTR to compat_ioctl
        ext4: remove unused macro MPAGE_DA_EXTENT_TAIL
        ext4: add missing braces in ext4_ext_drop_refs()
        ext4: fix some nonstandard indentation in extents.c
        ...
      e5da4c93
    • Paolo Bonzini's avatar
      Merge branch 'cve-2019-3016' into kvm-next-5.6 · 4cbc418a
      Paolo Bonzini authored
      From Boris Ostrovsky:
      
      The KVM hypervisor may provide a guest with ability to defer remote TLB
      flush when the remote VCPU is not running. When this feature is used,
      the TLB flush will happen only when the remote VPCU is scheduled to run
      again. This will avoid unnecessary (and expensive) IPIs.
      
      Under certain circumstances, when a guest initiates such deferred action,
      the hypervisor may miss the request. It is also possible that the guest
      may mistakenly assume that it has already marked remote VCPU as needing
      a flush when in fact that request had already been processed by the
      hypervisor. In both cases this will result in an invalid translation
      being present in a vCPU, potentially allowing accesses to memory locations
      in that guest's address space that should not be accessible.
      
      Note that only intra-guest memory is vulnerable.
      
      The five patches address both of these problems:
      1. The first patch makes sure the hypervisor doesn't accidentally clear
      a guest's remote flush request
      2. The rest of the patches prevent the race between hypervisor
      acknowledging a remote flush request and guest issuing a new one.
      
      Conflicts:
      	arch/x86/kvm/x86.c [move from kvm_arch_vcpu_free to kvm_arch_vcpu_destroy]
      4cbc418a
    • Boris Ostrovsky's avatar
      x86/KVM: Clean up host's steal time structure · a6bd811f
      Boris Ostrovsky authored
      
      
      Now that we are mapping kvm_steal_time from the guest directly we
      don't need keep a copy of it in kvm_vcpu_arch.st. The same is true
      for the stime field.
      
      This is part of CVE-2019-3016.
      
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Reviewed-by: default avatarJoao Martins <joao.m.martins@oracle.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      a6bd811f
    • Boris Ostrovsky's avatar
      x86/KVM: Make sure KVM_VCPU_FLUSH_TLB flag is not missed · b0431382
      Boris Ostrovsky authored
      
      
      There is a potential race in record_steal_time() between setting
      host-local vcpu->arch.st.steal.preempted to zero (i.e. clearing
      KVM_VCPU_PREEMPTED) and propagating this value to the guest with
      kvm_write_guest_cached(). Between those two events the guest may
      still see KVM_VCPU_PREEMPTED in its copy of kvm_steal_time, set
      KVM_VCPU_FLUSH_TLB and assume that hypervisor will do the right
      thing. Which it won't.
      
      Instad of copying, we should map kvm_steal_time and that will
      guarantee atomicity of accesses to @preempted.
      
      This is part of CVE-2019-3016.
      
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Reviewed-by: default avatarJoao Martins <joao.m.martins@oracle.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      b0431382
    • Boris Ostrovsky's avatar
      x86/kvm: Cache gfn to pfn translation · 91724814
      Boris Ostrovsky authored
      
      
      __kvm_map_gfn()'s call to gfn_to_pfn_memslot() is
      * relatively expensive
      * in certain cases (such as when done from atomic context) cannot be called
      
      Stashing gfn-to-pfn mapping should help with both cases.
      
      This is part of CVE-2019-3016.
      
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Reviewed-by: default avatarJoao Martins <joao.m.martins@oracle.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      91724814
    • Boris Ostrovsky's avatar
      x86/kvm: Introduce kvm_(un)map_gfn() · 1eff70a9
      Boris Ostrovsky authored
      
      
      kvm_vcpu_(un)map operates on gfns from any current address space.
      In certain cases we want to make sure we are not mapping SMRAM
      and for that we can use kvm_(un)map_gfn() that we are introducing
      in this patch.
      
      This is part of CVE-2019-3016.
      
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Reviewed-by: default avatarJoao Martins <joao.m.martins@oracle.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      1eff70a9
    • Boris Ostrovsky's avatar
      x86/kvm: Be careful not to clear KVM_VCPU_FLUSH_TLB bit · 8c6de56a
      Boris Ostrovsky authored
      
      
      kvm_steal_time_set_preempted() may accidentally clear KVM_VCPU_FLUSH_TLB
      bit if it is called more than once while VCPU is preempted.
      
      This is part of CVE-2019-3016.
      
      (This bug was also independently discovered by Jim Mattson
      <jmattson@google.com>)
      
      Signed-off-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Reviewed-by: default avatarJoao Martins <joao.m.martins@oracle.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      8c6de56a
    • Paolo Bonzini's avatar
      Merge tag 'kvm-ppc-next-5.6-2' of... · 1d5920c3
      Paolo Bonzini authored
      Merge tag 'kvm-ppc-next-5.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD
      
      Second KVM PPC update for 5.6
      
      * Fix compile warning on 32-bit machines
      * Fix locking error in secure VM support
      1d5920c3
    • Paolo Bonzini's avatar
      Merge tag 'kvmarm-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD · 621ab20c
      Paolo Bonzini authored
      KVM/arm updates for Linux 5.6
      
      - Fix MMIO sign extension
      - Fix HYP VA tagging on tag space exhaustion
      - Fix PSTATE/CPSR handling when generating exception
      - Fix MMU notifier's advertizing of young pages
      - Fix poisoned page handling
      - Fix PMU SW event handling
      - Fix TVAL register access
      - Fix AArch32 external abort injection
      - Fix ITS unmapped collection handling
      - Various cleanups
      621ab20c
    • Linus Torvalds's avatar
      Merge tag 'drm-next-2020-01-30' of git://anongit.freedesktop.org/drm/drm · 9f68e365
      Linus Torvalds authored
      Pull drm updates from Davbe Airlie:
       "This is the main pull request for graphics for 5.6. Usual selection of
        changes all over.
      
        I've got one outstanding vmwgfx pull that touches mm so kept it
        separate until after all of this lands. I'll try and get it to you
        soon after this, but it might be early next week (nothing wrong with
        code, just my schedule is messy)
      
        This also hits a lot of fbdev drivers with some cleanups.
      
        Other notables:
         - vulkan timeline semaphore support added to syncobjs
         - nouveau turing secureboot/graphics support
         - Displayport MST display stream compression support
      
        Detailed summary:
      
        uapi:
         - dma-buf heaps added (and fixed)
         - command line add support for panel oreientation
         - command line allow overriding penguin count
      
        drm:
         - mipi dsi definition updates
         - lockdep annotations for dma_resv
         - remove dma-buf kmap/kunmap support
         - constify fb_ops in all fbdev drivers
         - MST fix for daisy chained hotplug-
         - CTA-861-G modes with VIC >= 193 added
         - fix drm_panel_of_backlight export
         - LVDS decoder support
         - more device based logging support
         - scanline alighment for dumb buffers
         - MST DSC helpers
      
        scheduler:
         - documentation fixes
         - job distribution improvements
      
        panel:
         - Logic PD type 28 panel support
         - Jimax8729d MIPI-DSI
         - igenic JZ4770
         - generic DSI devicetree bindings
         - sony acx424AKP panel
         - Leadtek LTK500HD1829
         - xinpeng XPP055C272
         - AUO B116XAK01
         - GiantPlus GPM940B0
         - BOE NV140FHM-N49
         - Satoz SAT050AT40H12R2
         - Sharp LS020B1DD01D panels.
      
        ttm:
         - use blocking WW lock
      
        i915:
         - hw/uapi state separation
         - Lock annotation improvements
         - selftest improvements
         - ICL/TGL DSI VDSC support
         - VBT parsing improvments
         - Display refactoring
         - DSI updates + fixes
         - HDCP 2.2 for CFL
         - CML PCI ID fixes
         - GLK+ fbc fix
         - PSR fixes
         - GEN/GT refactor improvments
         - DP MST fixes
         - switch context id alloc to xarray
         - workaround updates
         - LMEM debugfs support
         - tiled monitor fixes
         - ICL+ clock gating programming removed
         - DP MST disable sequence fixed
         - LMEM discontiguous object maps
         - prefaulting for discontiguous objects
         - use LMEM for dumb buffers if possible
         - add LMEM mmap support
      
        amdgpu:
         - enable sync object timelines for vulkan
         - MST atomic routines
         - enable MST DSC support
         - add DMCUB display microengine support
         - DC OEM i2c support
         - Renoir DC fixes
         - Initial HDCP 2.x support
         - BACO support for Arcturus
         - Use BACO for runtime PM power save
         - gfxoff on navi10
         - gfx10 golden updates and fixes
         - DCN support on POWER
         - GFXOFF for raven1 refresh
         - MM engine idle handlers cleanup
         - 10bpc EDP panel fixes
         - renoir watermark fixes
         - SR-IOV fixes
         - Arcturus VCN fixes
         - GDDR6 training fixes
         - freesync fixes
         - Pollock support
      
        amdkfd:
         - unify more codepath with amdgpu
         - use KIQ to setup HIQ rather than MMIO
      
        radeon:
         - fix vma fault handler race
         - PPC DMA fix
         - register check fixes for r100/r200
      
        nouveau:
         - mmap_sem vs dma_resv fix
         - rewrite the ACR secure boot code for Turing
         - TU10x graphics engine support (TU11x pending)
         - Page kind mapping for turing
         - 10-bit LUT support
         - GP10B Tegra fixes
         - HD audio regression fix
      
        hisilicon/hibmc:
         - use generic fbdev code and helpers
      
        rockchip:
         - dsi/px30 support
      
        virtio:
         - fb damage support
         - static some functions
      
        vc4:
         - use dma_resv lock wrappers
      
        msm:
         - use dma_resv lock wrappers
         - sc7180 display + DSI support
         - a618 support
         - UBWC support improvements
      
        vmwgfx:
         - updates + new logging uapi
      
        exynos:
         - enable/disable callback cleanups
      
        etnaviv:
         - use dma_resv lock wrappers
      
        atmel-hlcdc:
         - clock fixes
      
        mediatek:
         - cmdq support
         - non-smooth cursor fixes
         - ctm property support
      
        sun4i:
         - suspend support
         - A64 mipi dsi support
      
        rcar-du:
         - Color management module support
         - LVDS encoder dual-link support
         - R8A77980 support
      
        analogic:
         - add support for an6345
      
        ast:
         - atomic modeset support
         - primary plane garbage fix
      
        arcgpu:
         - fixes for fourcc handling
      
        tegra:
         - minor fixes and improvments
      
        mcde:
         - vblank support
      
        meson:
         - OSD1 plane AFBC commit
      
        gma500:
         - add pageflip support
         - reomve global drm_dev
      
        komeda:
         - tweak debugfs output
         - d32 support
         - runtime PM suppotr
      
        udl:
         - use generic shmem helpers
         - cleanup and fixes"
      
      * tag 'drm-next-2020-01-30' of git://anongit.freedesktop.org/drm/drm: (1998 commits)
        drm/nouveau/fb/gp102-: allow module to load even when scrubber binary is missing
        drm/nouveau/acr: return error when registering LSF if ACR not supported
        drm/nouveau/disp/gv100-: not all channel types support reporting error codes
        drm/nouveau/disp/nv50-: prevent oops when no channel method map provided
        drm/nouveau: support synchronous pushbuf submission
        drm/nouveau: signal pending fences when channel has been killed
        drm/nouveau: reject attempts to submit to dead channels
        drm/nouveau: zero vma pointer even if we only unreference it rather than free
        drm/nouveau: Add HD-audio component notifier support
        drm/nouveau: fix build error without CONFIG_IOMMU_API
        drm/nouveau/kms/nv04: remove set but not used variable 'width'
        drm/nouveau/kms/nv50: remove set but not unused variable 'nv_connector'
        drm/nouveau/mmu: fix comptag memory leak
        drm/nouveau/gr/gp10b: Use gp100_grctx and gp100_gr_zbc
        drm/nouveau/pmu/gm20b,gp10b: Fix Falcon bootstrapping
        drm/exynos: Rename Exynos to lowercase
        drm/exynos: change callback names
        drm/mst: Don't do atomic checks over disabled managers
        drm/amdgpu: add the lost mutex_init back
        drm/amd/display: skip opp blank or unblank if test pattern enabled
        ...
      9f68e365
    • Linus Torvalds's avatar
      Merge tag 'for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply · 4cadc60d
      Linus Torvalds authored
      Pull power supply and reset updates from Sebastian Reichel:
       "Core:
         - Add battery internal resistance temperature table support
      
        Drivers:
         - sc27xx: Optimize the battery resistance with measuring temperature
         - max17042-battery: Add MAX17055 support
         - bq25890-charger: Add support of BQ25892 and BQ25896 chips
         - misc fixes"
      
      * tag 'for-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: (44 commits)
        power: supply: ipaq_micro_battery: remove unneeded semicolon
        power: supply: bq25890_charger: fix incorrect error return when bq25890_field_read fails
        power: supply: axp20x_usb_power: Only poll while offline
        power: supply: axp20x_usb_power: Add wakeup control
        power: supply: axp20x_usb_power: Allow offlining
        power: supply: axp20x_usb_power: Use a match structure
        power: suppy: ucs1002: Make the symbol 'ucs1002_regulator_enable' static
        power: reset: at91-poweroff: use proper master clock register offset
        power: reset: at91-poweroff: introduce struct shdwc_reg_config
        power: supply: bq25890_charger: Add DT and I2C ids for all supported chips
        dt-bindings: Add new chips to bq25890 binding documentation
        power: supply: bq25890_charger: Add support of BQ25892 and BQ25896 chips
        power: supply: core: Update sysfs-class-power ABI document
        power: supply: sbs-battery: Fix a signedness bug in sbs_get_battery_capacity()
        power: supply: ltc2941-battery-gauge: fix use-after-free
        power: supply: max17040: Correct IRQ wake handling
        power: supply: axp20x_usb_power: Remove unused device_node
        power: supply: axp20x_ac_power: Add wakeup control
        power: supply: axp20x_ac_power: Allow offlining
        power: supply: axp20x_ac_power: Fix reporting online status
        ...
      4cadc60d
    • Linus Torvalds's avatar
      Merge tag 'devicetree-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 893e591b
      Linus Torvalds authored
      Pull devicetree updates from Rob Herring:
      
       - Update dtc to upstream v1.5.1-22-gc40aeb60b47a (plus 1 revert)
      
       - Fix for DMA coherent devices on Power
      
       - Rework and simplify the DT phandle cache code
      
       - DT schema conversions for LEDS, gpio-leds, STM32 dfsdm, STM32 UART,
         STM32 ROMEM, STM32 watchdog, STM32 DMAs, STM32 mlahb, STM32 RTC,
         STM32 RCC, STM32 syscon, rs485, Renesas rCar CSI2, Faraday FTIDE010,
         DWC2, Arm idle-states, Allwinner legacy resets, PRCM and clocks,
         Allwinner H6 OPP, Allwinner AHCI, Allwinner MBUS, Allwinner A31 CSI,
         Allwinner h/w codec, Allwinner A10 system ctrl, Allwinner SRAM,
         Allwinner USB PHY, Renesas CEU, generic PCI host, Arm Versatile PCI
      
       - New binding schemas for SATA and PATA controllers, TI and Infineon VR
         controllers, MAX31730
      
       - New compatible strings for i.MX8QM, WCN3991, renesas,r8a77961-wdt,
         renesas,etheravb-r8a77961
      
       - Add USB 'super-speed-plus' as a documented speed
      
       - Vendor prefixes for broadmobi, calaosystems, kam, and mps
      
       - Clean-up the multiple flavors of ST-Ericsson vendor prefixes
      
      * tag 'devicetree-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (66 commits)
        scripts/dtc: Revert "yamltree: Ensure consistent bracketing of properties with phandles"
        of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc
        dt-bindings: leds: Convert gpio-leds to DT schema
        dt-bindings: leds: Convert common LED binding to schema
        dt-bindings: PCI: Convert generic host binding to DT schema
        dt-bindings: PCI: Convert Arm Versatile binding to DT schema
        dt-bindings: Be explicit about installing deps
        dt-bindings: stm32: convert dfsdm to json-schema
        dt-bindings: serial: Convert STM32 UART to json-schema
        dt-bindings: serial: Convert rs485 bindings to json-schema
        dt-bindings: timer: Use non-empty ranges in example
        dt-bindings: arm-boards: typo fix
        dt-bindings: Add TI and Infineon VR Controllers as trivial devices
        dt-binding: usb: add "super-speed-plus"
        dt-bindings: rcar-csi2: Convert bindings to json-schema
        dt-bindings: iio: adc: ad7606: Fix wrong maxItems value
        dt-bindings: Convert Faraday FTIDE010 to DT schema
        dt-bindings: Create DT bindings for PATA controllers
        dt-bindings: Create DT bindings for SATA controllers
        dt: bindings: add vendor prefix for Kamstrup A/S
        ...
      893e591b
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 1c715a65
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Various mptcp fixupes from Florian Westphal and Geery Uytterhoeven.
      
       2) Don't clear the node/port GUIDs after we've assigned the correct
          values to them. From Leon Romanovsky.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net:
        net/core: Do not clear VF index for node/port GUIDs query
        mptcp: Fix undefined mptcp_handle_ipv6_mapped for modular IPV6
        net: drop_monitor: Use kstrdup
        udp: document udp_rcv_segment special case for looped packets
        mptcp: MPTCP_HMAC_TEST should depend on MPTCP
        mptcp: Fix incorrect IPV6 dependency check
        Revert "MAINTAINERS: mptcp@ mailing list is moderated"
        mptcp: handle tcp fallback when using syn cookies
        mptcp: avoid a lockdep splat when mcast group was joined
        mptcp: fix panic on user pointer access
        mptcp: defer freeing of cached ext until last moment
        net: mvneta: fix XDP support if sw bm is used as fallback
        sch_choke: Use kvcalloc
        mptcp: Fix build with PROC_FS disabled.
        MAINTAINERS: mptcp@ mailing list is moderated
      1c715a65
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide · 5e237e8c
      Linus Torvalds authored
      Pull IDE updates from David Miller:
      
       1) Fix mem region name in tx4949ide driver, from Christophe JAILLET.
      
       2) Make drive->dn read only, it should not be changeable by users. From
          Dan Carpenter.
      
       3) Several cast fixups from Krzysztof Kozlowski.
      
      There is also going to be a removal of a now unused IDE driver, but that
      will come via the MIPS tree.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide:
        ide: make drive->dn read only
        ide: serverworks: potential overflow in svwks_set_pio_mode()
        cmd64x: potential buffer overflow in cmd64x_program_timings()
        ide: remove unneeded header include path to drivers/ide
        ide: qd65xx: Fix cast to pointer from integer of different size
        ide: ht6560b: Fix cast to pointer from integer of different size
        ide: remove set but not used variable 'hwif'
        ide: remove unnecessary touch_softlockup_watchdog
        ide: tx4939ide: Fix the name used in a 'devm_request_mem_region()' call
        ide: Use dev_get_drvdata where possible
      5e237e8c
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 9ca4c642
      Linus Torvalds authored
      Pull sparc updates from David Miller:
      
       1) Add a proper .exit.data section.
      
       2) Fix ipc64_perm type definition, from Arnd Bergmann.
      
       3) Support folded p4d page tables on sparc64, from Mike Rapport.
      
       4) Remove uses of struct timex, also from Arnd Bergmann.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        y2038: sparc: remove use of struct timex
        sparc64: add support for folded p4d page tables
        sparc/console: kill off obsolete declarations
        sparc32: fix struct ipc64_perm type definition
        sparc32, leon: Stop adding vendor and device id to prom ambapp path components
        sparc: Add .exit.data section.
        sparc: remove unneeded uapi/asm/statfs.h
      9ca4c642
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 11f2534b
      Linus Torvalds authored
      Pull arm64 KVM fix from Catalin Marinas:
       "Set the correct MDCR_EL2 register value on the first run of a vCPU"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE
      11f2534b
    • Leon Romanovsky's avatar
      net/core: Do not clear VF index for node/port GUIDs query · 9fbf082f
      Leon Romanovsky authored
      VF numbers were assigned to node_guid and port_guid, but cleared
      right before such query calls were issued. It caused to return
      node/port GUIDs of VF index 0 for all VFs.
      
      Fixes: 30aad417
      
       ("net/core: Add support for getting VF GUIDs")
      Reported-by: default avatarAdrian Chiris <adrianc@mellanox.com>
      Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9fbf082f
    • Arnd Bergmann's avatar
      y2038: sparc: remove use of struct timex · d68712ee
      Arnd Bergmann authored
      
      
      'struct timex' is one of the last users of 'struct timeval' and is
      only referenced in one place in the kernel any more, to convert the
      user space timex into the kernel-internal version on sparc64, with a
      different tv_usec member type.
      
      As a preparation for hiding the time_t definition and everything
      using that in the kernel, change the implementation once more
      to only convert the timeval member, and then enclose the
      struct definition in an #ifdef.
      
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Reviewed-by: default avatarJulian Calaby <julian.calaby@gmail.com>
      Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d68712ee
    • Mike Rapoport's avatar
      sparc64: add support for folded p4d page tables · 5637bc50
      Mike Rapoport authored
      
      
      Implement primitives necessary for the 4th level folding, add walks of p4d
      level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h.
      
      Signed-off-by: default avatarMike Rapoport <rppt@linux.ibm.com>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5637bc50
    • Dan Carpenter's avatar
      ide: make drive->dn read only · 2fd3c5c6
      Dan Carpenter authored
      
      
      The IDE core always sets ->dn correctly so changing it is never
      required.
      
      Setting it to a different value than assigned by IDE core is very likely
      to result in data corruption (due to wrong transfer timings being set on
      the controller etc.)
      
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Tested-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2fd3c5c6
    • Geert Uytterhoeven's avatar
      mptcp: Fix undefined mptcp_handle_ipv6_mapped for modular IPV6 · 31484d56
      Geert Uytterhoeven authored
      If CONFIG_MPTCP=y, CONFIG_MPTCP_IPV6=n, and CONFIG_IPV6=m:
      
          ERROR: "mptcp_handle_ipv6_mapped" [net/ipv6/ipv6.ko] undefined!
      
      This does not happen if CONFIG_MPTCP_IPV6=y, as CONFIG_MPTCP_IPV6
      selects CONFIG_IPV6, and thus forces CONFIG_IPV6 builtin.
      
      As exporting a symbol for an empty function would be a bit wasteful, fix
      this by providing a dummy version of mptcp_handle_ipv6_mapped() for the
      CONFIG_MPTCP_IPV6=n case.
      
      Rename mptcp_handle_ipv6_mapped() to mptcpv6_handle_mapped(), to make it
      clear this is a pure-IPV6 function, just like mptcpv6_init().
      
      Fixes: cec37a6e
      
       ("mptcp: Handle MP_CAPABLE options for outgoing connections")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31484d56
    • Joe Perches's avatar
      net: drop_monitor: Use kstrdup · 72d62c4e
      Joe Perches authored
      
      
      Convert the equivalent but rather odd uses of kmemdup with
      __GFP_ZERO to the more common kstrdup and avoid unnecessary
      zeroing of copied over memory.
      
      Signed-off-by: default avatarJoe Perches <joe@perches.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      72d62c4e
    • Willem de Bruijn's avatar
      udp: document udp_rcv_segment special case for looped packets · d0208bf4
      Willem de Bruijn authored
      Commit 6cd021a5
      
       ("udp: segment looped gso packets correctly")
      fixes an issue with rare udp gso multicast packets looped onto the
      receive path.
      
      The stable backport makes the narrowest change to target only these
      packets, when needed. As opposed to, say, expanding __udp_gso_segment,
      which is harder to reason to be free from unintended side-effects.
      
      But the resulting code is hardly self-describing.
      Document its purpose and rationale.
      
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0208bf4
    • Geert Uytterhoeven's avatar
      mptcp: MPTCP_HMAC_TEST should depend on MPTCP · 389b8fb3
      Geert Uytterhoeven authored
      As the MPTCP HMAC test is integrated into the MPTCP code, it can be
      built only when MPTCP is enabled.  Hence when MPTCP is disabled, asking
      the user if the test code should be enabled is futile.
      
      Wrap the whole block of MPTCP-specific config options inside a check for
      MPTCP.  While at it, drop the "default n" for MPTCP_HMAC_TEST, as that
      is the default anyway.
      
      Fixes: 65492c5a
      
       ("mptcp: move from sha1 (v0) to sha256 (v1)")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      389b8fb3
    • Geert Uytterhoeven's avatar
      mptcp: Fix incorrect IPV6 dependency check · 8e1974a2
      Geert Uytterhoeven authored
      If CONFIG_MPTCP=y, CONFIG_MPTCP_IPV6=n, and CONFIG_IPV6=m:
      
          net/mptcp/protocol.o: In function `__mptcp_tcp_fallback':
          protocol.c:(.text+0x786): undefined reference to `inet6_stream_ops'
      
      Fix this by checking for CONFIG_MPTCP_IPV6 instead of CONFIG_IPV6, like
      is done in all other places in the mptcp code.
      
      Fixes: 8ab183de
      
       ("mptcp: cope with later TCP fallback")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Reviewed-by: default avatarMat Martineau <mathew.j.martineau@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e1974a2
    • Dave Airlie's avatar
      Merge branch 'linux-5.6' of git://github.com/skeggsb/linux into drm-next · d47c7f06
      Dave Airlie authored
      
      
      A couple of OOPS fixes, fixes for TU1xx if firmware isn't available,
      better behaviour in the face of GPU faults, and a patch to make HD
      audio work again after runpm changes.
      
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Ben Skeggs <skeggsb@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/ <CACAvsv4xcLF6Ahh7UYEesn-wBEksd2da+ghusBAdODMrH7Sz2A@mail.gmail.com
      d47c7f06
    • Linus Torvalds's avatar
      Merge tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma · 39bed42d
      Linus Torvalds authored
      Pull mmu_notifier updates from Jason Gunthorpe:
       "This small series revises the names in mmu_notifier to make the code
        clearer and more readable"
      
      * tag 'for-linus-hmm' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
        mm/mmu_notifiers: Use 'interval_sub' as the variable for mmu_interval_notifier
        mm/mmu_notifiers: Use 'subscription' as the variable name for mmu_notifier
        mm/mmu_notifier: Rename struct mmu_notifier_mm to mmu_notifier_subscriptions
      39bed42d
    • Linus Torvalds's avatar
      Merge tag 'threads-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux · 83fa805b
      Linus Torvalds authored
      Pull thread management updates from Christian Brauner:
       "Sargun Dhillon over the last cycle has worked on the pidfd_getfd()
        syscall.
      
        This syscall allows for the retrieval of file descriptors of a process
        based on its pidfd. A task needs to have ptrace_may_access()
        permissions with PTRACE_MODE_ATTACH_REALCREDS (suggested by Oleg and
        Andy) on the target.
      
        One of the main use-cases is in combination with seccomp's user
        notification feature. As a reminder, seccomp's user notification
        feature was made available in v5.0. It allows a task to retrieve a
        file descriptor for its seccomp filter. The file descriptor is usually
        handed of to a more privileged supervising process. The supervisor can
        then listen for syscall events caught by the seccomp filter of the
        supervisee and perform actions in lieu of the supervisee, usually
        emulating syscalls. pidfd_getfd() is needed to expand its uses.
      
        There are currently two major users that wait on pidfd_getfd() and one
        future user:
      
         - Netflix, Sargun said, is working on a service mesh where users
           should be able to connect to a dns-based VIP. When a user connects
           to e.g. 1.2.3.4:80 that runs e.g. service "foo" they will be
           redirected to an envoy process. This service mesh uses seccomp user
           notifications and pidfd to intercept all connect calls and instead
           of connecting them to 1.2.3.4:80 connects them to e.g.
           127.0.0.1:8080.
      
         - LXD uses the seccomp notifier heavily to intercept and emulate
           mknod() and mount() syscalls for unprivileged containers/processes.
           With pidfd_getfd() more uses-cases e.g. bridging socket connections
           will be possible.
      
         - The patchset has also seen some interest from the browser corner.
           Right now, Firefox is using a SECCOMP_RET_TRAP sandbox managed by a
           broker process. In the future glibc will start blocking all signals
           during dlopen() rendering this type of sandbox impossible. Hence,
           in the future Firefox will switch to a seccomp-user-nofication
           based sandbox which also makes use of file descriptor retrieval.
           The thread for this can be found at
           https://sourceware.org/ml/libc-alpha/2019-12/msg00079.html
      
        With pidfd_getfd() it is e.g. possible to bridge socket connections
        for the supervisee (binding to a privileged port) and taking actions
        on file descriptors on behalf of the supervisee in general.
      
        Sargun's first version was using an ioctl on pidfds but various people
        pushed for it to be a proper syscall which he duely implemented as
        well over various review cycles. Selftests are of course included.
        I've also added instructions how to deal with merge conflicts below.
      
        There's also a small fix coming from the kernel mentee project to
        correctly annotate struct sighand_struct with __rcu to fix various
        sparse warnings. We've received a few more such fixes and even though
        they are mostly trivial I've decided to postpone them until after -rc1
        since they came in rather late and I don't want to risk introducing
        build warnings.
      
        Finally, there's a new prctl() command PR_{G,S}ET_IO_FLUSHER which is
        needed to avoid allocation recursions triggerable by storage drivers
        that have userspace parts that run in the IO path (e.g. dm-multipath,
        iscsi, etc). These allocation recursions deadlock the device.
      
        The new prctl() allows such privileged userspace components to avoid
        allocation recursions by setting the PF_MEMALLOC_NOIO and
        PF_LESS_THROTTLE flags. The patch carries the necessary acks from the
        relevant maintainers and is routed here as part of prctl()
        thread-management."
      
      * tag 'threads-v5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
        prctl: PR_{G,S}ET_IO_FLUSHER to support controlling memory reclaim
        sched.h: Annotate sighand_struct with __rcu
        test: Add test for pidfd getfd
        arch: wire up pidfd_getfd syscall
        pid: Implement pidfd_getfd syscall
        vfs, fdtable: Add fget_task helper
      83fa805b
    • Linus Torvalds's avatar
      Merge tag 'for-5.6/io_uring-vfs-2020-01-29' of git://git.kernel.dk/linux-block · 896f8d23
      Linus Torvalds authored
      Pull io_uring updates from Jens Axboe:
      
       - Support for various new opcodes (fallocate, openat, close, statx,
         fadvise, madvise, openat2, non-vectored read/write, send/recv, and
         epoll_ctl)
      
       - Faster ring quiesce for fileset updates
      
       - Optimizations for overflow condition checking
      
       - Support for max-sized clamping
      
       - Support for probing what opcodes are supported
      
       - Support for io-wq backend sharing between "sibling" rings
      
       - Support for registering personalities
      
       - Lots of little fixes and improvements
      
      * tag 'for-5.6/io_uring-vfs-2020-01-29' of git://git.kernel.dk/linux-block: (64 commits)
        io_uring: add support for epoll_ctl(2)
        eventpoll: support non-blocking do_epoll_ctl() calls
        eventpoll: abstract out epoll_ctl() handler
        io_uring: fix linked command file table usage
        io_uring: support using a registered personality for commands
        io_uring: allow registering credentials
        io_uring: add io-wq workqueue sharing
        io-wq: allow grabbing existing io-wq
        io_uring/io-wq: don't use static creds/mm assignments
        io-wq: make the io_wq ref counted
        io_uring: fix refcounting with batched allocations at OOM
        io_uring: add comment for drain_next
        io_uring: don't attempt to copy iovec for READ/WRITE
        io_uring: honor IOSQE_ASYNC for linked reqs
        io_uring: prep req when do IOSQE_ASYNC
        io_uring: use labeled array init in io_op_defs
        io_uring: optimise sqe-to-req flags translation
        io_uring: remove REQ_F_IO_DRAINED
        io_uring: file switch work needs to get flushed on exit
        io_uring: hide uring_fd in ctx
        ...
      896f8d23