I saw a couple places where overflows could potentially occur.
I've only compile tested these changes.
Thanks,
drew
Andrew Jones (2):
ACPI/IORT: Handle potential overflow in iort_dma_setup
iommu/dma: Handle potential overflow in iommu_dma_init_domain
drivers/acpi/arm64/iort.c
The sum of dmaaddr and size may overflow, particularly considering
there are cases where size will be U64_MAX.
Signed-off-by: Andrew Jones
---
drivers/acpi/arm64/iort.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64
if we shouldn't at least warn when base is not aligned?
Signed-off-by: Andrew Jones
---
drivers/iommu/dma-iommu.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index d1b04753b204..a0b01398b15c 100644
---
On Wed, Dec 19, 2018 at 12:21:35PM +, Robin Murphy wrote:
> On 18/12/2018 18:48, Andrew Jones wrote:
> > The sum of dmaaddr and size may overflow, particularly considering
> > there are cases where size will be U64_MAX.
>
> Only if the firmware is broken in the first pl