Skip to contentSkip to conversation

x86_64: fix mm.txt documentation

PATCH In review Jiri Slaby 3 participants 9 messages May 1, 2008 – May 2, 2008

Subsystems (3)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/2 x86_64: fix mm.txt documentation

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

---
 Documentation/x86_64/mm.txt |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
Documentation/x86_64/mm.txt +2 -3
index b89b6d2..efce750 100644
@@ -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
Signature · 1 line
1.5.4.5
author
#1 lore raw

PATCH 2/2 x86_64: use PAGE_OFFSET in dump_pagetables

Use PAGE_OFFSET macro instead of using 0xffff810000000000UL directly.

---
 arch/x86/mm/dump_pagetables.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/dump_pagetables.c +1 -1
index 6791b83..6f8e3fe 100644
@@ -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" },
Signature · 1 line
1.5.4.5
#2 lore raw

Re: [PATCH 2/2] x86_64: use PAGE_OFFSET in dump_pagetables

Quoted 1 line · Jiri Slaby

Use PAGE_OFFSET macro instead of using 0xffff810000000000UL directly.

thanks Jiri, applied.

Ingo

#3 lore raw
In reply to Jiri Slaby
Quoted 3 lines · Jiri Slaby

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

thanks Jiri, applied.

Documentation/x86_64/mm.txt ffffc10000000000 - ffffc1ffffffffff (=40 bits) hole · line 15

Quoted 7 lines

[Wasn't the hole intentional protection hole?]

Documentation/x86_64/mm.txt +2 -3
-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

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

author
#4 lore raw
Quoted 1 line · Ingo Molnar

Mind doing a patch that reinstates it, by lowering the 512 image size limit to 508 MB?

Yup, I will.

#5 lore raw
In reply to Ingo Molnar
Quoted 5 lines

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]

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

author
#6 lore raw
Quoted 5 lines · Andi Kleen
Quoted 1 line

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]

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.

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?

#7 lore raw
In reply to Jiri Slaby
Quoted 5 lines · Jiri Slaby

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

Yes it was.

-Andi

author
#8 lore raw
Quoted 8 lines · Andi Kleen
Quoted 5 lines · Jiri Slaby

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

Yes it was.

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