mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: linux-kernel@vger.kernel.org
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>
Subject: [PATCH] x86/32: treat all pfns as low in dump_pagetable before max_low_pfn is set
Date: Fri, 29 Oct 2010 16:53:32 +0100	[thread overview]
Message-ID: <1288367612-23829-1-git-send-email-ian.campbell@citrix.com> (raw)

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.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
---
 arch/x86/mm/fault.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 7d90ceb..7a2afc7 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -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)
-- 
1.5.6.5


                 reply	other threads:[~2010-10-29 15:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288367612-23829-1-git-send-email-ian.campbell@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®