summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/memmap
diff options
context:
space:
mode:
authorGoogler <noreply@google.com>2018-12-19 13:29:10 -0800
committerShentubot <shentubot@google.com>2018-12-19 13:30:08 -0800
commit86c9bd254749ebf65270aa60f728d9c847ac02d4 (patch)
treea46d2aa16add447aa5604975810fee5c839fd39f /pkg/sentry/memmap
parentff7178a4d10f9f1fb34e54fed5ef27cfbff5d6f9 (diff)
Automated rollback of changelist 225861605
PiperOrigin-RevId: 226224230 Change-Id: Id24c7d3733722fd41d5fe74ef64e0ce8c68f0b12
Diffstat (limited to 'pkg/sentry/memmap')
-rw-r--r--pkg/sentry/memmap/memmap.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/pkg/sentry/memmap/memmap.go b/pkg/sentry/memmap/memmap.go
index cf20b11e3..28e2bed9b 100644
--- a/pkg/sentry/memmap/memmap.go
+++ b/pkg/sentry/memmap/memmap.go
@@ -243,40 +243,6 @@ type MappingIdentity interface {
Msync(ctx context.Context, mr MappableRange) error
}
-// MLockMode specifies the memory locking behavior of a memory mapping.
-type MLockMode int
-
-// Note that the ordering of MLockModes is significant; see
-// mm.MemoryManager.defMLockMode.
-const (
- // MLockNone specifies that a mapping has no memory locking behavior.
- //
- // This must be the zero value for MLockMode.
- MLockNone MLockMode = iota
-
- // MLockEager specifies that a mapping is memory-locked, as by mlock() or
- // similar. Pages in the mapping should be made, and kept, resident in
- // physical memory as soon as possible.
- //
- // As of this writing, MLockEager does not cause memory-locking to be
- // requested from the host; it only affects the sentry's memory management
- // behavior.
- //
- // MLockEager is analogous to Linux's VM_LOCKED.
- MLockEager
-
- // MLockLazy specifies that a mapping is memory-locked, as by mlock() or
- // similar. Pages in the mapping should be kept resident in physical memory
- // once they have been made resident due to e.g. a page fault.
- //
- // As of this writing, MLockLazy does not cause memory-locking to be
- // requested from the host; in fact, it has virtually no effect, except for
- // interactions between mlocked pages and other syscalls.
- //
- // MLockLazy is analogous to Linux's VM_LOCKED | VM_LOCKONFAULT.
- MLockLazy
-)
-
// MMapOpts specifies a request to create a memory mapping.
type MMapOpts struct {
// Length is the length of the mapping.
@@ -337,9 +303,6 @@ type MMapOpts struct {
// mapping (see platform.AddressSpace.MapFile).
Precommit bool
- // MLockMode specifies the memory locking behavior of the mapping.
- MLockMode MLockMode
-
// Hint is the name used for the mapping in /proc/[pid]/maps. If Hint is
// empty, MappingIdentity.MappedName() will be used instead.
//