Skip to contentSkip to conversation

docs: clarify xenstore permission documentation

PATCH In review Juergen Gross 4 participants 7 messages Feb 9, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: clarify xenstore permission documentation

In docs/misc/xenstore.txt the description of the Xenstore node access permissions is missing one important aspect, which can be found only in the code or in the wiki [1]:

The first permission entry is defining the owner of the node via the domid, and the access rights for all domains NOT having a dedicated permission entry.

Make that aspect clear in the official documentation.

[1]: https://wiki.xenproject.org/wiki/XenBus#Permissions

---
 docs/misc/xenstore.txt | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
docs/misc/xenstore.txt +10 -7
index 8887e7df88..d807ef0709 100644
@@ -45,13 +45,16 @@ them to within 2048 bytes.  (See XENSTORE_*_PATH_MAX in xs_wire.h.)
 
 Each node has one or multiple permission entries.  Permissions are
 granted by domain-id, the first permission entry of each node specifies
-the owner of the node.  Permissions of a node can be changed by the
-owner of the node, the owner can only be modified by the control
-domain (usually domain id 0).  The owner always has the right to read
-and write the node, while other permissions can be setup to allow
-read and/or write access.  When a domain is being removed from Xenstore
-nodes owned by that domain will be removed together with all of those
-nodes' children.
+the owner of the node, who always has full access to the node (read and
+write permission).  The access rights of the first entry specify the
+allowed access for all domains not having a dedicated permission entry
+(the default is "n", removing access for all domains not explicitly
+added via additional permission entries).  Permissions of a node can be
+changed by the owner of the node, the owner can only be modified by the
+control domain (usually domain id 0).  Other permissions can be setup to
+allow read and/or write access for other domains.  When a domain is
+being removed from Xenstore nodes owned by that domain will be removed
+together with all of those nodes' children.
 
 
 Communication with xenstore is via either sockets, or event channel
Signature · 1 line
2.35.3
Reviewed-by on v1 1/1
#1 lore raw

Hi Juergen,

Quoted 9 lines · Juergen Gross

In docs/misc/xenstore.txt the description of the Xenstore node access permissions is missing one important aspect, which can be found only in the code or in the wiki [1]:

The first permission entry is defining the owner of the node via the domid, and the access rights for all domains NOT having a dedicated permission entry.

Make that aspect clear in the official documentation.

Thanks for the commit. I am not very thrilled with the current behavior but at least it is now clearly documented in xenstore.txt. So:

Cheers,

Signature · 1 line
Julien Grall
#2 lore raw
In reply to Juergen Gross
Quoted 8 lines · Juergen Gross

In docs/misc/xenstore.txt the description of the Xenstore node access permissions is missing one important aspect, which can be found only in the code or in the wiki [1]:

The first permission entry is defining the owner of the node via the domid, and the access rights for all domains NOT having a dedicated permission entry.

Quoted 5 lines

Make that aspect clear in the official documentation.

[1]: https://wiki.xenproject.org/wiki/XenBus#Permissions

I feel as if Edvin deserves some kind of credit here, seeing as it was his observation...

Also, CC to double check the wording.

~Andrew

Quoted 32 lines
---
 docs/misc/xenstore.txt | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
docs/misc/xenstore.txt +10 -7
index 8887e7df88..d807ef0709 100644
@@ -45,13 +45,16 @@ them to within 2048 bytes.  (See XENSTORE_*_PATH_MAX in xs_wire.h.)
 
 Each node has one or multiple permission entries.  Permissions are
 granted by domain-id, the first permission entry of each node specifies
-the owner of the node.  Permissions of a node can be changed by the
-owner of the node, the owner can only be modified by the control
-domain (usually domain id 0).  The owner always has the right to read
-and write the node, while other permissions can be setup to allow
-read and/or write access.  When a domain is being removed from Xenstore
-nodes owned by that domain will be removed together with all of those
-nodes' children.
+the owner of the node, who always has full access to the node (read and
+write permission).  The access rights of the first entry specify the
+allowed access for all domains not having a dedicated permission entry
+(the default is "n", removing access for all domains not explicitly
+added via additional permission entries).  Permissions of a node can be
+changed by the owner of the node, the owner can only be modified by the
+control domain (usually domain id 0).  Other permissions can be setup to
+allow read and/or write access for other domains.  When a domain is
+being removed from Xenstore nodes owned by that domain will be removed
+together with all of those nodes' children.
 
 
 Communication with xenstore is via either sockets, or event channel
#3 lore raw
Quoted 9 lines · Andrew Cooper
Quoted 8 lines · Juergen Gross

In docs/misc/xenstore.txt the description of the Xenstore node access permissions is missing one important aspect, which can be found only in the code or in the wiki [1]:

The first permission entry is defining the owner of the node via the domid, and the access rights for all domains NOT having a dedicated permission entry.

Quoted 8 lines
Quoted 5 lines

Make that aspect clear in the official documentation.

[1]: https://wiki.xenproject.org/wiki/XenBus#Permissions

I feel as if Edvin deserves some kind of credit here, seeing as it was his observation...

I wouldn't mind. What kind of tag would be appropriate? "Reported-by:"?

Juergen

#4 lore raw
Quoted 12 lines · Juergen Gross
Quoted 11 lines · Andrew Cooper
Quoted 10 lines · Juergen Gross

In docs/misc/xenstore.txt the description of the Xenstore node access permissions is missing one important aspect, which can be found only in the code or in the wiki [1]:

