Skip to content

Fix double allocation in swiotlb_alloc()

Will Deacon linux-iommu lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest6 patches 23 repliesIn review
  2. v56 patches 30 repliesSuperseded
  3. v45 patches 21 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches6 repliesSuperseded
v23 patches10 repliesSuperseded
v12 patches15 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6swiotlb: Fix double-allocation of slots due to broken alignment handlingkernel/dma/swiotlb.c+15 -132 replies
2/6swiotlb: Enforce page alignment in swiotlb_alloc()kernel/dma/swiotlb.c+6 -00 replies
3/6swiotlb: Honour dma_alloc_coherent() alignment in swiotlb_alloc()kernel/dma/swiotlb.c+3 -10 replies
4/6swiotlb: Fix alignment checks when both allocation and DMA masks are presentkernel/dma/swiotlb.c+9 -29 replies
5/6iommu/dma: Force swiotlb_max_mapping_size on an untrusted devicedrivers/iommu/dma-iommu.c+9 -00 replies
6/6swiotlb: Reinstate page-alignment for mappings >= PAGE_SIZEkernel/dma/swiotlb.c+11 -78 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchMichael KelleyPetr TesarikNicolin ChenRobin Murphy
SeriesT-b T-b
1/6R-b R-b T-b
2/6R-b R-b T-b
3/6R-b R-b T-b
4/6R-b T-b
5/6R-b A-b
6/6R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/6] Fix double allocation in swiotlb_alloc()

Hi again, folks,

This is version six of the patches which I previously posted at:

v1: https://lore.kernel.org/r/[email protected]
v2: https://lore.kernel.org/r/[email protected]
v3: https://lore.kernel.org/r/[email protected]
v4: https://lore.kernel.org/r/[email protected]
v5: https://lore.kernel.org/r/[email protected]

Changes since v5 include:

- Rework the final patch to preserve page-alignment for streaming requests without a DMA alignment mask

- Added Reviewed-by tags from Michael

Cheers,

Will

Cc Christoph Hellwig <[email protected]>
Cc Marek Szyprowski <[email protected]>
Cc Robin Murphy <[email protected]>
Cc Petr Tesarik <[email protected]>
Cc Dexuan Cui <[email protected]>
Cc Nicolin Chen <[email protected]>
Cc Michael Kelley <[email protected]>

--->8

Nicolin Chen (1):
iommu/dma: Force swiotlb_max_mapping_size on an untrusted device

Will Deacon (5):
swiotlb: Fix double-allocation of slots due to broken alignment
handling
swiotlb: Enforce page alignment in swiotlb_alloc()
swiotlb: Honour dma_alloc_coherent() alignment in swiotlb_alloc()
swiotlb: Fix alignment checks when both allocation and DMA masks are
present
swiotlb: Reinstate page-alignment for mappings >= PAGE_SIZE

 drivers/iommu/dma-iommu.c |  9 ++++++++
 kernel/dma/swiotlb.c      | 47 ++++++++++++++++++++++++++++-----------
 2 files changed, 43 insertions(+), 13 deletions(-)
Signature · 1 line
2.44.0.278.ge034bb2e1d-goog