1. 12 12月, 2020 2 次提交
  2. 11 12月, 2020 4 次提交
  3. 09 12月, 2020 5 次提交
  4. 08 12月, 2020 1 次提交
  5. 07 12月, 2020 2 次提交
    • A
      userfaultfd: selftests: fix SIGSEGV if huge mmap fails · 573a2593
      Axel Rasmussen 提交于
      The error handling in hugetlb_allocate_area() was incorrect for the
      hugetlb_shared test case.
      
      Previously the behavior was:
      
      - mmap a hugetlb area
        - If this fails, set the pointer to NULL, and carry on
      - mmap an alias of the same hugetlb fd
        - If this fails, munmap the original area
      
      If the original mmap failed, it's likely the second one did too.  If
      both failed, we'd blindly try to munmap a NULL pointer, causing a
      SIGSEGV.  Instead, "goto fail" so we return before trying to mmap the
      alias.
      
      This issue can be hit "in real life" by forgetting to set
      /proc/sys/vm/nr_hugepages (leaving it at 0), and then trying to run the
      hugetlb_shared test.
      
      Another small improvement is, when the original mmap fails, don't just
      print "it failed": perror(), so we can see *why*.  :)
      Signed-off-by: NAxel Rasmussen <axelrasmussen@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Peter Xu <peterx@redhat.com>
      Cc: Joe Perches <joe@perches.com>
      Cc: Mike Rapoport <rppt@linux.vnet.ibm.com>
      Cc: Andrea Arcangeli <aarcange@redhat.com>
      Cc: David Alan Gilbert <dgilbert@redhat.com>
      Link: https://lkml.kernel.org/r/20201204203443.2714693-1-axelrasmussen@google.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      573a2593
    • X
      tools/testing/selftests/vm: fix build error · d8cbe8bf
      Xingxing Su 提交于
      Only x86 and PowerPC implement the pkey-xxx.h, and an error was reported
      when compiling protection_keys.c.
      
      Add a Arch judgment to compile "protection_keys" in the Makefile.
      
      If other arch implement this, add the arch name to the Makefile.
      eg:
          ifneq (,$(findstring $(ARCH),powerpc mips ... ))
      
      Following build errors:
      
          pkey-helpers.h:93:2: error: #error Architecture not supported
           #error Architecture not supported
          pkey-helpers.h:96:20: error: `PKEY_DISABLE_ACCESS' undeclared
           #define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE)
                              ^
          protection_keys.c:218:45: error: `PKEY_DISABLE_WRITE' undeclared
           pkey_assert(flags & (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE));
                                                      ^
      Signed-off-by: NXingxing Su <suxingxing@loongson.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Sandipan Das <sandipan@linux.ibm.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Brian Geffon <bgeffon@google.com>
      Cc: Mina Almasry <almasrymina@google.com>
      Link: https://lkml.kernel.org/r/1606826876-30656-1-git-send-email-suxingxing@loongson.cnSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d8cbe8bf
  6. 06 12月, 2020 2 次提交
  7. 04 12月, 2020 1 次提交
    • M
      selftests: kvm/set_memory_region_test: Fix race in move region test · 0c55f867
      Maciej S. Szmigiero 提交于
      The current memory region move test correctly handles the situation that
      the second (realigning) memslot move operation would temporarily trigger
      MMIO until it completes, however it does not handle the case in which the
      first (misaligning) move operation does this, too.
      This results in false test assertions in case it does so.
      
      Fix this by handling temporary MMIO from the first memslot move operation
      in the test guest code, too.
      
      Fixes: 8a0639fe ("KVM: sefltests: Add explicit synchronization to move mem region test")
      Signed-off-by: NMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
      Message-Id: <0fdddb94bb0e31b7da129a809a308d91c10c0b5e.1606941224.git.maciej.szmigiero@oracle.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      0c55f867
  8. 02 12月, 2020 2 次提交
  9. 01 12月, 2020 2 次提交
  10. 29 11月, 2020 1 次提交
  11. 28 11月, 2020 6 次提交
  12. 25 11月, 2020 1 次提交
  13. 21 11月, 2020 2 次提交
  14. 20 11月, 2020 2 次提交
  15. 19 11月, 2020 6 次提交
  16. 18 11月, 2020 1 次提交