linux/drivers/iommu/arm
Yong Wu 862c3715de iommu: Switch gather->end to the inclusive end
Currently gather->end is "unsigned long" which may be overflow in
arch32 in the corner case: 0xfff00000 + 0x100000(iova + size).
Although it doesn't affect the size(end - start), it affects the checking
"gather->end < end"

This patch changes this "end" to the real end address
(end = start + size - 1). Correspondingly, update the length to
"end - start + 1".

Fixes: a7d20dc19d ("iommu: Introduce struct iommu_iotlb_gather for batching TLB flushes")
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210107122909.16317-5-yong.wu@mediatek.com
Signed-off-by: Will Deacon <will@kernel.org>
2021-01-27 12:32:27 +00:00
..
arm-smmu iommu/io-pgtable: Remove tlb_flush_leaf 2020-12-08 15:23:37 +00:00
arm-smmu-v3 iommu: Switch gather->end to the inclusive end 2021-01-27 12:32:27 +00:00
Makefile