Skip to contentSkip to conversation

docs: Fix device_model_user description of its default value

PATCH In review Anthony PERARD 5 participants 11 messages May 20, 2016 – May 23, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: Fix device_model_user description of its default value

docs/misc/qemu-deprivilege.txt and libxl suggest that "xen-qemuuser" is the default prefix, reflect that in the man.

Also add some emphasis.

---
 docs/man/xl.cfg.pod.5 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/man/xl.cfg.pod.5 +1 -1
index a4cc1b3..accd9b4 100644
@@ -1952,7 +1952,7 @@ option to the device-model.
 =item B<device_model_user="username">
 
 Run the device model as user "username", instead of
-xen-qemudepriv-domid$domid or xen-qemudepriv-shared or root.
+B<xen-qemuuser-domid$domid> or B<xen-qemuuser-shared> or B<root>.
 Please note that running QEMU as non-root causes migration and PCI
 passthrough not to work properly.
 
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw

Anthony PERARD writes ("[PATCH] docs: Fix device_model_user description of its default value"):

Quoted 4 lines

docs/misc/qemu-deprivilege.txt and libxl suggest that "xen-qemuuser" is the default prefix, reflect that in the man.

Also add some emphasis.

I'm going to make a perhaps-controversial suggestion:

This feature should be deprecated for 4.7. Specifically,
- the warning about running qemu as root should go away
- the docs should mention that running qemu not as root may well break things

Right now, the privsep is not finished and I think trying to run qemu as non-root won't (usually) actually work.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 11 lines · Ian Jackson

Anthony PERARD writes ("[PATCH] docs: Fix device_model_user description of its default value"):

Quoted 4 lines

docs/misc/qemu-deprivilege.txt and libxl suggest that "xen-qemuuser" is the default prefix, reflect that in the man.

Also add some emphasis.

I'm going to make a perhaps-controversial suggestion:

This feature should be deprecated for 4.7. Specifically,
- the warning about running qemu as root should go away
- the docs should mention that running qemu not as root may well break things

Definitely does break migration (as reported back around Christmas). Probably breaks other things.

The warning is definitely annoying, and not helpful.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
In reply to Ian Jackson
Quoted 4 lines · Ian Jackson

Anthony PERARD writes ("[PATCH] docs: Fix device_model_user description of its default value"):

Quoted 3 lines

docs/misc/qemu-deprivilege.txt and libxl suggest that "xen-qemuuser" is the default prefix, reflect that in the man.

Quoted 8 lines
Quoted 1 line

Also add some emphasis.

I'm going to make a perhaps-controversial suggestion:

This feature should be deprecated for 4.7. Specifically,
- the warning about running qemu as root should go away
- the docs should mention that running qemu not as root may well break things

Yes. The doc bearly mention an issue with migration and pci passthrough. I could boot a guest, but shutdown did not work.

Quoted 4 lines

Right now, the privsep is not finished and I think trying to run qemu as non-root won't (usually) actually work.

Ian.

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#4 lore raw
Quoted 9 lines · Anthony PERARD
Quoted 8 lines · Ian Jackson

Anthony PERARD writes ("[PATCH] docs: Fix device_model_user description of its default value"):

Quoted 4 lines

docs/misc/qemu-deprivilege.txt and libxl suggest that "xen-qemuuser" is the default prefix, reflect that in the man.

Also add some emphasis.

I'm going to make a perhaps-controversial suggestion:

Quoted 8 lines
Quoted 4 lines

This feature should be deprecated for 4.7. Specifically,
- the warning about running qemu as root should go away
- the docs should mention that running qemu not as root may well break things

Yes. The doc bearly mention an issue with migration and pci passthrough. I could boot a guest, but shutdown did not work.

So I guess we should just remove relevant manpage sections? The code can be left as-is so that we can develop this thing further.

Wei.

Quoted 7 lines
Quoted 4 lines

Right now, the privsep is not finished and I think trying to run qemu as non-root won't (usually) actually work.

Ian.

Signature · 1 line
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
Quoted 15 lines · Wei Liu
Quoted 14 lines · Anthony PERARD
Quoted 12 lines · Ian Jackson

Anthony PERARD writes ("[PATCH] docs: Fix device_model_user description of its default value"):

Quoted 4 lines

docs/misc/qemu-deprivilege.txt and libxl suggest that "xen-qemuuser" is the default prefix, reflect that in the man.

