kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] KVM: s390: Fix two bugs
@ 2025-08-05 14:17 Claudio Imbrenda
  2025-08-05 14:17 ` [PATCH v2 1/2] KVM: s390: Fix incorrect usage of mmu_notifier_register() Claudio Imbrenda
  2025-08-05 14:17 ` [PATCH v2 2/2] KVM: s390: Fix FOLL_*/FAULT_FLAG_* confusion Claudio Imbrenda
  0 siblings, 2 replies; 5+ messages in thread
From: Claudio Imbrenda @ 2025-08-05 14:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-s390, kvm, david, frankja, seiden, nsg, nrb, schlameuss,
	hca, mhartmay, borntraeger

This small series fixes two bugs in s390 KVM. One is small and trivial,
the other is pretty bad.

* The wrong type of flag was being passed to vcpu_dat_fault_handler();
  it expects a FOLL_* flag, but a FAULT_FLAG_* was passed instead.
* Due to incorrect usage of mmu_notifier_register(), in some rare cases
  when running a secure guest, the struct mm for the userspace process
  would get freed too early and cause a use-after-free.

v1->v2
* Rename the parameters of __kvm_s390_handle_dat_fault() and
  vcpu_dat_fault_handler() from flags to foll (thanks Christian)

Claudio Imbrenda (2):
  KVM: s390: Fix incorrect usage of mmu_notifier_register()
  KVM: s390: Fix FOLL_*/FAULT_FLAG_* confusion

 arch/s390/kvm/kvm-s390.c | 24 ++++++++++++------------
 arch/s390/kvm/pv.c       | 14 +++++++++-----
 2 files changed, 21 insertions(+), 17 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-06  9:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-05 14:17 [PATCH v2 0/2] KVM: s390: Fix two bugs Claudio Imbrenda
2025-08-05 14:17 ` [PATCH v2 1/2] KVM: s390: Fix incorrect usage of mmu_notifier_register() Claudio Imbrenda
2025-08-05 14:17 ` [PATCH v2 2/2] KVM: s390: Fix FOLL_*/FAULT_FLAG_* confusion Claudio Imbrenda
2025-08-05 14:20   ` Steffen Eiden
2025-08-06  9:03   ` Christoph Schlameuss

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).