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,
Sashiko Bot <sashiko-bot@kernel.org>
Subject: [PATCH 0/2] KVM: SEV: Fixups for the cache maintenance fixes
Date: Mon, 28 Sep 2026 08:46:42 -0700 [thread overview]
Message-ID: <20260928154644.2559454-1-seanjc@google.com> (raw)
Two fixes, two bugs. I'm batting a 1.000. Fix a double-free and a race
pointed out by Sashiko.
Regarding fixing the double free, I initially said I'd just move the allocation
to avoid having to deal with CPUMASK_OFFSTACK=n[*], but that felt too much like
I was leaving trap for someone else. So instead I elected to nullify the
pointer with memset(), which has a fairly desirable side effect of clearing the
mask when CPUMASK_OFFSTACK=n.
[*] https://lore.kernel.org/all/arQMARDUTSjbWpMX@google.com
Sean Christopherson (2):
KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it
KVM: SEV: Do cache maintenance on the source VM *before* clearing SEV
state
arch/x86/kvm/svm/sev.c | 46 ++++++++++++++++++++++++++----------------
1 file changed, 29 insertions(+), 17 deletions(-)
base-commit: a4bab1c12fd528ccaafee00360e07463873404a9
--
2.56.0.rc1.315.gc6ed9934b7-goog
next reply other threads:[~2026-09-28 15:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 15:46 Sean Christopherson [this message]
2026-09-28 15:46 ` [PATCH 1/2] KVM: SEV: Nullify "have run CPUs" mask pointer when freeing it Sean Christopherson
2026-09-28 15:46 ` [PATCH 2/2] KVM: SEV: Do cache maintenance on the source VM *before* clearing SEV state 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=20260928154644.2559454-1-seanjc@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=sashiko-bot@kernel.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 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®