qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?
@ 2014-05-09  1:57 Gonglei (Arei)
  2014-05-09  8:14 ` Paolo Bonzini
  0 siblings, 1 reply; 20+ messages in thread
From: Gonglei (Arei) @ 2014-05-09  1:57 UTC (permalink / raw)
  To: qemu-devel@nongnu.org
  Cc: Paolo Bonzini, Huangweidong (C), Herongguang (Stephen),
	mst@redhat.com

Hi,

Vhost devices need to do VHOST_SET_MEM_TABLE ioctl in vhost_dev_start()
to tell vhost kernel modules GPA to HVA memory mappings, which consume is expensively. 
The reason is same as KVM_SET_GSI_ROUTING ioctl. That is, in ioctl processing, 
kmod and vhost calls synchronize_rcu() to wait for grace period to free old memory.
 
In KVM_SET_GSI_ROUTING case, we cannot simply change synchronize_rcu to call_rcu, 
since this may leads to DOS attacks if guest VM keeps setting IRQ affinity.
 
In VHOST_SET_MEM_TABLE case, I wonder if we can change synchronize_rcu() to call_rcu(), 
i.e., is it possible to trigger DOS attack in guest? There are some cases QEMU would do 
VHOST_SET_MEM_TABLE ioctl, like VM start/reboot/attach vhost devices, and RAM memory 
regions in system memory address space change. 

And I'd like to know if guest activities could lead to RAM memory regions change?
 
Can you give me some advices? Thanks!


Best regards,
-Gonglei

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

end of thread, other threads:[~2014-05-13  8:23 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-09  1:57 [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module? Gonglei (Arei)
2014-05-09  8:14 ` Paolo Bonzini
2014-05-09  9:04   ` Gonglei (Arei)
2014-05-09  9:53     ` Paolo Bonzini
2014-05-12  9:28       ` Gonglei (Arei)
2014-05-12  9:57         ` Paolo Bonzini
2014-05-12 10:08           ` Michael S. Tsirkin
2014-05-12 10:14             ` Paolo Bonzini
2014-05-12 10:18               ` Michael S. Tsirkin
2014-05-12 10:25                 ` Paolo Bonzini
2014-05-12 11:07                   ` Michael S. Tsirkin
2014-05-12 11:46                     ` Paolo Bonzini
2014-05-12 12:12                       ` Michael S. Tsirkin
2014-05-12 12:46                         ` Paolo Bonzini
2014-05-12 12:53                           ` Michael S. Tsirkin
2014-05-12 13:02                             ` Paolo Bonzini
2014-05-12 10:30           ` Michael S. Tsirkin
2014-05-13  7:03             ` Gonglei (Arei)
2014-05-13  8:21               ` Michael S. Tsirkin
2014-05-13  7:01           ` Gonglei (Arei)

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).