1. 23 Apr, 2020 6 commits
  2. 22 Apr, 2020 7 commits
  3. 21 Apr, 2020 23 commits
  4. 20 Apr, 2020 4 commits
    • Paul Mackerras's avatar
      KVM: PPC: Book3S HV: Handle non-present PTEs in page fault functions · ae49deda
      Paul Mackerras authored
      Since cd758a9b "KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot in HPT
      page fault handler", it's been possible in fairly rare circumstances to
      load a non-present PTE in kvmppc_book3s_hv_page_fault() when running a
      guest on a POWER8 host.
      
      Because that case wasn't checked for, we could misinterpret the non-present
      PTE as being a cache-inhibited PTE.  That could mismatch with the
      corresponding hash PTE, which would cause the function to fail with -EFAULT
      a little further down.  That would propagate up to the KVM_RUN ioctl()
      generally causing the KVM userspace (usually qemu) to fall over.
      
      This addresses the problem by catching that case and returning to the guest
      instead.
      
      For completeness, this fixes the radix page fault handler in the same
      way.  For radix this didn't cause any obvious misbehaviour, because we
      ended up putting the non-present PTE into the guest's partition-scoped
      page tables, leading immediately to another hypervisor data/instruction
      storage interrupt, which would go through the page fault path again
      and fix things up.
      
      Fixes: cd758a9b "KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot in HPT page fault handler"
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1820402Reported-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Tested-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      ae49deda
    • Josh Poimboeuf's avatar
      kvm: Disable objtool frame pointer checking for vmenter.S · 7f4b5cde
      Josh Poimboeuf authored
      Frame pointers are completely broken by vmenter.S because it clobbers
      RBP:
      
        arch/x86/kvm/svm/vmenter.o: warning: objtool: __svm_vcpu_run()+0xe4: BP used as a scratch register
      
      That's unavoidable, so just skip checking that file when frame pointers
      are configured in.
      
      On the other hand, ORC can handle that code just fine, so leave objtool
      enabled in the !FRAME_POINTER case.
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Message-Id: <01fae42917bacad18be8d2cbc771353da6603473.1587398610.git.jpoimboe@redhat.com>
      Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Fixes: 199cd1d7 ("KVM: SVM: Split svm_vcpu_run inline assembly to separate file")
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7f4b5cde
    • Paul Moore's avatar
      audit: check the length of userspace generated audit records · 763dafc5
      Paul Moore authored
      Commit 75612528 ("audit: always check the netlink payload length
      in audit_receive_msg()") fixed a number of missing message length
      checks, but forgot to check the length of userspace generated audit
      records.  The good news is that you need CAP_AUDIT_WRITE to submit
      userspace audit records, which is generally only given to trusted
      processes, so the impact should be limited.
      
      Cc: stable@vger.kernel.org
      Fixes: 75612528 ("audit: always check the netlink payload length in audit_receive_msg()")
      Reported-by: syzbot+49e69b4d71a420ceda3e@syzkaller.appspotmail.com
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      763dafc5
    • Jarkko Sakkinen's avatar
      tpm/tpm_tis: Free IRQ if probing fails · b160c94b
      Jarkko Sakkinen authored
      Call disable_interrupts() if we have to revert to polling in order not to
      unnecessarily reserve the IRQ for the life-cycle of the driver.
      
      Cc: stable@vger.kernel.org # 4.5.x
      Reported-by: default avatarHans de Goede <hdegoede@redhat.com>
      Fixes: e3837e74 ("tpm_tis: Refactor the interrupt setup")
      Signed-off-by: default avatarJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      b160c94b