diff options
| author | Sean Christopherson <seanjc@google.com> | 2026-09-21 17:13:31 -0700 |
|---|---|---|
| committer | Sean Christopherson <seanjc@google.com> | 2026-09-22 07:28:14 -0700 |
| commit | 3fe5d2944e5ac3fc5073344b0982c73703332e18 (patch) | |
| tree | 39c8264a97744f711c79d96aba83b45080560d38 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 83411f32b8ad96c6b05b1511d1a588daab44bd25 (diff) | |
KVM: guest_memfd: Establish memslot<=>guest_memfd bindings *after* memslot is ready
Wait to bind a memslot to a guest_memfd instance until *after* the memslot
is fully prepared, as creating the binding in guest_memfd will effectively
expose the memslot to readers. As pointed out by Sashiko, binding the
memslot before it's ready to be exposed to the rest of the world can break
various memslot assumption and rules. E.g. x86 could observe a NULL rmap
pointer if a PUNCH_HOLE hit the guest_memfd after the binding was created,
but before KVM made it through kvm_prepare_memory_region().
Fixes: a7800aa80ea4 ("KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory")
Cc: stable@vger.kernel.org
Reported-by: Sashiko Bot <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/20260826170551.BEF801F000E9@smtp.kernel.org
Link: https://patch.msgid.link/20260922001332.1121266-6-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions
