summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/arch/arch_arm64.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-27 21:39:33 +0000
committergVisor bot <gvisor-bot@google.com>2020-02-27 21:39:33 +0000
commitd28077cca02f4b9dd58f8d3930a614b8b0f5e757 (patch)
tree188831c609c965e0248831bb52539bb2563dac37 /pkg/sentry/arch/arch_arm64.go
parenta13855d9705b7aa2ed481d1775560731a29606eb (diff)
parentd9ee81183fee2288681822a179ef230226fb8930 (diff)
Merge release-20200219.0-57-gd9ee811 (automated)
Diffstat (limited to 'pkg/sentry/arch/arch_arm64.go')
-rwxr-xr-xpkg/sentry/arch/arch_arm64.go12
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(),
}
}