From: "H. Peter Anvin" <hpa@zytor.com>
To: Borislav Petkov <bp@alien8.de>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
Greg KH <gregkh@linuxfoundation.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
mingo@redhat.com, tglx@linutronix.de, xen-devel@lists.xen.org,
linux-kernel@vger.kernel.org, samu.kallio@aberdeencloud.com,
kraman@redhat.com, jwboyer@redhat.com
Subject: Re: Is: x86: mm: Fix vmalloc_fault oops during lazy MMU updates Was: Re: [PATCH] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set
Date: Thu, 28 Feb 2013 07:53:44 -0800 [thread overview]
Message-ID: <512F7D88.4090703@zytor.com> (raw)
In-Reply-To: <20130228153846.GA9782@pd.tnic>
On 02/28/2013 07:38 AM, Borislav Petkov wrote:
> On Thu, Feb 28, 2013 at 09:29:10AM -0500, Konrad Rzeszutek Wilk wrote:
>> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
>> index fb674fd..4f7d793 100644
>> --- a/arch/x86/mm/fault.c
>> +++ b/arch/x86/mm/fault.c
>> @@ -378,10 +378,12 @@ static noinline __kprobes int vmalloc_fault(unsigned long address)
>> if (pgd_none(*pgd_ref))
>> return -1;
>>
>> - if (pgd_none(*pgd))
>> + if (pgd_none(*pgd)) {
>> set_pgd(pgd, *pgd_ref);
>> - else
>> + arch_flush_lazy_mmu_mode();
>
> Do I understand it correctly that this would cost us a
> "preempt_disable(); preempt_enable()" needlessly on baremetal when
> running with CONFIG_PARAVIRT enabled?
>
OK, this is mind-boggingly crazy and these things that just drives me
batty about PV.
arch_flush_lazy_mmu_mode() involves a function call and preemption off
*before it even tests for being a noop*. On bare metal this function
doesn't do anything, and cannot do anything.
At the very least we should have an early filter for the **COMMON!**
case that we are not on a PV platform.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
next prev parent reply other threads:[~2013-02-28 15:55 UTC|newest]
Thread overview: 28+ 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-26 23:57 ` Boris Ostrovsky
2013-02-27 22:40 ` H. Peter Anvin
2013-02-27 22:40 ` H. Peter Anvin
2013-02-27 23:00 ` Greg KH
2013-02-27 23:07 ` H. Peter Anvin
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 14:29 ` Konrad Rzeszutek Wilk
2013-02-28 15:38 ` Borislav Petkov
2013-02-28 15:38 ` Borislav Petkov
2013-02-28 15:53 ` H. Peter Anvin
2013-02-28 15:53 ` H. Peter Anvin [this message]
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:24 ` H. Peter Anvin
2013-02-28 16:27 ` Boris Ostrovsky
2013-02-28 16:32 ` Borislav Petkov
2013-02-28 16:32 ` Borislav Petkov
2013-02-28 18:14 ` Steven Rostedt
2013-02-28 18:14 ` Steven Rostedt
2013-02-28 16:27 ` Boris Ostrovsky
2013-02-28 16:22 ` Borislav Petkov
2013-02-28 16:20 ` Boris Ostrovsky
2013-02-28 16:10 ` Borislav Petkov
2013-02-27 23:00 ` Greg KH
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=512F7D88.4090703@zytor.com \
--to=hpa@zytor.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=gregkh@linuxfoundation.org \
--cc=jwboyer@redhat.com \
--cc=konrad.wilk@oracle.com \
--cc=kraman@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=samu.kallio@aberdeencloud.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 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.