From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <kernellwp@gmail.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Vivek Goyal <vgoyal@redhat.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: X86: Fix async pf caused null-ptr-deref
Date: Mon, 29 Jun 2020 08:42:12 -0700 [thread overview]
Message-ID: <20200629154212.GC12312@linux.intel.com> (raw)
In-Reply-To: <f9b06428-51c3-09af-48cc-d378182916fd@redhat.com>
On Mon, Jun 29, 2020 at 03:59:25PM +0200, Paolo Bonzini wrote:
> On 29/06/20 15:46, Vitaly Kuznetsov wrote:
> >> + if (!lapic_in_kernel(vcpu))
> >> + return 1;
> >> +
> > I'm not sure how much we care about !lapic_in_kernel() case but this
> > change should be accompanied with userspace changes to not expose
> > KVM_FEATURE_ASYNC_PF_INT or how would the guest know that writing a
> > legitimate value will result in #GP?
>
> Almost any pv feature is broken with QEMU if kernel_irqchip=off. I
> wouldn't bother and I am seriously thinking of dropping all support for
> that, including:
Heh, based on my limited testing, that could be "Almost everything is
broken with Qemu if kernel_irqchip=off".
> - just injecting #UD for MOV from/to CR8 unless lapic_in_kernel()
>
> - make KVM_INTERRUPT fail unless irqchip_in_kernel(), so that
> KVM_INTERRUPT is only used to inject EXTINT with kernel_irqchip=split
>
> Paolo
>
> > Alternatively, we may just return '0' here: guest will be able to check
> > what's in the MSR to see if the feature was enabled. Normally, guests
> > shouldn't care about this but maybe there are cases when they do?
> >
>
next prev parent reply other threads:[~2020-06-29 19:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 10:26 [PATCH] KVM: X86: Fix async pf caused null-ptr-deref Wanpeng Li
2020-06-29 13:46 ` Vitaly Kuznetsov
2020-06-29 13:59 ` Paolo Bonzini
2020-06-29 15:42 ` Sean Christopherson [this message]
2020-06-30 0:16 ` Wanpeng Li
2020-06-29 15:03 ` Paolo Bonzini
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=20200629154212.GC12312@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kernellwp@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=vgoyal@redhat.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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;
as well as URLs for NNTP newsgroup(s).