libxl/depriv: Remove RLIMIT_NPROC restriction
PATCH 1/1 libxl/depriv: Remove RLIMIT_NPROC restriction
This also prevents QEMU from creating ptreads, which it requires for certain devices to function.
---
CC: Ian Jackson <[email protected]>
CC: Wei Liu <[email protected]>
CC: Anthony Perard <[email protected]>
--- docs/designs/qemu-deprivilege.md | 4 +++- tools/libxl/libxl_linux.c | 1 - 2 files changed, 3 insertions(+), 2 deletions(-)
docs/designs/qemu-deprivilege.md +3 -1
@@ -114,7 +114,6 @@ resources available to it. Limits that can be implemented immediately without much effort: - RLIMIT_FSIZE` (file size) to 256KiB. - - RLIMIT_NPROC (after uid changes to a unique uid) Probably not necessary but why not: - RLIMIT_CORE: 0
@@ -142,6 +141,9 @@ virtual memory which QEMU uses as a mapcache. xen-mapcache.c already fiddles with this; it would be straightforward to make it *set* the rlimit to what it thinks a sensible limit is. +RLIMIT_NPROC limits total number of processes or threads. QEMU uses +threads for some devices, so this would require some thought. + Other things that would take some cleverness / changes to QEMU to utilize due to ordering constrants: - RLIMIT_NOFILES (after all necessary files are opened)
tools/libxl/libxl_linux.c +0 -1
@@ -318,7 +318,6 @@ static struct {RLIMIT_ENTRY (RLIMIT_FSIZE ,256 *1024 ),/* Shouldn't need any of these */ -RLIMIT_ENTRY (RLIMIT_NPROC ,0 ),RLIMIT_ENTRY (RLIMIT_CORE ,0 ),RLIMIT_ENTRY (RLIMIT_MSGQUEUE ,0 ), RLIMIT_ENTRY(RLIMIT_LOCKS, 0),
Signature · 7 lines
2.19.1 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
George Dunlap writes ("[PATCH] libxl/depriv: Remove RLIMIT_NPROC restriction"):
Quoted 2 lines
This also prevents QEMU from creating ptreads, which it requires for certain devices to function.
To unblock staging.
We should consider whether we can impose a smaller limit and if so what it should be (and whether it needs to be dynamic).
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Ian Jackson
George Dunlap writes ("[PATCH] libxl/depriv: Remove
RLIMIT_NPROCrestriction"):Quoted 2 lines
This also prevents QEMU from creating ptreads, which it requires for certain devices to function.
Acked-by Ian Jackson <[email protected]>To unblock staging.
We should consider whether we can impose a smaller limit and if so what it should be (and whether it needs to be dynamic).
Yep, that's why I this patch also changes the design doc, moving RLIMIT_NPROC from "Restrictions done" to "Further RLIMITs", to make sure it stays on the radar.
-George
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 1 line · George Dunlap
This also prevents QEMU from creating ptreads, which it requires for
ptreads -> pthreads
Quoted 3 lines
certain devices to function.
Signed-off-by George Dunlap <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel