summaryrefslogtreecommitdiff
path: root/include/linux/parser.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-05-01 13:22:35 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2026-05-29 20:25:29 +0200
commitc8cc238093ca6c99267032f6cfe78f59389f3157 (patch)
treeae7749e898b104245f073e2c16b4f7272fb04839 /include/linux/parser.h
parent121d88de56bc5c0ba0ce2f6381af67f948a7e7c1 (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/parser.h')
0 files changed, 0 insertions, 0 deletions