diff options
| author | Ackerley Tng <ackerleytng@google.com> | 2026-05-22 15:46:09 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-05-26 09:56:35 -0700 |
| commit | 138f5f9cbe374ff87084f1d32181d2a4a2d924e8 (patch) | |
| tree | 30cbecb6603080f18b5c7f2e48d8bf91581938ff /lib/timerqueue.c | |
| parent | f13e900599089b10113ceb36013423f0837c6792 (diff) | |
KVM: SEV: Unmap local kmaps in LIFO order, per highmem requirements
Per highmem.h, local kernel mappings must be unmapped in the reserve order
they were acquired, following a LIFO (last-in, first-out) stack-based
approach, and that failure to do so "is invalid and causes malfunction".
Swap the kunmap_local() calls in SNP post-populate flow to ensure the
mappings are released in the correct order.
Note, because SNP is 64-bit only, the bugs are benign as there are no
highmem mappings to unwind.
Fixes: 2a62345b3052 ("KVM: guest_memfd: GUP source pages prior to populating guest memory")
Signed-off-by: Ackerley Tng <ackerleytng@google.com>
Link: https://patch.msgid.link/20260522-fix-sev-gmem-post-populate-v2-4-3f196bfad5a1@google.com
[sean: call out that the bug is benign]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'lib/timerqueue.c')
0 files changed, 0 insertions, 0 deletions
