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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 02 Mar 2009 21:51:41 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Huang Ying <ying.huang@...el.com>
CC:	Brian Maly <bmaly@...hat.com>, Ingo Molnar <mingo@...e.hu>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Fix e820 end address with EFI

Huang Ying wrote:
> On Tue, 2009-03-03 at 13:37 +0800, Yinghai Lu wrote:
> [...]
>>> The dmesg with ignore_loglevel in kernel parameters is attached with the
>>> mail.
>>>
>>> init_memory_mapping: 0000000000000000-000000003f700000
>>>  0000000000 - 003f600000 page 2M
>>>  003f600000 - 003f700000 page 4k
>>> kernel direct mapping tables up to 3f700000 @ 8000-b000
>>> last_map_addr: 3f700000 end: 3f700000
>>>
>>> init_memory_mapping: 00000000fffb0000-00000000fffba000
>>>  00fffb0000 - 0100000000 page 4k
>>> last_map_addr: 100000000 end: fffba000
>> that is funny, the range calculating has some problem...when the range size < 2M...
> 
> Yes. Can you fix that? If you have no time, I can do that.
> 

please try

diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index c9d4466..25a7be8 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -748,6 +748,8 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,
 	pos = start_pfn << PAGE_SHIFT;
 	end_pfn = ((pos + (PMD_SIZE - 1)) >> PMD_SHIFT)
 			<< (PMD_SHIFT - PAGE_SHIFT);
+	if (end_pfn > (end>>PAGE_SHIFT))
+		end_pfn = end>>PAGE_SHIFT;
 	if (start_pfn < end_pfn) {
 		nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0);
 		pos = end_pfn << PAGE_SHIFT;
--
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