1. 07 Jan, 2021 2 commits
    • Sean Christopherson's avatar
      KVM: x86/mmu: Get root level from walkers when retrieving MMIO SPTE · 39b4d43e
      Sean Christopherson authored
      Get the so called "root" level from the low level shadow page table
      walkers instead of manually attempting to calculate it higher up the
      stack, e.g. in get_mmio_spte().  When KVM is using PAE shadow paging,
      the starting level of the walk, from the callers perspective, is not
      the CR3 root but rather the PDPTR "root".  Checking for reserved bits
      from the CR3 root causes get_mmio_spte() to consume uninitialized stack
      data due to indexing into sptes[] for a level that was not filled by
      get_walk().  This can result in false positives and/or negatives
      depending on what garbage happens to be on the stack.
      
      Opportunistically nuke a few extra newlines.
      
      Fixes: 95fb5b02 ("kvm: x86/mmu: Support MMIO in the TDP MMU")
      Reported-by: default avatarRichard Herbert <rherbert@sympatico.ca>
      Cc: Ben Gardon <bgardon@google.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20201218003139.2167891-3-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      39b4d43e
    • Sean Christopherson's avatar
      KVM: x86/mmu: Use -1 to flag an undefined spte in get_mmio_spte() · 2aa07893
      Sean Christopherson authored
      Return -1 from the get_walk() helpers if the shadow walk doesn't fill at
      least one spte, which can theoretically happen if the walk hits a
      not-present PDPTR.  Returning the root level in such a case will cause
      get_mmio_spte() to return garbage (uninitialized stack data).  In
      practice, such a scenario should be impossible as KVM shouldn't get a
      reserved-bit page fault with a not-present PDPTR.
      
      Note, using mmu->root_level in get_walk() is wrong for other reasons,
      too, but that's now a moot point.
      
      Fixes: 95fb5b02 ("kvm: x86/mmu: Support MMIO in the TDP MMU")
      Cc: Ben Gardon <bgardon@google.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
      Message-Id: <20201218003139.2167891-2-seanjc@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      2aa07893
  2. 13 Dec, 2020 3 commits
    • Linus Torvalds's avatar
      Linux 5.10 · 2c85ebc5
      Linus Torvalds authored
      2c85ebc5
    • Linus Torvalds's avatar
      Merge tag 'x86-urgent-2020-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · ec6f5e0e
      Linus Torvalds authored
      Pull x86 fixes from Thomas Gleixner:
       "A set of x86 and membarrier fixes:
      
         - Correct a few problems in the x86 and the generic membarrier
           implementation. Small corrections for assumptions about visibility
           which have turned out not to be true.
      
         - Make the PAT bits for memory encryption correct vs 4K and 2M/1G
           page table entries as they are at a different location.
      
         - Fix a concurrency issue in the the local bandwidth readout of
           resource control leading to incorrect values
      
         - Fix the ordering of allocating a vector for an interrupt. The order
           missed to respect the provided cpumask when the first attempt of
           allocating node local in the mask fails. It then tries the node
           instead of trying the full provided mask first. This leads to
           erroneous error messages and breaking the (user) supplied affinity
           request. Reorder it.
      
         - Make the INT3 padding detection in optprobe work correctly"
      
      * tag 'x86-urgent-2020-12-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/kprobes: Fix optprobe to detect INT3 padding correctly
        x86/apic/vector: Fix ordering in vector assignment
        x86/resctrl: Fix incorrect local bandwidth when mba_sc is enabled
        x86/mm/mem_encrypt: Fix definition of PMD_FLAGS_DEC_WP
        membarrier: Execute SYNC_CORE on the calling thread
        membarrier: Explicitly sync remote cores when SYNC_CORE is requested
        membarrier: Add an actual barrier before rseq_preempt()
        x86/membarrier: Get rid of a dubious optimization
      ec6f5e0e
    • Linus Torvalds's avatar
      Merge tag 'block-5.10-2020-12-12' of git://git.kernel.dk/linux-block · d2360a39
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "This should be it for 5.10.
      
        Mike and Song looked into the warning case, and thankfully it appears
        the fix was pretty trivial - we can just change the md device chunk
        type to unsigned int to get rid of it. They cannot currently be < 0,
        and nobody is checking for that either.
      
        We're reverting the discard changes as the corruption reports came in
        very late, and there's just no time to attempt to deal with it at this
        point. Reverting the changes in question is the right call for 5.10"
      
      * tag 'block-5.10-2020-12-12' of git://git.kernel.dk/linux-block:
        md: change mddev 'chunk_sectors' from int to unsigned
        Revert "md: add md_submit_discard_bio() for submitting discard bio"
        Revert "md/raid10: extend r10bio devs to raid disks"
        Revert "md/raid10: pull codes that wait for blocked dev into one function"
        Revert "md/raid10: improve raid10 discard request"
        Revert "md/raid10: improve discard request for far layout"
        Revert "dm raid: remove unnecessary discard limits for raid10"
      d2360a39
  3. 12 Dec, 2020 12 commits
  4. 11 Dec, 2020 23 commits