From: David Daney <ddaney@caviumnetworks.com>
To: Wu Fei <at.wufei@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
Subject: Re: [PATCH] cleanup vmalloc_fault for 64bit kernel
Date: Wed, 09 Sep 2009 08:35:26 -0700 [thread overview]
Message-ID: <4AA7CB3E.1080807@caviumnetworks.com> (raw)
In-Reply-To: <20090831132811.GA6924@desktop>
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 <at.wufei@gmail.com>
> ---
> 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;
> -#ifdef MODULE_START
> - if (unlikely(address >= MODULE_START && address < MODULE_END))
> - goto vmalloc_fault;
> #endif
>
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:
<1251931654-21268-1-git-send-email-ddaney@caviumnetworks.com>
AKA: [PATCH] MIPS: Don't corrupt page tables on vmalloc fault.
> /*
> @@ -203,6 +201,7 @@ do_sigbus:
> force_sig_info(SIGBUS, &info, tsk);
>
> return;
> +#ifdef CONFIG_32BIT
> vmalloc_fault:
> {
> /*
> @@ -241,4 +240,5 @@ vmalloc_fault:
> goto no_context;
> return;
> }
> +#endif
> }
next prev parent reply other threads:[~2009-09-09 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-31 13:28 [PATCH] cleanup vmalloc_fault for 64bit kernel Wu Fei
2009-09-09 15:35 ` David Daney [this message]
2009-09-10 11:42 ` Wu Fei
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=4AA7CB3E.1080807@caviumnetworks.com \
--to=ddaney@caviumnetworks.com \
--cc=at.wufei@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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;
as well as URLs for NNTP newsgroup(s).