mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [v2] KVM: x86: Question on lock protection in handle_ept_misconfig
@ 2025-07-09  6:50 zoudongjie (A)
  2025-07-09 13:01 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: zoudongjie (A) @ 2025-07-09  6:50 UTC (permalink / raw)
  To: seanjc, pbonzini, tglx, mingo, bp, dave.hansen, x86, hpa, kvm,
	linux-kernel
  Cc: Chenzhendong (alex), luolongmin, Mujinsheng (DxJanesir),
	chenjianfei (D), Fangyi (Eric), lishan (E),
	Renxuming, suxiaodong, caijunjie (A), zoudongjie (A)

Resending as plain text to fix formatting issues.
---

Hi all,

I noticed that in handle_ept_misconfig(), kvm_io_bus_write() is called. And 
within kvm_io_bus_write(), BUS is obtained through srcu_dereference(). During 
this process, kvm->slots_lock is not acquired, nor is srcu_read_lock() called 
for protection. If another process is synchronizing BUS at the same time, 
synchronize_srcu_expedited() cannot safely reclaim space(it cannot protect 
srcu_dereference() outside the critical section?), how can we ensure that BUS 
obtained by kvm_io_bus_write() is the latest?

Thanks,
Junjie Cai

Reported by: Junjie Cai <mailto:caijunjie15@h-partners.com>


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

end of thread, other threads:[~2025-07-09 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-09  6:50 [v2] KVM: x86: Question on lock protection in handle_ept_misconfig zoudongjie (A)
2025-07-09 13:01 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®