All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: David Scott <dave.scott@citrix.com>
Cc: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com,
	stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH] libxl: create /local/domain/<domid>/error and make guest-writable
Date: Wed, 8 Oct 2014 14:08:28 +0100	[thread overview]
Message-ID: <1412773708.24894.6.camel@citrix.com> (raw)
In-Reply-To: <1412698325-32748-1-git-send-email-dave.scott@citrix.com>

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@citrix.com>
> ---
>  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.

      reply	other threads:[~2014-10-08 13:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-07 16:12 [PATCH] libxl: create /local/domain/<domid>/error and make guest-writable David Scott
2014-10-08 13:08 ` Ian Campbell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1412773708.24894.6.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=dave.scott@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.