diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-05-01 13:22:35 -0700 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2026-05-29 20:25:29 +0200 |
| commit | c8cc238093ca6c99267032f6cfe78f59389f3157 (patch) | |
| tree | ae7749e898b104245f073e2c16b4f7272fb04839 /include/linux/ptp_clock_kernel.h | |
| parent | 121d88de56bc5c0ba0ce2f6381af67f948a7e7c1 (diff) | |
KVM: SEV: Use READ_ONCE() when reading entries/indices from PSC buffer
Use READ_ONCE() when reading entries/indices from the guest-accessible
Page State Change buffer to defend against TOCTOU bugs.
Don't bother with READ_ONCE()/WRITE_ONCE() for cases where KVM is writing
(and not consuming the result!), as the guest isn't supposed to touch the
buffer while it's being processed. I.e. using READ_ONCE() is all about
protecting against misbehaving guests.
Fixes: 9b54e248d264 ("KVM: SEV: Add support to handle Page State Change VMGEXIT")
Cc: stable@vger.kernel.org
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-ID: <20260501202250.2115252-11-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/linux/ptp_clock_kernel.h')
0 files changed, 0 insertions, 0 deletions
