All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: "Alex Velazquez" <alex.j.velazquez@gmail.com>,
	xen-users@lists.xen.org, "Wei Liu" <wei.liu2@citrix.com>,
	xen-devel@lists.xenproject.org,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-users] DomU fails to reboot with storage driver domain
Date: Fri, 1 Apr 2016 14:54:48 +0100	[thread overview]
Message-ID: <20160401135448.GE27636@citrix.com> (raw)
In-Reply-To: <22270.31492.47809.723117@mariner.uk.xensource.com>

On Fri, Apr 01, 2016 at 02:43:32PM +0100, Ian Jackson wrote:
> Wei Liu writes ("Re: [Xen-users] DomU fails to reboot with storage driver domain"):
> > On Fri, Apr 01, 2016 at 01:04:42PM +0200, Roger Pau Monné wrote:
> > > TBH, I don't see an easy way to solve this, I've thought about fetching 
> > > the "backend" node from the xenstore frontend path of each device, but 
> > > that's not safe since the guest can modify those entries.
> > > 
> > Interrogating frontend  is not entirely unsafe because we can validate
> > that path before reading from it. There is also a backend-id field that
> > we can use if that make validation easier -- no need to parse a frontend
> > provided string.
> > 
> > Another fix is to fetch all backend domain name / domid from JSON, then
> > fetch all xenstore backend entries. This is safe because JSON is not
> > controlled by guest. This might require adding locks to multiple APIs,
> > but luckily that wouldn't change their semantics.
> >
> > Ian, do you have better ideas?
> 
> Either of these two approaches sound good.
> 
> I'm not sure why using the JSON domid would need any additional
> locking.  The code here already has the JSON in its hand, doesn't it ?
> But using the domain _name_ rather than the domid is wrong, and I
> think the JSON might have only the name.
> 

The APIs that retrieve lists of devices will need to lock JSON config
as well, which they don't currently do because they only reference
xenstore.

> I think the xenstore approach is probably better.  I think it may be
> best to use (with checking) the frontend's backend path, since ideally
> we would find the corresponding device entry directly.
> 
> But I am happy with whatever is most convenient.
> 

Interrogating frontend is more convenient.

> I think we should fix this for 4.7 and the fix is a bugfix so OK to go
> in after the freeze.
> 

Yes, it's a bug that should be fixed. I can give it a stab next week
when I'm back in office unless someone else beats me to it.

Wei.

> Ian.

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

  reply	other threads:[~2016-04-01 13:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CALhSYYRek3PeJyJEVNSLFE6WCbkDc3n+Qj6L5XYwQKkMgthqPw@mail.gmail.com>
     [not found] ` <alpine.OSX.2.20.1603231152520.753@mac>
     [not found]   ` <CALhSYYQLPdEZ-pSBdUjKDWnNsmF95zu9t=T7zGZ69Vb1S1hwWg@mail.gmail.com>
2016-04-01 11:04     ` [Xen-users] DomU fails to reboot with storage driver domain Roger Pau Monné
2016-04-01 12:07       ` Wei Liu
2016-04-01 13:43         ` Ian Jackson
2016-04-01 13:54           ` Wei Liu [this message]
2016-04-12 20:05             ` Alex Velazquez

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=20160401135448.GE27636@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=alex.j.velazquez@gmail.com \
    --cc=roger.pau@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xen-users@lists.xen.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.