diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-27 21:39:33 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-27 21:39:33 +0000 |
commit | d28077cca02f4b9dd58f8d3930a614b8b0f5e757 (patch) | |
tree | 188831c609c965e0248831bb52539bb2563dac37 /pkg/sentry/arch/arch_arm64.go | |
parent | a13855d9705b7aa2ed481d1775560731a29606eb (diff) | |
parent | d9ee81183fee2288681822a179ef230226fb8930 (diff) |
Merge release-20200219.0-57-gd9ee811 (automated)
Diffstat (limited to 'pkg/sentry/arch/arch_arm64.go')
-rwxr-xr-x | 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 100755 --- 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(), } } |