mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Naveen N Rao <naveen@kernel.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	kvm@vger.kernel.org,  linux-kernel@vger.kernel.org,
	Atish Patra <atishp@meta.com>
Subject: Re: [PATCH v2 2/3] KVM: SVM: Use "is AVIC-addressable" helper to sanity check load()/put()
Date: Thu, 24 Sep 2026 16:46:45 +0530	[thread overview]
Message-ID: <arUGiiweeeN4exvs@blrnaveerao1> (raw)
In-Reply-To: <20260923155108.1550622-3-seanjc@google.com>

On Wed, Sep 23, 2026 at 08:51:07AM -0700, Sean Christopherson wrote:
> Use avic_is_addressable_vcpu() instead of open coding a check on the bounds
> of the allocated table for the sanity checks when loading/putting AVIC
> state for a vCPU.  If KVM botches the allocation, then KVM will already
> have performed an OOB write in avic_init_backing_page(), i.e. being super
> paranoid in load()/put() doesn't provide meaningful protection in practice.
> 
> Cc: Naveen N Rao (AMD) <naveen@kernel.org>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>  arch/x86/kvm/svm/avic.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Naveen N Rao (AMD) <naveen@kernel.org>


- Naveen


  reply	other threads:[~2026-09-24 11:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 15:51 [PATCH v2 0/3] KVM: SVM: Fix AVIC Physical ID table UAF Sean Christopherson
2026-09-23 15:51 ` [PATCH v2 1/3] KVM: SVM: Add paranoid helper for checking if vCPU is AVIC-addressable Sean Christopherson
2026-09-24 11:16   ` Naveen N Rao
2026-09-23 15:51 ` [PATCH v2 2/3] KVM: SVM: Use "is AVIC-addressable" helper to sanity check load()/put() Sean Christopherson
2026-09-24 11:16   ` Naveen N Rao [this message]
2026-09-23 15:51 ` [PATCH v2 3/3] KVM: SVM: Clear AVIC Physical ID table entry if vCPU creation fails Sean Christopherson
2026-09-24 11:21   ` Naveen N Rao
2026-09-24 13:55     ` 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=arUGiiweeeN4exvs@blrnaveerao1 \
    --to=naveen@kernel.org \
    --cc=atishp@meta.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 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®