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] Protocol change of suspending through xenbus [an

To: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Protocol change of suspending through xenbus [and 1 more messages]
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Fri, 1 Apr 2011 13:35:55 +0100
Cc: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@xxxxxxxxxx>, Frank Pan <frankpzh@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 01 Apr 2011 05:36:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <19860.48654.247892.412149@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <AANLkTimD3PkjFmg3YgbMpKgyYzzn4pomnAeeWNJ6wRK_@xxxxxxxxxxxxxx> <AANLkTin7Cd0Zw8KpbD5sUiDngA3Mg5zmOjhg8tFuvRcV@xxxxxxxxxxxxxx> <19860.48654.247892.412149@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2011-03-31 at 18:46 +0100, Ian Jackson wrote:
> Frank Pan writes ("[Xen-devel] [PATCH] Protocol change of suspending through 
> xenbus"):
> > Xend/libxl uses polling on suspending PV/PV-on-HVM guests.
> > They simply check whether the guest has been suspended again
> > and again. Guest has no chance to report errors to Xend/libxl.
> I don't think this protocol is necessarily correct.
> However I'm not sure the current code in libxl is correct either.  It
> assumes that any value other than "suspend" in control/shutdown is a
> guest ack.

Hmm, it's a bit of a short coming in the protocol -- if someone writes
something to the key which is not the ack we are waiting for we've got
no way of knowing if the guest has acked the request or not and
therefore whether it is just about to make the suspend hypercall or not
and so it's hard to know how we could recover.

It would strictly speaking be a bug in the guest for the guest to write
anything other than "" when acknowledging a request, but in practice any
write will do.

IMHO it is a bug in the toolstack to allow a second request to be made
while one is currently outstanding. I'm not sure if xl has such a bug or

> > The following patch is for libxl. It creates a key in the xenbus:
> > control/shutdown-error. Guest can post any error string into this
> > key, and also libxl can return this error to the user/administrator
> > asap.
> What character set is this string in ?  What if it contains hostile
> data ?  etc.

Not to excuse it but I think we already have this problem since the PV
driver frontends will write error strings to an error node
(xenbus_dev_error in the pvops kernel).

I think it's generally understood to be simple ASCII text, although I
doubt it is even as well defined as that.

One subtle difference with this case is that the device error messages
(AFAIK) are not propagated so there is no issue with ensuring the
toolstack side is robust (since it doesn't exist). Also there is also no
danger of an admin seeing them out of context (e.g. interleaved with
toolstack generated logging) and not realising they are from the guest,
if we are worried about that sort of attack.

> I think it might be better to report the details of the error in the
> guest kernel logfile.


Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] [PATCH] Protocol change of suspending through xenbus [and 1 more messages], Ian Campbell <=