From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XItdj-0008UU-RW for qemu-devel@nongnu.org; Sun, 17 Aug 2014 02:08:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XItdd-0006hA-Mn for qemu-devel@nongnu.org; Sun, 17 Aug 2014 02:08:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47573) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XItdd-0006gu-EM for qemu-devel@nongnu.org; Sun, 17 Aug 2014 02:08:21 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7H68JJg025938 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 17 Aug 2014 02:08:19 -0400 Message-ID: <53F046CE.1000205@redhat.com> Date: Sun, 17 Aug 2014 08:08:14 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1406121438-23083-1-git-send-email-lcapitulino@redhat.com> <1406121438-23083-3-git-send-email-lcapitulino@redhat.com> <20140811081719.GA11762@redhat.com> <87lhqv2sjc.fsf@blackfin.pond.sub.org> <20140811111518.GQ11762@redhat.com> In-Reply-To: <20140811111518.GQ11762@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 2/3] QMP: rate limit BLOCK_IO_ERROR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , Markus Armbruster Cc: kwolf@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino Il 11/08/2014 13:15, Daniel P. Berrange ha scritto: >> > 1. Don't throttle. Client can rely on events as long as it keeps the >> > QMP connection alive. Client should poll after establishing the QMP >> > connection. > A malicious guest OS can flood libvirt with events in this way. Of course > even if we throttle, a compromised QEMU can still flood libvirt. The only > fail-safe protection is for libvirt to detect flooding and throttle the > rate at which it talks to the (malicious) QEMU. > If you use rerror=stop,werror=stop, only a limited error can be passed down to libvirt before libvirt invokes the "cont" command and there's no need to do any throttling. Paolo