summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/mm
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2019-04-10 17:59:02 -0700
committerShentubot <shentubot@google.com>2019-04-10 18:00:18 -0700
commitcc48969bb72e3efdc22746c5e7463b79b1942c2b (patch)
tree8fe3c01ba81b042a8ab9d7b9751b3c0c59e03a75 /pkg/sentry/mm
parentd93d19fd4eefdfd868919a73c9498e7da7eb9258 (diff)
Internal change
PiperOrigin-RevId: 242978508 Change-Id: I0ea59ac5ba1dd499e87c53f2e24709371048679b
Diffstat (limited to 'pkg/sentry/mm')
-rw-r--r--pkg/sentry/mm/syscalls.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/sentry/mm/syscalls.go b/pkg/sentry/mm/syscalls.go
index f8f095fed..cc7eb76d2 100644
--- a/pkg/sentry/mm/syscalls.go
+++ b/pkg/sentry/mm/syscalls.go
@@ -698,11 +698,11 @@ func (mm *MemoryManager) Brk(ctx context.Context, addr usermem.Addr) (usermem.Ad
return mm.brk.End, syserror.EINVAL
}
- // TODO: This enforces RLIMIT_DATA, but is slightly more
- // permissive than the usual data limit. In particular, this only
- // limits the size of the heap; a true RLIMIT_DATA limits the size of
- // heap + data + bss. The segment sizes need to be plumbed from the
- // loader package to fully enforce RLIMIT_DATA.
+ // TODO: This enforces RLIMIT_DATA, but is
+ // slightly more permissive than the usual data limit. In particular,
+ // this only limits the size of the heap; a true RLIMIT_DATA limits the
+ // size of heap + data + bss. The segment sizes need to be plumbed from
+ // the loader package to fully enforce RLIMIT_DATA.
if uint64(addr-mm.brk.Start) > limits.FromContext(ctx).Get(limits.Data).Cur {
mm.mappingMu.Unlock()
return mm.brk.End, syserror.ENOMEM