From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO47t-0005vg-5K for qemu-devel@nongnu.org; Tue, 16 Oct 2012 06:11:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TO47r-0002kR-W1 for qemu-devel@nongnu.org; Tue, 16 Oct 2012 06:11:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO47r-0002k7-Lk for qemu-devel@nongnu.org; Tue, 16 Oct 2012 06:11:51 -0400 Message-ID: <507D32E0.7020006@redhat.com> Date: Tue, 16 Oct 2012 12:11:44 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1350305057-6287-1-git-send-email-stefanha@redhat.com> <1350305057-6287-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1350305057-6287-3-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 2/3] qemu-img: Detect backing file chain infinite loops List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: kashyap.cv@gmail.com, qemu-devel@nongnu.org, =?ISO-8859-15?Q?Beno=EEt?= =?ISO-8859-15?Q?_Canet?= Am 15.10.2012 14:44, schrieb Stefan Hajnoczi: > A malicious or corruption image can contain an infinite loop of backing > files. The qemu-img info --backing-chain command must not hang when > such files are encountered. > > Signed-off-by: Stefan Hajnoczi This seems to do what is intended, but I think rather than fixing the 'qemu-img info' special case I'd have fixed bdrv_open() to detect the situation. Do we need to properly communicate what the broken image is with JSON output? This patch will only produce broken JSON in the failure case. Kevin