From d48610795d94f4d1a1782bd5372cbb8e0a76931c Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Mon, 16 Nov 2020 16:29:16 -0800 Subject: Allow RLIMIT_RSS to be set Closes #4746 PiperOrigin-RevId: 342747165 --- pkg/sentry/syscalls/linux/sys_rlimit.go | 3 +++ 1 file changed, 3 insertions(+) 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: {}, -- cgit v1.2.3