mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Amirmohammad Eftekhar <amirmohammad.eftekhar@cispa.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	kvm@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: VMX: Add array_index_nospec() to evmcs_field_offset()
Date: Fri, 23 Oct 2026 18:17:18 -0700	[thread overview]
Message-ID: <atwHHh1z3zVzLV4P@google.com> (raw)
In-Reply-To: <20261023171307.636760-1-amirmohammad.eftekhar@cispa.de>

On Fri, Oct 23, 2026, Amirmohammad Eftekhar wrote:
> From: Amirmohammad Eftekhar <amirmohammad.eftekhar@cispa.de>
> 
> evmcs_field_offset() bounds-checks the guest-supplied field index against
> nr_evmcs_1_fields and then indexes vmcs_field_to_evmcs_1[] with it, but,
> unlike its vmcs12 counterpart get_vmcs12_field_offset(), it does not clamp
> the index with array_index_nospec() after the check.  The field index is
> derived from a guest-supplied VMCS field encoding on the enlightened
> VMREAD/VMWRITE path, so the array access can be performed speculatively
> past the bounds check (Spectre v1), disclosing memory adjacent to
> vmcs_field_to_evmcs_1[].
> 
> Clamp the index with array_index_nospec() immediately after the bounds
> check, mirroring get_vmcs12_field_offset().
> 
> Signed-off-by: Amirmohammad Eftekhar <amirmohammad.eftekhar@cispa.de>
> ---

You already posted this exact patch[*], and at a glance several of the bug reports
appear to be duplicates as well.  Please stop spamming duplicates.  If you have
questions about the flow and/or timing of patches, e.g. since we're in a merge
window, then Documentation/process/maintainer-kvm-x86.rst is your friend.

[*] https://lore.kernel.org/all/20261017093016.32348-3-amirmohammad.eftekhar@cispa.de

  reply	other threads:[~2026-10-24  1:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-23 17:13 Amirmohammad Eftekhar
2026-10-24  1:17 ` Sean Christopherson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-10-17  9:30 Amirmohammad Eftekhar

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=atwHHh1z3zVzLV4P@google.com \
    --to=seanjc@google.com \
    --cc=amirmohammad.eftekhar@cispa.de \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=vkuznets@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

all inboxes | Powered by JetHome®