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>] [day] [month] [year] [list]
Message-Id: <20080216180935E.tomof@acm.org>
Date:	Sat, 16 Feb 2008 18:09:36 +0900
From:	FUJITA Tomonori <tomof@....org>
To:	linux-kernel@...r.kernel.org
Cc:	fujita.tomonori@....ntt.co.jp
Subject: [PATCH] iommu-helper: segment boundary limit should be a power of 2

The segment boundary limit should be a power of 2 so let's make it
clear.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
---
 lib/iommu-helper.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c
index 495575a..de0eced 100644
--- a/lib/iommu-helper.c
+++ b/lib/iommu-helper.c
@@ -54,6 +54,8 @@ unsigned long iommu_area_alloc(unsigned long *map, unsigned long size,
 			       unsigned long align_mask)
 {
 	unsigned long index;
+
+	BUG_ON(!is_power_of_2(boundary_size));
 again:
 	index = find_next_zero_area(map, size, start, nr, align_mask);
 	if (index != -1) {
-- 
1.5.3.7

--
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