Re: [PATCH v4 6/6] arm: dma-mapping: updates to limit dma_mask and iommu mapping size

2015-01-27 Thread Murali Karicheri
On 01/27/2015 06:34 AM, Catalin Marinas wrote: On Tue, Jan 27, 2015 at 11:12:32AM +, Robin Murphy wrote: On 23/01/15 22:32, Murali Karicheri wrote: Limit the dma_mask to minimum of dma_mask and dma_base + size - 1. Also arm_iommu_create_mapping() has size parameter of size_t and arm_setup_

Re: [PATCH v4 6/6] arm: dma-mapping: updates to limit dma_mask and iommu mapping size

2015-01-27 Thread Catalin Marinas
On Tue, Jan 27, 2015 at 11:12:32AM +, Robin Murphy wrote: > On 23/01/15 22:32, Murali Karicheri wrote: > > Limit the dma_mask to minimum of dma_mask and dma_base + size - 1. > > > > Also arm_iommu_create_mapping() has size parameter of size_t and > > arm_setup_iommu_dma_ops() can take a value h

Re: [PATCH v4 6/6] arm: dma-mapping: updates to limit dma_mask and iommu mapping size

2015-01-27 Thread Robin Murphy
Hi Murali, On 23/01/15 22:32, Murali Karicheri wrote: Limit the dma_mask to minimum of dma_mask and dma_base + size - 1. Also arm_iommu_create_mapping() has size parameter of size_t and arm_setup_iommu_dma_ops() can take a value higher than that. So limit the size to SIZE_MAX. Signed-off-by: M

[PATCH v4 6/6] arm: dma-mapping: updates to limit dma_mask and iommu mapping size

2015-01-23 Thread Murali Karicheri
Limit the dma_mask to minimum of dma_mask and dma_base + size - 1. Also arm_iommu_create_mapping() has size parameter of size_t and arm_setup_iommu_dma_ops() can take a value higher than that. So limit the size to SIZE_MAX. Signed-off-by: Murali Karicheri --- arch/arm/mm/dma-mapping.c | 10 ++