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

Re: [Xen-devel] [PATCH] libxl: create /local/domain/<domid>/error and make guest-writable



On Tue, 2014-10-07 at 17:12 +0100, David Scott wrote:
> Frontends write error information to these paths which is currently
> blocked with an EACCES. Typical errors from a Linux 3.x look like:
> 
> $ sudo xenstore-ls /local/domain/11/error -p
> device = ""  . . . . . . . . . . . . . . . . . . . . . . . .  (n11)
>  vbd = ""  . . . . . . . . . . . . . . . . . . . . . . . . .  (n11)
>   5632 = ""  . . . . . . . . . . . . . . . . . . . . . . . .  (n11)
>    error = "19 xenbus_dev_probe on device/vbd/5632"  . . . .  (n11)

I had no idea this existed!

> Signed-off-by: David Scott <dave.scott@xxxxxxxxxx>
> ---
>  docs/misc/xenstore-paths.markdown |   20 ++++++++++++++++++++

What do you think of a single more generic entry e.g.

        #### ~/error/device/$DEVTYPE/$DEVID/error
        
        An error message reported by the virtual device driver
        associated with ~/device/$DEVTYPE/$DEVID/* (see above)

> diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
> index 8b82584..af56896 100644
> --- a/tools/libxl/libxl_create.c
> +++ b/tools/libxl/libxl_create.c
> @@ -600,6 +600,9 @@ retry_transaction:
>      libxl__xs_mkdir(gc, t,
>                      libxl__sprintf(gc, "%s/data", dom_path),
>                      rwperm, ARRAY_SIZE(rwperm));
> +    libxl__xs_mkdir(gc, t,
> +                    libxl__sprintf(gc, "%s/error", dom_path),
> +                    rwperm, ARRAY_SIZE(rwperm));

Looks to be trivially correct to me.

It's a shame to be opening up yet another area where the guest is free
to do whatever, but I expect the patch to create each of the specific
device paths as we add the device would be somewhat larger.

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®.