From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+5feef0b9ee9c8e9e5689@syzkaller.appspotmail.com,
Jim Mattson <jmattson@google.com>
Subject: [PATCH 0/3] KVM: x86: CR0 vs. KVM_SET_SREGS and !URG
Date: Tue, 13 Jun 2023 13:30:34 -0700 [thread overview]
Message-ID: <20230613203037.1968489-1-seanjc@google.com> (raw)
Fix a longstanding bug where KVM doesn't check the incoming CR0 provided
by userspace via KVM_SET_SREGS, and then fix a VMX specific bug that let
the missing CR0 check escalate from "just" a failed VM-Entry, to a "KVM is
all kinds of confused and generates a WARN" issue.
Expand the set_sregs_test selftest to provide basic CR0 coverage
Sean Christopherson (3):
KVM: x86: Disallow KVM_SET_SREGS{2} if incoming CR0 is invalid
KVM: VMX: Don't fudge CR0 and CR4 for restricted L2 guest
KVM: selftests: Expand x86's sregs test to cover illegal CR0 values
arch/x86/include/asm/kvm-x86-ops.h | 1 +
arch/x86/include/asm/kvm_host.h | 3 +-
arch/x86/kvm/svm/svm.c | 6 ++
arch/x86/kvm/vmx/vmx.c | 41 ++++++++---
arch/x86/kvm/x86.c | 34 +++++----
.../selftests/kvm/x86_64/set_sregs_test.c | 70 +++++++++++--------
6 files changed, 100 insertions(+), 55 deletions(-)
base-commit: 24ff4c08e5bbdd7399d45f940f10fed030dfadda
--
2.41.0.162.gfafddb0af9-goog
next reply other threads:[~2023-06-13 20:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-13 20:30 Sean Christopherson [this message]
2023-06-13 20:30 ` [PATCH 1/3] KVM: x86: Disallow KVM_SET_SREGS{2} if incoming CR0 is invalid Sean Christopherson
2023-06-22 8:19 ` Yu Zhang
2023-06-22 21:32 ` Sean Christopherson
2023-06-13 20:30 ` [PATCH 2/3] KVM: VMX: Don't fudge CR0 and CR4 for restricted L2 guest Sean Christopherson
2023-06-13 20:30 ` [PATCH 3/3] KVM: selftests: Expand x86's sregs test to cover illegal CR0 values Sean Christopherson
2023-07-29 15:04 ` [PATCH 0/3] KVM: x86: CR0 vs. KVM_SET_SREGS and !URG 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=20230613203037.1968489-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=syzbot+5feef0b9ee9c8e9e5689@syzkaller.appspotmail.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
all inboxes | Powered by JetHome®