From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>, Wanpeng Li <kernellwp@gmail.com>
Cc: Sean Christopherson <sean.j.christopherson@intel.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 15:59:25 +0200 [thread overview]
Message-ID: <f9b06428-51c3-09af-48cc-d378182916fd@redhat.com> (raw)
In-Reply-To: <877dvqc7cs.fsf@vitty.brq.redhat.com>
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:
- 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:01 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 [this message]
2020-06-29 15:42 ` Sean Christopherson
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=f9b06428-51c3-09af-48cc-d378182916fd@redhat.com \
--to=pbonzini@redhat.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=sean.j.christopherson@intel.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).