Skip to contentSkip to conversation

docs: Fix dm_restrict documentation

PATCH-for-4.12 George Dunlap 4 participants 7 messages Jan 24, 2019 – Jan 25, 2019

lore
Share & tools
lore
#0 lore raw

Remove "chatty" and redundant information from the xl man page; restrict it to functional descriptions only, and point instead to qemu-depriv.pandoc and SUPPORT.md as locations for "canonical" information.

Add a man page entry for device_model_user.

Update qemu-deprivilege.pandoc:

Changes in missing feature list:
- Migration is functional
- But qdisk backends are not

Add a missing restriction list.

The following statements from the man page are dropped:
- Mentioning PV; PV guests never have a device model.
- Drop the confusing statement about stdvga and cirrus vga options.
- Re-used domain IDs are now handled.
- Device models should no longer be able to create world-readable files on dom0's filesystem.

---
RFC: I don't know what the 'vga' limitation thing was about -- I tried both 'default' and 'stgvga' with dm_restrict and they worked fine.

Freeze exception justification:
- Fixing a "bug" in the docs
- No functional change

CC Ian Jackson <[email protected]>
CC Wei Liu <[email protected]>
CC Anthony Perard <[email protected]>
CC Juergen Gross <[email protected]>
---
 docs/features/qemu-deprivilege.pandoc |  12 ++--
 docs/man/xl.cfg.5.pod.in              | 100 +++-----------------------
 2 files changed, 16 insertions(+), 96 deletions(-)
docs/features/qemu-deprivilege.pandoc +8 -4
index 20d6ac2189..cfe528b1d3 100644
@@ -110,10 +110,14 @@ See docs/design/qemu-deprivilege.md for technical details.
 
 The following features still need to be implemented:
  * Inserting a new cdrom while the guest is running (xl cdrom-insert)
- * Migration / save / restore
-
-dm_restrict is totally unsupported and may have unexpected security
-problems if used with a dom0 Linux kernel earlier than 2.6.18.
+ * Support for qdisk backends
+
+A number of restrictions still need to be implemented.  A compromised
+device model may be able to do the following:
+ * Delay or exploit weaknesses in the toolstack
+ * Launch "fork bombs" or other resource exhaustion attacks
+ * Make network connections on the management network
+ * Break out of the restrictions after migration
 
 Additionally, getting PCI passthrough to work securely would require a
 significant rework of how passthrough works at the moment.  It may be
docs/man/xl.cfg.5.pod.in +8 -92

112 lines not on this page · raw message

Signature · 7 lines
2.20.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw
Quoted 15 lines · George Dunlap

Remove "chatty" and redundant information from the xl man page; restrict it to functional descriptions only, and point instead to qemu-depriv.pandoc and SUPPORT.md as locations for "canonical" information.

Add a man page entry for device_model_user.

Update qemu-deprivilege.pandoc:

Changes in missing feature list:
- Migration is functional
- But qdisk backends are not

Add a missing restriction list.

Quoted 8 lines

The following statements from the man page are dropped:
- Mentioning PV; PV guests never have a device model.
- Drop the confusing statement about stdvga and cirrus vga options.
- Re-used domain IDs are now handled.
- Device models should no longer be able to create world-readable files on dom0's filesystem.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
In reply to George Dunlap
Quoted 22 lines · George Dunlap

Remove "chatty" and redundant information from the xl man page; restrict it to functional descriptions only, and point instead to qemu-depriv.pandoc and SUPPORT.md as locations for "canonical" information.

Add a man page entry for device_model_user.

Update qemu-deprivilege.pandoc:

Changes in missing feature list:
- Migration is functional
- But qdisk backends are not

Add a missing restriction list.

The following statements from the man page are dropped:
- Mentioning PV; PV guests never have a device model.
- Drop the confusing statement about stdvga and cirrus vga options.
- Re-used domain IDs are now handled.
- Device models should no longer be able to create world-readable files on dom0's filesystem.

Quoted 4 lines

---
RFC: I don't know what the 'vga' limitation thing was about -- I tried both 'default' and 'stgvga' with dm_restrict and they worked fine.

I think until we figure out the situation of vga, the statement should stay.

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 23 lines · Wei Liu
Quoted 22 lines · George Dunlap

Remove "chatty" and redundant information from the xl man page; restrict it to functional descriptions only, and point instead to qemu-depriv.pandoc and SUPPORT.md as locations for "canonical" information.

Add a man page entry for device_model_user.

Update qemu-deprivilege.pandoc:

Changes in missing feature list:
- Migration is functional
- But qdisk backends are not

Add a missing restriction list.

The following statements from the man page are dropped:
- Mentioning PV; PV guests never have a device model.
- Drop the confusing statement about stdvga and cirrus vga options.
- Re-used domain IDs are now handled.
- Device models should no longer be able to create world-readable files on dom0's filesystem.

Quoted 7 lines
Quoted 4 lines

---
RFC: I don't know what the 'vga' limitation thing was about -- I tried both 'default' and 'stgvga' with dm_restrict and they worked fine.

I think until we figure out the situation of vga, the statement should stay.

How would we do that?

-George

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 29 lines · George Dunlap
Quoted 28 lines · Wei Liu
Quoted 26 lines · George Dunlap

Remove "chatty" and redundant information from the xl man page; restrict it to functional descriptions only, and point instead to qemu-depriv.pandoc and SUPPORT.md as locations for "canonical" information.

Add a man page entry for device_model_user.

Update qemu-deprivilege.pandoc:

