Re: [PATCH 1/2] x86_64: fix mm.txt documentation

Previous thread: none

Next thread: Re: [PATCH 0/1] Embedded Maintainer(s), linux-embedded@vger list by David Woodhouse on Thursday, May 1, 2008 - 3:02 am. (15 messages)
From: Jiri Slaby
Date: Thursday, May 1, 2008 - 2:58 am

Commit 85eb69a16aab5a394ce043c2131319eae35e6493 introduced 512 MiB
sized kernel and 1.5 GiB sized module space but omitted to change
documentation properly. Fix that.

[Wasn't the hole intentional protection hole?]

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: tglx@linutronix.de
Cc: mingo@redhat.com
Cc: hpa@zytor.com
---
 Documentation/x86_64/mm.txt |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Documentation/x86_64/mm.txt b/Documentation/x86_64/mm.txt
index b89b6d2..efce750 100644
--- a/Documentation/x86_64/mm.txt
+++ b/Documentation/x86_64/mm.txt
@@ -11,9 +11,8 @@ ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole
 ffffc20000000000 - ffffe1ffffffffff (=45 bits) vmalloc/ioremap space
 ffffe20000000000 - ffffe2ffffffffff (=40 bits) virtual memory map (1TB)
 ... unused hole ...
-ffffffff80000000 - ffffffff82800000 (=40 MB)   kernel text mapping, from phys 0
-... unused hole ...
-ffffffff88000000 - fffffffffff00000 (=1919 MB) module mapping space
+ffffffff80000000 - ffffffffa0000000 (=512 MB)  kernel text mapping, from phys 0
+ffffffffa0000000 - fffffffffff00000 (=1536 MB) module mapping space
 
 The direct mapping covers all memory in the system up to the highest
 memory address (this means in some cases it can also include PCI memory
-- 
1.5.4.5

--

From: Jiri Slaby
Date: Thursday, May 1, 2008 - 2:58 am

Use PAGE_OFFSET macro instead of using 0xffff810000000000UL directly.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: tglx@linutronix.de
Cc: mingo@redhat.com
Cc: hpa@zytor.com
---
 arch/x86/mm/dump_pagetables.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c
index 6791b83..6f8e3fe 100644
--- a/arch/x86/mm/dump_pagetables.c
+++ b/arch/x86/mm/dump_pagetables.c
@@ -42,7 +42,7 @@ static struct addr_marker address_markers[] = {
 	{ 0, "User Space" },
 #ifdef CONFIG_X86_64
 	{ 0x8000000000000000UL, "Kernel Space" },
-	{ 0xffff810000000000UL, "Low Kernel Mapping" },
+	{ PAGE_OFFSET,		"Low Kernel Mapping" },
 	{ VMALLOC_START,        "vmalloc() Area" },
 	{ VMEMMAP_START,        "Vmemmap" },
 	{ __START_KERNEL_map,   "High Kernel Mapping" },
-- 
1.5.4.5

--

From: Ingo Molnar
Date: Friday, May 2, 2008 - 12:33 am

thanks Jiri, applied.

	Ingo
--

From: Ingo Molnar
Date: Friday, May 2, 2008 - 12:22 am

yep, the image was in a 128 MB chunk from which 88 MB was left empty and 
modules started at the next 128 MB boundary. The largest image i ever 
had was around 44MB, so i doubt it's an issue in practice. Mind doing a 
patch that reinstates it, by lowering the 512 image size limit to 508 
MB? [4MB should be more than enough in practice]

	Ingo
--

From: Jiri Slaby
Date: Friday, May 2, 2008 - 12:57 am

Yup, I will.
--

From: Andi Kleen
Date: Friday, May 2, 2008 - 1:38 am

Actually you could even limit to the exact know size of the kernel (rounded
up to 2MB) after early boot. Then the protection would be even better and less
aliasing to deal with for pageattr.c. Just invalidate the left over PMDs.

-Andi
--

From: Jiri Slaby
Date: Friday, May 2, 2008 - 1:47 am

Doesn't cleanup_highmap() do that? ... so I guess we don't need the hole? Or do 
we when we reach the limit to not go over to modules?
--

From: Andi Kleen
Date: Friday, May 2, 2008 - 1:00 am

Yes it was.

-Andi
--

From: Jiri Slaby
Date: Friday, May 2, 2008 - 12:55 am

Thanks. Going to post a patch to re-introduce the hole.
--

Previous thread: none

Next thread: Re: [PATCH 0/1] Embedded Maintainer(s), linux-embedded@vger list by David Woodhouse on Thursday, May 1, 2008 - 3:02 am. (15 messages)