Files
xen/tools/libxl
George Dunlap ce2f426058 tools/dm_depriv: Add first cut RLIMITs
Limit the ability of a potentially compromised QEMU to consume system
resources.  Key limits:
 - RLIMIT_FSIZE (file size): 256KiB
 - RLIMIT_NPROC (after uid changes to a unique uid)

Probably unnecessary limits but why not:
 - RLIMIT_CORE: 0
 - RLIMIT_MSGQUEUE: 0
 - RLIMIT_LOCKS: 0
 - RLIMIT_MEMLOCK: 0

NB that we do not yet set RLIMIT_AS (total virtual memory) or
RLIMIT_NOFILES (number of open files), since these require more care
and/or more coordination with QEMU to implement.

Suggested-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
Changes since v4:
- Put global headers before local headers (sugg by Paul)
- Move #undif inside the braces (sugg by Paul)

Changes since v3:
- Align RLIMIT_ENTRY list for easier reading
- Fix wrong format string specifier
- Get rid of some trailing whitespace

Changes since v2:
- Use a macro to define rlimit entries
- Use RLIMIT_NLIMITS as an end-of-list marker, rather than -1
- Various style clean-ups

CC: Ian Jackson <ian.jackson@citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
CC: Anthony Perard <anthony.perard@citrix.com>
2018-11-06 15:41:25 +00:00
..
2013-10-10 15:48:55 +01:00
2012-10-05 14:34:30 +01:00
2018-07-30 14:46:32 +01:00
2018-03-30 12:51:55 +01:00
2017-09-26 11:10:08 +01:00
2017-09-26 11:10:08 +01:00
2016-04-20 14:34:04 +01:00
2018-07-25 11:08:22 +01:00
2016-12-13 20:25:25 +00:00
2016-12-13 20:25:25 +00:00
2016-12-13 20:25:25 +00:00
2013-10-10 15:48:55 +01:00
2018-07-25 11:07:46 +01:00
2011-10-12 16:21:32 +01:00