From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmO9v-0008So-LC for qemu-devel@nongnu.org; Thu, 06 Nov 2014 09:35:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmO9p-0006Ab-BU for qemu-devel@nongnu.org; Thu, 06 Nov 2014 09:35:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmO9o-0006A7-U1 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 09:35:29 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA6EZR8v023765 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 6 Nov 2014 09:35:27 -0500 Date: Thu, 6 Nov 2014 09:35:24 -0500 From: Jeff Cody Message-ID: <20141106143524.GC23802@localhost.localdomain> References: <87lhnq3iul.fsf@blackfin.pond.sub.org> <20141105110140.GC6198@noname.str.redhat.com> <87tx2csa8c.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87tx2csa8c.fsf@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] Image probing: how it can be insecure, and what we could do about it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz On Thu, Nov 06, 2014 at 02:57:07PM +0100, Markus Armbruster wrote: > Kevin Wolf writes: > > > Am 04.11.2014 um 19:45 hat Markus Armbruster geschrieben: [...] > >> I proposed something less radical, namely to keep guessing the image > >> format, but base the guess on trusted meta-data only: file name and > >> attributes. Block and character special files are raw. For other > >> files, find the file name extension, and look up the format claiming it. > >> > >> PRO: Plugs the hole. > >> > >> CON: Breaks existing usage when the new guess differs from the old > >> guess. Common usage should be fine: > >> > >> * -hda test.qcow2 > >> > >> Fine as long as test.qcow2 is really QCOW2 (as it should!), and > >> either specifies a backing format (as it arguably should), or the > >> backing file name is sane. > >> > >> * -hda disk.img > >> > >> Fine as long as disk.img is really a disk image (as it should). > > > > .img is not as clear, I've seen people using it for other formats. It's > > still a disk image, but not a raw one. > > Is this usage common? > More anecdotal data: Like Eric, I have non-raw images using a .img extension. Also, ".img" as a generic naming convention is useful enough that some of our own qemu iotests use it, regardless of format (mainly in block job python tests) [...]