From: "H. Peter Anvin" <hpa@zytor.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
mingo@redhat.com, konrad.wilk@oracle.com, tglx@linutronix.de,
xen-devel@lists.xen.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set
Date: Wed, 27 Feb 2013 14:40:01 -0800 [thread overview]
Message-ID: <512E8B41.8000504@zytor.com> (raw)
In-Reply-To: <91983d94-7b7d-4a0b-9470-e7cd823ba139@default>
Greg, policy opinion?
-hpa
On 02/26/2013 03:57 PM, Boris Ostrovsky wrote:
>
> ----- hpa@zytor.com wrote:
>
>> On 02/26/2013 02:56 PM, Boris Ostrovsky wrote:
>>> When CONFIG_DEBUG_PAGEALLOC is set page table updates made by
>>> kernel_map_pages() are not made visible (via TLB flush) immediately
>> if lazy
>>> MMU is on. In environments that support lazy MMU (e.g. Xen) this may
>> lead to
>>> fatal page faults, for example, when zap_pte_range() needs to
>> allocate pages
>>> in __tlb_remove_page() -> tlb_next_batch().
>>>
>>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>>> ---
>>> arch/x86/mm/pageattr.c | 2 ++
>>> 1 file changed, 2 insertions(+)
>>>
>>> diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
>>> index ca1f1c2..7b3216e 100644
>>> --- a/arch/x86/mm/pageattr.c
>>> +++ b/arch/x86/mm/pageattr.c
>>> @@ -1369,6 +1369,8 @@ void kernel_map_pages(struct page *page, int
>> numpages, int enable)
>>> * but that can deadlock->flush only current cpu:
>>> */
>>> __flush_tlb_all();
>>> +
>>> + arch_flush_lazy_mmu_mode();
>>> }
>>>
>>> #ifdef CONFIG_HIBERNATION
>>>
>>
>> This sounds like a critical fix, i.e. a -stable candidate. Am I
>> correct?
>
> I considered copying stable but then I decided that this is a debugging feature
> --- kernel_map_pages() is only defined if CONFIG_DEBUG_PAGEALLOC is set and my
> thinking was that stable kernels usually don't do this.
>
>
> -boris
>
next prev parent reply other threads:[~2013-02-27 22:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 23:57 [PATCH] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set Boris Ostrovsky
2013-02-27 22:40 ` H. Peter Anvin [this message]
2013-02-27 23:00 ` Greg KH
2013-02-27 23:07 ` H. Peter Anvin
2013-02-28 14:29 ` Is: x86: mm: Fix vmalloc_fault oops during lazy MMU updates Was: " Konrad Rzeszutek Wilk
2013-02-28 15:38 ` Borislav Petkov
2013-02-28 15:53 ` H. Peter Anvin
2013-02-28 16:10 ` Borislav Petkov
2013-02-28 16:20 ` Boris Ostrovsky
2013-02-28 16:22 ` Borislav Petkov
2013-02-28 16:24 ` H. Peter Anvin
2013-02-28 16:27 ` Boris Ostrovsky
2013-02-28 16:32 ` Borislav Petkov
2013-02-28 18:14 ` Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2013-02-26 22:56 Boris Ostrovsky
2013-02-26 23:38 ` H. Peter Anvin
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=512E8B41.8000504@zytor.com \
--to=hpa@zytor.com \
--cc=boris.ostrovsky@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=xen-devel@lists.xen.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