diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-02-10 10:10:17 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-02-10 10:10:17 -0800 |
commit | b9db7db3bdfe1405d14465bb7ad8fb33637fd840 (patch) | |
tree | ec64146aacde6dd09258b3c80095637327dbdd9c /pkg/sentry/arch/signal_arm64.go | |
parent | 298c129cc151e197db35a927f9676cc40ec80d5c (diff) | |
parent | 6eb80b2e2df4a7e0a0b9dcfc99906a84fd8fc3f0 (diff) |
Merge pull request #5267 from lubinszARM:pr_usr_lazy_fp
PiperOrigin-RevId: 356762859
Diffstat (limited to 'pkg/sentry/arch/signal_arm64.go')
-rw-r--r-- | pkg/sentry/arch/signal_arm64.go | 9 |
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). |