[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC] libxl: relax readonly check introduced by XSA-142 fix



On Thu, 2015-11-12 at 10:53 -0700, Jim Fehlig wrote:
> Ian Campbell wrote:
> > On Thu, 2015-11-12 at 08:45 -0700, Jim Fehlig wrote:
> > > Â
> > > > The commit message doesn't say anything about AHCI. Are AHCI disks
> > > > actually emulated correctly by QEMU with readonly=on?
> > > I just double checked, and good thing since AHCI + readonly is
> > > another
> > > rejected
> > > combination
> > > 
> > > /usr/lib/xen/bin/qemu-system-i386 -device ahci,id=ahci0 \
> > > Â-drive file=/tmp/disk.raw,if=none,id=ahcidisk-
> > > 0,format=raw,readonly=on \
> > > Â-device ide-hd,bus=ahci0.0,unit=0,drive=ahcidisk-0
> > > qemu-system-i386: -device ide-hd,bus=ahci0.0,unit=0,drive=ahcidisk-0:
> > > Can't use
> > > a read-only drive
> > > 
> > > So IDE/SATA/AHCI are all incompatible with readonly=on. I'll fix this
> > > and
> > > ammend
> > > the commit message in V2.
> > 
> > Just to clarify when you say "rejected" and "incompatible" do you mean
> > that
> > qemu will fail to start if you try, or that it will ignore you and give
> > a
> > writeable disk?
> 
> qemu will fail to start.

OK, that's good, I was a bit worried it might fail open.

> > If, as I think, it will fail, why don't we just always ask and rely on
> > qemu
> > to reject, instead of trying to whitelist the ones we know work in the
> > libxl code?
> 
> That would be possible, but makes it more difficult to track down why the 
> domain
> failed to start.[...]

Indeed.

> libxl: error: libxl_create.c:1340:domcreate_devmodel_started: device model did
> not start: -6

At a minimum this ought to do as the bootloader failed message does and say
"look inÂ/var/log/xen/qemu-dm-sles12-hvm.log for more info". Ideally error
reporting from qemu back to the toolstack would be able to actually report
back what was going on somehow (which I appreciate might be rather
difficult to arrange).

Anyway, none of that is on you and since qemu fails safe if libxl gets it
wrong I don't think it should block this patch.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.