1. 30 Apr, 2020 1 commit
  2. 23 Apr, 2020 3 commits
  3. 22 Apr, 2020 28 commits
  4. 21 Apr, 2020 8 commits
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 18bf3408
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "15 fixes"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        tools/vm: fix cross-compile build
        coredump: fix null pointer dereference on coredump
        mm: shmem: disable interrupt when acquiring info->lock in userfaultfd_copy path
        shmem: fix possible deadlocks on shmlock_user_lock
        vmalloc: fix remap_vmalloc_range() bounds checks
        mm/shmem: fix build without THP
        mm/ksm: fix NULL pointer dereference when KSM zero page is enabled
        tools/build: tweak unused value workaround
        checkpatch: fix a typo in the regex for $allocFunctions
        mm, gup: return EINTR when gup is interrupted by fatal signals
        mm/hugetlb: fix a addressing exception caused by huge_pte_offset
        MAINTAINERS: add an entry for kfifo
        mm/userfaultfd: disable userfaultfd-wp on x86_32
        slub: avoid redzone when choosing freepointer location
        sh: fix build error in mm/init.c
      18bf3408
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 8160a563
      Linus Torvalds authored
      Pull kvm fixes from Paolo Bonzini:
       "Bugfixes, and a few cleanups to the newly-introduced assembly language
        vmentry code for AMD"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: PPC: Book3S HV: Handle non-present PTEs in page fault functions
        kvm: Disable objtool frame pointer checking for vmenter.S
        MAINTAINERS: add a reviewer for KVM/s390
        KVM: s390: Fix PV check in deliverable_irqs()
        kvm: Handle reads of SandyBridge RAPL PMU MSRs rather than injecting #GP
        KVM: Remove CREATE_IRQCHIP/SET_PIT2 race
        KVM: SVM: Fix __svm_vcpu_run declaration.
        KVM: SVM: Do not setup frame pointer in __svm_vcpu_run
        KVM: SVM: Fix build error due to missing release_pages() include
        KVM: SVM: Do not mark svm_vcpu_run with STACK_FRAME_NON_STANDARD
        kvm: nVMX: match comment with return type for nested_vmx_exit_reflected
        kvm: nVMX: reflect MTF VM-exits if injected by L1
        KVM: s390: Return last valid slot if approx index is out-of-bounds
        KVM: Check validity of resolved slot when searching memslots
        KVM: VMX: Enable machine check support for 32bit targets
        KVM: SVM: move more vmentry code to assembly
        KVM: SVM: fix compilation with modular PSP and non-modular KVM
      8160a563
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 189522da
      Linus Torvalds authored
      Pull virtio fixes and cleanups from Michael Tsirkin:
      
       - Some bug fixes
      
       - Cleanup a couple of issues that surfaced meanwhile
      
       - Disable vhost on ARM with OABI for now - to be fixed fully later in
         the cycle or in the next release.
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (24 commits)
        vhost: disable for OABI
        virtio: drop vringh.h dependency
        virtio_blk: add a missing include
        virtio-balloon: Avoid using the word 'report' when referring to free page hinting
        virtio-balloon: make virtballoon_free_page_report() static
        vdpa: fix comment of vdpa_register_device()
        vdpa: make vhost, virtio depend on menu
        vdpa: allow a 32 bit vq alignment
        drm/virtio: fix up for include file changes
        remoteproc: pull in slab.h
        rpmsg: pull in slab.h
        virtio_input: pull in slab.h
        remoteproc: pull in slab.h
        virtio-rng: pull in slab.h
        virtgpu: pull in uaccess.h
        tools/virtio: make asm/barrier.h self contained
        tools/virtio: define aligned attribute
        virtio/test: fix up after IOTLB changes
        vhost: Create accessors for virtqueues private_data
        vdpasim: Return status in vdpasim_get_status
        ...
      189522da
    • Linus Torvalds's avatar
      Merge tag 'tpmdd-next-20200421' of git://git.infradead.org/users/jjs/linux-tpmdd · b61f7ff0
      Linus Torvalds authored
      Pull tpm fixes from Jarkko Sakkinen:
       "A few bug fixes"
      
      * tag 'tpmdd-next-20200421' of git://git.infradead.org/users/jjs/linux-tpmdd:
        tpm/tpm_tis: Free IRQ if probing fails
        tpm: fix wrong return value in tpm_pcr_extend
        tpm: ibmvtpm: retry on H_CLOSED in tpm_ibmvtpm_send()
        tpm: Export tpm2_get_cc_attrs_tbl for ibmvtpm driver as module
      b61f7ff0
    • Linus Torvalds's avatar
      Merge tag 'clang-format-for-linus-v5.7-rc3' of git://github.com/ojeda/linux · 20f16489
      Linus Torvalds authored
      Pull clang-format fixlets from Miguel Ojeda:
       "Two trivial clang-format changes:
      
         - Don't indent C++ namespaces (Ian Rogers)
      
         - The usual clang-format macro list update (Miguel Ojeda)"
      
      * tag 'clang-format-for-linus-v5.7-rc3' of git://github.com/ojeda/linux:
        clang-format: Update with the latest for_each macro list
        clang-format: don't indent namespaces
      20f16489
    • Lucas Stach's avatar
      tools/vm: fix cross-compile build · cf01699e
      Lucas Stach authored
      Commit 7ed1c190 ("tools: fix cross-compile var clobbering") moved
      the setup of the CC variable to tools/scripts/Makefile.include to make
      the behavior consistent across all the tools Makefiles.
      
      As the vm tools missed the include we end up with the wrong CC in a
      cross-compiling evironment.
      
      Fixes: 7ed1c190 (tools: fix cross-compile var clobbering)
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Martin Kelly <martin@martingkelly.com>
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20200416104748.25243-1-l.stach@pengutronix.deSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      cf01699e
    • Sudip Mukherjee's avatar
      coredump: fix null pointer dereference on coredump · db973a72
      Sudip Mukherjee authored
      If the core_pattern is set to "|" and any process segfaults then we get
      a null pointer derefernce while trying to coredump. The call stack shows:
      
          RIP: do_coredump+0x628/0x11c0
      
      When the core_pattern has only "|" there is no use of trying the
      coredump and we can check that while formating the corename and exit
      with an error.
      
      After this change I get:
      
          format_corename failed
          Aborting core
      
      Fixes: 315c6926 ("coredump: split pipe command whitespace before expanding template")
      Reported-by: default avatarMatthew Ruffell <matthew.ruffell@canonical.com>
      Signed-off-by: default avatarSudip Mukherjee <sudipm.mukherjee@gmail.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Cc: Paul Wise <pabs3@bonedaddy.net>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: <stable@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20200416194612.21418-1-sudipm.mukherjee@gmail.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      db973a72
    • Yang Shi's avatar
      mm: shmem: disable interrupt when acquiring info->lock in userfaultfd_copy path · 94b7cc01
      Yang Shi authored
      Syzbot reported the below lockdep splat:
      
          WARNING: possible irq lock inversion dependency detected
          5.6.0-rc7-syzkaller #0 Not tainted
          --------------------------------------------------------
          syz-executor.0/10317 just changed the state of lock:
          ffff888021d16568 (&(&info->lock)->rlock){+.+.}, at: spin_lock include/linux/spinlock.h:338 [inline]
          ffff888021d16568 (&(&info->lock)->rlock){+.+.}, at: shmem_mfill_atomic_pte+0x1012/0x21c0 mm/shmem.c:2407
          but this lock was taken by another, SOFTIRQ-safe lock in the past:
           (&(&xa->xa_lock)->rlock#5){..-.}
      
          and interrupts could create inverse lock ordering between them.
      
          other info that might help us debug this:
           Possible interrupt unsafe locking scenario:
      
                 CPU0                    CPU1
                 ----                    ----
            lock(&(&info->lock)->rlock);
                                         local_irq_disable();
                                         lock(&(&xa->xa_lock)->rlock#5);
                                         lock(&(&info->lock)->rlock);
            <Interrupt>
              lock(&(&xa->xa_lock)->rlock#5);
      
           *** DEADLOCK ***
      
      The full report is quite lengthy, please see:
      
        https://lore.kernel.org/linux-mm/alpine.LSU.2.11.2004152007370.13597@eggly.anvils/T/#m813b412c5f78e25ca8c6c7734886ed4de43f241d
      
      It is because CPU 0 held info->lock with IRQ enabled in userfaultfd_copy
      path, then CPU 1 is splitting a THP which held xa_lock and info->lock in
      IRQ disabled context at the same time.  If softirq comes in to acquire
      xa_lock, the deadlock would be triggered.
      
      The fix is to acquire/release info->lock with *_irq version instead of
      plain spin_{lock,unlock} to make it softirq safe.
      
      Fixes: 4c27fe4c ("userfaultfd: shmem: add shmem_mcopy_atomic_pte for userfaultfd support")
      Reported-by: syzbot+e27980339d305f2dbfd9@syzkaller.appspotmail.com
      Signed-off-by: default avatarYang Shi <yang.shi@linux.alibaba.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Tested-by: syzbot+e27980339d305f2dbfd9@syzkaller.appspotmail.com
      Acked-by: default avatarHugh Dickins <hughd@google.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Link: http://lkml.kernel.org/r/1587061357-122619-1-git-send-email-yang.shi@linux.alibaba.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      94b7cc01