lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1282064161-21056-1-git-send-email-x0095840@ti.com>
Date:	Tue, 17 Aug 2010 11:56:01 -0500
From:	Fernando Guzman Lugo <x0095840@...com>
To:	<linux-kernel@...r.kernel.org>, <linux-omap@...r.kernel.org>
Cc:	<Hiroshi.DOYU@...ia.com>, <h-kanigeri2@...com>,
	Fernando Guzman Lugo <x0095840@...com>
Subject: [PATCH] iommu: fix end address of vm area comparation in alloc_iovm_area

End address of the vm area is .start + bytes -1., not start + byte.
This patch fixes that issue by doing an inclusive comparison with
tmp->da_start. This issue was preventing allocate an area of size
exactly the same than the free area. I did no change the value of
da_end of each vm area because it is used to get area size in
several places.

Signed-off-by: Fernando Guzman Lugo <x0095840@...com>
Acked-by: Hiroshi DOYU <Hiroshi.DOYU@...ia.com>
---
 arch/arm/plat-omap/iovmm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/iovmm.c b/arch/arm/plat-omap/iovmm.c
index 8ce0de2..24ca9c4 100644
--- a/arch/arm/plat-omap/iovmm.c
+++ b/arch/arm/plat-omap/iovmm.c
@@ -292,7 +292,7 @@ static struct iovm_struct *alloc_iovm_area(struct iommu *obj, u32 da,
 		if (prev_end >= start)
 			break;
 
-		if (start + bytes < tmp->da_start)
+		if (start + bytes <= tmp->da_start)
 			goto found;
 
 		if (flags & IOVMF_DA_ANON)
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