From: Ian Jackson Subject: Re: RFC: Making QEMU honour 'readonly' flag for disks Date: Thu, 24 Jul 2008 14:37:17 +0100 Message-ID: <18568.34189.57005.491667@mariner.uk.xensource.com> References: <20080724113627.GU1138@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080724113627.GU1138@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Daniel P. Berrange" Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Daniel P. Berrange writes ("[Xen-devel] RFC: Making QEMU honour 'readonly' flag for disks"): > This proof of concept patch I've done against the RHEL-5 Xen tree introduces > a new 'drv_read_only' flag to QEMU's BlockDriverState struct, and if set to > non-zero, will cause the individual block backend drivers inside QEMU to > always open with O_RDONLY, and never try O_RDWR. Ultimately this would be > hooked up to the '-drive' parameter via a extra flag ',ro' in its args. > It then makes xenstore.c set this flag based on the 'mode' parameter for > the disk in xenstore. I think this is a good idea but you should discuss it with upstream to try to minimise the difference between the patch that goes into our tree and the one that goes into upstream. Normally I would say that this kind of thing is rather much to be doing after feature freeze but I think you could (and I would) argue that the missing check is a security defect. Ian.