WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Q: How to find own domid or uuid from domU?

To: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Q: How to find own domid or uuid from domU?
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Tue, 23 May 2006 13:02:42 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, "Andrew D. Ball" <aball@xxxxxxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Delivery-date: Tue, 23 May 2006 04:03:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060523100255.GA16064@xxxxxxxxxxxxxxxxxxxxxx> (Ewan Mellor's message of "Tue, 23 May 2006 11:02:55 +0100")
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <87r72rppv2.fsf@xxxxxxxxxxxxxxxxx> <c7b7a9451577705256438d2456881321@xxxxxxxxxxxx> <87iro3pj2z.fsf@xxxxxxxxxxxxxxxxx> <0cbcc9c018815b56e92521554c2cd585@xxxxxxxxxxxx> <446C8488.1030503@xxxxxxxxxx> <8d2b2f0e40dfb24f939a81970a493a7f@xxxxxxxxxxxx> <446C910A.50000@xxxxxxxxxx> <3d8eece20605180959i5b06dbd2q3f66ebfeba0be255@xxxxxxxxxxxxxx> <87sln1ch5r.fsf@xxxxxxxxxxxxxxxxx> <20060523083121.GO10042@xxxxxxxxxxxx> <20060523100255.GA16064@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
Ewan Mellor <ewan@xxxxxxxxxxxxx> writes:

> On Tue, May 23, 2006 at 09:31:21AM +0100, Christian Limpach wrote:
>
>> On Tue, May 23, 2006 at 09:52:00AM +0200, Markus Armbruster wrote:
>> > "Christian Limpach" <christian.limpach@xxxxxxxxx> writes:
>> > 
>> > > There's a uuid node under the vm path.  I.e. you'd do:
>> > > vmpath=$(xenstore-read vm)
>> > > uuid=$(xenstore-read $vmpath/uuid)
>> > 
>> > Fails in domU:
>> > 
>> >     # xenstore-read vm
>> >     /vm/947df77a-58b5-4e3d-9b6c-aa0178d8e133
>> >     # xenstore-read /vm/947df77a-58b5-4e3d-9b6c-aa0178d8e133/uuid
>> >     xenstore-read: couldn't read path 
>> > /vm/947df77a-58b5-4e3d-9b6c-aa0178d8e133/uuid
>> 
>> Indeed, it's either broken because we've set the permissions not to
>> allow domains to have access to the /vm tree or because we don't allow
>> domains to read outside of their "home" directory.
>
> Permissions for doing this are set in Xend.  At the moment, for security, we
> only allow a domain to look at /local/domain/<domid>, and
> /local/domain/0/backend/<device type>/<domid>, IIRC.  If it is reasonable to
> allow a guest to determine its UUID, then we could trivially add that to Xend,
> by allowing it to read that particular value from the vm directory.
>
> Ewan.

To me it feels like there's a rough consensus that there are
legitimate uses for the UUID in domU.

It was pointed out that xenstore isn't really designed to be used in
anger from domU, and that unprivileged access could create real
problems.

Keir indicated that he's willing to merge a patch to put the UUID into
sysfs.  Makes sense to me, because the UUID is to be used by
unprivileged processes.

I understand that xen_sysfs may not be accepted upstream, or only with
changes.  Fine with me, I'm not looking for a stable API at this time,
I'm looking for something that works to get us going.  If it goes away
later, tough, welcome to the bleeding edge, go look for something else
that works.

I also understand that this is no precedent for stuffing all kinds of
xenstore data into xen_sysfs.

I was looking into Christian's suggestion to read a proper UUID key
rather than extracting it from the vm value.  Well, it doesn't work.
I'll be happy to revise my patch when it does.

In light of the above and all the other contributions to this thread:
what about merging my patch?

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel