From be415eedcb3d5f61ed9f6a90bba8df2ecd54d8c8 Mon Sep 17 00:00:00 2001 From: Bin Lu Date: Wed, 26 Feb 2020 04:17:54 -0500 Subject: add arch-specific feature into mm Signed-off-by: Bin Lu --- pkg/sentry/mm/metadata.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'pkg/sentry/mm/metadata.go') 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 +} -- cgit v1.2.3