summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/loader/loader.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-21 14:26:08 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-21 14:26:08 -0700
commiteba086642e466f275b1f2df1284997b2ba0c28dc (patch)
treec23a4c9d047d4b4cc219000094976c5ca912e59f /pkg/sentry/loader/loader.go
parent89822a446161f1ccb3b84d53f8528bc8b0a28053 (diff)
parentfe001edb14e6e879ab4ebca0d2ac71d770ac8cce (diff)
Merge pull request #1818 from lubinszARM:pr_signal_1
PiperOrigin-RevId: 307680200
Diffstat (limited to 'pkg/sentry/loader/loader.go')
-rw-r--r--pkg/sentry/loader/loader.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/sentry/loader/loader.go b/pkg/sentry/loader/loader.go
index d6675b8f0..88449fe95 100644
--- a/pkg/sentry/loader/loader.go
+++ b/pkg/sentry/loader/loader.go
@@ -311,6 +311,15 @@ func Load(ctx context.Context, args LoadArgs, extraAuxv []arch.AuxEntry, vdso *V
m.SetAuxv(auxv)
m.SetExecutable(file)
+ symbolValue, err := getSymbolValueFromVDSO("rt_sigreturn")
+ if err != nil {
+ return 0, nil, "", syserr.NewDynamic(fmt.Sprintf("Failed to find rt_sigreturn in vdso: %v", err), syserr.FromError(err).ToLinux())
+ }
+
+ // Found rt_sigretrun.
+ addr := uint64(vdsoAddr) + symbolValue - vdsoPrelink
+ m.SetVDSOSigReturn(addr)
+
ac.SetIP(uintptr(loaded.entry))
ac.SetStack(uintptr(stack.Bottom))