Also add some emphasis.

I'm going to make a perhaps-controversial suggestion:

This feature should be deprecated for 4.7. Specifically,
- the warning about running qemu as root should go away
- the docs should mention that running qemu not as root may well break things

Quoted 6 lines
Quoted 3 lines

Yes. The doc bearly mention an issue with migration and pci passthrough. I could boot a guest, but shutdown did not work.

So I guess we should just remove relevant manpage sections? The code can be left as-is so that we can develop this thing further.

I agree that if we're not going to actually recommend people use this feature yet that the warning should go away.

-George

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#6 lore raw

PATCH 1/1 libxl: Do not warn about non existing user for the device model

In reply to Anthony PERARD

Running QEMU as non-root user is not ready yet, so avoid avertising it with a warning.

Also improve the doc to include more potential issue with running QEMU as non-root.

---
 docs/man/xl.cfg.pod.5          | 5 +++--
 docs/misc/qemu-deprivilege.txt | 4 ++--
 tools/libxl/libxl_dm.c         | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
docs/man/xl.cfg.pod.5 +3 -2
index accd9b4..8a4f4c5 100644
@@ -1953,8 +1953,9 @@ option to the device-model.
 
 Run the device model as user "username", instead of
 B<xen-qemuuser-domid$domid> or B<xen-qemuuser-shared> or B<root>.
-Please note that running QEMU as non-root causes migration and PCI
-passthrough not to work properly.
+Please note that running QEMU as non-root causes several features like
+migration and PCI passthrough to not work properly and may prevent the guest
+from booting.
 
 =back
 
docs/misc/qemu-deprivilege.txt +2 -2
index 879a98e..7751194 100644
@@ -31,5 +31,5 @@ adduser --no-create-home --system xen-qemuuser-shared
 As a last resort, libxl will start QEMU as root.
 
 
-Please note that running QEMU as non-root causes migration and PCI
-passthrough not to work properly.
+Please note that running QEMU as non-root causes several features like migration and
+PCI passthrough to not work properly and may prevent the guest from booting.
tools/libxl/libxl_dm.c +1 -1
index 4aff323a..4248f4c 100644
@@ -1482,7 +1482,7 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
         }
 
         user = NULL;
-        LOG(WARN, "Could not find user %s, starting QEMU as root",
+        LOG(DEBUG, "Could not find user %s, starting QEMU as root",
             LIBXL_QEMU_USER_SHARED);
 
 end_search:
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#7 lore raw

Re: [PATCH] libxl: Do not warn about non existing user for the device model

Quoted 18 lines · Anthony PERARD

Running QEMU as non-root user is not ready yet, so avoid avertising it with a warning.

Also improve the doc to include more potential issue with running QEMU as non-root.

---
 docs/man/xl.cfg.pod.5          | 5 +++--
 docs/misc/qemu-deprivilege.txt | 4 ++--
 tools/libxl/libxl_dm.c         | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
docs/man/xl.cfg.pod.5 +0 -0
index accd9b4..8a4f4c5 100644

docs/man/xl.cfg.pod.5 option to the device-model. · line 1959

Quoted 9 lines
docs/man/xl.cfg.pod.5 +3 -2
@@ -1953,8 +1953,9 @@ option to the device-model.
 
 Run the device model as user "username", instead of
 B<xen-qemuuser-domid$domid> or B<xen-qemuuser-shared> or B<root>.
-Please note that running QEMU as non-root causes migration and PCI
-passthrough not to work properly.
+Please note that running QEMU as non-root causes several features like
+migration and PCI passthrough to not work properly and may prevent the guest
+from booting.
 

What is not clear is that whether using this option would buy the user anything security-wise. If it doesn't improve security but only break things we should probably remove it from man page all together.

Just my 2 cents.

Wei.

Quoted 30 lines
docs/man/xl.cfg.pod.5 +0 -0
 =back
 
docs/misc/qemu-deprivilege.txt +2 -2
index 879a98e..7751194 100644
@@ -31,5 +31,5 @@ adduser --no-create-home --system xen-qemuuser-shared
 As a last resort, libxl will start QEMU as root.
 
 
-Please note that running QEMU as non-root causes migration and PCI
-passthrough not to work properly.
+Please note that running QEMU as non-root causes several features like migration and
+PCI passthrough to not work properly and may prevent the guest from booting.
tools/libxl/libxl_dm.c +1 -1
index 4aff323a..4248f4c 100644
@@ -1482,7 +1482,7 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
         }
 
         user = NULL;
