Merge pull request #1978 from lubinszARM:pr_signal_mm

PiperOrigin-RevId: 307078788
This commit is contained in:
gVisor bot 2020-04-17 11:18:11 -07:00
commit 80deebb0bf
3 changed files with 18 additions and 0 deletions

View File

@ -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.

View File

@ -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
}

View File

@ -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.