1. 09 Aug, 2019 2 commits
    • Robin Murphy's avatar
      iommu/dma: Handle SG length overflow better · ab2cbeb0
      Robin Murphy authored
      Since scatterlist dimensions are all unsigned ints, in the relatively
      rare cases where a device's max_segment_size is set to UINT_MAX, then
      the "cur_len + s_length <= max_len" check in __finalise_sg() will always
      return true. As a result, the corner case of such a device mapping an
      excessively large scatterlist which is mergeable to or beyond a total
      length of 4GB can lead to overflow and a bogus truncated dma_length in
      the resulting segment.
      
      As we already assume that any single segment must be no longer than
      max_len to begin with, this can easily be addressed by reshuffling the
      comparison.
      
      Fixes: 809eac54 ("iommu/dma: Implement scatterlist segment merging")
      Reported-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
      Tested-by: default avatarNicolin Chen <nicoleotsuka@gmail.com>
      Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      ab2cbeb0
    • Lu Baolu's avatar
      iommu/vt-d: Correctly check format of page table in debugfs · bfeaec7f
      Lu Baolu authored
      PASID support and enable bit in the context entry isn't the right
      indicator for the type of tables (legacy or scalable mode). Check
      the DMA_RTADDR_SMT bit in the root context pointer instead.
      
      Cc: Ashok Raj <ashok.raj@intel.com>
      Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
      Cc: Kevin Tian <kevin.tian@intel.com>
      Cc: Sai Praneeth <sai.praneeth.prakhya@intel.com>
      Fixes: dd5142ca ("iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals")
      Signed-off-by: default avatarLu Baolu <baolu.lu@linux.intel.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      bfeaec7f
  2. 06 Aug, 2019 3 commits
  3. 05 Aug, 2019 1 commit
  4. 04 Aug, 2019 10 commits
  5. 03 Aug, 2019 24 commits