diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-27 13:34:23 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-27 13:34:23 -0800 |
commit | d9ee81183fee2288681822a179ef230226fb8930 (patch) | |
tree | f7c0edd08467157a68f0509ccc57064b9fe2c594 /pkg/sentry/arch/arch_arm64.go | |
parent | 0eafb7eb278233e7cb3888cc7b674dd5879d4667 (diff) | |
parent | a369c88c0c4ece5239855000d28df045111c1be7 (diff) |
Merge of a369c88c0c4ece5239855000d28df045111c1be7
PiperOrigin-RevId: 297674924
Diffstat (limited to 'pkg/sentry/arch/arch_arm64.go')
-rw-r--r-- | pkg/sentry/arch/arch_arm64.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/pkg/sentry/arch/arch_arm64.go b/pkg/sentry/arch/arch_arm64.go index ac98897b5..372b650b9 100644 --- a/pkg/sentry/arch/arch_arm64.go +++ b/pkg/sentry/arch/arch_arm64.go @@ -68,6 +68,7 @@ const ( // context64 represents an ARM64 context. type context64 struct { State + sigFPState []aarch64FPState // fpstate to be restored on sigreturn. } // Arch implements Context.Arch. @@ -75,10 +76,19 @@ func (c *context64) Arch() Arch { return ARM64 } +func (c *context64) copySigFPState() []aarch64FPState { + var sigfps []aarch64FPState + for _, s := range c.sigFPState { + sigfps = append(sigfps, s.fork()) + } + return sigfps +} + // Fork returns an exact copy of this context. func (c *context64) Fork() Context { return &context64{ - State: c.State.Fork(), + State: c.State.Fork(), + sigFPState: c.copySigFPState(), } } |