summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/arch/signal_arm64.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-02-10 18:15:48 +0000
committergVisor bot <gvisor-bot@google.com>2021-02-10 18:15:48 +0000
commita40373b6360303daaa7cd266b2e8c42a26425508 (patch)
tree85244444c4eb3a3eea46503b252c072eb6f5634d /pkg/sentry/arch/signal_arm64.go
parent549583ee9f2782807cc4144e64ff7db5fdb71b71 (diff)
parentb9db7db3bdfe1405d14465bb7ad8fb33637fd840 (diff)
Merge release-20210201.0-75-gb9db7db3b (automated)
Diffstat (limited to 'pkg/sentry/arch/signal_arm64.go')
-rw-r--r--pkg/sentry/arch/signal_arm64.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/sentry/arch/signal_arm64.go b/pkg/sentry/arch/signal_arm64.go
index 7fde5d34e..71596130d 100644
--- a/pkg/sentry/arch/signal_arm64.go
+++ b/pkg/sentry/arch/signal_arm64.go
@@ -36,7 +36,6 @@ type SignalContext64 struct {
Pstate uint64
_pad [8]byte // __attribute__((__aligned__(16)))
Fpsimd64 FpsimdContext // size = 528
- Reserved [3568]uint8
}
// +marshal
@@ -86,10 +85,6 @@ func (c *context64) NewSignalStack() NativeSignalStack {
func (c *context64) SignalSetup(st *Stack, act *SignalAct, info *SignalInfo, alt *SignalStack, sigset linux.SignalSet) error {
sp := st.Bottom
- if !(alt.IsEnabled() && sp == alt.Top()) {
- sp -= 128
- }
-
// Construct the UContext64 now since we need its size.
uc := &UContext64{
Flags: 0,
@@ -102,6 +97,10 @@ func (c *context64) SignalSetup(st *Stack, act *SignalAct, info *SignalInfo, alt
},
Sigset: sigset,
}
+ if linux.Signal(info.Signo) == linux.SIGSEGV || linux.Signal(info.Signo) == linux.SIGBUS {
+ uc.MContext.FaultAddr = info.Addr()
+ }
+
ucSize := uc.SizeBytes()
// frameSize = ucSize + sizeof(siginfo).