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: <20061027083405.GA18899@skynet.ie>
Date:	Fri, 27 Oct 2006 09:34:06 +0100
From:	mel@...net.ie (Mel Gorman)
To:	akpm@...l.org
Cc:	kmannth@...ibm.com, linux-kernel@...r.kernel.org
Subject: [PATCH] Calculation fix for memory holes beyong the end of physical memory

absent_pages_in_range() made the assumption that users of the arch-independent
zone-sizing API would not care about holes beyound the end of physical memory.
This was not the case and was "fixed" in a patch called "Account for holes
that are outside the range of physical memory". However, when given a range
that started before a hole in "real" memory and ended beyond the end of memory,
it would get the result wrong. The bug is in mainline but a patch is below.

It has been tested successfully on a number of machines and
architectures. Additional credit to Keith Mannthey for discovering the problem,
helping identify the correct fix and confirming it Worked For Him.

Signed-off-by: Mel Gorman <mel@....ul.ie>
---
diff -rup -X /usr/src/patchset-0.6/bin//dontdiff linux-2.6.19-rc2-mm2-clean/mm/page_alloc.c linux-2.6.19-rc2-mm2-fix_hole_pages/mm/page_alloc.c
--- linux-2.6.19-rc2-mm2-clean/mm/page_alloc.c	2006-10-23 09:53:24.000000000 +0100
+++ linux-2.6.19-rc2-mm2-fix_hole_pages/mm/page_alloc.c	2006-10-26 10:33:30.000000000 +0100
@@ -2511,7 +2511,7 @@ unsigned long __init __absent_pages_in_r
 
 	/* Account for ranges past physical memory on this node */
 	if (range_end_pfn > prev_end_pfn)
-		hole_pages = range_end_pfn -
+		hole_pages += range_end_pfn -
 				max(range_start_pfn, prev_end_pfn);
 
 	return hole_pages;
-
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