Skip to content

Add DMA attributes tracking

Leon Romanovsky linux-iommu lkml ntb 2 versions – Applied

Status from this message: Applied all patches to dma-mapping-for-next. Thanks!

Get series with b4
b4 am [email protected] change-id 20260323-dma-attrs-debug-85e282d6f3bb

Versions newest first

  1. v2 Latest6 patches 9 repliesApplied
  2. v11 patch 4 repliesApplied

Changes in v2 from the cover letter

- Split original patch to be a series
- Added all unmap flows
- Skipped DMA attributes which exist only in map path
- Added ntb patch
- Link to v1: https://patch.msgid.link/[email protected]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/6ntb: Store original DMA address for future releasedrivers/ntb/ntb_transport.c+3 -11 reply
2/6ntb: Use consistent DMA attributes when freeing DMA mappingsdrivers/ntb/ntb_transport.c+4 -41 reply
3/6dma-debug: Remove unused DMA attribute parameterkernel/dma/debug.c kernel/dma/debug.h kernel/dma/mapping.c+5 -81 reply
4/6dma-debug: Record DMA attributes in debug entrykernel/dma/debug.c+29 -191 reply
5/6dma-debug: Feed DMA attribute for unmapping flows tookernel/dma/debug.c kernel/dma/debug.h kernel/dma/mapping.c+23 -171 reply
6/6dma-debug: Ensure mappings are created and released with matching attributeskernel/dma/debug.c+23 -01 reply

Reviews trailers per patch

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

PatchDave JiangSamiullah Khawaja
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] Add DMA attributes tracking

The DMA API expects that callers use the same attributes when mapping and unmapping. Add tracking to verify this and catch mismatches.

Thanks

---
Changes in v2:
- Split original patch to be a series
- Added all unmap flows
- Skipped DMA attributes which exist only in map path
- Added ntb patch
- Link to v1: https://patch.msgid.link/[email protected]

---
Leon Romanovsky (6):
ntb: Store original DMA address for future release
ntb: Use consistent DMA attributes when freeing DMA mappings
dma-debug: Remove unused DMA attribute parameter
dma-debug: Record DMA attributes in debug entry
dma-debug: Feed DMA attribute for unmapping flows too
dma-debug: Ensure mappings are created and released with matching attributes

 drivers/ntb/ntb_transport.c | 10 +++---
 kernel/dma/debug.c          | 87 +++++++++++++++++++++++++++++++--------------
 kernel/dma/debug.h          | 25 ++++++-------
 kernel/dma/mapping.c        | 10 +++---
 4 files changed, 85 insertions(+), 47 deletions(-)

---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260323-dma-attrs-debug-85e282d6f3bb

Best regards,

Signature · 1 line
Leon Romanovsky <[email protected]>