All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "Huangweidong (C)" <weidong.huang@huawei.com>,
	"Herongguang (Stephen)" <herongguang.he@huawei.com>,
	"mst@redhat.com" <mst@redhat.com>
Subject: Re: [Qemu-devel] [RFC] vhost: Can we change synchronize_rcu to call_rcu in vhost_set_memory() in vhost kernel module?
Date: Fri, 09 May 2014 10:14:59 +0200	[thread overview]
Message-ID: <536C8E83.8030504@redhat.com> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF19020815E7324@SZXEMA503-MBS.china.huawei.com>

Il 09/05/2014 03:57, Gonglei (Arei) ha scritto:
> 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?

Yes, for example enabling/disabling PCI BARs would have that effect.

Paolo

  reply	other threads:[~2014-05-09  8:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=536C8E83.8030504@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=herongguang.he@huawei.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=weidong.huang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.