summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/arch
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/arch')
-rw-r--r--pkg/sentry/arch/BUILD18
-rw-r--r--pkg/sentry/arch/arch.go2
-rw-r--r--pkg/sentry/arch/arch_amd64.go2
-rw-r--r--pkg/sentry/arch/arch_state_x86.go1
-rw-r--r--pkg/sentry/arch/arch_x86.go2
-rw-r--r--pkg/sentry/arch/auxv.go2
-rw-r--r--pkg/sentry/arch/signal_amd64.go6
7 files changed, 17 insertions, 16 deletions
diff --git a/pkg/sentry/arch/BUILD b/pkg/sentry/arch/BUILD
index 314b3e962..0a2a35400 100644
--- a/pkg/sentry/arch/BUILD
+++ b/pkg/sentry/arch/BUILD
@@ -1,7 +1,21 @@
package(licenses = ["notice"]) # Apache 2.0
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
-load("//tools/go_stateify:defs.bzl", "go_library")
+load("//tools/go_stateify:defs.bzl", "go_library", "go_stateify")
+
+go_stateify(
+ name = "arch_state",
+ srcs = [
+ "arch.go",
+ "arch_amd64.go",
+ "arch_state_x86.go",
+ "arch_x86.go",
+ "auxv.go",
+ "signal_amd64.go",
+ ],
+ out = "arch_state.go",
+ package = "arch",
+)
go_library(
name = "arch",
@@ -10,6 +24,7 @@ go_library(
"arch.go",
"arch_amd64.go",
"arch_amd64.s",
+ "arch_state.go",
"arch_state_x86.go",
"arch_x86.go",
"auxv.go",
@@ -31,6 +46,7 @@ go_library(
"//pkg/sentry/context",
"//pkg/sentry/limits",
"//pkg/sentry/usermem",
+ "//pkg/state",
"//pkg/syserror",
],
)
diff --git a/pkg/sentry/arch/arch.go b/pkg/sentry/arch/arch.go
index 21cb84502..0189e958d 100644
--- a/pkg/sentry/arch/arch.go
+++ b/pkg/sentry/arch/arch.go
@@ -254,8 +254,6 @@ const (
// MemoryManager.
//
// Note that "highest address" below is always exclusive.
-//
-// +stateify savable
type MmapLayout struct {
// MinAddr is the lowest mappable address.
MinAddr usermem.Addr
diff --git a/pkg/sentry/arch/arch_amd64.go b/pkg/sentry/arch/arch_amd64.go
index f1e408af9..23526fe8e 100644
--- a/pkg/sentry/arch/arch_amd64.go
+++ b/pkg/sentry/arch/arch_amd64.go
@@ -95,8 +95,6 @@ const (
)
// context64 represents an AMD64 context.
-//
-// +stateify savable
type context64 struct {
State
sigFPState []x86FPState // fpstate to be restored on sigreturn.
diff --git a/pkg/sentry/arch/arch_state_x86.go b/pkg/sentry/arch/arch_state_x86.go
index e9c23a06b..cb38d098a 100644
--- a/pkg/sentry/arch/arch_state_x86.go
+++ b/pkg/sentry/arch/arch_state_x86.go
@@ -56,7 +56,6 @@ func (s *State) afterLoad() {
copy(s.x86FPState, old)
}
-// +stateify savable
type syscallPtraceRegs struct {
R15 uint64
R14 uint64
diff --git a/pkg/sentry/arch/arch_x86.go b/pkg/sentry/arch/arch_x86.go
index b35eec53c..5cc4f8377 100644
--- a/pkg/sentry/arch/arch_x86.go
+++ b/pkg/sentry/arch/arch_x86.go
@@ -153,8 +153,6 @@ func NewFloatingPointData() *FloatingPointData {
// State contains the common architecture bits for X86 (the build tag of this
// file ensures it's only built on x86).
-//
-// +stateify savable
type State struct {
// The system registers.
Regs syscall.PtraceRegs `state:".(syscallPtraceRegs)"`
diff --git a/pkg/sentry/arch/auxv.go b/pkg/sentry/arch/auxv.go
index 81cfb4a01..70e0e35b7 100644
--- a/pkg/sentry/arch/auxv.go
+++ b/pkg/sentry/arch/auxv.go
@@ -19,8 +19,6 @@ import (
)
// An AuxEntry represents an entry in an ELF auxiliary vector.
-//
-// +stateify savable
type AuxEntry struct {
Key uint64
Value usermem.Addr
diff --git a/pkg/sentry/arch/signal_amd64.go b/pkg/sentry/arch/signal_amd64.go
index e81717e8b..c1d743f38 100644
--- a/pkg/sentry/arch/signal_amd64.go
+++ b/pkg/sentry/arch/signal_amd64.go
@@ -28,8 +28,6 @@ import (
// SignalAct represents the action that should be taken when a signal is
// delivered, and is equivalent to struct sigaction on 64-bit x86.
-//
-// +stateify savable
type SignalAct struct {
Handler uint64
Flags uint64
@@ -49,8 +47,6 @@ func (s *SignalAct) DeserializeTo(other *SignalAct) {
// SignalStack represents information about a user stack, and is equivalent to
// stack_t on 64-bit x86.
-//
-// +stateify savable
type SignalStack struct {
Addr uint64
Flags uint32
@@ -70,8 +66,6 @@ func (s *SignalStack) DeserializeTo(other *SignalStack) {
// SignalInfo represents information about a signal being delivered, and is
// equivalent to struct siginfo on 64-bit x86.
-//
-// +stateify savable
type SignalInfo struct {
Signo int32 // Signal number
Errno int32 // Errno value