Skip to content
Commit e81e99ba authored by David Stevens's avatar David Stevens Committed by Joerg Roedel
Browse files

swiotlb: Support aligned swiotlb buffers



Add an argument to swiotlb_tbl_map_single that specifies the desired
alignment of the allocated buffer. This is used by dma-iommu to ensure
the buffer is aligned to the iova granule size when using swiotlb with
untrusted sub-granule mappings. This addresses an issue where adjacent
slots could be exposed to the untrusted device if IO_TLB_SIZE < iova
granule < PAGE_SIZE.

Signed-off-by: default avatarDavid Stevens <stevensd@chromium.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20210929023300.335969-7-stevensd@google.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 2e727bff
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment