public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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,
	 Hou Wenlong <houwenlong.hwl@antgroup.com>
Subject: [PATCH 0/3] KVM: SVM: Unregister GALog notifier on module exit
Date: Thu, 16 Oct 2025 12:06:40 -0700	[thread overview]
Message-ID: <20251016190643.80529-1-seanjc@google.com> (raw)

Unregister KVM's GALog notifier when kvm-amd.ko is being unloaded so that
a spurious GALog event, e.g. due to some other bug, doesn't escalate to a
use-after-free.

I deliberately didn't tag this for stable@, as shuffling the setup code
around could easily introduce more problems than it solves, e.g. the patch
might apply cleanly to an older kernel, but blow up at runtime due to the
ordering being wrong.

My thought/plan is to get the fix into 6.18, where avic is first enabled by
default, but not bother getting it into older LTS kernels.

Sean Christopherson (3):
  KVM: SVM: Initialize per-CPU svm_data at the end of hardware setup
  KVM: SVM: Unregister KVM's GALog notifier on kvm-amd.ko exit
  KVM: SVM: Make avic_ga_log_notifier() local to avic.c

 arch/x86/kvm/svm/avic.c |  8 +++++++-
 arch/x86/kvm/svm/svm.c  | 15 +++++++++------
 arch/x86/kvm/svm/svm.h  |  2 +-
 3 files changed, 17 insertions(+), 8 deletions(-)


base-commit: 6b36119b94d0b2bb8cea9d512017efafd461d6ac
-- 
2.51.0.858.gf9c4a03a3a-goog


             reply	other threads:[~2025-10-16 19:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-16 19:06 Sean Christopherson [this message]
2025-10-16 19:06 ` [PATCH 1/3] KVM: SVM: Initialize per-CPU svm_data at the end of hardware setup Sean Christopherson
2025-10-16 19:06 ` [PATCH 2/3] KVM: SVM: Unregister KVM's GALog notifier on kvm-amd.ko exit Sean Christopherson
2025-10-16 19:06 ` [PATCH 3/3] KVM: SVM: Make avic_ga_log_notifier() local to avic.c Sean Christopherson
2025-11-04 17:45 ` [PATCH 0/3] KVM: SVM: Unregister GALog notifier on module exit 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=20251016190643.80529-1-seanjc@google.com \
    --to=seanjc@google.com \
    --cc=houwenlong.hwl@antgroup.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.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