Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOxnp-0004pJ-VU for qemu-devel@nongnu.org; Fri, 01 Aug 2008 12:48:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOxno-0004lb-4y for qemu-devel@nongnu.org; Fri, 01 Aug 2008 12:48:29 -0400 Received: from [199.232.76.173] (port=41303 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOxnn-0004lE-Qm for qemu-devel@nongnu.org; Fri, 01 Aug 2008 12:48:27 -0400 Received: from smtp02.citrix.com ([66.165.176.63]:54268) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KOxnn-0006wa-9b for qemu-devel@nongnu.org; Fri, 01 Aug 2008 12:48:27 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18579.15930.393041.733173@mariner.uk.xensource.com> Date: Fri, 1 Aug 2008 17:47:54 +0100 Subject: Re: [Qemu-devel] PATCH: Control over drive open modes for backing file In-Reply-To: <4893222A.6050101@codemonkey.ws> References: <20080731113120.GJ23888@redhat.com> <489203C9.1040607@codemonkey.ws> <20080801091809.GJ23993@redhat.com> <4893222A.6050101@codemonkey.ws> From: Ian Jackson Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori writes ("Re: [Qemu-devel] PATCH: Control over drive open modes for backing file"): > Right, but my point is that ,mode=ro does not have to force QEMU to open > the file O_RDONLY. It simply needs to prevent writes from happening. Well, yes, but actually it's probably most reliable to do it that way. Given that this is a security feature we want to avoid accidentally `missing' a case. So we should definitely open the underlying file(s) O_RDONLY. If we do that then the guest definitely won't be able to write as if it manages to persuade qemu to try qemu will just get an error. This is fine I think, if we can expose the read-only status to the guest. > But it's important to be able to expose this property to the guest, so > ,mode=ro should not be allowed for disks that do not support exposing > their read-only-ness to the guest. I agree that it would be an unusual thing to do, to expose a ro disk in a way that doesn't support advertising the ro flag. But I think it should still be possible perhaps with some kind of force option. Ian.