diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2021-06-09 22:51:28 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-06-09 22:53:41 -0700 |
commit | 8d87a9418aacc175d7a2fa3583f40988e05946cc (patch) | |
tree | 87e595b78ec384a7e21f67d5a7cc776b176c20a0 /pkg/sentry/arch/signal_arm64.go | |
parent | 8a7b5a4a8188157a99e5f7654f9235c5332b3552 (diff) |
[op] Move SignalAct to abi/linux package.
There were also other duplicate definitions of the same struct that I have now
removed.
Updates #214
PiperOrigin-RevId: 378579954
Diffstat (limited to 'pkg/sentry/arch/signal_arm64.go')
-rw-r--r-- | pkg/sentry/arch/signal_arm64.go | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pkg/sentry/arch/signal_arm64.go b/pkg/sentry/arch/signal_arm64.go index da71fb873..cc3c6ce62 100644 --- a/pkg/sentry/arch/signal_arm64.go +++ b/pkg/sentry/arch/signal_arm64.go @@ -71,18 +71,13 @@ type UContext64 struct { MContext SignalContext64 } -// NewSignalAct implements Context.NewSignalAct. -func (c *context64) NewSignalAct() NativeSignalAct { - return &SignalAct{} -} - // NewSignalStack implements Context.NewSignalStack. func (c *context64) NewSignalStack() NativeSignalStack { return &SignalStack{} } // SignalSetup implements Context.SignalSetup. -func (c *context64) SignalSetup(st *Stack, act *SignalAct, info *SignalInfo, alt *SignalStack, sigset linux.SignalSet) error { +func (c *context64) SignalSetup(st *Stack, act *linux.SigAction, info *SignalInfo, alt *SignalStack, sigset linux.SignalSet) error { sp := st.Bottom // Construct the UContext64 now since we need its size. @@ -114,7 +109,7 @@ func (c *context64) SignalSetup(st *Stack, act *SignalAct, info *SignalInfo, alt // Prior to proceeding, figure out if the frame will exhaust the range // for the signal stack. This is not allowed, and should immediately // force signal delivery (reverting to the default handler). - if act.IsOnStack() && alt.IsEnabled() && !alt.Contains(frameBottom) { + if act.Flags&linux.SA_ONSTACK != 0 && alt.IsEnabled() && !alt.Contains(frameBottom) { return unix.EFAULT } @@ -137,7 +132,7 @@ func (c *context64) SignalSetup(st *Stack, act *SignalAct, info *SignalInfo, alt c.Regs.Regs[0] = uint64(info.Signo) c.Regs.Regs[1] = uint64(infoAddr) c.Regs.Regs[2] = uint64(ucAddr) - c.Regs.Regs[30] = uint64(act.Restorer) + c.Regs.Regs[30] = act.Restorer // Save the thread's floating point state. c.sigFPState = append(c.sigFPState, c.fpState) |