[Top] [All Lists]

Re: [PATCH] cleanup vmalloc_fault for 64bit kernel

To: Wu Fei <>
Subject: Re: [PATCH] cleanup vmalloc_fault for 64bit kernel
From: David Daney <>
Date: Wed, 09 Sep 2009 08:35:26 -0700
Cc: Ralf Baechle <>,
In-reply-to: <20090831132811.GA6924@desktop>
Original-recipient: rfc822;
References: <20090831132811.GA6924@desktop>
User-agent: Thunderbird (X11/20090320)
Wu Fei wrote:
64bit kernel won't arrive vmalloc_fault, it's not necessary or possible
to copy the page table from init_mm.pgd. swapper_pg_dir, module_pg_dir
and the process's pgd represent the different virtual address area, and
the tlb exception handler accesses the suitable one directly.

Signed-off-by: Wu Fei <>
 arch/mips/mm/fault.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index f956ecb..e769789 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -58,11 +58,9 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned 
long write,
         * only copy the information from the master page table,
         * nothing more.
+#ifdef CONFIG_32BIT
        if (unlikely(address >= VMALLOC_START && address <= VMALLOC_END))
                goto vmalloc_fault;
-       if (unlikely(address >= MODULE_START && address < MODULE_END))
-               goto vmalloc_fault;

That is not correct. You can still arrive at do_page_fault() from faults in the vmalloc range. We need to go directly to the panic code as I did in my patch: Message-Id: <>

AKA: [PATCH] MIPS: Don't corrupt page tables on vmalloc fault.

@@ -203,6 +201,7 @@ do_sigbus:
        force_sig_info(SIGBUS, &info, tsk);
+#ifdef CONFIG_32BIT
@@ -241,4 +240,5 @@ vmalloc_fault:
                        goto no_context;

<Prev in Thread] Current Thread [Next in Thread>