Skip to contentSkip to conversation

x86/32: treat all pfns as low in dump_pagetable before max_low_pfn is set

PATCH New Ian Campbell 1 participant 1 message Oct 29, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/32: treat all pfns as low in dump_pagetable before max_low_pfn is set

If we end up calling dump_pagetable before max_low_pfn is set then currently we always stop after pdpt since low_pfn(...) is always false.

If we are calling dump_pagetable this early then I think it is reasonably safe to assume all PFNs are low.

In any case if things are going so badly wrong so early on then we might as well struggle on and print as much of the page table as possible.

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
---
 arch/x86/mm/fault.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/fault.c +1 -1
index 7d90ceb..7a2afc7 100644
@@ -306,7 +306,7 @@ check_v8086_mode(struct pt_regs *regs, unsigned long address,
 
 static bool low_pfn(unsigned long pfn)
 {
-	return pfn < max_low_pfn;
+	return !max_low_pfn || pfn < max_low_pfn;
 }
 
 static void dump_pagetable(unsigned long address)
Signature · 1 line
1.5.6.5