diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-05-22 15:46:06 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-05-26 09:56:34 -0700 |
| commit | f13e900599089b10113ceb36013423f0837c6792 (patch) | |
| tree | b886951aa50f710050c045c8985e1518f31e0904 /include/linux/workqueue.h | |
| parent | 4c735bf1bc22fd6ee66ab4bffe1d7599c3964781 (diff) | |
KVM: SEV: Pin source page for write when adding CPUID data for SNP guest
When populating a guest_memfd instance with the initial CPUID data for an
SNP guest, acquire a writable pin on the source page as KVM will write back
the "correct" CPUID information if the userspace provided data is rejected
by trusted firmware. Because KVM writes to the source page using a kernel
mapping, pinning for read could result in KVM clobbering read-only memory.
Note, well-behaved VMMs are unlikely to be affected, as CPUID information
is almost always dynamically generated by userspace, i.e. it's unlikely for
the CPUID information to be backed by a read-only mapping.
Fixes: 2a62345b30529 ("KVM: guest_memfd: GUP source pages prior to populating guest memory")
Cc: stable@vger.kernel.org
Signed-off-by: Ackerley Tng <ackerleytng@google.com>
Link: https://patch.msgid.link/20260522-fix-sev-gmem-post-populate-v2-1-3f196bfad5a1@google.com
[sean: rewrite shortlog and changelog, tag for stable@]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions
