From: Richard Weinberger <richard@nod.at>
To: Chen Gang <gang.chen@asianux.com>, Jeff Dike <jdike@addtoit.com>
Cc: uml-devel <user-mode-linux-devel@lists.sourceforge.net>,
Hugh Dickins <hughd@google.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
uml-user <user-mode-linux-user@lists.sourceforge.net>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [uml-devel] [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()
Date: Wed, 13 Nov 2013 10:07:04 +0100 [thread overview]
Message-ID: <52834138.7050005@nod.at> (raw)
In-Reply-To: <528308E8.8040203@asianux.com>
Am 13.11.2013 06:06, schrieb Chen Gang:
> Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc()
> succeed, they may be used, so in the next failure, we have to skip them
> to let exit_mmap() or do_munmap() to process it.
>
> According to "Documentation/vm/locking", 'mm->page_table_lock' is for
> using vma list, so not need it when its related vmas are detached or
> unmapped from using vma list.
>
> The related work flow:
>
> exit_mmap() ->
> unmap_vmas(); /* so not need mm->page_table_lock */
> free_pgtables();
>
> do_munmap()->
> detach_vmas_to_be_unmapped(); /* so not need mm->page_table_lock */
> unmap_region() ->
> free_pgtables();
>
> free_pgtables() ->
> free_pgd_range() ->
> free_pud_range() ->
> free_pmd_range() ->
> free_pte_range() ->
> pmd_clear();
> pte_free_tlb();
> pud_clear();
> pmd_free_tlb();
> pgd_clear();
> pud_free_tlb();
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
Sounds reasonable to me.
*But* there are patches you from out there that tried to fix similar issues and got reverted later.
Now I'm a bit nervous and want a ACK from mm folks to have this verified.
It's not that I don't trust you, but I really don't trust you. ;-)
Thanks,
//richard
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: Chen Gang <gang.chen@asianux.com>, Jeff Dike <jdike@addtoit.com>
Cc: Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
uml-devel <user-mode-linux-devel@lists.sourceforge.net>,
uml-user <user-mode-linux-user@lists.sourceforge.net>
Subject: Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()
Date: Wed, 13 Nov 2013 10:07:04 +0100 [thread overview]
Message-ID: <52834138.7050005@nod.at> (raw)
In-Reply-To: <528308E8.8040203@asianux.com>
Am 13.11.2013 06:06, schrieb Chen Gang:
> Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc()
> succeed, they may be used, so in the next failure, we have to skip them
> to let exit_mmap() or do_munmap() to process it.
>
> According to "Documentation/vm/locking", 'mm->page_table_lock' is for
> using vma list, so not need it when its related vmas are detached or
> unmapped from using vma list.
>
> The related work flow:
>
> exit_mmap() ->
> unmap_vmas(); /* so not need mm->page_table_lock */
> free_pgtables();
>
> do_munmap()->
> detach_vmas_to_be_unmapped(); /* so not need mm->page_table_lock */
> unmap_region() ->
> free_pgtables();
>
> free_pgtables() ->
> free_pgd_range() ->
> free_pud_range() ->
> free_pmd_range() ->
> free_pte_range() ->
> pmd_clear();
> pte_free_tlb();
> pud_clear();
> pmd_free_tlb();
> pgd_clear();
> pud_free_tlb();
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
Sounds reasonable to me.
*But* there are patches you from out there that tried to fix similar issues and got reverted later.
Now I'm a bit nervous and want a ACK from mm folks to have this verified.
It's not that I don't trust you, but I really don't trust you. ;-)
Thanks,
//richard
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: Richard Weinberger <richard@nod.at>
To: Chen Gang <gang.chen@asianux.com>, Jeff Dike <jdike@addtoit.com>
Cc: Hugh Dickins <hughd@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
uml-devel <user-mode-linux-devel@lists.sourceforge.net>,
uml-user <user-mode-linux-user@lists.sourceforge.net>
Subject: Re: [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte()
Date: Wed, 13 Nov 2013 10:07:04 +0100 [thread overview]
Message-ID: <52834138.7050005@nod.at> (raw)
In-Reply-To: <528308E8.8040203@asianux.com>
Am 13.11.2013 06:06, schrieb Chen Gang:
> Unfortunately, p?d_alloc() and p?d_free() are not pair!! If p?d_alloc()
> succeed, they may be used, so in the next failure, we have to skip them
> to let exit_mmap() or do_munmap() to process it.
>
> According to "Documentation/vm/locking", 'mm->page_table_lock' is for
> using vma list, so not need it when its related vmas are detached or
> unmapped from using vma list.
>
> The related work flow:
>
> exit_mmap() ->
> unmap_vmas(); /* so not need mm->page_table_lock */
> free_pgtables();
>
> do_munmap()->
> detach_vmas_to_be_unmapped(); /* so not need mm->page_table_lock */
> unmap_region() ->
> free_pgtables();
>
> free_pgtables() ->
> free_pgd_range() ->
> free_pud_range() ->
> free_pmd_range() ->
> free_pte_range() ->
> pmd_clear();
> pte_free_tlb();
> pud_clear();
> pmd_free_tlb();
> pgd_clear();
> pud_free_tlb();
>
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
Sounds reasonable to me.
*But* there are patches you from out there that tried to fix similar issues and got reverted later.
Now I'm a bit nervous and want a ACK from mm folks to have this verified.
It's not that I don't trust you, but I really don't trust you. ;-)
Thanks,
//richard
next prev parent reply other threads:[~2013-11-13 9:07 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 10:34 [PATCH] mm: revert mremap pud_free anti-fix Hugh Dickins
2013-10-15 10:34 ` Hugh Dickins
2013-10-15 11:46 ` Chen Gang
2013-10-15 11:46 ` Chen Gang
2013-11-13 7:15 ` Chen Gang
2013-11-13 7:15 ` Chen Gang
2013-11-13 5:06 ` [PATCH] arch: um: kernel: skas: mmu: remove pmd_free() and pud_free() for failure processing in init_stub_pte() Chen Gang
2013-11-13 5:06 ` Chen Gang
2013-11-13 9:07 ` Richard Weinberger [this message]
2013-11-13 9:07 ` Richard Weinberger
2013-11-13 9:07 ` Richard Weinberger
2013-11-13 9:14 ` [uml-devel] " Chen Gang
2013-11-13 9:14 ` Chen Gang
2013-11-13 9:14 ` Chen Gang
2013-11-14 5:20 ` Hugh Dickins
2013-11-14 5:20 ` Hugh Dickins
2013-11-14 5:20 ` Hugh Dickins
2013-11-14 6:48 ` Chen Gang
2013-11-14 6:48 ` Chen Gang
2013-11-14 6:48 ` Chen Gang
2013-11-14 7:33 ` Chen Gang
2013-11-14 7:33 ` Chen Gang
2013-11-14 7:55 ` Richard Weinberger
2013-11-14 7:55 ` Richard Weinberger
2013-11-14 8:57 ` Chen Gang
2013-11-14 8:57 ` Chen Gang
2013-11-15 2:14 ` [uml-devel] " Chen Gang
2013-11-15 2:14 ` Chen Gang
2013-11-15 2:14 ` Chen Gang
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=52834138.7050005@nod.at \
--to=richard@nod.at \
--cc=akpm@linux-foundation.org \
--cc=gang.chen@asianux.com \
--cc=hughd@google.com \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
--cc=user-mode-linux-user@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.