All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Gao <chao.gao@intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, <kvm@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Alexander Potapenko <glider@google.com>
Subject: Re: [PATCH 2/2] KVM: x86: Harden KVM against imbalanced load/put of guest FPU state
Date: Tue, 4 Nov 2025 14:07:19 +0800	[thread overview]
Message-ID: <aQmYF8jDKlzecQ6A@intel.com> (raw)
In-Reply-To: <20251030185802.3375059-3-seanjc@google.com>

On Thu, Oct 30, 2025 at 11:58:02AM -0700, Sean Christopherson wrote:
>Assert, via KVM_BUG_ON(), that guest FPU state isn't/is in use when
>loading/putting the FPU to help detect KVM bugs without needing an assist
>from KASAN.  If an imbalanced load/put is detected, skip the redundant
>load/put to avoid clobbering guest state and/or crashing the host.
>
>Note, kvm_access_xstate_msr() already provides a similar assertion.
>
>Signed-off-by: Sean Christopherson <seanjc@google.com>

Reviewed-by: Chao Gao <chao.gao@intel.com>

  reply	other threads:[~2025-11-04  6:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 18:58 [PATCH 0/2] KVM: x86: Fix an FPU+CET splat Sean Christopherson
2025-10-30 18:58 ` [PATCH 1/2] KVM: x86: Unload "FPU" state on INIT if and only if its currently in-use Sean Christopherson
2025-11-04  3:10   ` Chao Gao
2025-10-30 18:58 ` [PATCH 2/2] KVM: x86: Harden KVM against imbalanced load/put of guest FPU state Sean Christopherson
2025-11-04  6:07   ` Chao Gao [this message]
2025-10-31  6:28 ` [PATCH 0/2] KVM: x86: Fix an FPU+CET splat Yao Yuan
2025-11-04 17:45 ` Sean Christopherson

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=aQmYF8jDKlzecQ6A@intel.com \
    --to=chao.gao@intel.com \
    --cc=glider@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.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 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.