diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-04-17 18:21:08 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-04-17 18:21:08 +0000 |
commit | 0f9e6d074af4099c048ec9b31035cbc6cc30474d (patch) | |
tree | 2754312a82d8cf170efd9757965033e8c6bd5eee /pkg/sentry/mm | |
parent | 0665b0af8fb412f3194d6faaa11a1721b0133b8e (diff) | |
parent | 80deebb0bfde2a53c943deb8d8473239bb6de3eb (diff) |
Merge release-20200323.0-179-g80deebb (automated)
Diffstat (limited to 'pkg/sentry/mm')
-rw-r--r-- | pkg/sentry/mm/lifecycle.go | 1 | ||||
-rw-r--r-- | pkg/sentry/mm/metadata.go | 14 | ||||
-rw-r--r-- | pkg/sentry/mm/mm.go | 3 | ||||
-rwxr-xr-x | pkg/sentry/mm/mm_state_autogen.go | 2 |
4 files changed, 20 insertions, 0 deletions
diff --git a/pkg/sentry/mm/lifecycle.go b/pkg/sentry/mm/lifecycle.go index d8a5b9d29..aac56679b 100644 --- a/pkg/sentry/mm/lifecycle.go +++ b/pkg/sentry/mm/lifecycle.go @@ -84,6 +84,7 @@ func (mm *MemoryManager) Fork(ctx context.Context) (*MemoryManager, error) { dumpability: mm.dumpability, aioManager: aioManager{contexts: make(map[uint64]*AIOContext)}, sleepForActivation: mm.sleepForActivation, + vdsoSigReturnAddr: mm.vdsoSigReturnAddr, } // Copy vmas. diff --git a/pkg/sentry/mm/metadata.go b/pkg/sentry/mm/metadata.go index 6a49334f4..28e5057f7 100644 --- a/pkg/sentry/mm/metadata.go +++ b/pkg/sentry/mm/metadata.go @@ -167,3 +167,17 @@ func (mm *MemoryManager) SetExecutable(file fsbridge.File) { orig.DecRef() } } + +// VDSOSigReturn returns the address of vdso_sigreturn. +func (mm *MemoryManager) VDSOSigReturn() uint64 { + mm.metadataMu.Lock() + defer mm.metadataMu.Unlock() + return mm.vdsoSigReturnAddr +} + +// SetVDSOSigReturn sets the address of vdso_sigreturn. +func (mm *MemoryManager) SetVDSOSigReturn(addr uint64) { + mm.metadataMu.Lock() + defer mm.metadataMu.Unlock() + mm.vdsoSigReturnAddr = addr +} diff --git a/pkg/sentry/mm/mm.go b/pkg/sentry/mm/mm.go index c2195ae11..34d3bde7a 100644 --- a/pkg/sentry/mm/mm.go +++ b/pkg/sentry/mm/mm.go @@ -231,6 +231,9 @@ type MemoryManager struct { // before trying to activate the address space. When set to true, delays in // activation are not reported as stuck tasks by the watchdog. sleepForActivation bool + + // vdsoSigReturnAddr is the address of 'vdso_sigreturn'. + vdsoSigReturnAddr uint64 } // vma represents a virtual memory area. diff --git a/pkg/sentry/mm/mm_state_autogen.go b/pkg/sentry/mm/mm_state_autogen.go index 2d0e5f5f7..4ef8fa9c6 100755 --- a/pkg/sentry/mm/mm_state_autogen.go +++ b/pkg/sentry/mm/mm_state_autogen.go @@ -168,6 +168,7 @@ func (x *MemoryManager) save(m state.Map) { m.Save("dumpability", &x.dumpability) m.Save("aioManager", &x.aioManager) m.Save("sleepForActivation", &x.sleepForActivation) + m.Save("vdsoSigReturnAddr", &x.vdsoSigReturnAddr) } func (x *MemoryManager) load(m state.Map) { @@ -192,6 +193,7 @@ func (x *MemoryManager) load(m state.Map) { m.Load("dumpability", &x.dumpability) m.Load("aioManager", &x.aioManager) m.Load("sleepForActivation", &x.sleepForActivation) + m.Load("vdsoSigReturnAddr", &x.vdsoSigReturnAddr) m.AfterLoad(x.afterLoad) } |