summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2020-11-16 16:29:16 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-16 16:31:21 -0800
commitd48610795d94f4d1a1782bd5372cbb8e0a76931c (patch)
treee6f85abdbf8e412c0c303985252c7005cd7be937 /pkg/sentry/syscalls/linux
parentcc5cfce4c6c9df1a44433681b87d411a67b09b28 (diff)
Allow RLIMIT_RSS to be set
Closes #4746 PiperOrigin-RevId: 342747165
Diffstat (limited to 'pkg/sentry/syscalls/linux')
-rw-r--r--pkg/sentry/syscalls/linux/sys_rlimit.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_rlimit.go b/pkg/sentry/syscalls/linux/sys_rlimit.go
index 309c183a3..88cd234d1 100644
--- a/pkg/sentry/syscalls/linux/sys_rlimit.go
+++ b/pkg/sentry/syscalls/linux/sys_rlimit.go
@@ -90,6 +90,9 @@ var setableLimits = map[limits.LimitType]struct{}{
limits.FileSize: {},
limits.MemoryLocked: {},
limits.Stack: {},
+ // RSS can be set, but it's not enforced because Linux doesn't enforce it
+ // either: "This limit has effect only in Linux 2.4.x, x < 30"
+ limits.Rss: {},
// These are not enforced, but we include them here to avoid returning
// EPERM, since some apps expect them to succeed.
limits.Core: {},