This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH] xl: Perform minimal validation of virtual disk f

On Fri, 2011-01-14 at 14:55 +0000, Kamala Narasimhan wrote:
> On Fri, Jan 14, 2011 at 4:05 AM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
> > On Thu, 2011-01-13 at 15:35 +0000, Kamala Narasimhan wrote:
> >> This patch performs some very basic validation on the virtual disk
> >> file passed through the config file.  This validation ensures that we
> >> don't go too far with the initialization like spawn qemu and more
> >> while there could be some potentially fundamental issues.  Obviously,
> >> there is a lot of room for improvement in the kind of validations we
> >> could do but the below is a minimal first stab at it.  Please consider
> >> this for inclusion or feel free to tweak it as necessary.
> >>
> >> Signed-off-by: Kamala Narasimhan <kamala.narasimhan@xxxxxxxxxx>
> >
> > I wonder if the validation function should be part of libxl?
> >
> We are better off performing these checks early on as they are very
> basic.  Getting far enough to spawn qemu and getting to its block
> device initialization code and failing there is a bit of a chase when
> it comes to troubleshooting these issues, the cause of which are
> rather trivial.  That said, in the long run we might want to move
> these validations to upstream qemu as qemu also must perform these
> checks especially when run without an accelerator (as there wouldn't
> be a toolstack to perform these checks for it in that case).  But,
> till that is accomplished these checks need to be somewhere and libxl
> seem like a reasonable place in my opinion.

I think Ians point is that your change affects the 'xl' binary and not
the libxl.so library.

Perhaps libxl_device_disk_add() and libxl_cdrom_insert() would be the
reasonable places to add this, replacing fprintf() calls with libxl
logging functions.


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>