Re: [PATCH v4 4/7] iommu: Switch gather->end to the inclusive end

2021-01-18 Thread Robin Murphy
On 2021-01-07 12:29, Yong Wu wrote: Currently gather->end is "unsigned long" which may be overflow in arch32 in the corner case: 0xfff0 + 0x10(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

[PATCH v4 4/7] iommu: Switch gather->end to the inclusive end

2021-01-07 Thread Yong Wu
Currently gather->end is "unsigned long" which may be overflow in arch32 in the corner case: 0xfff0 + 0x10(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 -