summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-08-08 05:52:44 +0000
committergVisor bot <gvisor-bot@google.com>2020-08-08 05:52:44 +0000
commitab32c85544000a00e9cf25a9677089909d896d86 (patch)
tree240d0bcb178a8475ae2f4128f162782d44c00c88 /pkg/sentry/platform
parent77f7fcf41ffbc224055cb4413ba7e686b98910b8 (diff)
parent13a8ae81b2361cd32f8e73d14ca5b9bca9569b1a (diff)
Merge release-20200804.0-53-g13a8ae81b (automated)
Diffstat (limited to 'pkg/sentry/platform')
-rw-r--r--pkg/sentry/platform/kvm/context.go4
-rw-r--r--pkg/sentry/platform/platform.go14
-rw-r--r--pkg/sentry/platform/ptrace/ptrace.go4
-rw-r--r--pkg/sentry/platform/ring0/defs_impl_arm64.go4
4 files changed, 16 insertions, 10 deletions
diff --git a/pkg/sentry/platform/kvm/context.go b/pkg/sentry/platform/kvm/context.go
index eb92721fb..6e6b76416 100644
--- a/pkg/sentry/platform/kvm/context.go
+++ b/pkg/sentry/platform/kvm/context.go
@@ -91,8 +91,8 @@ func (c *context) Interrupt() {
// Release implements platform.Context.Release().
func (c *context) Release() {}
-// FloatingPointStateChanged implements platform.Context.FloatingPointStateChanged.
-func (c *context) FloatingPointStateChanged() {}
+// FullStateChanged implements platform.Context.FullStateChanged.
+func (c *context) FullStateChanged() {}
// PullFullState implements platform.Context.PullFullState.
func (c *context) PullFullState(as platform.AddressSpace, ac arch.Context) {}
diff --git a/pkg/sentry/platform/platform.go b/pkg/sentry/platform/platform.go
index 3f99afdd1..ba031516a 100644
--- a/pkg/sentry/platform/platform.go
+++ b/pkg/sentry/platform/platform.go
@@ -171,14 +171,20 @@ type Context interface {
// Preconditions: The caller must be running on the task goroutine.
PullFullState(as AddressSpace, ac arch.Context)
- // FloatingPointStateChanged forces restoring a full state of the application thread.
+ // FullStateChanged() indicates that a thread state has been changed by
+ // the Sentry. This happens in case of the rt_sigreturn, execve, etc.
//
- // A platform can support lazy loading/restoring of a thread state.
- // This means that if the Sentry has not changed a thread state,
+ // First, it indicates that the Sentry has the full state of the thread
+ // and PullFullState() has to do nothing if it is called after
+ // FullStateChanged().
+ //
+ // Second, it forces restoring the full state of the application
+ // thread. A platform can support lazy loading/restoring of a thread
+ // state. This means that if the Sentry has not changed a thread state,
// the platform may not restore it.
//
// Preconditions: The caller must be running on the task goroutine.
- FloatingPointStateChanged()
+ FullStateChanged()
// Interrupt interrupts a concurrent call to Switch(), causing it to return
// ErrContextInterrupt.
diff --git a/pkg/sentry/platform/ptrace/ptrace.go b/pkg/sentry/platform/ptrace/ptrace.go
index 45ff2bcc3..b52d0fbd8 100644
--- a/pkg/sentry/platform/ptrace/ptrace.go
+++ b/pkg/sentry/platform/ptrace/ptrace.go
@@ -182,8 +182,8 @@ func (c *context) Interrupt() {
// Release implements platform.Context.Release().
func (c *context) Release() {}
-// FloatingPointStateChanged implements platform.Context.FloatingPointStateChanged.
-func (c *context) FloatingPointStateChanged() {}
+// FullStateChanged implements platform.Context.FullStateChanged.
+func (c *context) FullStateChanged() {}
// PullFullState implements platform.Context.PullFullState.
func (c *context) PullFullState(as platform.AddressSpace, ac arch.Context) {}
diff --git a/pkg/sentry/platform/ring0/defs_impl_arm64.go b/pkg/sentry/platform/ring0/defs_impl_arm64.go
index 2dac9ad14..8ebfbfdb6 100644
--- a/pkg/sentry/platform/ring0/defs_impl_arm64.go
+++ b/pkg/sentry/platform/ring0/defs_impl_arm64.go
@@ -1,13 +1,13 @@
package ring0
import (
- "gvisor.dev/gvisor/pkg/sentry/arch"
"gvisor.dev/gvisor/pkg/sentry/platform/ring0/pagetables"
- "reflect"
"fmt"
+ "gvisor.dev/gvisor/pkg/sentry/arch"
"gvisor.dev/gvisor/pkg/usermem"
"io"
+ "reflect"
)
// Useful bits.