Changes in missing feature list:
- Migration is functional
- But qdisk backends are not

Add a missing restriction list.

The following statements from the man page are dropped:
- Mentioning PV; PV guests never have a device model.
- Drop the confusing statement about stdvga and cirrus vga options.
- Re-used domain IDs are now handled.
- Device models should no longer be able to create world-readable files on dom0's filesystem.

---
RFC: I don't know what the 'vga' limitation thing was about -- I tried both 'default' and 'stgvga' with dm_restrict and they worked fine.

Quoted 4 lines
Quoted 2 lines

I think until we figure out the situation of vga, the statement should stay.

How would we do that?

Per my understanding:

Setting vga option to anything else other than "none" may not work

?

Wei.

Quoted 2 lines

-George

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
Quoted 33 lines · Wei Liu
Quoted 32 lines · George Dunlap
Quoted 30 lines · Wei Liu
Quoted 22 lines · George Dunlap

Remove "chatty" and redundant information from the xl man page; restrict it to functional descriptions only, and point instead to qemu-depriv.pandoc and SUPPORT.md as locations for "canonical" information.

Add a man page entry for device_model_user.

Update qemu-deprivilege.pandoc:

Changes in missing feature list:
- Migration is functional
- But qdisk backends are not

Add a missing restriction list.

The following statements from the man page are dropped:
- Mentioning PV; PV guests never have a device model.
- Drop the confusing statement about stdvga and cirrus vga options.
- Re-used domain IDs are now handled.
- Device models should no longer be able to create world-readable files on dom0's filesystem.

Quoted 4 lines

---
RFC: I don't know what the 'vga' limitation thing was about -- I tried both 'default' and 'stgvga' with dm_restrict and they worked fine.

I think until we figure out the situation of vga, the statement should stay.

Quoted 7 lines
Quoted 1 line

How would we do that?

Per my understanding:

Setting vga option to anything else other than "none" may not work

?

Is their an issue with the vga setting and dm_restrict=1 ? I never add any problem. Accessing the guest graphic output via VNC while running with dm_restrict works fine. (but I only ever use the default.)

Maybe it's time to blame! And do some archeology ...

Base on commit 7d278e2115d084a5f78a512ae01ce946c10cff7d "xl: Document VGA problems arising from lack of physmap dmop" the issue is just that using xc_domain_add_to_physmap doesn't work.

But that issue has been addressed with a new DMOPS, and QEMU have support for it since:
commit 2cbf8903530b936964dd3af7e2e5bf85c3955d5c
"xen: Use newly added dmops for mapping VGA memory" which is QEMU 3.0.

qemu-xen-4.12.0 is at least QEMU 3.0. So it should be just a matter of documenting that we need QEMU 3.0.
But based on qemu-deprivilege.pandoc, QEMU 3.0 is required for dm_restrict to works, so all is fine. The original mention of problem with vga!=none isn't true anymore.

Version requirement is documented in the man page, which redirect to qemu-deprivilege.pandoc which specify QEMU 3.0+. So all is fine.

Cheers,

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by
#6 lore raw
Quoted 58 lines · Anthony PERARD
Quoted 33 lines · Wei Liu
Quoted 32 lines · George Dunlap
Quoted 30 lines · Wei Liu
Quoted 22 lines · George Dunlap

Remove "chatty" and redundant information from the xl man page; restrict it to functional descriptions only, and point instead to qemu-depriv.pandoc and SUPPORT.md as locations for "canonical" information.

Add a man page entry for device_model_user.

Update qemu-deprivilege.pandoc:

Changes in missing feature list:
- Migration is functional
- But qdisk backends are not

Add a missing restriction list.

The following statements from the man page are dropped:
- Mentioning PV; PV guests never have a device model.
- Drop the confusing statement about stdvga and cirrus vga options.
- Re-used domain IDs are now handled.
- Device models should no longer be able to create world-readable files on dom0's filesystem.

Quoted 4 lines

---
RFC: I don't know what the 'vga' limitation thing was about -- I tried both 'default' and 'stgvga' with dm_restrict and they worked fine.

I think until we figure out the situation of vga, the statement should stay.

Quoted 7 lines
Quoted 1 line

How would we do that?

Per my understanding:

Setting vga option to anything else other than "none" may not work

?

Is their an issue with the vga setting and dm_restrict=1 ? I never add any problem. Accessing the guest graphic output via VNC while running with dm_restrict works fine. (but I only ever use the default.)

Maybe it's time to blame! And do some archeology ...

Base on commit 7d278e2115d084a5f78a512ae01ce946c10cff7d "xl: Document VGA problems arising from lack of physmap dmop" the issue is just that using xc_domain_add_to_physmap doesn't work.

But that issue has been addressed with a new DMOPS, and QEMU have support for it since:
commit 2cbf8903530b936964dd3af7e2e5bf85c3955d5c
"xen: Use newly added dmops for mapping VGA memory" which is QEMU 3.0.

Quoted 8 lines

qemu-xen-4.12.0 is at least QEMU 3.0. So it should be just a matter of documenting that we need QEMU 3.0.
But based on qemu-deprivilege.pandoc, QEMU 3.0 is required for dm_restrict to works, so all is fine. The original mention of problem with vga!=none isn't true anymore.

Version requirement is documented in the man page, which redirect to qemu-deprivilege.pandoc which specify QEMU 3.0+. So all is fine.

OK. That's convincing. Thanks for digging.

We can remove the statement for 4.12.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel