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]
Date:	Fri, 28 Jul 2006 15:08:52 +0200
From:	Heiko Carstens <heiko.carstens@...ibm.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	Ingo Molnar <mingo@...e.hu>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	linux-kernel@...r.kernel.org
Subject: [patch] bootmem: use MAX_DMA_ADDRESS instead of LOW32LIMIT

From: Heiko Carstens <heiko.carstens@...ibm.com>

__alloc_bootmem_low() and __alloc_bootmem_low_node() should use
MAX_DMA_ADDRESS as limit which is per architecture instead of a global
LOW32LIMIT. Otherwise the bootmem allocator may return addresses
to memory regions which cannot be used for DMA access.

Signed-off-by: Heiko Carstens <heiko.carstens@...ibm.com>
---

 mm/bootmem.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/mm/bootmem.c b/mm/bootmem.c
index 50353e0..541bbe9 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -436,8 +436,6 @@ void * __init __alloc_bootmem_node(pg_da
 	return __alloc_bootmem(size, align, goal);
 }
 
-#define LOW32LIMIT 0xffffffff
-
 void * __init __alloc_bootmem_low(unsigned long size, unsigned long align, unsigned long goal)
 {
 	bootmem_data_t *bdata;
@@ -445,7 +443,7 @@ void * __init __alloc_bootmem_low(unsign
 
 	list_for_each_entry(bdata, &bdata_list, list)
 		if ((ptr = __alloc_bootmem_core(bdata, size,
-						 align, goal, LOW32LIMIT)))
+						 align, goal, MAX_DMA_ADDRESS)))
 			return(ptr);
 
 	/*
@@ -459,5 +457,6 @@ void * __init __alloc_bootmem_low(unsign
 void * __init __alloc_bootmem_low_node(pg_data_t *pgdat, unsigned long size,
 				       unsigned long align, unsigned long goal)
 {
-	return __alloc_bootmem_core(pgdat->bdata, size, align, goal, LOW32LIMIT);
+	return __alloc_bootmem_core(pgdat->bdata, size, align, goal,
+				    MAX_DMA_ADDRESS);
 }
-
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