linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Simon Jeons <simon.jeons@gmail.com>
To: Rik van Riel <riel@redhat.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	Dave Hansen <dave.hansen@intel.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.cz>, Mel Gorman <mgorman@suse.de>
Subject: Re: vmalloc fault
Date: Fri, 26 Apr 2013 18:17:10 +0800	[thread overview]
Message-ID: <517A5426.8050901@gmail.com> (raw)
In-Reply-To: <517A5138.9040902@redhat.com>

Morning Rik, so early.
On 04/26/2013 06:04 PM, Rik van Riel wrote:
> On 04/26/2013 05:55 AM, Simon Jeons wrote:
>> Hi all,
>>
>> 1. Why vmalloc fault need sync user process page table with kernel page
>> table instead of using kernel page table directly?
>
> Each process has its own PGD, into which both kernel and user
> PMDs (or PUDs) are mapped. It is possible the PGD is missing
> some pointers, that need to be filled in at fault time.

It seems that you miss my question. I mean why sync page table between 
user process and init_mm.pgd, can user process use init_mm.pgd page 
table directly when access vmalloc memory? ;-)

>
>> 2. Why do_swap_page doesn't set present flag?
>
> It does.  Look at how vm_get_page_prot works.

Got it.

>
>> 3. When enable DEBUG_PAGEALLOC(catch use-after-free bug), if user
>> process alloc pages from zone_normal(which is direct mapping) when
>> fallback, this page which allocated for user process will set present
>> flag in related pte, correct? but why also set present flag for kernel
>> direct mapping? Does kernel have any requirement to access it?
>
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-04-26 10:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  9:55 Simon Jeons
2013-04-26 10:04 ` Rik van Riel
2013-04-26 10:17   ` Simon Jeons [this message]
2013-04-26 10:19     ` Rik van Riel
2013-04-26 10:27       ` Simon Jeons

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=517A5426.8050901@gmail.com \
    --to=simon.jeons@gmail.com \
    --cc=dave.hansen@intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mhocko@suse.cz \
    --cc=riel@redhat.com \
    /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