The first permission entry is defining the owner of the node via the domid, and the access rights for all domains NOT having a dedicated permission entry.

Make that aspect clear in the official documentation.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

[1]: https://wiki.xenproject.org/wiki/XenBus#Permissions

I feel as if Edvin deserves some kind of credit here, seeing as it was his observation...

I wouldn't mind. What kind of tag would be appropriate? "Reported-by:"?

Probably.  I can't think of anything better.

(and as usual, can be fixed on commit if that's the only issue)

~Andrew

#5 lore raw
In reply to Andrew Cooper
Quoted 48 lines · Andrew Cooper
Quoted 8 lines · Juergen Gross

In docs/misc/xenstore.txt the description of the Xenstore node access permissions is missing one important aspect, which can be found only in the code or in the wiki [1]:

The first permission entry is defining the owner of the node via the domid, and the access rights for all domains NOT having a dedicated permission entry.

Quoted 5 lines

Make that aspect clear in the official documentation.

[1]: https://wiki.xenproject.org/wiki/XenBus#Permissions

I feel as if Edvin deserves some kind of credit here, seeing as it was his observation...

Also, CC to double check the wording.

~Andrew

Quoted 21 lines

---
docs/misc/xenstore.txt | 17 ++++++++++-------

1 file changed, 10 insertions(+), 7 deletions(-)
docs/misc/xenstore.txt +0 -0
index 8887e7df88..d807ef0709 100644
@@ -45,13 +45,16 @@ them to within 2048 bytes.  (See XENSTORE_*_PATH_MAX in xs_wire.h.)
 

Each node has one or multiple permission entries. Permissions are granted by domain-id, the first permission entry of each node specifies

docs/misc/xenstore.txt +2 -7
-the owner of the node.  Permissions of a node can be changed by the
-owner of the node, the owner can only be modified by the control
-domain (usually domain id 0).  The owner always has the right to read
-and write the node, while other permissions can be setup to allow
-read and/or write access.  When a domain is being removed from Xenstore
-nodes owned by that domain will be removed together with all of those
-nodes' children.
+the owner of the node, who always has full access to the node (read and
+write permission).
Quoted 6 lines

docs/misc/xenstore.txt them to within 2048 bytes. (See XENSTORE_*_PATH_MAX in xs_wire.h.)

Quoted 6 lines

The access rights of the first entry specify the

docs/misc/xenstore.txt +5 -0
+allowed access for all domains not having a dedicated permission entry
+(the default is "n", removing access for all domains not explicitly
+added via additional permission entries).  Permissions of a node can be
+changed by the owner of the node, the owner can only be modified by the
+control domain (usually domain id 0).

This looks good in general, one small nitpick, maybe we need something like this too:
", or domains equivalent to the owner or control domain (domain equivalence can be established with the privileged SET_TARGET operation)"

Thanks,
--Edwin

Quoted 8 lines
Quoted 7 lines

Other permissions can be setup to

docs/misc/xenstore.txt +3 -0
+allow read and/or write access for other domains.  When a domain is
+being removed from Xenstore nodes owned by that domain will be removed
+together with all of those nodes' children.

Communication with xenstore is via either sockets, or event channel

#6 lore raw
Quoted 48 lines · Edwin Torok
Quoted 47 lines · Andrew Cooper
Quoted 8 lines · Juergen Gross

In docs/misc/xenstore.txt the description of the Xenstore node access permissions is missing one important aspect, which can be found only in the code or in the wiki [1]:

The first permission entry is defining the owner of the node via the domid, and the access rights for all domains NOT having a dedicated permission entry.

Quoted 5 lines

Make that aspect clear in the official documentation.

[1]: https://wiki.xenproject.org/wiki/XenBus#Permissions

I feel as if Edvin deserves some kind of credit here, seeing as it was his observation...

Also, CC to double check the wording.

~Andrew

Quoted 21 lines

---
docs/misc/xenstore.txt | 17 ++++++++++-------

1 file changed, 10 insertions(+), 7 deletions(-)
docs/misc/xenstore.txt +0 -0
index 8887e7df88..d807ef0709 100644
@@ -45,13 +45,16 @@ them to within 2048 bytes.  (See XENSTORE_*_PATH_MAX in xs_wire.h.)
 

Each node has one or multiple permission entries. Permissions are granted by domain-id, the first permission entry of each node specifies

docs/misc/xenstore.txt +2 -7
-the owner of the node.  Permissions of a node can be changed by the
-owner of the node, the owner can only be modified by the control
-domain (usually domain id 0).  The owner always has the right to read
-and write the node, while other permissions can be setup to allow
-read and/or write access.  When a domain is being removed from Xenstore
-nodes owned by that domain will be removed together with all of those
-nodes' children.
+the owner of the node, who always has full access to the node (read and
+write permission).
Quoted 9 lines
Quoted 6 lines

docs/misc/xenstore.txt them to within 2048 bytes. (See XENSTORE_*_PATH_MAX in xs_wire.h.)

Quoted 6 lines

The access rights of the first entry specify the

docs/misc/xenstore.txt +5 -0
+allowed access for all domains not having a dedicated permission entry
+(the default is "n", removing access for all domains not explicitly
+added via additional permission entries).  Permissions of a node can be
+changed by the owner of the node, the owner can only be modified by the
+control domain (usually domain id 0).

This looks good in general, one small nitpick, maybe we need something like this too:
", or domains equivalent to the owner or control domain (domain equivalence can be established with the privileged SET_TARGET operation)"

This is already part of the SET_TARGET description. So I don't think we need to add it here, too.

Juergen