-        LOG(WARN, "Could not find user %s, starting QEMU as root",
+        LOG(DEBUG, "Could not find user %s, starting QEMU as root",
             LIBXL_QEMU_USER_SHARED);
 
 end_search:
Signature · 1 line
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#8 lore raw

Re: [PATCH] libxl: Do not warn about non existing user for the device model

Quoted 20 lines · Wei Liu
Quoted 19 lines · Anthony PERARD

Running QEMU as non-root user is not ready yet, so avoid avertising it with a warning.

Also improve the doc to include more potential issue with running QEMU as non-root.

---
 docs/man/xl.cfg.pod.5          | 5 +++--
 docs/misc/qemu-deprivilege.txt | 4 ++--
 tools/libxl/libxl_dm.c         | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
docs/man/xl.cfg.pod.5 +0 -0
index accd9b4..8a4f4c5 100644
@@ -1953,8 +1953,9 @@ option to the device-model.
 
Quoted 12 lines

docs/man/xl.cfg.pod.5 option to the device-model. · line 1959

Quoted 8 lines
docs/man/xl.cfg.pod.5 +3 -2
 Run the device model as user "username", instead of
 B<xen-qemuuser-domid$domid> or B<xen-qemuuser-shared> or B<root>.
-Please note that running QEMU as non-root causes migration and PCI
-passthrough not to work properly.
+Please note that running QEMU as non-root causes several features like
+migration and PCI passthrough to not work properly and may prevent the guest
+from booting.
 

What is not clear is that whether using this option would buy the user anything security-wise. If it doesn't improve security but only break things we should probably remove it from man page all together.

If having undocumented config options is fine, then I guess we can remove this from the man.

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#9 lore raw

Re: [PATCH] libxl: Do not warn about non existing user for the device model

Quoted 34 lines · Anthony PERARD
Quoted 20 lines · Wei Liu
Quoted 19 lines · Anthony PERARD

Running QEMU as non-root user is not ready yet, so avoid avertising it with a warning.

Also improve the doc to include more potential issue with running QEMU as non-root.

---
 docs/man/xl.cfg.pod.5          | 5 +++--
 docs/misc/qemu-deprivilege.txt | 4 ++--
 tools/libxl/libxl_dm.c         | 2 +-
 3 files changed, 6 insertions(+), 5 deletions(-)
docs/man/xl.cfg.pod.5 +0 -0
index accd9b4..8a4f4c5 100644
@@ -1953,8 +1953,9 @@ option to the device-model.
 
Quoted 12 lines

docs/man/xl.cfg.pod.5 option to the device-model. · line 1959

Quoted 8 lines
docs/man/xl.cfg.pod.5 +3 -2
 Run the device model as user "username", instead of
 B<xen-qemuuser-domid$domid> or B<xen-qemuuser-shared> or B<root>.
-Please note that running QEMU as non-root causes migration and PCI
-passthrough not to work properly.
+Please note that running QEMU as non-root causes several features like
+migration and PCI passthrough to not work properly and may prevent the guest
+from booting.
 

What is not clear is that whether using this option would buy the user anything security-wise. If it doesn't improve security but only break things we should probably remove it from man page all together.

Quoted 3 lines

If having undocumented config options is fine, then I guess we can remove this from the man.

I would say it is OK to have some WIP options to go undocumented -- because you don't want users to use them anyway.

Another way is to state explicitly in manpage that people should not use this option because it doesn't provide extra security at this stage.

Ian, do you have any opinion on this?

Wei.

Quoted 2 lines
Signature · 1 line
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#10 lore raw

Re: [PATCH] libxl: Do not warn about non existing user for the device model

Wei Liu writes ("Re: [PATCH] libxl: Do not warn about non existing user for the device model"):

Quoted 2 lines

I would say it is OK to have some WIP options to go undocumented -- because you don't want users to use them anyway.

I agree.

Quoted 4 lines

Another way is to state explicitly in manpage that people should not use this option because it doesn't provide extra security at this stage.

Ian, do you have any opinion on this?

Either is fine by me.

If the option goes undocumented it ought to have a note in the IDL or whereever saying not to use it.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel