summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/mm
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2018-11-16 12:16:37 -0800
committerNicolas Lacasse <nlacasse@google.com>2018-11-20 14:02:07 -0800
commitbb9a2bb62ed37f9b29c7ab4418b8b90417d1b2a2 (patch)
treedf790035bda57dd2d60d69f8d67306b8fd135f69 /pkg/sentry/mm
parent45f4b90d4f6fc5bdaaaa35f677340860a2c1029c (diff)
Update futex to use usermem abstractions.
This eliminates the indirection that existed in task_futex. PiperOrigin-RevId: 221832498 Change-Id: Ifb4c926d493913aa6694e193deae91616a29f042
Diffstat (limited to 'pkg/sentry/mm')
-rw-r--r--pkg/sentry/mm/syscalls.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/sentry/mm/syscalls.go b/pkg/sentry/mm/syscalls.go
index a721cc456..9519c7390 100644
--- a/pkg/sentry/mm/syscalls.go
+++ b/pkg/sentry/mm/syscalls.go
@@ -794,10 +794,9 @@ func (mm *MemoryManager) Sync(ctx context.Context, addr usermem.Addr, length uin
return nil
}
-// GetSharedFutexKey is used by kernel.futexChecker.GetSharedKey to implement
-// futex.Checker.GetSharedKey.
+// GetSharedFutexKey is used by kernel.Task.GetSharedKey.
func (mm *MemoryManager) GetSharedFutexKey(ctx context.Context, addr usermem.Addr) (futex.Key, error) {
- ar, ok := addr.ToRange(4) // sizeof(int32)
+ ar, ok := addr.ToRange(4) // sizeof(int32).
if !ok {
return futex.Key{}, syserror.EFAULT
}