diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-08 01:32:17 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-08 01:32:17 +0000 |
commit | 8f70c8003e9d132fc766ed7d92ce805c093d518b (patch) | |
tree | 6d77a3246e3f04605790d410e7630cb910704ced /pkg | |
parent | 8f9d99c812b7599c52ed98f80c1a33717758a5c6 (diff) | |
parent | a55bd73d4802112a7055de8663e947b9c0f42a2e (diff) |
Merge release-20200928.0-66-ga55bd73d4 (automated)
Diffstat (limited to 'pkg')
106 files changed, 10843 insertions, 10850 deletions
diff --git a/pkg/abi/linux/linux_amd64_state_autogen.go b/pkg/abi/linux/linux_amd64_state_autogen.go index 474bb3e65..78a4a30e7 100644 --- a/pkg/abi/linux/linux_amd64_state_autogen.go +++ b/pkg/abi/linux/linux_amd64_state_autogen.go @@ -11,11 +11,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *PtraceRegs) StateTypeName() string { +func (p *PtraceRegs) StateTypeName() string { return "pkg/abi/linux.PtraceRegs" } -func (x *PtraceRegs) StateFields() []string { +func (p *PtraceRegs) StateFields() []string { return []string{ "R15", "R14", @@ -47,69 +47,69 @@ func (x *PtraceRegs) StateFields() []string { } } -func (x *PtraceRegs) beforeSave() {} +func (p *PtraceRegs) beforeSave() {} -func (x *PtraceRegs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.R15) - m.Save(1, &x.R14) - m.Save(2, &x.R13) - m.Save(3, &x.R12) - m.Save(4, &x.Rbp) - m.Save(5, &x.Rbx) - m.Save(6, &x.R11) - m.Save(7, &x.R10) - m.Save(8, &x.R9) - m.Save(9, &x.R8) - m.Save(10, &x.Rax) - m.Save(11, &x.Rcx) - m.Save(12, &x.Rdx) - m.Save(13, &x.Rsi) - m.Save(14, &x.Rdi) - m.Save(15, &x.Orig_rax) - m.Save(16, &x.Rip) - m.Save(17, &x.Cs) - m.Save(18, &x.Eflags) - m.Save(19, &x.Rsp) - m.Save(20, &x.Ss) - m.Save(21, &x.Fs_base) - m.Save(22, &x.Gs_base) - m.Save(23, &x.Ds) - m.Save(24, &x.Es) - m.Save(25, &x.Fs) - m.Save(26, &x.Gs) +func (p *PtraceRegs) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.R15) + stateSinkObject.Save(1, &p.R14) + stateSinkObject.Save(2, &p.R13) + stateSinkObject.Save(3, &p.R12) + stateSinkObject.Save(4, &p.Rbp) + stateSinkObject.Save(5, &p.Rbx) + stateSinkObject.Save(6, &p.R11) + stateSinkObject.Save(7, &p.R10) + stateSinkObject.Save(8, &p.R9) + stateSinkObject.Save(9, &p.R8) + stateSinkObject.Save(10, &p.Rax) + stateSinkObject.Save(11, &p.Rcx) + stateSinkObject.Save(12, &p.Rdx) + stateSinkObject.Save(13, &p.Rsi) + stateSinkObject.Save(14, &p.Rdi) + stateSinkObject.Save(15, &p.Orig_rax) + stateSinkObject.Save(16, &p.Rip) + stateSinkObject.Save(17, &p.Cs) + stateSinkObject.Save(18, &p.Eflags) + stateSinkObject.Save(19, &p.Rsp) + stateSinkObject.Save(20, &p.Ss) + stateSinkObject.Save(21, &p.Fs_base) + stateSinkObject.Save(22, &p.Gs_base) + stateSinkObject.Save(23, &p.Ds) + stateSinkObject.Save(24, &p.Es) + stateSinkObject.Save(25, &p.Fs) + stateSinkObject.Save(26, &p.Gs) } -func (x *PtraceRegs) afterLoad() {} +func (p *PtraceRegs) afterLoad() {} -func (x *PtraceRegs) StateLoad(m state.Source) { - m.Load(0, &x.R15) - m.Load(1, &x.R14) - m.Load(2, &x.R13) - m.Load(3, &x.R12) - m.Load(4, &x.Rbp) - m.Load(5, &x.Rbx) - m.Load(6, &x.R11) - m.Load(7, &x.R10) - m.Load(8, &x.R9) - m.Load(9, &x.R8) - m.Load(10, &x.Rax) - m.Load(11, &x.Rcx) - m.Load(12, &x.Rdx) - m.Load(13, &x.Rsi) - m.Load(14, &x.Rdi) - m.Load(15, &x.Orig_rax) - m.Load(16, &x.Rip) - m.Load(17, &x.Cs) - m.Load(18, &x.Eflags) - m.Load(19, &x.Rsp) - m.Load(20, &x.Ss) - m.Load(21, &x.Fs_base) - m.Load(22, &x.Gs_base) - m.Load(23, &x.Ds) - m.Load(24, &x.Es) - m.Load(25, &x.Fs) - m.Load(26, &x.Gs) +func (p *PtraceRegs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.R15) + stateSourceObject.Load(1, &p.R14) + stateSourceObject.Load(2, &p.R13) + stateSourceObject.Load(3, &p.R12) + stateSourceObject.Load(4, &p.Rbp) + stateSourceObject.Load(5, &p.Rbx) + stateSourceObject.Load(6, &p.R11) + stateSourceObject.Load(7, &p.R10) + stateSourceObject.Load(8, &p.R9) + stateSourceObject.Load(9, &p.R8) + stateSourceObject.Load(10, &p.Rax) + stateSourceObject.Load(11, &p.Rcx) + stateSourceObject.Load(12, &p.Rdx) + stateSourceObject.Load(13, &p.Rsi) + stateSourceObject.Load(14, &p.Rdi) + stateSourceObject.Load(15, &p.Orig_rax) + stateSourceObject.Load(16, &p.Rip) + stateSourceObject.Load(17, &p.Cs) + stateSourceObject.Load(18, &p.Eflags) + stateSourceObject.Load(19, &p.Rsp) + stateSourceObject.Load(20, &p.Ss) + stateSourceObject.Load(21, &p.Fs_base) + stateSourceObject.Load(22, &p.Gs_base) + stateSourceObject.Load(23, &p.Ds) + stateSourceObject.Load(24, &p.Es) + stateSourceObject.Load(25, &p.Fs) + stateSourceObject.Load(26, &p.Gs) } func init() { diff --git a/pkg/abi/linux/linux_arm64_state_autogen.go b/pkg/abi/linux/linux_arm64_state_autogen.go index 30c6bef55..5fc6cf73f 100644 --- a/pkg/abi/linux/linux_arm64_state_autogen.go +++ b/pkg/abi/linux/linux_arm64_state_autogen.go @@ -10,11 +10,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *PtraceRegs) StateTypeName() string { +func (p *PtraceRegs) StateTypeName() string { return "pkg/abi/linux.PtraceRegs" } -func (x *PtraceRegs) StateFields() []string { +func (p *PtraceRegs) StateFields() []string { return []string{ "Regs", "Sp", @@ -23,23 +23,23 @@ func (x *PtraceRegs) StateFields() []string { } } -func (x *PtraceRegs) beforeSave() {} +func (p *PtraceRegs) beforeSave() {} -func (x *PtraceRegs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Regs) - m.Save(1, &x.Sp) - m.Save(2, &x.Pc) - m.Save(3, &x.Pstate) +func (p *PtraceRegs) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.Regs) + stateSinkObject.Save(1, &p.Sp) + stateSinkObject.Save(2, &p.Pc) + stateSinkObject.Save(3, &p.Pstate) } -func (x *PtraceRegs) afterLoad() {} +func (p *PtraceRegs) afterLoad() {} -func (x *PtraceRegs) StateLoad(m state.Source) { - m.Load(0, &x.Regs) - m.Load(1, &x.Sp) - m.Load(2, &x.Pc) - m.Load(3, &x.Pstate) +func (p *PtraceRegs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.Regs) + stateSourceObject.Load(1, &p.Sp) + stateSourceObject.Load(2, &p.Pc) + stateSourceObject.Load(3, &p.Pstate) } func init() { diff --git a/pkg/abi/linux/linux_state_autogen.go b/pkg/abi/linux/linux_state_autogen.go index a2bfcd215..53477bee5 100644 --- a/pkg/abi/linux/linux_state_autogen.go +++ b/pkg/abi/linux/linux_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *IOEvent) StateTypeName() string { +func (i *IOEvent) StateTypeName() string { return "pkg/abi/linux.IOEvent" } -func (x *IOEvent) StateFields() []string { +func (i *IOEvent) StateFields() []string { return []string{ "Data", "Obj", @@ -19,30 +19,30 @@ func (x *IOEvent) StateFields() []string { } } -func (x *IOEvent) beforeSave() {} +func (i *IOEvent) beforeSave() {} -func (x *IOEvent) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Data) - m.Save(1, &x.Obj) - m.Save(2, &x.Result) - m.Save(3, &x.Result2) +func (i *IOEvent) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Data) + stateSinkObject.Save(1, &i.Obj) + stateSinkObject.Save(2, &i.Result) + stateSinkObject.Save(3, &i.Result2) } -func (x *IOEvent) afterLoad() {} +func (i *IOEvent) afterLoad() {} -func (x *IOEvent) StateLoad(m state.Source) { - m.Load(0, &x.Data) - m.Load(1, &x.Obj) - m.Load(2, &x.Result) - m.Load(3, &x.Result2) +func (i *IOEvent) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Data) + stateSourceObject.Load(1, &i.Obj) + stateSourceObject.Load(2, &i.Result) + stateSourceObject.Load(3, &i.Result2) } -func (x *BPFInstruction) StateTypeName() string { +func (b *BPFInstruction) StateTypeName() string { return "pkg/abi/linux.BPFInstruction" } -func (x *BPFInstruction) StateFields() []string { +func (b *BPFInstruction) StateFields() []string { return []string{ "OpCode", "JumpIfTrue", @@ -51,30 +51,30 @@ func (x *BPFInstruction) StateFields() []string { } } -func (x *BPFInstruction) beforeSave() {} +func (b *BPFInstruction) beforeSave() {} -func (x *BPFInstruction) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.OpCode) - m.Save(1, &x.JumpIfTrue) - m.Save(2, &x.JumpIfFalse) - m.Save(3, &x.K) +func (b *BPFInstruction) StateSave(stateSinkObject state.Sink) { + b.beforeSave() + stateSinkObject.Save(0, &b.OpCode) + stateSinkObject.Save(1, &b.JumpIfTrue) + stateSinkObject.Save(2, &b.JumpIfFalse) + stateSinkObject.Save(3, &b.K) } -func (x *BPFInstruction) afterLoad() {} +func (b *BPFInstruction) afterLoad() {} -func (x *BPFInstruction) StateLoad(m state.Source) { - m.Load(0, &x.OpCode) - m.Load(1, &x.JumpIfTrue) - m.Load(2, &x.JumpIfFalse) - m.Load(3, &x.K) +func (b *BPFInstruction) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &b.OpCode) + stateSourceObject.Load(1, &b.JumpIfTrue) + stateSourceObject.Load(2, &b.JumpIfFalse) + stateSourceObject.Load(3, &b.K) } -func (x *KernelTermios) StateTypeName() string { +func (k *KernelTermios) StateTypeName() string { return "pkg/abi/linux.KernelTermios" } -func (x *KernelTermios) StateFields() []string { +func (k *KernelTermios) StateFields() []string { return []string{ "InputFlags", "OutputFlags", @@ -87,57 +87,57 @@ func (x *KernelTermios) StateFields() []string { } } -func (x *KernelTermios) beforeSave() {} +func (k *KernelTermios) beforeSave() {} -func (x *KernelTermios) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InputFlags) - m.Save(1, &x.OutputFlags) - m.Save(2, &x.ControlFlags) - m.Save(3, &x.LocalFlags) - m.Save(4, &x.LineDiscipline) - m.Save(5, &x.ControlCharacters) - m.Save(6, &x.InputSpeed) - m.Save(7, &x.OutputSpeed) +func (k *KernelTermios) StateSave(stateSinkObject state.Sink) { + k.beforeSave() + stateSinkObject.Save(0, &k.InputFlags) + stateSinkObject.Save(1, &k.OutputFlags) + stateSinkObject.Save(2, &k.ControlFlags) + stateSinkObject.Save(3, &k.LocalFlags) + stateSinkObject.Save(4, &k.LineDiscipline) + stateSinkObject.Save(5, &k.ControlCharacters) + stateSinkObject.Save(6, &k.InputSpeed) + stateSinkObject.Save(7, &k.OutputSpeed) } -func (x *KernelTermios) afterLoad() {} +func (k *KernelTermios) afterLoad() {} -func (x *KernelTermios) StateLoad(m state.Source) { - m.Load(0, &x.InputFlags) - m.Load(1, &x.OutputFlags) - m.Load(2, &x.ControlFlags) - m.Load(3, &x.LocalFlags) - m.Load(4, &x.LineDiscipline) - m.Load(5, &x.ControlCharacters) - m.Load(6, &x.InputSpeed) - m.Load(7, &x.OutputSpeed) +func (k *KernelTermios) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &k.InputFlags) + stateSourceObject.Load(1, &k.OutputFlags) + stateSourceObject.Load(2, &k.ControlFlags) + stateSourceObject.Load(3, &k.LocalFlags) + stateSourceObject.Load(4, &k.LineDiscipline) + stateSourceObject.Load(5, &k.ControlCharacters) + stateSourceObject.Load(6, &k.InputSpeed) + stateSourceObject.Load(7, &k.OutputSpeed) } -func (x *WindowSize) StateTypeName() string { +func (w *WindowSize) StateTypeName() string { return "pkg/abi/linux.WindowSize" } -func (x *WindowSize) StateFields() []string { +func (w *WindowSize) StateFields() []string { return []string{ "Rows", "Cols", } } -func (x *WindowSize) beforeSave() {} +func (w *WindowSize) beforeSave() {} -func (x *WindowSize) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Rows) - m.Save(1, &x.Cols) +func (w *WindowSize) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.Rows) + stateSinkObject.Save(1, &w.Cols) } -func (x *WindowSize) afterLoad() {} +func (w *WindowSize) afterLoad() {} -func (x *WindowSize) StateLoad(m state.Source) { - m.Load(0, &x.Rows) - m.Load(1, &x.Cols) +func (w *WindowSize) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.Rows) + stateSourceObject.Load(1, &w.Cols) } func init() { diff --git a/pkg/bpf/bpf_state_autogen.go b/pkg/bpf/bpf_state_autogen.go index 43dd9ff9e..db56bbeb5 100644 --- a/pkg/bpf/bpf_state_autogen.go +++ b/pkg/bpf/bpf_state_autogen.go @@ -6,27 +6,27 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Program) StateTypeName() string { +func (p *Program) StateTypeName() string { return "pkg/bpf.Program" } -func (x *Program) StateFields() []string { +func (p *Program) StateFields() []string { return []string{ "instructions", } } -func (x *Program) beforeSave() {} +func (p *Program) beforeSave() {} -func (x *Program) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.instructions) +func (p *Program) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.instructions) } -func (x *Program) afterLoad() {} +func (p *Program) afterLoad() {} -func (x *Program) StateLoad(m state.Source) { - m.Load(0, &x.instructions) +func (p *Program) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.instructions) } func init() { diff --git a/pkg/buffer/buffer_state_autogen.go b/pkg/buffer/buffer_state_autogen.go index 8ba19e5f9..9acbe7173 100644 --- a/pkg/buffer/buffer_state_autogen.go +++ b/pkg/buffer/buffer_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *buffer) StateTypeName() string { +func (b *buffer) StateTypeName() string { return "pkg/buffer.buffer" } -func (x *buffer) StateFields() []string { +func (b *buffer) StateFields() []string { return []string{ "data", "read", @@ -19,107 +19,107 @@ func (x *buffer) StateFields() []string { } } -func (x *buffer) beforeSave() {} +func (b *buffer) beforeSave() {} -func (x *buffer) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.data) - m.Save(1, &x.read) - m.Save(2, &x.write) - m.Save(3, &x.bufferEntry) +func (b *buffer) StateSave(stateSinkObject state.Sink) { + b.beforeSave() + stateSinkObject.Save(0, &b.data) + stateSinkObject.Save(1, &b.read) + stateSinkObject.Save(2, &b.write) + stateSinkObject.Save(3, &b.bufferEntry) } -func (x *buffer) afterLoad() {} +func (b *buffer) afterLoad() {} -func (x *buffer) StateLoad(m state.Source) { - m.Load(0, &x.data) - m.Load(1, &x.read) - m.Load(2, &x.write) - m.Load(3, &x.bufferEntry) +func (b *buffer) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &b.data) + stateSourceObject.Load(1, &b.read) + stateSourceObject.Load(2, &b.write) + stateSourceObject.Load(3, &b.bufferEntry) } -func (x *bufferList) StateTypeName() string { +func (b *bufferList) StateTypeName() string { return "pkg/buffer.bufferList" } -func (x *bufferList) StateFields() []string { +func (b *bufferList) StateFields() []string { return []string{ "head", "tail", } } -func (x *bufferList) beforeSave() {} +func (b *bufferList) beforeSave() {} -func (x *bufferList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (b *bufferList) StateSave(stateSinkObject state.Sink) { + b.beforeSave() + stateSinkObject.Save(0, &b.head) + stateSinkObject.Save(1, &b.tail) } -func (x *bufferList) afterLoad() {} +func (b *bufferList) afterLoad() {} -func (x *bufferList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (b *bufferList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &b.head) + stateSourceObject.Load(1, &b.tail) } -func (x *bufferEntry) StateTypeName() string { +func (b *bufferEntry) StateTypeName() string { return "pkg/buffer.bufferEntry" } -func (x *bufferEntry) StateFields() []string { +func (b *bufferEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *bufferEntry) beforeSave() {} +func (b *bufferEntry) beforeSave() {} -func (x *bufferEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (b *bufferEntry) StateSave(stateSinkObject state.Sink) { + b.beforeSave() + stateSinkObject.Save(0, &b.next) + stateSinkObject.Save(1, &b.prev) } -func (x *bufferEntry) afterLoad() {} +func (b *bufferEntry) afterLoad() {} -func (x *bufferEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (b *bufferEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &b.next) + stateSourceObject.Load(1, &b.prev) } -func (x *pool) StateTypeName() string { +func (p *pool) StateTypeName() string { return "pkg/buffer.pool" } -func (x *pool) StateFields() []string { +func (p *pool) StateFields() []string { return []string{ "bufferSize", "embeddedStorage", } } -func (x *pool) beforeSave() {} +func (p *pool) beforeSave() {} -func (x *pool) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.bufferSize) - m.Save(1, &x.embeddedStorage) +func (p *pool) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.bufferSize) + stateSinkObject.Save(1, &p.embeddedStorage) } -func (x *pool) StateLoad(m state.Source) { - m.Load(0, &x.bufferSize) - m.LoadWait(1, &x.embeddedStorage) - m.AfterLoad(x.afterLoad) +func (p *pool) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.bufferSize) + stateSourceObject.LoadWait(1, &p.embeddedStorage) + stateSourceObject.AfterLoad(p.afterLoad) } -func (x *View) StateTypeName() string { +func (v *View) StateTypeName() string { return "pkg/buffer.View" } -func (x *View) StateFields() []string { +func (v *View) StateFields() []string { return []string{ "data", "size", @@ -127,21 +127,21 @@ func (x *View) StateFields() []string { } } -func (x *View) beforeSave() {} +func (v *View) beforeSave() {} -func (x *View) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.data) - m.Save(1, &x.size) - m.Save(2, &x.pool) +func (v *View) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.data) + stateSinkObject.Save(1, &v.size) + stateSinkObject.Save(2, &v.pool) } -func (x *View) afterLoad() {} +func (v *View) afterLoad() {} -func (x *View) StateLoad(m state.Source) { - m.Load(0, &x.data) - m.Load(1, &x.size) - m.Load(2, &x.pool) +func (v *View) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.data) + stateSourceObject.Load(1, &v.size) + stateSourceObject.Load(2, &v.pool) } func init() { diff --git a/pkg/cpuid/cpuid_arm64_state_autogen.go b/pkg/cpuid/cpuid_arm64_state_autogen.go index 10569802c..656b8d001 100644 --- a/pkg/cpuid/cpuid_arm64_state_autogen.go +++ b/pkg/cpuid/cpuid_arm64_state_autogen.go @@ -8,11 +8,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *FeatureSet) StateTypeName() string { +func (f *FeatureSet) StateTypeName() string { return "pkg/cpuid.FeatureSet" } -func (x *FeatureSet) StateFields() []string { +func (f *FeatureSet) StateFields() []string { return []string{ "Set", "CPUImplementer", @@ -23,27 +23,27 @@ func (x *FeatureSet) StateFields() []string { } } -func (x *FeatureSet) beforeSave() {} +func (f *FeatureSet) beforeSave() {} -func (x *FeatureSet) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Set) - m.Save(1, &x.CPUImplementer) - m.Save(2, &x.CPUArchitecture) - m.Save(3, &x.CPUVariant) - m.Save(4, &x.CPUPartnum) - m.Save(5, &x.CPURevision) +func (f *FeatureSet) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Set) + stateSinkObject.Save(1, &f.CPUImplementer) + stateSinkObject.Save(2, &f.CPUArchitecture) + stateSinkObject.Save(3, &f.CPUVariant) + stateSinkObject.Save(4, &f.CPUPartnum) + stateSinkObject.Save(5, &f.CPURevision) } -func (x *FeatureSet) afterLoad() {} +func (f *FeatureSet) afterLoad() {} -func (x *FeatureSet) StateLoad(m state.Source) { - m.Load(0, &x.Set) - m.Load(1, &x.CPUImplementer) - m.Load(2, &x.CPUArchitecture) - m.Load(3, &x.CPUVariant) - m.Load(4, &x.CPUPartnum) - m.Load(5, &x.CPURevision) +func (f *FeatureSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Set) + stateSourceObject.Load(1, &f.CPUImplementer) + stateSourceObject.Load(2, &f.CPUArchitecture) + stateSourceObject.Load(3, &f.CPUVariant) + stateSourceObject.Load(4, &f.CPUPartnum) + stateSourceObject.Load(5, &f.CPURevision) } func init() { diff --git a/pkg/cpuid/cpuid_x86_state_autogen.go b/pkg/cpuid/cpuid_x86_state_autogen.go index 14b26bef7..c73dd2291 100644 --- a/pkg/cpuid/cpuid_x86_state_autogen.go +++ b/pkg/cpuid/cpuid_x86_state_autogen.go @@ -8,11 +8,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Cache) StateTypeName() string { +func (c *Cache) StateTypeName() string { return "pkg/cpuid.Cache" } -func (x *Cache) StateFields() []string { +func (c *Cache) StateFields() []string { return []string{ "Level", "Type", @@ -26,40 +26,40 @@ func (x *Cache) StateFields() []string { } } -func (x *Cache) beforeSave() {} - -func (x *Cache) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Level) - m.Save(1, &x.Type) - m.Save(2, &x.FullyAssociative) - m.Save(3, &x.Partitions) - m.Save(4, &x.Ways) - m.Save(5, &x.Sets) - m.Save(6, &x.InvalidateHierarchical) - m.Save(7, &x.Inclusive) - m.Save(8, &x.DirectMapped) +func (c *Cache) beforeSave() {} + +func (c *Cache) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.Level) + stateSinkObject.Save(1, &c.Type) + stateSinkObject.Save(2, &c.FullyAssociative) + stateSinkObject.Save(3, &c.Partitions) + stateSinkObject.Save(4, &c.Ways) + stateSinkObject.Save(5, &c.Sets) + stateSinkObject.Save(6, &c.InvalidateHierarchical) + stateSinkObject.Save(7, &c.Inclusive) + stateSinkObject.Save(8, &c.DirectMapped) } -func (x *Cache) afterLoad() {} - -func (x *Cache) StateLoad(m state.Source) { - m.Load(0, &x.Level) - m.Load(1, &x.Type) - m.Load(2, &x.FullyAssociative) - m.Load(3, &x.Partitions) - m.Load(4, &x.Ways) - m.Load(5, &x.Sets) - m.Load(6, &x.InvalidateHierarchical) - m.Load(7, &x.Inclusive) - m.Load(8, &x.DirectMapped) +func (c *Cache) afterLoad() {} + +func (c *Cache) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.Level) + stateSourceObject.Load(1, &c.Type) + stateSourceObject.Load(2, &c.FullyAssociative) + stateSourceObject.Load(3, &c.Partitions) + stateSourceObject.Load(4, &c.Ways) + stateSourceObject.Load(5, &c.Sets) + stateSourceObject.Load(6, &c.InvalidateHierarchical) + stateSourceObject.Load(7, &c.Inclusive) + stateSourceObject.Load(8, &c.DirectMapped) } -func (x *FeatureSet) StateTypeName() string { +func (f *FeatureSet) StateTypeName() string { return "pkg/cpuid.FeatureSet" } -func (x *FeatureSet) StateFields() []string { +func (f *FeatureSet) StateFields() []string { return []string{ "Set", "VendorID", @@ -74,35 +74,35 @@ func (x *FeatureSet) StateFields() []string { } } -func (x *FeatureSet) beforeSave() {} - -func (x *FeatureSet) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Set) - m.Save(1, &x.VendorID) - m.Save(2, &x.ExtendedFamily) - m.Save(3, &x.ExtendedModel) - m.Save(4, &x.ProcessorType) - m.Save(5, &x.Family) - m.Save(6, &x.Model) - m.Save(7, &x.SteppingID) - m.Save(8, &x.Caches) - m.Save(9, &x.CacheLine) +func (f *FeatureSet) beforeSave() {} + +func (f *FeatureSet) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Set) + stateSinkObject.Save(1, &f.VendorID) + stateSinkObject.Save(2, &f.ExtendedFamily) + stateSinkObject.Save(3, &f.ExtendedModel) + stateSinkObject.Save(4, &f.ProcessorType) + stateSinkObject.Save(5, &f.Family) + stateSinkObject.Save(6, &f.Model) + stateSinkObject.Save(7, &f.SteppingID) + stateSinkObject.Save(8, &f.Caches) + stateSinkObject.Save(9, &f.CacheLine) } -func (x *FeatureSet) afterLoad() {} - -func (x *FeatureSet) StateLoad(m state.Source) { - m.Load(0, &x.Set) - m.Load(1, &x.VendorID) - m.Load(2, &x.ExtendedFamily) - m.Load(3, &x.ExtendedModel) - m.Load(4, &x.ProcessorType) - m.Load(5, &x.Family) - m.Load(6, &x.Model) - m.Load(7, &x.SteppingID) - m.Load(8, &x.Caches) - m.Load(9, &x.CacheLine) +func (f *FeatureSet) afterLoad() {} + +func (f *FeatureSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Set) + stateSourceObject.Load(1, &f.VendorID) + stateSourceObject.Load(2, &f.ExtendedFamily) + stateSourceObject.Load(3, &f.ExtendedModel) + stateSourceObject.Load(4, &f.ProcessorType) + stateSourceObject.Load(5, &f.Family) + stateSourceObject.Load(6, &f.Model) + stateSourceObject.Load(7, &f.SteppingID) + stateSourceObject.Load(8, &f.Caches) + stateSourceObject.Load(9, &f.CacheLine) } func init() { diff --git a/pkg/ilist/ilist_state_autogen.go b/pkg/ilist/ilist_state_autogen.go index d175c965e..378b7a895 100644 --- a/pkg/ilist/ilist_state_autogen.go +++ b/pkg/ilist/ilist_state_autogen.go @@ -6,56 +6,56 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *List) StateTypeName() string { +func (l *List) StateTypeName() string { return "pkg/ilist.List" } -func (x *List) StateFields() []string { +func (l *List) StateFields() []string { return []string{ "head", "tail", } } -func (x *List) beforeSave() {} +func (l *List) beforeSave() {} -func (x *List) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (l *List) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.head) + stateSinkObject.Save(1, &l.tail) } -func (x *List) afterLoad() {} +func (l *List) afterLoad() {} -func (x *List) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (l *List) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.head) + stateSourceObject.Load(1, &l.tail) } -func (x *Entry) StateTypeName() string { +func (e *Entry) StateTypeName() string { return "pkg/ilist.Entry" } -func (x *Entry) StateFields() []string { +func (e *Entry) StateFields() []string { return []string{ "next", "prev", } } -func (x *Entry) beforeSave() {} +func (e *Entry) beforeSave() {} -func (x *Entry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (e *Entry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (x *Entry) afterLoad() {} +func (e *Entry) afterLoad() {} -func (x *Entry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (e *Entry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } func init() { diff --git a/pkg/refs/refs_state_autogen.go b/pkg/refs/refs_state_autogen.go index 53e06c283..2ff841f4b 100644 --- a/pkg/refs/refs_state_autogen.go +++ b/pkg/refs/refs_state_autogen.go @@ -6,38 +6,38 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *WeakRef) StateTypeName() string { +func (w *WeakRef) StateTypeName() string { return "pkg/refs.WeakRef" } -func (x *WeakRef) StateFields() []string { +func (w *WeakRef) StateFields() []string { return []string{ "obj", "user", } } -func (x *WeakRef) beforeSave() {} +func (w *WeakRef) beforeSave() {} -func (x *WeakRef) StateSave(m state.Sink) { - x.beforeSave() - var obj savedReference = x.saveObj() - m.SaveValue(0, obj) - m.Save(1, &x.user) +func (w *WeakRef) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + var objValue savedReference = w.saveObj() + stateSinkObject.SaveValue(0, objValue) + stateSinkObject.Save(1, &w.user) } -func (x *WeakRef) afterLoad() {} +func (w *WeakRef) afterLoad() {} -func (x *WeakRef) StateLoad(m state.Source) { - m.Load(1, &x.user) - m.LoadValue(0, new(savedReference), func(y interface{}) { x.loadObj(y.(savedReference)) }) +func (w *WeakRef) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(1, &w.user) + stateSourceObject.LoadValue(0, new(savedReference), func(y interface{}) { w.loadObj(y.(savedReference)) }) } -func (x *AtomicRefCount) StateTypeName() string { +func (a *AtomicRefCount) StateTypeName() string { return "pkg/refs.AtomicRefCount" } -func (x *AtomicRefCount) StateFields() []string { +func (a *AtomicRefCount) StateFields() []string { return []string{ "refCount", "name", @@ -45,96 +45,96 @@ func (x *AtomicRefCount) StateFields() []string { } } -func (x *AtomicRefCount) beforeSave() {} +func (a *AtomicRefCount) beforeSave() {} -func (x *AtomicRefCount) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) - m.Save(1, &x.name) - m.Save(2, &x.stack) +func (a *AtomicRefCount) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.refCount) + stateSinkObject.Save(1, &a.name) + stateSinkObject.Save(2, &a.stack) } -func (x *AtomicRefCount) afterLoad() {} +func (a *AtomicRefCount) afterLoad() {} -func (x *AtomicRefCount) StateLoad(m state.Source) { - m.Load(0, &x.refCount) - m.Load(1, &x.name) - m.Load(2, &x.stack) +func (a *AtomicRefCount) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.refCount) + stateSourceObject.Load(1, &a.name) + stateSourceObject.Load(2, &a.stack) } -func (x *savedReference) StateTypeName() string { +func (s *savedReference) StateTypeName() string { return "pkg/refs.savedReference" } -func (x *savedReference) StateFields() []string { +func (s *savedReference) StateFields() []string { return []string{ "obj", } } -func (x *savedReference) beforeSave() {} +func (s *savedReference) beforeSave() {} -func (x *savedReference) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.obj) +func (s *savedReference) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.obj) } -func (x *savedReference) afterLoad() {} +func (s *savedReference) afterLoad() {} -func (x *savedReference) StateLoad(m state.Source) { - m.Load(0, &x.obj) +func (s *savedReference) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.obj) } -func (x *weakRefList) StateTypeName() string { +func (w *weakRefList) StateTypeName() string { return "pkg/refs.weakRefList" } -func (x *weakRefList) StateFields() []string { +func (w *weakRefList) StateFields() []string { return []string{ "head", "tail", } } -func (x *weakRefList) beforeSave() {} +func (w *weakRefList) beforeSave() {} -func (x *weakRefList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (w *weakRefList) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.head) + stateSinkObject.Save(1, &w.tail) } -func (x *weakRefList) afterLoad() {} +func (w *weakRefList) afterLoad() {} -func (x *weakRefList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (w *weakRefList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.head) + stateSourceObject.Load(1, &w.tail) } -func (x *weakRefEntry) StateTypeName() string { +func (w *weakRefEntry) StateTypeName() string { return "pkg/refs.weakRefEntry" } -func (x *weakRefEntry) StateFields() []string { +func (w *weakRefEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *weakRefEntry) beforeSave() {} +func (w *weakRefEntry) beforeSave() {} -func (x *weakRefEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (w *weakRefEntry) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.next) + stateSinkObject.Save(1, &w.prev) } -func (x *weakRefEntry) afterLoad() {} +func (w *weakRefEntry) afterLoad() {} -func (x *weakRefEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (w *weakRefEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.next) + stateSourceObject.Load(1, &w.prev) } func init() { diff --git a/pkg/sentry/arch/arch_aarch64_state_autogen.go b/pkg/sentry/arch/arch_aarch64_state_autogen.go index 6b698f9ce..817679b05 100644 --- a/pkg/sentry/arch/arch_aarch64_state_autogen.go +++ b/pkg/sentry/arch/arch_aarch64_state_autogen.go @@ -8,37 +8,37 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Registers) StateTypeName() string { +func (r *Registers) StateTypeName() string { return "pkg/sentry/arch.Registers" } -func (x *Registers) StateFields() []string { +func (r *Registers) StateFields() []string { return []string{ "PtraceRegs", "TPIDR_EL0", } } -func (x *Registers) beforeSave() {} +func (r *Registers) beforeSave() {} -func (x *Registers) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.PtraceRegs) - m.Save(1, &x.TPIDR_EL0) +func (r *Registers) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.PtraceRegs) + stateSinkObject.Save(1, &r.TPIDR_EL0) } -func (x *Registers) afterLoad() {} +func (r *Registers) afterLoad() {} -func (x *Registers) StateLoad(m state.Source) { - m.Load(0, &x.PtraceRegs) - m.Load(1, &x.TPIDR_EL0) +func (r *Registers) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.PtraceRegs) + stateSourceObject.Load(1, &r.TPIDR_EL0) } -func (x *State) StateTypeName() string { +func (s *State) StateTypeName() string { return "pkg/sentry/arch.State" } -func (x *State) StateFields() []string { +func (s *State) StateFields() []string { return []string{ "Regs", "aarch64FPState", @@ -47,23 +47,23 @@ func (x *State) StateFields() []string { } } -func (x *State) beforeSave() {} +func (s *State) beforeSave() {} -func (x *State) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Regs) - m.Save(1, &x.aarch64FPState) - m.Save(2, &x.FeatureSet) - m.Save(3, &x.OrigR0) +func (s *State) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Regs) + stateSinkObject.Save(1, &s.aarch64FPState) + stateSinkObject.Save(2, &s.FeatureSet) + stateSinkObject.Save(3, &s.OrigR0) } -func (x *State) afterLoad() {} +func (s *State) afterLoad() {} -func (x *State) StateLoad(m state.Source) { - m.Load(0, &x.Regs) - m.LoadWait(1, &x.aarch64FPState) - m.Load(2, &x.FeatureSet) - m.Load(3, &x.OrigR0) +func (s *State) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Regs) + stateSourceObject.LoadWait(1, &s.aarch64FPState) + stateSourceObject.Load(2, &s.FeatureSet) + stateSourceObject.Load(3, &s.OrigR0) } func init() { diff --git a/pkg/sentry/arch/arch_amd64_state_autogen.go b/pkg/sentry/arch/arch_amd64_state_autogen.go index a6afbbb53..7fe18338d 100644 --- a/pkg/sentry/arch/arch_amd64_state_autogen.go +++ b/pkg/sentry/arch/arch_amd64_state_autogen.go @@ -10,30 +10,30 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *context64) StateTypeName() string { +func (c *context64) StateTypeName() string { return "pkg/sentry/arch.context64" } -func (x *context64) StateFields() []string { +func (c *context64) StateFields() []string { return []string{ "State", "sigFPState", } } -func (x *context64) beforeSave() {} +func (c *context64) beforeSave() {} -func (x *context64) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.State) - m.Save(1, &x.sigFPState) +func (c *context64) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.State) + stateSinkObject.Save(1, &c.sigFPState) } -func (x *context64) afterLoad() {} +func (c *context64) afterLoad() {} -func (x *context64) StateLoad(m state.Source) { - m.Load(0, &x.State) - m.Load(1, &x.sigFPState) +func (c *context64) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.State) + stateSourceObject.Load(1, &c.sigFPState) } func init() { diff --git a/pkg/sentry/arch/arch_arm64_state_autogen.go b/pkg/sentry/arch/arch_arm64_state_autogen.go index 4e69512bb..bece3fa9e 100644 --- a/pkg/sentry/arch/arch_arm64_state_autogen.go +++ b/pkg/sentry/arch/arch_arm64_state_autogen.go @@ -10,30 +10,30 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *context64) StateTypeName() string { +func (c *context64) StateTypeName() string { return "pkg/sentry/arch.context64" } -func (x *context64) StateFields() []string { +func (c *context64) StateFields() []string { return []string{ "State", "sigFPState", } } -func (x *context64) beforeSave() {} +func (c *context64) beforeSave() {} -func (x *context64) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.State) - m.Save(1, &x.sigFPState) +func (c *context64) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.State) + stateSinkObject.Save(1, &c.sigFPState) } -func (x *context64) afterLoad() {} +func (c *context64) afterLoad() {} -func (x *context64) StateLoad(m state.Source) { - m.Load(0, &x.State) - m.Load(1, &x.sigFPState) +func (c *context64) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.State) + stateSourceObject.Load(1, &c.sigFPState) } func init() { diff --git a/pkg/sentry/arch/arch_state_autogen.go b/pkg/sentry/arch/arch_state_autogen.go index b29124813..e0a1de627 100644 --- a/pkg/sentry/arch/arch_state_autogen.go +++ b/pkg/sentry/arch/arch_state_autogen.go @@ -8,11 +8,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *MmapLayout) StateTypeName() string { +func (m *MmapLayout) StateTypeName() string { return "pkg/sentry/arch.MmapLayout" } -func (x *MmapLayout) StateFields() []string { +func (m *MmapLayout) StateFields() []string { return []string{ "MinAddr", "MaxAddr", @@ -23,60 +23,60 @@ func (x *MmapLayout) StateFields() []string { } } -func (x *MmapLayout) beforeSave() {} +func (m *MmapLayout) beforeSave() {} -func (x *MmapLayout) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.MinAddr) - m.Save(1, &x.MaxAddr) - m.Save(2, &x.BottomUpBase) - m.Save(3, &x.TopDownBase) - m.Save(4, &x.DefaultDirection) - m.Save(5, &x.MaxStackRand) +func (m *MmapLayout) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.MinAddr) + stateSinkObject.Save(1, &m.MaxAddr) + stateSinkObject.Save(2, &m.BottomUpBase) + stateSinkObject.Save(3, &m.TopDownBase) + stateSinkObject.Save(4, &m.DefaultDirection) + stateSinkObject.Save(5, &m.MaxStackRand) } -func (x *MmapLayout) afterLoad() {} +func (m *MmapLayout) afterLoad() {} -func (x *MmapLayout) StateLoad(m state.Source) { - m.Load(0, &x.MinAddr) - m.Load(1, &x.MaxAddr) - m.Load(2, &x.BottomUpBase) - m.Load(3, &x.TopDownBase) - m.Load(4, &x.DefaultDirection) - m.Load(5, &x.MaxStackRand) +func (m *MmapLayout) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.MinAddr) + stateSourceObject.Load(1, &m.MaxAddr) + stateSourceObject.Load(2, &m.BottomUpBase) + stateSourceObject.Load(3, &m.TopDownBase) + stateSourceObject.Load(4, &m.DefaultDirection) + stateSourceObject.Load(5, &m.MaxStackRand) } -func (x *AuxEntry) StateTypeName() string { +func (a *AuxEntry) StateTypeName() string { return "pkg/sentry/arch.AuxEntry" } -func (x *AuxEntry) StateFields() []string { +func (a *AuxEntry) StateFields() []string { return []string{ "Key", "Value", } } -func (x *AuxEntry) beforeSave() {} +func (a *AuxEntry) beforeSave() {} -func (x *AuxEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Key) - m.Save(1, &x.Value) +func (a *AuxEntry) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.Key) + stateSinkObject.Save(1, &a.Value) } -func (x *AuxEntry) afterLoad() {} +func (a *AuxEntry) afterLoad() {} -func (x *AuxEntry) StateLoad(m state.Source) { - m.Load(0, &x.Key) - m.Load(1, &x.Value) +func (a *AuxEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.Key) + stateSourceObject.Load(1, &a.Value) } -func (x *SignalAct) StateTypeName() string { +func (s *SignalAct) StateTypeName() string { return "pkg/sentry/arch.SignalAct" } -func (x *SignalAct) StateFields() []string { +func (s *SignalAct) StateFields() []string { return []string{ "Handler", "Flags", @@ -85,30 +85,30 @@ func (x *SignalAct) StateFields() []string { } } -func (x *SignalAct) beforeSave() {} +func (s *SignalAct) beforeSave() {} -func (x *SignalAct) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Handler) - m.Save(1, &x.Flags) - m.Save(2, &x.Restorer) - m.Save(3, &x.Mask) +func (s *SignalAct) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Handler) + stateSinkObject.Save(1, &s.Flags) + stateSinkObject.Save(2, &s.Restorer) + stateSinkObject.Save(3, &s.Mask) } -func (x *SignalAct) afterLoad() {} +func (s *SignalAct) afterLoad() {} -func (x *SignalAct) StateLoad(m state.Source) { - m.Load(0, &x.Handler) - m.Load(1, &x.Flags) - m.Load(2, &x.Restorer) - m.Load(3, &x.Mask) +func (s *SignalAct) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Handler) + stateSourceObject.Load(1, &s.Flags) + stateSourceObject.Load(2, &s.Restorer) + stateSourceObject.Load(3, &s.Mask) } -func (x *SignalStack) StateTypeName() string { +func (s *SignalStack) StateTypeName() string { return "pkg/sentry/arch.SignalStack" } -func (x *SignalStack) StateFields() []string { +func (s *SignalStack) StateFields() []string { return []string{ "Addr", "Flags", @@ -116,28 +116,28 @@ func (x *SignalStack) StateFields() []string { } } -func (x *SignalStack) beforeSave() {} +func (s *SignalStack) beforeSave() {} -func (x *SignalStack) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Addr) - m.Save(1, &x.Flags) - m.Save(2, &x.Size) +func (s *SignalStack) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Addr) + stateSinkObject.Save(1, &s.Flags) + stateSinkObject.Save(2, &s.Size) } -func (x *SignalStack) afterLoad() {} +func (s *SignalStack) afterLoad() {} -func (x *SignalStack) StateLoad(m state.Source) { - m.Load(0, &x.Addr) - m.Load(1, &x.Flags) - m.Load(2, &x.Size) +func (s *SignalStack) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Addr) + stateSourceObject.Load(1, &s.Flags) + stateSourceObject.Load(2, &s.Size) } -func (x *SignalInfo) StateTypeName() string { +func (s *SignalInfo) StateTypeName() string { return "pkg/sentry/arch.SignalInfo" } -func (x *SignalInfo) StateFields() []string { +func (s *SignalInfo) StateFields() []string { return []string{ "Signo", "Errno", @@ -146,23 +146,23 @@ func (x *SignalInfo) StateFields() []string { } } -func (x *SignalInfo) beforeSave() {} +func (s *SignalInfo) beforeSave() {} -func (x *SignalInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Signo) - m.Save(1, &x.Errno) - m.Save(2, &x.Code) - m.Save(3, &x.Fields) +func (s *SignalInfo) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Signo) + stateSinkObject.Save(1, &s.Errno) + stateSinkObject.Save(2, &s.Code) + stateSinkObject.Save(3, &s.Fields) } -func (x *SignalInfo) afterLoad() {} +func (s *SignalInfo) afterLoad() {} -func (x *SignalInfo) StateLoad(m state.Source) { - m.Load(0, &x.Signo) - m.Load(1, &x.Errno) - m.Load(2, &x.Code) - m.Load(3, &x.Fields) +func (s *SignalInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Signo) + stateSourceObject.Load(1, &s.Errno) + stateSourceObject.Load(2, &s.Code) + stateSourceObject.Load(3, &s.Fields) } func init() { diff --git a/pkg/sentry/arch/arch_x86_impl_state_autogen.go b/pkg/sentry/arch/arch_x86_impl_state_autogen.go index e7738a847..e584c3f83 100644 --- a/pkg/sentry/arch/arch_x86_impl_state_autogen.go +++ b/pkg/sentry/arch/arch_x86_impl_state_autogen.go @@ -8,11 +8,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *State) StateTypeName() string { +func (s *State) StateTypeName() string { return "pkg/sentry/arch.State" } -func (x *State) StateFields() []string { +func (s *State) StateFields() []string { return []string{ "Regs", "x86FPState", @@ -20,20 +20,20 @@ func (x *State) StateFields() []string { } } -func (x *State) beforeSave() {} +func (s *State) beforeSave() {} -func (x *State) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Regs) - m.Save(1, &x.x86FPState) - m.Save(2, &x.FeatureSet) +func (s *State) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Regs) + stateSinkObject.Save(1, &s.x86FPState) + stateSinkObject.Save(2, &s.FeatureSet) } -func (x *State) StateLoad(m state.Source) { - m.Load(0, &x.Regs) - m.LoadWait(1, &x.x86FPState) - m.Load(2, &x.FeatureSet) - m.AfterLoad(x.afterLoad) +func (s *State) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Regs) + stateSourceObject.LoadWait(1, &s.x86FPState) + stateSourceObject.Load(2, &s.FeatureSet) + stateSourceObject.AfterLoad(s.afterLoad) } func init() { diff --git a/pkg/sentry/arch/arch_x86_state_autogen.go b/pkg/sentry/arch/arch_x86_state_autogen.go index c52b40a26..11378624b 100644 --- a/pkg/sentry/arch/arch_x86_state_autogen.go +++ b/pkg/sentry/arch/arch_x86_state_autogen.go @@ -9,27 +9,27 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Registers) StateTypeName() string { +func (r *Registers) StateTypeName() string { return "pkg/sentry/arch.Registers" } -func (x *Registers) StateFields() []string { +func (r *Registers) StateFields() []string { return []string{ "PtraceRegs", } } -func (x *Registers) beforeSave() {} +func (r *Registers) beforeSave() {} -func (x *Registers) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.PtraceRegs) +func (r *Registers) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.PtraceRegs) } -func (x *Registers) afterLoad() {} +func (r *Registers) afterLoad() {} -func (x *Registers) StateLoad(m state.Source) { - m.Load(0, &x.PtraceRegs) +func (r *Registers) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.PtraceRegs) } func init() { diff --git a/pkg/sentry/device/device_state_autogen.go b/pkg/sentry/device/device_state_autogen.go index 8a28a4be4..53fcb5d84 100644 --- a/pkg/sentry/device/device_state_autogen.go +++ b/pkg/sentry/device/device_state_autogen.go @@ -6,82 +6,82 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Registry) StateTypeName() string { +func (r *Registry) StateTypeName() string { return "pkg/sentry/device.Registry" } -func (x *Registry) StateFields() []string { +func (r *Registry) StateFields() []string { return []string{ "lastAnonDeviceMinor", "devices", } } -func (x *Registry) beforeSave() {} +func (r *Registry) beforeSave() {} -func (x *Registry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.lastAnonDeviceMinor) - m.Save(1, &x.devices) +func (r *Registry) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.lastAnonDeviceMinor) + stateSinkObject.Save(1, &r.devices) } -func (x *Registry) afterLoad() {} +func (r *Registry) afterLoad() {} -func (x *Registry) StateLoad(m state.Source) { - m.Load(0, &x.lastAnonDeviceMinor) - m.Load(1, &x.devices) +func (r *Registry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.lastAnonDeviceMinor) + stateSourceObject.Load(1, &r.devices) } -func (x *ID) StateTypeName() string { +func (i *ID) StateTypeName() string { return "pkg/sentry/device.ID" } -func (x *ID) StateFields() []string { +func (i *ID) StateFields() []string { return []string{ "Major", "Minor", } } -func (x *ID) beforeSave() {} +func (i *ID) beforeSave() {} -func (x *ID) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Major) - m.Save(1, &x.Minor) +func (i *ID) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Major) + stateSinkObject.Save(1, &i.Minor) } -func (x *ID) afterLoad() {} +func (i *ID) afterLoad() {} -func (x *ID) StateLoad(m state.Source) { - m.Load(0, &x.Major) - m.Load(1, &x.Minor) +func (i *ID) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Major) + stateSourceObject.Load(1, &i.Minor) } -func (x *Device) StateTypeName() string { +func (d *Device) StateTypeName() string { return "pkg/sentry/device.Device" } -func (x *Device) StateFields() []string { +func (d *Device) StateFields() []string { return []string{ "ID", "last", } } -func (x *Device) beforeSave() {} +func (d *Device) beforeSave() {} -func (x *Device) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ID) - m.Save(1, &x.last) +func (d *Device) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.ID) + stateSinkObject.Save(1, &d.last) } -func (x *Device) afterLoad() {} +func (d *Device) afterLoad() {} -func (x *Device) StateLoad(m state.Source) { - m.Load(0, &x.ID) - m.Load(1, &x.last) +func (d *Device) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.ID) + stateSourceObject.Load(1, &d.last) } func init() { diff --git a/pkg/sentry/devices/memdev/memdev_state_autogen.go b/pkg/sentry/devices/memdev/memdev_state_autogen.go index 127ea03ee..5064e0f59 100644 --- a/pkg/sentry/devices/memdev/memdev_state_autogen.go +++ b/pkg/sentry/devices/memdev/memdev_state_autogen.go @@ -6,30 +6,30 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *fullDevice) StateTypeName() string { +func (f *fullDevice) StateTypeName() string { return "pkg/sentry/devices/memdev.fullDevice" } -func (x *fullDevice) StateFields() []string { +func (f *fullDevice) StateFields() []string { return []string{} } -func (x *fullDevice) beforeSave() {} +func (f *fullDevice) beforeSave() {} -func (x *fullDevice) StateSave(m state.Sink) { - x.beforeSave() +func (f *fullDevice) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *fullDevice) afterLoad() {} +func (f *fullDevice) afterLoad() {} -func (x *fullDevice) StateLoad(m state.Source) { +func (f *fullDevice) StateLoad(stateSourceObject state.Source) { } -func (x *fullFD) StateTypeName() string { +func (f *fullFD) StateTypeName() string { return "pkg/sentry/devices/memdev.fullFD" } -func (x *fullFD) StateFields() []string { +func (f *fullFD) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -38,49 +38,49 @@ func (x *fullFD) StateFields() []string { } } -func (x *fullFD) beforeSave() {} +func (f *fullFD) beforeSave() {} -func (x *fullFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) +func (f *fullFD) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfd) + stateSinkObject.Save(1, &f.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &f.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &f.NoLockFD) } -func (x *fullFD) afterLoad() {} +func (f *fullFD) afterLoad() {} -func (x *fullFD) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) +func (f *fullFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfd) + stateSourceObject.Load(1, &f.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &f.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &f.NoLockFD) } -func (x *nullDevice) StateTypeName() string { +func (n *nullDevice) StateTypeName() string { return "pkg/sentry/devices/memdev.nullDevice" } -func (x *nullDevice) StateFields() []string { +func (n *nullDevice) StateFields() []string { return []string{} } -func (x *nullDevice) beforeSave() {} +func (n *nullDevice) beforeSave() {} -func (x *nullDevice) StateSave(m state.Sink) { - x.beforeSave() +func (n *nullDevice) StateSave(stateSinkObject state.Sink) { + n.beforeSave() } -func (x *nullDevice) afterLoad() {} +func (n *nullDevice) afterLoad() {} -func (x *nullDevice) StateLoad(m state.Source) { +func (n *nullDevice) StateLoad(stateSourceObject state.Source) { } -func (x *nullFD) StateTypeName() string { +func (n *nullFD) StateTypeName() string { return "pkg/sentry/devices/memdev.nullFD" } -func (x *nullFD) StateFields() []string { +func (n *nullFD) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -89,49 +89,49 @@ func (x *nullFD) StateFields() []string { } } -func (x *nullFD) beforeSave() {} +func (n *nullFD) beforeSave() {} -func (x *nullFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) +func (n *nullFD) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.vfsfd) + stateSinkObject.Save(1, &n.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &n.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &n.NoLockFD) } -func (x *nullFD) afterLoad() {} +func (n *nullFD) afterLoad() {} -func (x *nullFD) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) +func (n *nullFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.vfsfd) + stateSourceObject.Load(1, &n.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &n.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &n.NoLockFD) } -func (x *randomDevice) StateTypeName() string { +func (r *randomDevice) StateTypeName() string { return "pkg/sentry/devices/memdev.randomDevice" } -func (x *randomDevice) StateFields() []string { +func (r *randomDevice) StateFields() []string { return []string{} } -func (x *randomDevice) beforeSave() {} +func (r *randomDevice) beforeSave() {} -func (x *randomDevice) StateSave(m state.Sink) { - x.beforeSave() +func (r *randomDevice) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *randomDevice) afterLoad() {} +func (r *randomDevice) afterLoad() {} -func (x *randomDevice) StateLoad(m state.Source) { +func (r *randomDevice) StateLoad(stateSourceObject state.Source) { } -func (x *randomFD) StateTypeName() string { +func (r *randomFD) StateTypeName() string { return "pkg/sentry/devices/memdev.randomFD" } -func (x *randomFD) StateFields() []string { +func (r *randomFD) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -141,51 +141,51 @@ func (x *randomFD) StateFields() []string { } } -func (x *randomFD) beforeSave() {} +func (r *randomFD) beforeSave() {} -func (x *randomFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) - m.Save(4, &x.off) +func (r *randomFD) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.vfsfd) + stateSinkObject.Save(1, &r.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &r.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &r.NoLockFD) + stateSinkObject.Save(4, &r.off) } -func (x *randomFD) afterLoad() {} +func (r *randomFD) afterLoad() {} -func (x *randomFD) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) - m.Load(4, &x.off) +func (r *randomFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.vfsfd) + stateSourceObject.Load(1, &r.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &r.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &r.NoLockFD) + stateSourceObject.Load(4, &r.off) } -func (x *zeroDevice) StateTypeName() string { +func (z *zeroDevice) StateTypeName() string { return "pkg/sentry/devices/memdev.zeroDevice" } -func (x *zeroDevice) StateFields() []string { +func (z *zeroDevice) StateFields() []string { return []string{} } -func (x *zeroDevice) beforeSave() {} +func (z *zeroDevice) beforeSave() {} -func (x *zeroDevice) StateSave(m state.Sink) { - x.beforeSave() +func (z *zeroDevice) StateSave(stateSinkObject state.Sink) { + z.beforeSave() } -func (x *zeroDevice) afterLoad() {} +func (z *zeroDevice) afterLoad() {} -func (x *zeroDevice) StateLoad(m state.Source) { +func (z *zeroDevice) StateLoad(stateSourceObject state.Source) { } -func (x *zeroFD) StateTypeName() string { +func (z *zeroFD) StateTypeName() string { return "pkg/sentry/devices/memdev.zeroFD" } -func (x *zeroFD) StateFields() []string { +func (z *zeroFD) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -194,23 +194,23 @@ func (x *zeroFD) StateFields() []string { } } -func (x *zeroFD) beforeSave() {} +func (z *zeroFD) beforeSave() {} -func (x *zeroFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) +func (z *zeroFD) StateSave(stateSinkObject state.Sink) { + z.beforeSave() + stateSinkObject.Save(0, &z.vfsfd) + stateSinkObject.Save(1, &z.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &z.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &z.NoLockFD) } -func (x *zeroFD) afterLoad() {} +func (z *zeroFD) afterLoad() {} -func (x *zeroFD) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) +func (z *zeroFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &z.vfsfd) + stateSourceObject.Load(1, &z.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &z.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &z.NoLockFD) } func init() { diff --git a/pkg/sentry/devices/ttydev/ttydev_state_autogen.go b/pkg/sentry/devices/ttydev/ttydev_state_autogen.go index 9883dcf08..3389b37f3 100644 --- a/pkg/sentry/devices/ttydev/ttydev_state_autogen.go +++ b/pkg/sentry/devices/ttydev/ttydev_state_autogen.go @@ -6,23 +6,23 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *ttyDevice) StateTypeName() string { +func (t *ttyDevice) StateTypeName() string { return "pkg/sentry/devices/ttydev.ttyDevice" } -func (x *ttyDevice) StateFields() []string { +func (t *ttyDevice) StateFields() []string { return []string{} } -func (x *ttyDevice) beforeSave() {} +func (t *ttyDevice) beforeSave() {} -func (x *ttyDevice) StateSave(m state.Sink) { - x.beforeSave() +func (t *ttyDevice) StateSave(stateSinkObject state.Sink) { + t.beforeSave() } -func (x *ttyDevice) afterLoad() {} +func (t *ttyDevice) afterLoad() {} -func (x *ttyDevice) StateLoad(m state.Source) { +func (t *ttyDevice) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/fs/dev/dev_state_autogen.go b/pkg/sentry/fs/dev/dev_state_autogen.go index 48a60e45f..09e71c0c8 100644 --- a/pkg/sentry/fs/dev/dev_state_autogen.go +++ b/pkg/sentry/fs/dev/dev_state_autogen.go @@ -6,279 +6,279 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/dev.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *fullDevice) StateTypeName() string { +func (f *fullDevice) StateTypeName() string { return "pkg/sentry/fs/dev.fullDevice" } -func (x *fullDevice) StateFields() []string { +func (f *fullDevice) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *fullDevice) beforeSave() {} +func (f *fullDevice) beforeSave() {} -func (x *fullDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (f *fullDevice) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.InodeSimpleAttributes) } -func (x *fullDevice) afterLoad() {} +func (f *fullDevice) afterLoad() {} -func (x *fullDevice) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (f *fullDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.InodeSimpleAttributes) } -func (x *fullFileOperations) StateTypeName() string { +func (f *fullFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.fullFileOperations" } -func (x *fullFileOperations) StateFields() []string { +func (f *fullFileOperations) StateFields() []string { return []string{} } -func (x *fullFileOperations) beforeSave() {} +func (f *fullFileOperations) beforeSave() {} -func (x *fullFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (f *fullFileOperations) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *fullFileOperations) afterLoad() {} +func (f *fullFileOperations) afterLoad() {} -func (x *fullFileOperations) StateLoad(m state.Source) { +func (f *fullFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *netTunInodeOperations) StateTypeName() string { +func (n *netTunInodeOperations) StateTypeName() string { return "pkg/sentry/fs/dev.netTunInodeOperations" } -func (x *netTunInodeOperations) StateFields() []string { +func (n *netTunInodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *netTunInodeOperations) beforeSave() {} +func (n *netTunInodeOperations) beforeSave() {} -func (x *netTunInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (n *netTunInodeOperations) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.InodeSimpleAttributes) } -func (x *netTunInodeOperations) afterLoad() {} +func (n *netTunInodeOperations) afterLoad() {} -func (x *netTunInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (n *netTunInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.InodeSimpleAttributes) } -func (x *netTunFileOperations) StateTypeName() string { +func (n *netTunFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.netTunFileOperations" } -func (x *netTunFileOperations) StateFields() []string { +func (n *netTunFileOperations) StateFields() []string { return []string{ "device", } } -func (x *netTunFileOperations) beforeSave() {} +func (n *netTunFileOperations) beforeSave() {} -func (x *netTunFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.device) +func (n *netTunFileOperations) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.device) } -func (x *netTunFileOperations) afterLoad() {} +func (n *netTunFileOperations) afterLoad() {} -func (x *netTunFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.device) +func (n *netTunFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.device) } -func (x *nullDevice) StateTypeName() string { +func (n *nullDevice) StateTypeName() string { return "pkg/sentry/fs/dev.nullDevice" } -func (x *nullDevice) StateFields() []string { +func (n *nullDevice) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *nullDevice) beforeSave() {} +func (n *nullDevice) beforeSave() {} -func (x *nullDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (n *nullDevice) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.InodeSimpleAttributes) } -func (x *nullDevice) afterLoad() {} +func (n *nullDevice) afterLoad() {} -func (x *nullDevice) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (n *nullDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.InodeSimpleAttributes) } -func (x *nullFileOperations) StateTypeName() string { +func (n *nullFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.nullFileOperations" } -func (x *nullFileOperations) StateFields() []string { +func (n *nullFileOperations) StateFields() []string { return []string{} } -func (x *nullFileOperations) beforeSave() {} +func (n *nullFileOperations) beforeSave() {} -func (x *nullFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (n *nullFileOperations) StateSave(stateSinkObject state.Sink) { + n.beforeSave() } -func (x *nullFileOperations) afterLoad() {} +func (n *nullFileOperations) afterLoad() {} -func (x *nullFileOperations) StateLoad(m state.Source) { +func (n *nullFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *zeroDevice) StateTypeName() string { +func (z *zeroDevice) StateTypeName() string { return "pkg/sentry/fs/dev.zeroDevice" } -func (x *zeroDevice) StateFields() []string { +func (z *zeroDevice) StateFields() []string { return []string{ "nullDevice", } } -func (x *zeroDevice) beforeSave() {} +func (z *zeroDevice) beforeSave() {} -func (x *zeroDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nullDevice) +func (z *zeroDevice) StateSave(stateSinkObject state.Sink) { + z.beforeSave() + stateSinkObject.Save(0, &z.nullDevice) } -func (x *zeroDevice) afterLoad() {} +func (z *zeroDevice) afterLoad() {} -func (x *zeroDevice) StateLoad(m state.Source) { - m.Load(0, &x.nullDevice) +func (z *zeroDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &z.nullDevice) } -func (x *zeroFileOperations) StateTypeName() string { +func (z *zeroFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.zeroFileOperations" } -func (x *zeroFileOperations) StateFields() []string { +func (z *zeroFileOperations) StateFields() []string { return []string{} } -func (x *zeroFileOperations) beforeSave() {} +func (z *zeroFileOperations) beforeSave() {} -func (x *zeroFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (z *zeroFileOperations) StateSave(stateSinkObject state.Sink) { + z.beforeSave() } -func (x *zeroFileOperations) afterLoad() {} +func (z *zeroFileOperations) afterLoad() {} -func (x *zeroFileOperations) StateLoad(m state.Source) { +func (z *zeroFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *randomDevice) StateTypeName() string { +func (r *randomDevice) StateTypeName() string { return "pkg/sentry/fs/dev.randomDevice" } -func (x *randomDevice) StateFields() []string { +func (r *randomDevice) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *randomDevice) beforeSave() {} +func (r *randomDevice) beforeSave() {} -func (x *randomDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (r *randomDevice) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.InodeSimpleAttributes) } -func (x *randomDevice) afterLoad() {} +func (r *randomDevice) afterLoad() {} -func (x *randomDevice) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (r *randomDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.InodeSimpleAttributes) } -func (x *randomFileOperations) StateTypeName() string { +func (r *randomFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.randomFileOperations" } -func (x *randomFileOperations) StateFields() []string { +func (r *randomFileOperations) StateFields() []string { return []string{} } -func (x *randomFileOperations) beforeSave() {} +func (r *randomFileOperations) beforeSave() {} -func (x *randomFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (r *randomFileOperations) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *randomFileOperations) afterLoad() {} +func (r *randomFileOperations) afterLoad() {} -func (x *randomFileOperations) StateLoad(m state.Source) { +func (r *randomFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *ttyInodeOperations) StateTypeName() string { +func (t *ttyInodeOperations) StateTypeName() string { return "pkg/sentry/fs/dev.ttyInodeOperations" } -func (x *ttyInodeOperations) StateFields() []string { +func (t *ttyInodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *ttyInodeOperations) beforeSave() {} +func (t *ttyInodeOperations) beforeSave() {} -func (x *ttyInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (t *ttyInodeOperations) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.InodeSimpleAttributes) } -func (x *ttyInodeOperations) afterLoad() {} +func (t *ttyInodeOperations) afterLoad() {} -func (x *ttyInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (t *ttyInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.InodeSimpleAttributes) } -func (x *ttyFileOperations) StateTypeName() string { +func (t *ttyFileOperations) StateTypeName() string { return "pkg/sentry/fs/dev.ttyFileOperations" } -func (x *ttyFileOperations) StateFields() []string { +func (t *ttyFileOperations) StateFields() []string { return []string{} } -func (x *ttyFileOperations) beforeSave() {} +func (t *ttyFileOperations) beforeSave() {} -func (x *ttyFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (t *ttyFileOperations) StateSave(stateSinkObject state.Sink) { + t.beforeSave() } -func (x *ttyFileOperations) afterLoad() {} +func (t *ttyFileOperations) afterLoad() {} -func (x *ttyFileOperations) StateLoad(m state.Source) { +func (t *ttyFileOperations) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go b/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go index 359d52e92..f946f2ba5 100644 --- a/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go +++ b/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go @@ -7,11 +7,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *pipeOperations) StateTypeName() string { +func (p *pipeOperations) StateTypeName() string { return "pkg/sentry/fs/fdpipe.pipeOperations" } -func (x *pipeOperations) StateFields() []string { +func (p *pipeOperations) StateFields() []string { return []string{ "flags", "opener", @@ -19,19 +19,19 @@ func (x *pipeOperations) StateFields() []string { } } -func (x *pipeOperations) StateSave(m state.Sink) { - x.beforeSave() - var flags fs.FileFlags = x.saveFlags() - m.SaveValue(0, flags) - m.Save(1, &x.opener) - m.Save(2, &x.readAheadBuffer) +func (p *pipeOperations) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + var flagsValue fs.FileFlags = p.saveFlags() + stateSinkObject.SaveValue(0, flagsValue) + stateSinkObject.Save(1, &p.opener) + stateSinkObject.Save(2, &p.readAheadBuffer) } -func (x *pipeOperations) StateLoad(m state.Source) { - m.LoadWait(1, &x.opener) - m.Load(2, &x.readAheadBuffer) - m.LoadValue(0, new(fs.FileFlags), func(y interface{}) { x.loadFlags(y.(fs.FileFlags)) }) - m.AfterLoad(x.afterLoad) +func (p *pipeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(1, &p.opener) + stateSourceObject.Load(2, &p.readAheadBuffer) + stateSourceObject.LoadValue(0, new(fs.FileFlags), func(y interface{}) { p.loadFlags(y.(fs.FileFlags)) }) + stateSourceObject.AfterLoad(p.afterLoad) } func init() { diff --git a/pkg/sentry/fs/fs_state_autogen.go b/pkg/sentry/fs/fs_state_autogen.go index 78e30e0e4..95df2cad0 100644 --- a/pkg/sentry/fs/fs_state_autogen.go +++ b/pkg/sentry/fs/fs_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *StableAttr) StateTypeName() string { +func (s *StableAttr) StateTypeName() string { return "pkg/sentry/fs.StableAttr" } -func (x *StableAttr) StateFields() []string { +func (s *StableAttr) StateFields() []string { return []string{ "Type", "DeviceID", @@ -21,34 +21,34 @@ func (x *StableAttr) StateFields() []string { } } -func (x *StableAttr) beforeSave() {} +func (s *StableAttr) beforeSave() {} -func (x *StableAttr) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Type) - m.Save(1, &x.DeviceID) - m.Save(2, &x.InodeID) - m.Save(3, &x.BlockSize) - m.Save(4, &x.DeviceFileMajor) - m.Save(5, &x.DeviceFileMinor) +func (s *StableAttr) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Type) + stateSinkObject.Save(1, &s.DeviceID) + stateSinkObject.Save(2, &s.InodeID) + stateSinkObject.Save(3, &s.BlockSize) + stateSinkObject.Save(4, &s.DeviceFileMajor) + stateSinkObject.Save(5, &s.DeviceFileMinor) } -func (x *StableAttr) afterLoad() {} +func (s *StableAttr) afterLoad() {} -func (x *StableAttr) StateLoad(m state.Source) { - m.Load(0, &x.Type) - m.Load(1, &x.DeviceID) - m.Load(2, &x.InodeID) - m.Load(3, &x.BlockSize) - m.Load(4, &x.DeviceFileMajor) - m.Load(5, &x.DeviceFileMinor) +func (s *StableAttr) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Type) + stateSourceObject.Load(1, &s.DeviceID) + stateSourceObject.Load(2, &s.InodeID) + stateSourceObject.Load(3, &s.BlockSize) + stateSourceObject.Load(4, &s.DeviceFileMajor) + stateSourceObject.Load(5, &s.DeviceFileMinor) } -func (x *UnstableAttr) StateTypeName() string { +func (u *UnstableAttr) StateTypeName() string { return "pkg/sentry/fs.UnstableAttr" } -func (x *UnstableAttr) StateFields() []string { +func (u *UnstableAttr) StateFields() []string { return []string{ "Size", "Usage", @@ -61,38 +61,38 @@ func (x *UnstableAttr) StateFields() []string { } } -func (x *UnstableAttr) beforeSave() {} +func (u *UnstableAttr) beforeSave() {} -func (x *UnstableAttr) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Size) - m.Save(1, &x.Usage) - m.Save(2, &x.Perms) - m.Save(3, &x.Owner) - m.Save(4, &x.AccessTime) - m.Save(5, &x.ModificationTime) - m.Save(6, &x.StatusChangeTime) - m.Save(7, &x.Links) +func (u *UnstableAttr) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.Size) + stateSinkObject.Save(1, &u.Usage) + stateSinkObject.Save(2, &u.Perms) + stateSinkObject.Save(3, &u.Owner) + stateSinkObject.Save(4, &u.AccessTime) + stateSinkObject.Save(5, &u.ModificationTime) + stateSinkObject.Save(6, &u.StatusChangeTime) + stateSinkObject.Save(7, &u.Links) } -func (x *UnstableAttr) afterLoad() {} +func (u *UnstableAttr) afterLoad() {} -func (x *UnstableAttr) StateLoad(m state.Source) { - m.Load(0, &x.Size) - m.Load(1, &x.Usage) - m.Load(2, &x.Perms) - m.Load(3, &x.Owner) - m.Load(4, &x.AccessTime) - m.Load(5, &x.ModificationTime) - m.Load(6, &x.StatusChangeTime) - m.Load(7, &x.Links) +func (u *UnstableAttr) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.Size) + stateSourceObject.Load(1, &u.Usage) + stateSourceObject.Load(2, &u.Perms) + stateSourceObject.Load(3, &u.Owner) + stateSourceObject.Load(4, &u.AccessTime) + stateSourceObject.Load(5, &u.ModificationTime) + stateSourceObject.Load(6, &u.StatusChangeTime) + stateSourceObject.Load(7, &u.Links) } -func (x *AttrMask) StateTypeName() string { +func (a *AttrMask) StateTypeName() string { return "pkg/sentry/fs.AttrMask" } -func (x *AttrMask) StateFields() []string { +func (a *AttrMask) StateFields() []string { return []string{ "Type", "DeviceID", @@ -110,48 +110,48 @@ func (x *AttrMask) StateFields() []string { } } -func (x *AttrMask) beforeSave() {} - -func (x *AttrMask) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Type) - m.Save(1, &x.DeviceID) - m.Save(2, &x.InodeID) - m.Save(3, &x.BlockSize) - m.Save(4, &x.Size) - m.Save(5, &x.Usage) - m.Save(6, &x.Perms) - m.Save(7, &x.UID) - m.Save(8, &x.GID) - m.Save(9, &x.AccessTime) - m.Save(10, &x.ModificationTime) - m.Save(11, &x.StatusChangeTime) - m.Save(12, &x.Links) -} - -func (x *AttrMask) afterLoad() {} - -func (x *AttrMask) StateLoad(m state.Source) { - m.Load(0, &x.Type) - m.Load(1, &x.DeviceID) - m.Load(2, &x.InodeID) - m.Load(3, &x.BlockSize) - m.Load(4, &x.Size) - m.Load(5, &x.Usage) - m.Load(6, &x.Perms) - m.Load(7, &x.UID) - m.Load(8, &x.GID) - m.Load(9, &x.AccessTime) - m.Load(10, &x.ModificationTime) - m.Load(11, &x.StatusChangeTime) - m.Load(12, &x.Links) -} - -func (x *PermMask) StateTypeName() string { +func (a *AttrMask) beforeSave() {} + +func (a *AttrMask) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.Type) + stateSinkObject.Save(1, &a.DeviceID) + stateSinkObject.Save(2, &a.InodeID) + stateSinkObject.Save(3, &a.BlockSize) + stateSinkObject.Save(4, &a.Size) + stateSinkObject.Save(5, &a.Usage) + stateSinkObject.Save(6, &a.Perms) + stateSinkObject.Save(7, &a.UID) + stateSinkObject.Save(8, &a.GID) + stateSinkObject.Save(9, &a.AccessTime) + stateSinkObject.Save(10, &a.ModificationTime) + stateSinkObject.Save(11, &a.StatusChangeTime) + stateSinkObject.Save(12, &a.Links) +} + +func (a *AttrMask) afterLoad() {} + +func (a *AttrMask) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.Type) + stateSourceObject.Load(1, &a.DeviceID) + stateSourceObject.Load(2, &a.InodeID) + stateSourceObject.Load(3, &a.BlockSize) + stateSourceObject.Load(4, &a.Size) + stateSourceObject.Load(5, &a.Usage) + stateSourceObject.Load(6, &a.Perms) + stateSourceObject.Load(7, &a.UID) + stateSourceObject.Load(8, &a.GID) + stateSourceObject.Load(9, &a.AccessTime) + stateSourceObject.Load(10, &a.ModificationTime) + stateSourceObject.Load(11, &a.StatusChangeTime) + stateSourceObject.Load(12, &a.Links) +} + +func (p *PermMask) StateTypeName() string { return "pkg/sentry/fs.PermMask" } -func (x *PermMask) StateFields() []string { +func (p *PermMask) StateFields() []string { return []string{ "Read", "Write", @@ -159,28 +159,28 @@ func (x *PermMask) StateFields() []string { } } -func (x *PermMask) beforeSave() {} +func (p *PermMask) beforeSave() {} -func (x *PermMask) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Read) - m.Save(1, &x.Write) - m.Save(2, &x.Execute) +func (p *PermMask) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.Read) + stateSinkObject.Save(1, &p.Write) + stateSinkObject.Save(2, &p.Execute) } -func (x *PermMask) afterLoad() {} +func (p *PermMask) afterLoad() {} -func (x *PermMask) StateLoad(m state.Source) { - m.Load(0, &x.Read) - m.Load(1, &x.Write) - m.Load(2, &x.Execute) +func (p *PermMask) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.Read) + stateSourceObject.Load(1, &p.Write) + stateSourceObject.Load(2, &p.Execute) } -func (x *FilePermissions) StateTypeName() string { +func (f *FilePermissions) StateTypeName() string { return "pkg/sentry/fs.FilePermissions" } -func (x *FilePermissions) StateFields() []string { +func (f *FilePermissions) StateFields() []string { return []string{ "User", "Group", @@ -191,112 +191,112 @@ func (x *FilePermissions) StateFields() []string { } } -func (x *FilePermissions) beforeSave() {} +func (f *FilePermissions) beforeSave() {} -func (x *FilePermissions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.User) - m.Save(1, &x.Group) - m.Save(2, &x.Other) - m.Save(3, &x.Sticky) - m.Save(4, &x.SetUID) - m.Save(5, &x.SetGID) +func (f *FilePermissions) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.User) + stateSinkObject.Save(1, &f.Group) + stateSinkObject.Save(2, &f.Other) + stateSinkObject.Save(3, &f.Sticky) + stateSinkObject.Save(4, &f.SetUID) + stateSinkObject.Save(5, &f.SetGID) } -func (x *FilePermissions) afterLoad() {} +func (f *FilePermissions) afterLoad() {} -func (x *FilePermissions) StateLoad(m state.Source) { - m.Load(0, &x.User) - m.Load(1, &x.Group) - m.Load(2, &x.Other) - m.Load(3, &x.Sticky) - m.Load(4, &x.SetUID) - m.Load(5, &x.SetGID) +func (f *FilePermissions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.User) + stateSourceObject.Load(1, &f.Group) + stateSourceObject.Load(2, &f.Other) + stateSourceObject.Load(3, &f.Sticky) + stateSourceObject.Load(4, &f.SetUID) + stateSourceObject.Load(5, &f.SetGID) } -func (x *FileOwner) StateTypeName() string { +func (f *FileOwner) StateTypeName() string { return "pkg/sentry/fs.FileOwner" } -func (x *FileOwner) StateFields() []string { +func (f *FileOwner) StateFields() []string { return []string{ "UID", "GID", } } -func (x *FileOwner) beforeSave() {} +func (f *FileOwner) beforeSave() {} -func (x *FileOwner) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.UID) - m.Save(1, &x.GID) +func (f *FileOwner) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.UID) + stateSinkObject.Save(1, &f.GID) } -func (x *FileOwner) afterLoad() {} +func (f *FileOwner) afterLoad() {} -func (x *FileOwner) StateLoad(m state.Source) { - m.Load(0, &x.UID) - m.Load(1, &x.GID) +func (f *FileOwner) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.UID) + stateSourceObject.Load(1, &f.GID) } -func (x *DentAttr) StateTypeName() string { +func (d *DentAttr) StateTypeName() string { return "pkg/sentry/fs.DentAttr" } -func (x *DentAttr) StateFields() []string { +func (d *DentAttr) StateFields() []string { return []string{ "Type", "InodeID", } } -func (x *DentAttr) beforeSave() {} +func (d *DentAttr) beforeSave() {} -func (x *DentAttr) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Type) - m.Save(1, &x.InodeID) +func (d *DentAttr) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.Type) + stateSinkObject.Save(1, &d.InodeID) } -func (x *DentAttr) afterLoad() {} +func (d *DentAttr) afterLoad() {} -func (x *DentAttr) StateLoad(m state.Source) { - m.Load(0, &x.Type) - m.Load(1, &x.InodeID) +func (d *DentAttr) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.Type) + stateSourceObject.Load(1, &d.InodeID) } -func (x *SortedDentryMap) StateTypeName() string { +func (s *SortedDentryMap) StateTypeName() string { return "pkg/sentry/fs.SortedDentryMap" } -func (x *SortedDentryMap) StateFields() []string { +func (s *SortedDentryMap) StateFields() []string { return []string{ "names", "entries", } } -func (x *SortedDentryMap) beforeSave() {} +func (s *SortedDentryMap) beforeSave() {} -func (x *SortedDentryMap) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.names) - m.Save(1, &x.entries) +func (s *SortedDentryMap) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.names) + stateSinkObject.Save(1, &s.entries) } -func (x *SortedDentryMap) afterLoad() {} +func (s *SortedDentryMap) afterLoad() {} -func (x *SortedDentryMap) StateLoad(m state.Source) { - m.Load(0, &x.names) - m.Load(1, &x.entries) +func (s *SortedDentryMap) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.names) + stateSourceObject.Load(1, &s.entries) } -func (x *Dirent) StateTypeName() string { +func (d *Dirent) StateTypeName() string { return "pkg/sentry/fs.Dirent" } -func (x *Dirent) StateFields() []string { +func (d *Dirent) StateFields() []string { return []string{ "AtomicRefCount", "userVisible", @@ -309,198 +309,198 @@ func (x *Dirent) StateFields() []string { } } -func (x *Dirent) StateSave(m state.Sink) { - x.beforeSave() - var children map[string]*Dirent = x.saveChildren() - m.SaveValue(7, children) - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.userVisible) - m.Save(2, &x.Inode) - m.Save(3, &x.name) - m.Save(4, &x.parent) - m.Save(5, &x.deleted) - m.Save(6, &x.mounted) -} - -func (x *Dirent) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.userVisible) - m.Load(2, &x.Inode) - m.Load(3, &x.name) - m.Load(4, &x.parent) - m.Load(5, &x.deleted) - m.Load(6, &x.mounted) - m.LoadValue(7, new(map[string]*Dirent), func(y interface{}) { x.loadChildren(y.(map[string]*Dirent)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *DirentCache) StateTypeName() string { +func (d *Dirent) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + var childrenValue map[string]*Dirent = d.saveChildren() + stateSinkObject.SaveValue(7, childrenValue) + stateSinkObject.Save(0, &d.AtomicRefCount) + stateSinkObject.Save(1, &d.userVisible) + stateSinkObject.Save(2, &d.Inode) + stateSinkObject.Save(3, &d.name) + stateSinkObject.Save(4, &d.parent) + stateSinkObject.Save(5, &d.deleted) + stateSinkObject.Save(6, &d.mounted) +} + +func (d *Dirent) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.AtomicRefCount) + stateSourceObject.Load(1, &d.userVisible) + stateSourceObject.Load(2, &d.Inode) + stateSourceObject.Load(3, &d.name) + stateSourceObject.Load(4, &d.parent) + stateSourceObject.Load(5, &d.deleted) + stateSourceObject.Load(6, &d.mounted) + stateSourceObject.LoadValue(7, new(map[string]*Dirent), func(y interface{}) { d.loadChildren(y.(map[string]*Dirent)) }) + stateSourceObject.AfterLoad(d.afterLoad) +} + +func (d *DirentCache) StateTypeName() string { return "pkg/sentry/fs.DirentCache" } -func (x *DirentCache) StateFields() []string { +func (d *DirentCache) StateFields() []string { return []string{ "maxSize", "limit", } } -func (x *DirentCache) beforeSave() {} +func (d *DirentCache) beforeSave() {} -func (x *DirentCache) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.currentSize) { - state.Failf("currentSize is %#v, expected zero", &x.currentSize) +func (d *DirentCache) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + if !state.IsZeroValue(&d.currentSize) { + state.Failf("currentSize is %#v, expected zero", &d.currentSize) } - if !state.IsZeroValue(&x.list) { - state.Failf("list is %#v, expected zero", &x.list) + if !state.IsZeroValue(&d.list) { + state.Failf("list is %#v, expected zero", &d.list) } - m.Save(0, &x.maxSize) - m.Save(1, &x.limit) + stateSinkObject.Save(0, &d.maxSize) + stateSinkObject.Save(1, &d.limit) } -func (x *DirentCache) afterLoad() {} +func (d *DirentCache) afterLoad() {} -func (x *DirentCache) StateLoad(m state.Source) { - m.Load(0, &x.maxSize) - m.Load(1, &x.limit) +func (d *DirentCache) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.maxSize) + stateSourceObject.Load(1, &d.limit) } -func (x *DirentCacheLimiter) StateTypeName() string { +func (d *DirentCacheLimiter) StateTypeName() string { return "pkg/sentry/fs.DirentCacheLimiter" } -func (x *DirentCacheLimiter) StateFields() []string { +func (d *DirentCacheLimiter) StateFields() []string { return []string{ "max", } } -func (x *DirentCacheLimiter) beforeSave() {} +func (d *DirentCacheLimiter) beforeSave() {} -func (x *DirentCacheLimiter) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.count) { - state.Failf("count is %#v, expected zero", &x.count) +func (d *DirentCacheLimiter) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + if !state.IsZeroValue(&d.count) { + state.Failf("count is %#v, expected zero", &d.count) } - m.Save(0, &x.max) + stateSinkObject.Save(0, &d.max) } -func (x *DirentCacheLimiter) afterLoad() {} +func (d *DirentCacheLimiter) afterLoad() {} -func (x *DirentCacheLimiter) StateLoad(m state.Source) { - m.Load(0, &x.max) +func (d *DirentCacheLimiter) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.max) } -func (x *direntList) StateTypeName() string { +func (d *direntList) StateTypeName() string { return "pkg/sentry/fs.direntList" } -func (x *direntList) StateFields() []string { +func (d *direntList) StateFields() []string { return []string{ "head", "tail", } } -func (x *direntList) beforeSave() {} +func (d *direntList) beforeSave() {} -func (x *direntList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (d *direntList) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.head) + stateSinkObject.Save(1, &d.tail) } -func (x *direntList) afterLoad() {} +func (d *direntList) afterLoad() {} -func (x *direntList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (d *direntList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.head) + stateSourceObject.Load(1, &d.tail) } -func (x *direntEntry) StateTypeName() string { +func (d *direntEntry) StateTypeName() string { return "pkg/sentry/fs.direntEntry" } -func (x *direntEntry) StateFields() []string { +func (d *direntEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *direntEntry) beforeSave() {} +func (d *direntEntry) beforeSave() {} -func (x *direntEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (d *direntEntry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.next) + stateSinkObject.Save(1, &d.prev) } -func (x *direntEntry) afterLoad() {} +func (d *direntEntry) afterLoad() {} -func (x *direntEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (d *direntEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.next) + stateSourceObject.Load(1, &d.prev) } -func (x *eventList) StateTypeName() string { +func (e *eventList) StateTypeName() string { return "pkg/sentry/fs.eventList" } -func (x *eventList) StateFields() []string { +func (e *eventList) StateFields() []string { return []string{ "head", "tail", } } -func (x *eventList) beforeSave() {} +func (e *eventList) beforeSave() {} -func (x *eventList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (e *eventList) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.head) + stateSinkObject.Save(1, &e.tail) } -func (x *eventList) afterLoad() {} +func (e *eventList) afterLoad() {} -func (x *eventList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (e *eventList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.head) + stateSourceObject.Load(1, &e.tail) } -func (x *eventEntry) StateTypeName() string { +func (e *eventEntry) StateTypeName() string { return "pkg/sentry/fs.eventEntry" } -func (x *eventEntry) StateFields() []string { +func (e *eventEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *eventEntry) beforeSave() {} +func (e *eventEntry) beforeSave() {} -func (x *eventEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (e *eventEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (x *eventEntry) afterLoad() {} +func (e *eventEntry) afterLoad() {} -func (x *eventEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (e *eventEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } -func (x *File) StateTypeName() string { +func (f *File) StateTypeName() string { return "pkg/sentry/fs.File" } -func (x *File) StateFields() []string { +func (f *File) StateFields() []string { return []string{ "AtomicRefCount", "UniqueID", @@ -512,33 +512,33 @@ func (x *File) StateFields() []string { } } -func (x *File) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.UniqueID) - m.Save(2, &x.Dirent) - m.Save(3, &x.flags) - m.Save(4, &x.async) - m.Save(5, &x.FileOperations) - m.Save(6, &x.offset) +func (f *File) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.AtomicRefCount) + stateSinkObject.Save(1, &f.UniqueID) + stateSinkObject.Save(2, &f.Dirent) + stateSinkObject.Save(3, &f.flags) + stateSinkObject.Save(4, &f.async) + stateSinkObject.Save(5, &f.FileOperations) + stateSinkObject.Save(6, &f.offset) } -func (x *File) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.UniqueID) - m.Load(2, &x.Dirent) - m.Load(3, &x.flags) - m.Load(4, &x.async) - m.LoadWait(5, &x.FileOperations) - m.Load(6, &x.offset) - m.AfterLoad(x.afterLoad) +func (f *File) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.AtomicRefCount) + stateSourceObject.Load(1, &f.UniqueID) + stateSourceObject.Load(2, &f.Dirent) + stateSourceObject.Load(3, &f.flags) + stateSourceObject.Load(4, &f.async) + stateSourceObject.LoadWait(5, &f.FileOperations) + stateSourceObject.Load(6, &f.offset) + stateSourceObject.AfterLoad(f.afterLoad) } -func (x *overlayFileOperations) StateTypeName() string { +func (o *overlayFileOperations) StateTypeName() string { return "pkg/sentry/fs.overlayFileOperations" } -func (x *overlayFileOperations) StateFields() []string { +func (o *overlayFileOperations) StateFields() []string { return []string{ "upper", "lower", @@ -546,28 +546,28 @@ func (x *overlayFileOperations) StateFields() []string { } } -func (x *overlayFileOperations) beforeSave() {} +func (o *overlayFileOperations) beforeSave() {} -func (x *overlayFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.upper) - m.Save(1, &x.lower) - m.Save(2, &x.dirCursor) +func (o *overlayFileOperations) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.upper) + stateSinkObject.Save(1, &o.lower) + stateSinkObject.Save(2, &o.dirCursor) } -func (x *overlayFileOperations) afterLoad() {} +func (o *overlayFileOperations) afterLoad() {} -func (x *overlayFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.upper) - m.Load(1, &x.lower) - m.Load(2, &x.dirCursor) +func (o *overlayFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.upper) + stateSourceObject.Load(1, &o.lower) + stateSourceObject.Load(2, &o.dirCursor) } -func (x *overlayMappingIdentity) StateTypeName() string { +func (o *overlayMappingIdentity) StateTypeName() string { return "pkg/sentry/fs.overlayMappingIdentity" } -func (x *overlayMappingIdentity) StateFields() []string { +func (o *overlayMappingIdentity) StateFields() []string { return []string{ "AtomicRefCount", "id", @@ -575,28 +575,28 @@ func (x *overlayMappingIdentity) StateFields() []string { } } -func (x *overlayMappingIdentity) beforeSave() {} +func (o *overlayMappingIdentity) beforeSave() {} -func (x *overlayMappingIdentity) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.id) - m.Save(2, &x.overlayFile) +func (o *overlayMappingIdentity) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.AtomicRefCount) + stateSinkObject.Save(1, &o.id) + stateSinkObject.Save(2, &o.overlayFile) } -func (x *overlayMappingIdentity) afterLoad() {} +func (o *overlayMappingIdentity) afterLoad() {} -func (x *overlayMappingIdentity) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.id) - m.Load(2, &x.overlayFile) +func (o *overlayMappingIdentity) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.AtomicRefCount) + stateSourceObject.Load(1, &o.id) + stateSourceObject.Load(2, &o.overlayFile) } -func (x *MountSourceFlags) StateTypeName() string { +func (m *MountSourceFlags) StateTypeName() string { return "pkg/sentry/fs.MountSourceFlags" } -func (x *MountSourceFlags) StateFields() []string { +func (m *MountSourceFlags) StateFields() []string { return []string{ "ReadOnly", "NoAtime", @@ -605,30 +605,30 @@ func (x *MountSourceFlags) StateFields() []string { } } -func (x *MountSourceFlags) beforeSave() {} +func (m *MountSourceFlags) beforeSave() {} -func (x *MountSourceFlags) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ReadOnly) - m.Save(1, &x.NoAtime) - m.Save(2, &x.ForcePageCache) - m.Save(3, &x.NoExec) +func (m *MountSourceFlags) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.ReadOnly) + stateSinkObject.Save(1, &m.NoAtime) + stateSinkObject.Save(2, &m.ForcePageCache) + stateSinkObject.Save(3, &m.NoExec) } -func (x *MountSourceFlags) afterLoad() {} +func (m *MountSourceFlags) afterLoad() {} -func (x *MountSourceFlags) StateLoad(m state.Source) { - m.Load(0, &x.ReadOnly) - m.Load(1, &x.NoAtime) - m.Load(2, &x.ForcePageCache) - m.Load(3, &x.NoExec) +func (m *MountSourceFlags) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.ReadOnly) + stateSourceObject.Load(1, &m.NoAtime) + stateSourceObject.Load(2, &m.ForcePageCache) + stateSourceObject.Load(3, &m.NoExec) } -func (x *FileFlags) StateTypeName() string { +func (f *FileFlags) StateTypeName() string { return "pkg/sentry/fs.FileFlags" } -func (x *FileFlags) StateFields() []string { +func (f *FileFlags) StateFields() []string { return []string{ "Direct", "NonBlocking", @@ -647,50 +647,50 @@ func (x *FileFlags) StateFields() []string { } } -func (x *FileFlags) beforeSave() {} - -func (x *FileFlags) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Direct) - m.Save(1, &x.NonBlocking) - m.Save(2, &x.DSync) - m.Save(3, &x.Sync) - m.Save(4, &x.Append) - m.Save(5, &x.Read) - m.Save(6, &x.Write) - m.Save(7, &x.Pread) - m.Save(8, &x.Pwrite) - m.Save(9, &x.Directory) - m.Save(10, &x.Async) - m.Save(11, &x.LargeFile) - m.Save(12, &x.NonSeekable) - m.Save(13, &x.Truncate) -} - -func (x *FileFlags) afterLoad() {} - -func (x *FileFlags) StateLoad(m state.Source) { - m.Load(0, &x.Direct) - m.Load(1, &x.NonBlocking) - m.Load(2, &x.DSync) - m.Load(3, &x.Sync) - m.Load(4, &x.Append) - m.Load(5, &x.Read) - m.Load(6, &x.Write) - m.Load(7, &x.Pread) - m.Load(8, &x.Pwrite) - m.Load(9, &x.Directory) - m.Load(10, &x.Async) - m.Load(11, &x.LargeFile) - m.Load(12, &x.NonSeekable) - m.Load(13, &x.Truncate) -} - -func (x *Inode) StateTypeName() string { +func (f *FileFlags) beforeSave() {} + +func (f *FileFlags) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Direct) + stateSinkObject.Save(1, &f.NonBlocking) + stateSinkObject.Save(2, &f.DSync) + stateSinkObject.Save(3, &f.Sync) + stateSinkObject.Save(4, &f.Append) + stateSinkObject.Save(5, &f.Read) + stateSinkObject.Save(6, &f.Write) + stateSinkObject.Save(7, &f.Pread) + stateSinkObject.Save(8, &f.Pwrite) + stateSinkObject.Save(9, &f.Directory) + stateSinkObject.Save(10, &f.Async) + stateSinkObject.Save(11, &f.LargeFile) + stateSinkObject.Save(12, &f.NonSeekable) + stateSinkObject.Save(13, &f.Truncate) +} + +func (f *FileFlags) afterLoad() {} + +func (f *FileFlags) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Direct) + stateSourceObject.Load(1, &f.NonBlocking) + stateSourceObject.Load(2, &f.DSync) + stateSourceObject.Load(3, &f.Sync) + stateSourceObject.Load(4, &f.Append) + stateSourceObject.Load(5, &f.Read) + stateSourceObject.Load(6, &f.Write) + stateSourceObject.Load(7, &f.Pread) + stateSourceObject.Load(8, &f.Pwrite) + stateSourceObject.Load(9, &f.Directory) + stateSourceObject.Load(10, &f.Async) + stateSourceObject.Load(11, &f.LargeFile) + stateSourceObject.Load(12, &f.NonSeekable) + stateSourceObject.Load(13, &f.Truncate) +} + +func (i *Inode) StateTypeName() string { return "pkg/sentry/fs.Inode" } -func (x *Inode) StateFields() []string { +func (i *Inode) StateFields() []string { return []string{ "AtomicRefCount", "InodeOperations", @@ -702,88 +702,88 @@ func (x *Inode) StateFields() []string { } } -func (x *Inode) beforeSave() {} +func (i *Inode) beforeSave() {} -func (x *Inode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.InodeOperations) - m.Save(2, &x.StableAttr) - m.Save(3, &x.LockCtx) - m.Save(4, &x.Watches) - m.Save(5, &x.MountSource) - m.Save(6, &x.overlay) +func (i *Inode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.AtomicRefCount) + stateSinkObject.Save(1, &i.InodeOperations) + stateSinkObject.Save(2, &i.StableAttr) + stateSinkObject.Save(3, &i.LockCtx) + stateSinkObject.Save(4, &i.Watches) + stateSinkObject.Save(5, &i.MountSource) + stateSinkObject.Save(6, &i.overlay) } -func (x *Inode) afterLoad() {} +func (i *Inode) afterLoad() {} -func (x *Inode) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.InodeOperations) - m.Load(2, &x.StableAttr) - m.Load(3, &x.LockCtx) - m.Load(4, &x.Watches) - m.Load(5, &x.MountSource) - m.Load(6, &x.overlay) +func (i *Inode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.AtomicRefCount) + stateSourceObject.Load(1, &i.InodeOperations) + stateSourceObject.Load(2, &i.StableAttr) + stateSourceObject.Load(3, &i.LockCtx) + stateSourceObject.Load(4, &i.Watches) + stateSourceObject.Load(5, &i.MountSource) + stateSourceObject.Load(6, &i.overlay) } -func (x *LockCtx) StateTypeName() string { +func (l *LockCtx) StateTypeName() string { return "pkg/sentry/fs.LockCtx" } -func (x *LockCtx) StateFields() []string { +func (l *LockCtx) StateFields() []string { return []string{ "Posix", "BSD", } } -func (x *LockCtx) beforeSave() {} +func (l *LockCtx) beforeSave() {} -func (x *LockCtx) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Posix) - m.Save(1, &x.BSD) +func (l *LockCtx) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Posix) + stateSinkObject.Save(1, &l.BSD) } -func (x *LockCtx) afterLoad() {} +func (l *LockCtx) afterLoad() {} -func (x *LockCtx) StateLoad(m state.Source) { - m.Load(0, &x.Posix) - m.Load(1, &x.BSD) +func (l *LockCtx) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Posix) + stateSourceObject.Load(1, &l.BSD) } -func (x *Watches) StateTypeName() string { +func (w *Watches) StateTypeName() string { return "pkg/sentry/fs.Watches" } -func (x *Watches) StateFields() []string { +func (w *Watches) StateFields() []string { return []string{ "ws", "unlinked", } } -func (x *Watches) beforeSave() {} +func (w *Watches) beforeSave() {} -func (x *Watches) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ws) - m.Save(1, &x.unlinked) +func (w *Watches) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.ws) + stateSinkObject.Save(1, &w.unlinked) } -func (x *Watches) afterLoad() {} +func (w *Watches) afterLoad() {} -func (x *Watches) StateLoad(m state.Source) { - m.Load(0, &x.ws) - m.Load(1, &x.unlinked) +func (w *Watches) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.ws) + stateSourceObject.Load(1, &w.unlinked) } -func (x *Inotify) StateTypeName() string { +func (i *Inotify) StateTypeName() string { return "pkg/sentry/fs.Inotify" } -func (x *Inotify) StateFields() []string { +func (i *Inotify) StateFields() []string { return []string{ "id", "events", @@ -793,32 +793,32 @@ func (x *Inotify) StateFields() []string { } } -func (x *Inotify) beforeSave() {} +func (i *Inotify) beforeSave() {} -func (x *Inotify) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.id) - m.Save(1, &x.events) - m.Save(2, &x.scratch) - m.Save(3, &x.nextWatch) - m.Save(4, &x.watches) +func (i *Inotify) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.id) + stateSinkObject.Save(1, &i.events) + stateSinkObject.Save(2, &i.scratch) + stateSinkObject.Save(3, &i.nextWatch) + stateSinkObject.Save(4, &i.watches) } -func (x *Inotify) afterLoad() {} +func (i *Inotify) afterLoad() {} -func (x *Inotify) StateLoad(m state.Source) { - m.Load(0, &x.id) - m.Load(1, &x.events) - m.Load(2, &x.scratch) - m.Load(3, &x.nextWatch) - m.Load(4, &x.watches) +func (i *Inotify) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.id) + stateSourceObject.Load(1, &i.events) + stateSourceObject.Load(2, &i.scratch) + stateSourceObject.Load(3, &i.nextWatch) + stateSourceObject.Load(4, &i.watches) } -func (x *Event) StateTypeName() string { +func (e *Event) StateTypeName() string { return "pkg/sentry/fs.Event" } -func (x *Event) StateFields() []string { +func (e *Event) StateFields() []string { return []string{ "eventEntry", "wd", @@ -829,34 +829,34 @@ func (x *Event) StateFields() []string { } } -func (x *Event) beforeSave() {} +func (e *Event) beforeSave() {} -func (x *Event) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.eventEntry) - m.Save(1, &x.wd) - m.Save(2, &x.mask) - m.Save(3, &x.cookie) - m.Save(4, &x.len) - m.Save(5, &x.name) +func (e *Event) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.eventEntry) + stateSinkObject.Save(1, &e.wd) + stateSinkObject.Save(2, &e.mask) + stateSinkObject.Save(3, &e.cookie) + stateSinkObject.Save(4, &e.len) + stateSinkObject.Save(5, &e.name) } -func (x *Event) afterLoad() {} +func (e *Event) afterLoad() {} -func (x *Event) StateLoad(m state.Source) { - m.Load(0, &x.eventEntry) - m.Load(1, &x.wd) - m.Load(2, &x.mask) - m.Load(3, &x.cookie) - m.Load(4, &x.len) - m.Load(5, &x.name) +func (e *Event) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.eventEntry) + stateSourceObject.Load(1, &e.wd) + stateSourceObject.Load(2, &e.mask) + stateSourceObject.Load(3, &e.cookie) + stateSourceObject.Load(4, &e.len) + stateSourceObject.Load(5, &e.name) } -func (x *Watch) StateTypeName() string { +func (w *Watch) StateTypeName() string { return "pkg/sentry/fs.Watch" } -func (x *Watch) StateFields() []string { +func (w *Watch) StateFields() []string { return []string{ "owner", "wd", @@ -867,34 +867,34 @@ func (x *Watch) StateFields() []string { } } -func (x *Watch) beforeSave() {} +func (w *Watch) beforeSave() {} -func (x *Watch) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.owner) - m.Save(1, &x.wd) - m.Save(2, &x.target) - m.Save(3, &x.unpinned) - m.Save(4, &x.mask) - m.Save(5, &x.pins) +func (w *Watch) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.owner) + stateSinkObject.Save(1, &w.wd) + stateSinkObject.Save(2, &w.target) + stateSinkObject.Save(3, &w.unpinned) + stateSinkObject.Save(4, &w.mask) + stateSinkObject.Save(5, &w.pins) } -func (x *Watch) afterLoad() {} +func (w *Watch) afterLoad() {} -func (x *Watch) StateLoad(m state.Source) { - m.Load(0, &x.owner) - m.Load(1, &x.wd) - m.Load(2, &x.target) - m.Load(3, &x.unpinned) - m.Load(4, &x.mask) - m.Load(5, &x.pins) +func (w *Watch) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.owner) + stateSourceObject.Load(1, &w.wd) + stateSourceObject.Load(2, &w.target) + stateSourceObject.Load(3, &w.unpinned) + stateSourceObject.Load(4, &w.mask) + stateSourceObject.Load(5, &w.pins) } -func (x *MountSource) StateTypeName() string { +func (m *MountSource) StateTypeName() string { return "pkg/sentry/fs.MountSource" } -func (x *MountSource) StateFields() []string { +func (m *MountSource) StateFields() []string { return []string{ "AtomicRefCount", "MountSourceOperations", @@ -905,34 +905,34 @@ func (x *MountSource) StateFields() []string { } } -func (x *MountSource) beforeSave() {} +func (m *MountSource) beforeSave() {} -func (x *MountSource) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.MountSourceOperations) - m.Save(2, &x.FilesystemType) - m.Save(3, &x.Flags) - m.Save(4, &x.fscache) - m.Save(5, &x.direntRefs) +func (m *MountSource) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.AtomicRefCount) + stateSinkObject.Save(1, &m.MountSourceOperations) + stateSinkObject.Save(2, &m.FilesystemType) + stateSinkObject.Save(3, &m.Flags) + stateSinkObject.Save(4, &m.fscache) + stateSinkObject.Save(5, &m.direntRefs) } -func (x *MountSource) afterLoad() {} +func (m *MountSource) afterLoad() {} -func (x *MountSource) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.MountSourceOperations) - m.Load(2, &x.FilesystemType) - m.Load(3, &x.Flags) - m.Load(4, &x.fscache) - m.Load(5, &x.direntRefs) +func (m *MountSource) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.AtomicRefCount) + stateSourceObject.Load(1, &m.MountSourceOperations) + stateSourceObject.Load(2, &m.FilesystemType) + stateSourceObject.Load(3, &m.Flags) + stateSourceObject.Load(4, &m.fscache) + stateSourceObject.Load(5, &m.direntRefs) } -func (x *SimpleMountSourceOperations) StateTypeName() string { +func (s *SimpleMountSourceOperations) StateTypeName() string { return "pkg/sentry/fs.SimpleMountSourceOperations" } -func (x *SimpleMountSourceOperations) StateFields() []string { +func (s *SimpleMountSourceOperations) StateFields() []string { return []string{ "keep", "revalidate", @@ -940,73 +940,73 @@ func (x *SimpleMountSourceOperations) StateFields() []string { } } -func (x *SimpleMountSourceOperations) beforeSave() {} +func (s *SimpleMountSourceOperations) beforeSave() {} -func (x *SimpleMountSourceOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.keep) - m.Save(1, &x.revalidate) - m.Save(2, &x.cacheReaddir) +func (s *SimpleMountSourceOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.keep) + stateSinkObject.Save(1, &s.revalidate) + stateSinkObject.Save(2, &s.cacheReaddir) } -func (x *SimpleMountSourceOperations) afterLoad() {} +func (s *SimpleMountSourceOperations) afterLoad() {} -func (x *SimpleMountSourceOperations) StateLoad(m state.Source) { - m.Load(0, &x.keep) - m.Load(1, &x.revalidate) - m.Load(2, &x.cacheReaddir) +func (s *SimpleMountSourceOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.keep) + stateSourceObject.Load(1, &s.revalidate) + stateSourceObject.Load(2, &s.cacheReaddir) } -func (x *overlayMountSourceOperations) StateTypeName() string { +func (o *overlayMountSourceOperations) StateTypeName() string { return "pkg/sentry/fs.overlayMountSourceOperations" } -func (x *overlayMountSourceOperations) StateFields() []string { +func (o *overlayMountSourceOperations) StateFields() []string { return []string{ "upper", "lower", } } -func (x *overlayMountSourceOperations) beforeSave() {} +func (o *overlayMountSourceOperations) beforeSave() {} -func (x *overlayMountSourceOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.upper) - m.Save(1, &x.lower) +func (o *overlayMountSourceOperations) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.upper) + stateSinkObject.Save(1, &o.lower) } -func (x *overlayMountSourceOperations) afterLoad() {} +func (o *overlayMountSourceOperations) afterLoad() {} -func (x *overlayMountSourceOperations) StateLoad(m state.Source) { - m.Load(0, &x.upper) - m.Load(1, &x.lower) +func (o *overlayMountSourceOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.upper) + stateSourceObject.Load(1, &o.lower) } -func (x *overlayFilesystem) StateTypeName() string { +func (o *overlayFilesystem) StateTypeName() string { return "pkg/sentry/fs.overlayFilesystem" } -func (x *overlayFilesystem) StateFields() []string { +func (o *overlayFilesystem) StateFields() []string { return []string{} } -func (x *overlayFilesystem) beforeSave() {} +func (o *overlayFilesystem) beforeSave() {} -func (x *overlayFilesystem) StateSave(m state.Sink) { - x.beforeSave() +func (o *overlayFilesystem) StateSave(stateSinkObject state.Sink) { + o.beforeSave() } -func (x *overlayFilesystem) afterLoad() {} +func (o *overlayFilesystem) afterLoad() {} -func (x *overlayFilesystem) StateLoad(m state.Source) { +func (o *overlayFilesystem) StateLoad(stateSourceObject state.Source) { } -func (x *Mount) StateTypeName() string { +func (m *Mount) StateTypeName() string { return "pkg/sentry/fs.Mount" } -func (x *Mount) StateFields() []string { +func (m *Mount) StateFields() []string { return []string{ "ID", "ParentID", @@ -1015,30 +1015,30 @@ func (x *Mount) StateFields() []string { } } -func (x *Mount) beforeSave() {} +func (m *Mount) beforeSave() {} -func (x *Mount) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ID) - m.Save(1, &x.ParentID) - m.Save(2, &x.root) - m.Save(3, &x.previous) +func (m *Mount) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.ID) + stateSinkObject.Save(1, &m.ParentID) + stateSinkObject.Save(2, &m.root) + stateSinkObject.Save(3, &m.previous) } -func (x *Mount) afterLoad() {} +func (m *Mount) afterLoad() {} -func (x *Mount) StateLoad(m state.Source) { - m.Load(0, &x.ID) - m.Load(1, &x.ParentID) - m.Load(2, &x.root) - m.Load(3, &x.previous) +func (m *Mount) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.ID) + stateSourceObject.Load(1, &m.ParentID) + stateSourceObject.Load(2, &m.root) + stateSourceObject.Load(3, &m.previous) } -func (x *MountNamespace) StateTypeName() string { +func (m *MountNamespace) StateTypeName() string { return "pkg/sentry/fs.MountNamespace" } -func (x *MountNamespace) StateFields() []string { +func (m *MountNamespace) StateFields() []string { return []string{ "AtomicRefCount", "userns", @@ -1048,32 +1048,32 @@ func (x *MountNamespace) StateFields() []string { } } -func (x *MountNamespace) beforeSave() {} +func (m *MountNamespace) beforeSave() {} -func (x *MountNamespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.userns) - m.Save(2, &x.root) - m.Save(3, &x.mounts) - m.Save(4, &x.mountID) +func (m *MountNamespace) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.AtomicRefCount) + stateSinkObject.Save(1, &m.userns) + stateSinkObject.Save(2, &m.root) + stateSinkObject.Save(3, &m.mounts) + stateSinkObject.Save(4, &m.mountID) } -func (x *MountNamespace) afterLoad() {} +func (m *MountNamespace) afterLoad() {} -func (x *MountNamespace) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.userns) - m.Load(2, &x.root) - m.Load(3, &x.mounts) - m.Load(4, &x.mountID) +func (m *MountNamespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.AtomicRefCount) + stateSourceObject.Load(1, &m.userns) + stateSourceObject.Load(2, &m.root) + stateSourceObject.Load(3, &m.mounts) + stateSourceObject.Load(4, &m.mountID) } -func (x *overlayEntry) StateTypeName() string { +func (o *overlayEntry) StateTypeName() string { return "pkg/sentry/fs.overlayEntry" } -func (x *overlayEntry) StateFields() []string { +func (o *overlayEntry) StateFields() []string { return []string{ "lowerExists", "lower", @@ -1083,25 +1083,25 @@ func (x *overlayEntry) StateFields() []string { } } -func (x *overlayEntry) beforeSave() {} +func (o *overlayEntry) beforeSave() {} -func (x *overlayEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.lowerExists) - m.Save(1, &x.lower) - m.Save(2, &x.mappings) - m.Save(3, &x.upper) - m.Save(4, &x.dirCache) +func (o *overlayEntry) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.lowerExists) + stateSinkObject.Save(1, &o.lower) + stateSinkObject.Save(2, &o.mappings) + stateSinkObject.Save(3, &o.upper) + stateSinkObject.Save(4, &o.dirCache) } -func (x *overlayEntry) afterLoad() {} +func (o *overlayEntry) afterLoad() {} -func (x *overlayEntry) StateLoad(m state.Source) { - m.Load(0, &x.lowerExists) - m.Load(1, &x.lower) - m.Load(2, &x.mappings) - m.Load(3, &x.upper) - m.Load(4, &x.dirCache) +func (o *overlayEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.lowerExists) + stateSourceObject.Load(1, &o.lower) + stateSourceObject.Load(2, &o.mappings) + stateSourceObject.Load(3, &o.upper) + stateSourceObject.Load(4, &o.dirCache) } func init() { diff --git a/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go b/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go index b3270d11d..4d90bd42f 100644 --- a/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go +++ b/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go @@ -6,35 +6,35 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *DirtySet) StateTypeName() string { +func (d *DirtySet) StateTypeName() string { return "pkg/sentry/fs/fsutil.DirtySet" } -func (x *DirtySet) StateFields() []string { +func (d *DirtySet) StateFields() []string { return []string{ "root", } } -func (x *DirtySet) beforeSave() {} +func (d *DirtySet) beforeSave() {} -func (x *DirtySet) StateSave(m state.Sink) { - x.beforeSave() - var root *DirtySegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (d *DirtySet) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + var rootValue *DirtySegmentDataSlices = d.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *DirtySet) afterLoad() {} +func (d *DirtySet) afterLoad() {} -func (x *DirtySet) StateLoad(m state.Source) { - m.LoadValue(0, new(*DirtySegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*DirtySegmentDataSlices)) }) +func (d *DirtySet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*DirtySegmentDataSlices), func(y interface{}) { d.loadRoot(y.(*DirtySegmentDataSlices)) }) } -func (x *Dirtynode) StateTypeName() string { +func (d *Dirtynode) StateTypeName() string { return "pkg/sentry/fs/fsutil.Dirtynode" } -func (x *Dirtynode) StateFields() []string { +func (d *Dirtynode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -47,38 +47,38 @@ func (x *Dirtynode) StateFields() []string { } } -func (x *Dirtynode) beforeSave() {} +func (d *Dirtynode) beforeSave() {} -func (x *Dirtynode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (d *Dirtynode) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.nrSegments) + stateSinkObject.Save(1, &d.parent) + stateSinkObject.Save(2, &d.parentIndex) + stateSinkObject.Save(3, &d.hasChildren) + stateSinkObject.Save(4, &d.maxGap) + stateSinkObject.Save(5, &d.keys) + stateSinkObject.Save(6, &d.values) + stateSinkObject.Save(7, &d.children) } -func (x *Dirtynode) afterLoad() {} +func (d *Dirtynode) afterLoad() {} -func (x *Dirtynode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (d *Dirtynode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.nrSegments) + stateSourceObject.Load(1, &d.parent) + stateSourceObject.Load(2, &d.parentIndex) + stateSourceObject.Load(3, &d.hasChildren) + stateSourceObject.Load(4, &d.maxGap) + stateSourceObject.Load(5, &d.keys) + stateSourceObject.Load(6, &d.values) + stateSourceObject.Load(7, &d.children) } -func (x *DirtySegmentDataSlices) StateTypeName() string { +func (d *DirtySegmentDataSlices) StateTypeName() string { return "pkg/sentry/fs/fsutil.DirtySegmentDataSlices" } -func (x *DirtySegmentDataSlices) StateFields() []string { +func (d *DirtySegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -86,52 +86,52 @@ func (x *DirtySegmentDataSlices) StateFields() []string { } } -func (x *DirtySegmentDataSlices) beforeSave() {} +func (d *DirtySegmentDataSlices) beforeSave() {} -func (x *DirtySegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (d *DirtySegmentDataSlices) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.Start) + stateSinkObject.Save(1, &d.End) + stateSinkObject.Save(2, &d.Values) } -func (x *DirtySegmentDataSlices) afterLoad() {} +func (d *DirtySegmentDataSlices) afterLoad() {} -func (x *DirtySegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (d *DirtySegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.Start) + stateSourceObject.Load(1, &d.End) + stateSourceObject.Load(2, &d.Values) } -func (x *FileRangeSet) StateTypeName() string { +func (f *FileRangeSet) StateTypeName() string { return "pkg/sentry/fs/fsutil.FileRangeSet" } -func (x *FileRangeSet) StateFields() []string { +func (f *FileRangeSet) StateFields() []string { return []string{ "root", } } -func (x *FileRangeSet) beforeSave() {} +func (f *FileRangeSet) beforeSave() {} -func (x *FileRangeSet) StateSave(m state.Sink) { - x.beforeSave() - var root *FileRangeSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (f *FileRangeSet) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + var rootValue *FileRangeSegmentDataSlices = f.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *FileRangeSet) afterLoad() {} +func (f *FileRangeSet) afterLoad() {} -func (x *FileRangeSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*FileRangeSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*FileRangeSegmentDataSlices)) }) +func (f *FileRangeSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*FileRangeSegmentDataSlices), func(y interface{}) { f.loadRoot(y.(*FileRangeSegmentDataSlices)) }) } -func (x *FileRangenode) StateTypeName() string { +func (f *FileRangenode) StateTypeName() string { return "pkg/sentry/fs/fsutil.FileRangenode" } -func (x *FileRangenode) StateFields() []string { +func (f *FileRangenode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -144,38 +144,38 @@ func (x *FileRangenode) StateFields() []string { } } -func (x *FileRangenode) beforeSave() {} +func (f *FileRangenode) beforeSave() {} -func (x *FileRangenode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (f *FileRangenode) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.nrSegments) + stateSinkObject.Save(1, &f.parent) + stateSinkObject.Save(2, &f.parentIndex) + stateSinkObject.Save(3, &f.hasChildren) + stateSinkObject.Save(4, &f.maxGap) + stateSinkObject.Save(5, &f.keys) + stateSinkObject.Save(6, &f.values) + stateSinkObject.Save(7, &f.children) } -func (x *FileRangenode) afterLoad() {} +func (f *FileRangenode) afterLoad() {} -func (x *FileRangenode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (f *FileRangenode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.nrSegments) + stateSourceObject.Load(1, &f.parent) + stateSourceObject.Load(2, &f.parentIndex) + stateSourceObject.Load(3, &f.hasChildren) + stateSourceObject.Load(4, &f.maxGap) + stateSourceObject.Load(5, &f.keys) + stateSourceObject.Load(6, &f.values) + stateSourceObject.Load(7, &f.children) } -func (x *FileRangeSegmentDataSlices) StateTypeName() string { +func (f *FileRangeSegmentDataSlices) StateTypeName() string { return "pkg/sentry/fs/fsutil.FileRangeSegmentDataSlices" } -func (x *FileRangeSegmentDataSlices) StateFields() []string { +func (f *FileRangeSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -183,52 +183,52 @@ func (x *FileRangeSegmentDataSlices) StateFields() []string { } } -func (x *FileRangeSegmentDataSlices) beforeSave() {} +func (f *FileRangeSegmentDataSlices) beforeSave() {} -func (x *FileRangeSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (f *FileRangeSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Start) + stateSinkObject.Save(1, &f.End) + stateSinkObject.Save(2, &f.Values) } -func (x *FileRangeSegmentDataSlices) afterLoad() {} +func (f *FileRangeSegmentDataSlices) afterLoad() {} -func (x *FileRangeSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (f *FileRangeSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Start) + stateSourceObject.Load(1, &f.End) + stateSourceObject.Load(2, &f.Values) } -func (x *FrameRefSet) StateTypeName() string { +func (f *FrameRefSet) StateTypeName() string { return "pkg/sentry/fs/fsutil.FrameRefSet" } -func (x *FrameRefSet) StateFields() []string { +func (f *FrameRefSet) StateFields() []string { return []string{ "root", } } -func (x *FrameRefSet) beforeSave() {} +func (f *FrameRefSet) beforeSave() {} -func (x *FrameRefSet) StateSave(m state.Sink) { - x.beforeSave() - var root *FrameRefSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (f *FrameRefSet) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + var rootValue *FrameRefSegmentDataSlices = f.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *FrameRefSet) afterLoad() {} +func (f *FrameRefSet) afterLoad() {} -func (x *FrameRefSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*FrameRefSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*FrameRefSegmentDataSlices)) }) +func (f *FrameRefSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*FrameRefSegmentDataSlices), func(y interface{}) { f.loadRoot(y.(*FrameRefSegmentDataSlices)) }) } -func (x *FrameRefnode) StateTypeName() string { +func (f *FrameRefnode) StateTypeName() string { return "pkg/sentry/fs/fsutil.FrameRefnode" } -func (x *FrameRefnode) StateFields() []string { +func (f *FrameRefnode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -241,38 +241,38 @@ func (x *FrameRefnode) StateFields() []string { } } -func (x *FrameRefnode) beforeSave() {} +func (f *FrameRefnode) beforeSave() {} -func (x *FrameRefnode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (f *FrameRefnode) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.nrSegments) + stateSinkObject.Save(1, &f.parent) + stateSinkObject.Save(2, &f.parentIndex) + stateSinkObject.Save(3, &f.hasChildren) + stateSinkObject.Save(4, &f.maxGap) + stateSinkObject.Save(5, &f.keys) + stateSinkObject.Save(6, &f.values) + stateSinkObject.Save(7, &f.children) } -func (x *FrameRefnode) afterLoad() {} +func (f *FrameRefnode) afterLoad() {} -func (x *FrameRefnode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (f *FrameRefnode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.nrSegments) + stateSourceObject.Load(1, &f.parent) + stateSourceObject.Load(2, &f.parentIndex) + stateSourceObject.Load(3, &f.hasChildren) + stateSourceObject.Load(4, &f.maxGap) + stateSourceObject.Load(5, &f.keys) + stateSourceObject.Load(6, &f.values) + stateSourceObject.Load(7, &f.children) } -func (x *FrameRefSegmentDataSlices) StateTypeName() string { +func (f *FrameRefSegmentDataSlices) StateTypeName() string { return "pkg/sentry/fs/fsutil.FrameRefSegmentDataSlices" } -func (x *FrameRefSegmentDataSlices) StateFields() []string { +func (f *FrameRefSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -280,21 +280,21 @@ func (x *FrameRefSegmentDataSlices) StateFields() []string { } } -func (x *FrameRefSegmentDataSlices) beforeSave() {} +func (f *FrameRefSegmentDataSlices) beforeSave() {} -func (x *FrameRefSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (f *FrameRefSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Start) + stateSinkObject.Save(1, &f.End) + stateSinkObject.Save(2, &f.Values) } -func (x *FrameRefSegmentDataSlices) afterLoad() {} +func (f *FrameRefSegmentDataSlices) afterLoad() {} -func (x *FrameRefSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (f *FrameRefSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Start) + stateSourceObject.Load(1, &f.End) + stateSourceObject.Load(2, &f.Values) } func init() { diff --git a/pkg/sentry/fs/fsutil/fsutil_state_autogen.go b/pkg/sentry/fs/fsutil/fsutil_state_autogen.go index 8e2a4c961..43016f689 100644 --- a/pkg/sentry/fs/fsutil/fsutil_state_autogen.go +++ b/pkg/sentry/fs/fsutil/fsutil_state_autogen.go @@ -6,124 +6,124 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *DirtyInfo) StateTypeName() string { +func (d *DirtyInfo) StateTypeName() string { return "pkg/sentry/fs/fsutil.DirtyInfo" } -func (x *DirtyInfo) StateFields() []string { +func (d *DirtyInfo) StateFields() []string { return []string{ "Keep", } } -func (x *DirtyInfo) beforeSave() {} +func (d *DirtyInfo) beforeSave() {} -func (x *DirtyInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Keep) +func (d *DirtyInfo) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.Keep) } -func (x *DirtyInfo) afterLoad() {} +func (d *DirtyInfo) afterLoad() {} -func (x *DirtyInfo) StateLoad(m state.Source) { - m.Load(0, &x.Keep) +func (d *DirtyInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.Keep) } -func (x *StaticDirFileOperations) StateTypeName() string { +func (s *StaticDirFileOperations) StateTypeName() string { return "pkg/sentry/fs/fsutil.StaticDirFileOperations" } -func (x *StaticDirFileOperations) StateFields() []string { +func (s *StaticDirFileOperations) StateFields() []string { return []string{ "dentryMap", "dirCursor", } } -func (x *StaticDirFileOperations) beforeSave() {} +func (s *StaticDirFileOperations) beforeSave() {} -func (x *StaticDirFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dentryMap) - m.Save(1, &x.dirCursor) +func (s *StaticDirFileOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.dentryMap) + stateSinkObject.Save(1, &s.dirCursor) } -func (x *StaticDirFileOperations) afterLoad() {} +func (s *StaticDirFileOperations) afterLoad() {} -func (x *StaticDirFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.dentryMap) - m.Load(1, &x.dirCursor) +func (s *StaticDirFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.dentryMap) + stateSourceObject.Load(1, &s.dirCursor) } -func (x *NoReadWriteFile) StateTypeName() string { +func (n *NoReadWriteFile) StateTypeName() string { return "pkg/sentry/fs/fsutil.NoReadWriteFile" } -func (x *NoReadWriteFile) StateFields() []string { +func (n *NoReadWriteFile) StateFields() []string { return []string{} } -func (x *NoReadWriteFile) beforeSave() {} +func (n *NoReadWriteFile) beforeSave() {} -func (x *NoReadWriteFile) StateSave(m state.Sink) { - x.beforeSave() +func (n *NoReadWriteFile) StateSave(stateSinkObject state.Sink) { + n.beforeSave() } -func (x *NoReadWriteFile) afterLoad() {} +func (n *NoReadWriteFile) afterLoad() {} -func (x *NoReadWriteFile) StateLoad(m state.Source) { +func (n *NoReadWriteFile) StateLoad(stateSourceObject state.Source) { } -func (x *FileStaticContentReader) StateTypeName() string { +func (f *FileStaticContentReader) StateTypeName() string { return "pkg/sentry/fs/fsutil.FileStaticContentReader" } -func (x *FileStaticContentReader) StateFields() []string { +func (f *FileStaticContentReader) StateFields() []string { return []string{ "content", } } -func (x *FileStaticContentReader) beforeSave() {} +func (f *FileStaticContentReader) beforeSave() {} -func (x *FileStaticContentReader) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.content) +func (f *FileStaticContentReader) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.content) } -func (x *FileStaticContentReader) afterLoad() {} +func (f *FileStaticContentReader) afterLoad() {} -func (x *FileStaticContentReader) StateLoad(m state.Source) { - m.Load(0, &x.content) +func (f *FileStaticContentReader) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.content) } -func (x *HostFileMapper) StateTypeName() string { +func (h *HostFileMapper) StateTypeName() string { return "pkg/sentry/fs/fsutil.HostFileMapper" } -func (x *HostFileMapper) StateFields() []string { +func (h *HostFileMapper) StateFields() []string { return []string{ "refs", } } -func (x *HostFileMapper) beforeSave() {} +func (h *HostFileMapper) beforeSave() {} -func (x *HostFileMapper) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refs) +func (h *HostFileMapper) StateSave(stateSinkObject state.Sink) { + h.beforeSave() + stateSinkObject.Save(0, &h.refs) } -func (x *HostFileMapper) StateLoad(m state.Source) { - m.Load(0, &x.refs) - m.AfterLoad(x.afterLoad) +func (h *HostFileMapper) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &h.refs) + stateSourceObject.AfterLoad(h.afterLoad) } -func (x *HostMappable) StateTypeName() string { +func (h *HostMappable) StateTypeName() string { return "pkg/sentry/fs/fsutil.HostMappable" } -func (x *HostMappable) StateFields() []string { +func (h *HostMappable) StateFields() []string { return []string{ "hostFileMapper", "backingFile", @@ -131,169 +131,169 @@ func (x *HostMappable) StateFields() []string { } } -func (x *HostMappable) beforeSave() {} +func (h *HostMappable) beforeSave() {} -func (x *HostMappable) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.hostFileMapper) - m.Save(1, &x.backingFile) - m.Save(2, &x.mappings) +func (h *HostMappable) StateSave(stateSinkObject state.Sink) { + h.beforeSave() + stateSinkObject.Save(0, &h.hostFileMapper) + stateSinkObject.Save(1, &h.backingFile) + stateSinkObject.Save(2, &h.mappings) } -func (x *HostMappable) afterLoad() {} +func (h *HostMappable) afterLoad() {} -func (x *HostMappable) StateLoad(m state.Source) { - m.Load(0, &x.hostFileMapper) - m.Load(1, &x.backingFile) - m.Load(2, &x.mappings) +func (h *HostMappable) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &h.hostFileMapper) + stateSourceObject.Load(1, &h.backingFile) + stateSourceObject.Load(2, &h.mappings) } -func (x *SimpleFileInode) StateTypeName() string { +func (s *SimpleFileInode) StateTypeName() string { return "pkg/sentry/fs/fsutil.SimpleFileInode" } -func (x *SimpleFileInode) StateFields() []string { +func (s *SimpleFileInode) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *SimpleFileInode) beforeSave() {} +func (s *SimpleFileInode) beforeSave() {} -func (x *SimpleFileInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (s *SimpleFileInode) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleAttributes) } -func (x *SimpleFileInode) afterLoad() {} +func (s *SimpleFileInode) afterLoad() {} -func (x *SimpleFileInode) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (s *SimpleFileInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleAttributes) } -func (x *NoReadWriteFileInode) StateTypeName() string { +func (n *NoReadWriteFileInode) StateTypeName() string { return "pkg/sentry/fs/fsutil.NoReadWriteFileInode" } -func (x *NoReadWriteFileInode) StateFields() []string { +func (n *NoReadWriteFileInode) StateFields() []string { return []string{ "InodeSimpleAttributes", } } -func (x *NoReadWriteFileInode) beforeSave() {} +func (n *NoReadWriteFileInode) beforeSave() {} -func (x *NoReadWriteFileInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) +func (n *NoReadWriteFileInode) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.InodeSimpleAttributes) } -func (x *NoReadWriteFileInode) afterLoad() {} +func (n *NoReadWriteFileInode) afterLoad() {} -func (x *NoReadWriteFileInode) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) +func (n *NoReadWriteFileInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.InodeSimpleAttributes) } -func (x *InodeSimpleAttributes) StateTypeName() string { +func (i *InodeSimpleAttributes) StateTypeName() string { return "pkg/sentry/fs/fsutil.InodeSimpleAttributes" } -func (x *InodeSimpleAttributes) StateFields() []string { +func (i *InodeSimpleAttributes) StateFields() []string { return []string{ "fsType", "unstable", } } -func (x *InodeSimpleAttributes) beforeSave() {} +func (i *InodeSimpleAttributes) beforeSave() {} -func (x *InodeSimpleAttributes) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fsType) - m.Save(1, &x.unstable) +func (i *InodeSimpleAttributes) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fsType) + stateSinkObject.Save(1, &i.unstable) } -func (x *InodeSimpleAttributes) afterLoad() {} +func (i *InodeSimpleAttributes) afterLoad() {} -func (x *InodeSimpleAttributes) StateLoad(m state.Source) { - m.Load(0, &x.fsType) - m.Load(1, &x.unstable) +func (i *InodeSimpleAttributes) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.fsType) + stateSourceObject.Load(1, &i.unstable) } -func (x *InodeSimpleExtendedAttributes) StateTypeName() string { +func (i *InodeSimpleExtendedAttributes) StateTypeName() string { return "pkg/sentry/fs/fsutil.InodeSimpleExtendedAttributes" } -func (x *InodeSimpleExtendedAttributes) StateFields() []string { +func (i *InodeSimpleExtendedAttributes) StateFields() []string { return []string{ "xattrs", } } -func (x *InodeSimpleExtendedAttributes) beforeSave() {} +func (i *InodeSimpleExtendedAttributes) beforeSave() {} -func (x *InodeSimpleExtendedAttributes) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.xattrs) +func (i *InodeSimpleExtendedAttributes) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.xattrs) } -func (x *InodeSimpleExtendedAttributes) afterLoad() {} +func (i *InodeSimpleExtendedAttributes) afterLoad() {} -func (x *InodeSimpleExtendedAttributes) StateLoad(m state.Source) { - m.Load(0, &x.xattrs) +func (i *InodeSimpleExtendedAttributes) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.xattrs) } -func (x *staticFile) StateTypeName() string { +func (s *staticFile) StateTypeName() string { return "pkg/sentry/fs/fsutil.staticFile" } -func (x *staticFile) StateFields() []string { +func (s *staticFile) StateFields() []string { return []string{ "FileStaticContentReader", } } -func (x *staticFile) beforeSave() {} +func (s *staticFile) beforeSave() {} -func (x *staticFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FileStaticContentReader) +func (s *staticFile) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.FileStaticContentReader) } -func (x *staticFile) afterLoad() {} +func (s *staticFile) afterLoad() {} -func (x *staticFile) StateLoad(m state.Source) { - m.Load(0, &x.FileStaticContentReader) +func (s *staticFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.FileStaticContentReader) } -func (x *InodeStaticFileGetter) StateTypeName() string { +func (i *InodeStaticFileGetter) StateTypeName() string { return "pkg/sentry/fs/fsutil.InodeStaticFileGetter" } -func (x *InodeStaticFileGetter) StateFields() []string { +func (i *InodeStaticFileGetter) StateFields() []string { return []string{ "Contents", } } -func (x *InodeStaticFileGetter) beforeSave() {} +func (i *InodeStaticFileGetter) beforeSave() {} -func (x *InodeStaticFileGetter) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Contents) +func (i *InodeStaticFileGetter) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Contents) } -func (x *InodeStaticFileGetter) afterLoad() {} +func (i *InodeStaticFileGetter) afterLoad() {} -func (x *InodeStaticFileGetter) StateLoad(m state.Source) { - m.Load(0, &x.Contents) +func (i *InodeStaticFileGetter) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Contents) } -func (x *CachingInodeOperations) StateTypeName() string { +func (c *CachingInodeOperations) StateTypeName() string { return "pkg/sentry/fs/fsutil.CachingInodeOperations" } -func (x *CachingInodeOperations) StateFields() []string { +func (c *CachingInodeOperations) StateFields() []string { return []string{ "backingFile", "mfp", @@ -308,61 +308,61 @@ func (x *CachingInodeOperations) StateFields() []string { } } -func (x *CachingInodeOperations) beforeSave() {} +func (c *CachingInodeOperations) beforeSave() {} -func (x *CachingInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.backingFile) - m.Save(1, &x.mfp) - m.Save(2, &x.opts) - m.Save(3, &x.attr) - m.Save(4, &x.dirtyAttr) - m.Save(5, &x.mappings) - m.Save(6, &x.cache) - m.Save(7, &x.dirty) - m.Save(8, &x.hostFileMapper) - m.Save(9, &x.refs) +func (c *CachingInodeOperations) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.backingFile) + stateSinkObject.Save(1, &c.mfp) + stateSinkObject.Save(2, &c.opts) + stateSinkObject.Save(3, &c.attr) + stateSinkObject.Save(4, &c.dirtyAttr) + stateSinkObject.Save(5, &c.mappings) + stateSinkObject.Save(6, &c.cache) + stateSinkObject.Save(7, &c.dirty) + stateSinkObject.Save(8, &c.hostFileMapper) + stateSinkObject.Save(9, &c.refs) } -func (x *CachingInodeOperations) afterLoad() {} +func (c *CachingInodeOperations) afterLoad() {} -func (x *CachingInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.backingFile) - m.Load(1, &x.mfp) - m.Load(2, &x.opts) - m.Load(3, &x.attr) - m.Load(4, &x.dirtyAttr) - m.Load(5, &x.mappings) - m.Load(6, &x.cache) - m.Load(7, &x.dirty) - m.Load(8, &x.hostFileMapper) - m.Load(9, &x.refs) +func (c *CachingInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.backingFile) + stateSourceObject.Load(1, &c.mfp) + stateSourceObject.Load(2, &c.opts) + stateSourceObject.Load(3, &c.attr) + stateSourceObject.Load(4, &c.dirtyAttr) + stateSourceObject.Load(5, &c.mappings) + stateSourceObject.Load(6, &c.cache) + stateSourceObject.Load(7, &c.dirty) + stateSourceObject.Load(8, &c.hostFileMapper) + stateSourceObject.Load(9, &c.refs) } -func (x *CachingInodeOperationsOptions) StateTypeName() string { +func (c *CachingInodeOperationsOptions) StateTypeName() string { return "pkg/sentry/fs/fsutil.CachingInodeOperationsOptions" } -func (x *CachingInodeOperationsOptions) StateFields() []string { +func (c *CachingInodeOperationsOptions) StateFields() []string { return []string{ "ForcePageCache", "LimitHostFDTranslation", } } -func (x *CachingInodeOperationsOptions) beforeSave() {} +func (c *CachingInodeOperationsOptions) beforeSave() {} -func (x *CachingInodeOperationsOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ForcePageCache) - m.Save(1, &x.LimitHostFDTranslation) +func (c *CachingInodeOperationsOptions) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.ForcePageCache) + stateSinkObject.Save(1, &c.LimitHostFDTranslation) } -func (x *CachingInodeOperationsOptions) afterLoad() {} +func (c *CachingInodeOperationsOptions) afterLoad() {} -func (x *CachingInodeOperationsOptions) StateLoad(m state.Source) { - m.Load(0, &x.ForcePageCache) - m.Load(1, &x.LimitHostFDTranslation) +func (c *CachingInodeOperationsOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.ForcePageCache) + stateSourceObject.Load(1, &c.LimitHostFDTranslation) } func init() { diff --git a/pkg/sentry/fs/fsutil/inode_cached.go b/pkg/sentry/fs/fsutil/inode_cached.go index 9eb6f522e..85a23432b 100644 --- a/pkg/sentry/fs/fsutil/inode_cached.go +++ b/pkg/sentry/fs/fsutil/inode_cached.go @@ -22,7 +22,6 @@ import ( "gvisor.dev/gvisor/pkg/log" "gvisor.dev/gvisor/pkg/safemem" "gvisor.dev/gvisor/pkg/sentry/fs" - "gvisor.dev/gvisor/pkg/sentry/kernel/time" ktime "gvisor.dev/gvisor/pkg/sentry/kernel/time" "gvisor.dev/gvisor/pkg/sentry/memmap" "gvisor.dev/gvisor/pkg/sentry/pgalloc" @@ -444,7 +443,7 @@ func (c *CachingInodeOperations) TouchAccessTime(ctx context.Context, inode *fs. // time. // // Preconditions: c.attrMu is locked for writing. -func (c *CachingInodeOperations) touchAccessTimeLocked(now time.Time) { +func (c *CachingInodeOperations) touchAccessTimeLocked(now ktime.Time) { c.attr.AccessTime = now c.dirtyAttr.AccessTime = true } @@ -461,7 +460,7 @@ func (c *CachingInodeOperations) TouchModificationAndStatusChangeTime(ctx contex // and status change times in-place to the current time. // // Preconditions: c.attrMu is locked for writing. -func (c *CachingInodeOperations) touchModificationAndStatusChangeTimeLocked(now time.Time) { +func (c *CachingInodeOperations) touchModificationAndStatusChangeTimeLocked(now ktime.Time) { c.attr.ModificationTime = now c.dirtyAttr.ModificationTime = true c.attr.StatusChangeTime = now @@ -480,7 +479,7 @@ func (c *CachingInodeOperations) TouchStatusChangeTime(ctx context.Context) { // in-place to the current time. // // Preconditions: c.attrMu is locked for writing. -func (c *CachingInodeOperations) touchStatusChangeTimeLocked(now time.Time) { +func (c *CachingInodeOperations) touchStatusChangeTimeLocked(now ktime.Time) { c.attr.StatusChangeTime = now c.dirtyAttr.StatusChangeTime = true } @@ -672,9 +671,6 @@ func (rw *inodeReadWriter) ReadToBlocks(dsts safemem.BlockSeq) (uint64, error) { // Continue. seg, gap = gap.NextSegment(), FileRangeGapIterator{} } - - default: - break } } unlock() @@ -768,9 +764,6 @@ func (rw *inodeReadWriter) WriteFromBlocks(srcs safemem.BlockSeq) (uint64, error // Continue. seg, gap = gap.NextSegment(), FileRangeGapIterator{} - - default: - break } } rw.maybeGrowFile() diff --git a/pkg/sentry/fs/gofer/gofer_state_autogen.go b/pkg/sentry/fs/gofer/gofer_state_autogen.go index 1f7360ec8..c3cad4ad5 100644 --- a/pkg/sentry/fs/gofer/gofer_state_autogen.go +++ b/pkg/sentry/fs/gofer/gofer_state_autogen.go @@ -6,37 +6,37 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *fifo) StateTypeName() string { +func (f *fifo) StateTypeName() string { return "pkg/sentry/fs/gofer.fifo" } -func (x *fifo) StateFields() []string { +func (f *fifo) StateFields() []string { return []string{ "InodeOperations", "fileIops", } } -func (x *fifo) beforeSave() {} +func (f *fifo) beforeSave() {} -func (x *fifo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeOperations) - m.Save(1, &x.fileIops) +func (f *fifo) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.InodeOperations) + stateSinkObject.Save(1, &f.fileIops) } -func (x *fifo) afterLoad() {} +func (f *fifo) afterLoad() {} -func (x *fifo) StateLoad(m state.Source) { - m.Load(0, &x.InodeOperations) - m.Load(1, &x.fileIops) +func (f *fifo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.InodeOperations) + stateSourceObject.Load(1, &f.fileIops) } -func (x *fileOperations) StateTypeName() string { +func (f *fileOperations) StateTypeName() string { return "pkg/sentry/fs/gofer.fileOperations" } -func (x *fileOperations) StateFields() []string { +func (f *fileOperations) StateFields() []string { return []string{ "inodeOperations", "dirCursor", @@ -44,72 +44,72 @@ func (x *fileOperations) StateFields() []string { } } -func (x *fileOperations) beforeSave() {} +func (f *fileOperations) beforeSave() {} -func (x *fileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inodeOperations) - m.Save(1, &x.dirCursor) - m.Save(2, &x.flags) +func (f *fileOperations) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.inodeOperations) + stateSinkObject.Save(1, &f.dirCursor) + stateSinkObject.Save(2, &f.flags) } -func (x *fileOperations) StateLoad(m state.Source) { - m.LoadWait(0, &x.inodeOperations) - m.Load(1, &x.dirCursor) - m.LoadWait(2, &x.flags) - m.AfterLoad(x.afterLoad) +func (f *fileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &f.inodeOperations) + stateSourceObject.Load(1, &f.dirCursor) + stateSourceObject.LoadWait(2, &f.flags) + stateSourceObject.AfterLoad(f.afterLoad) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/gofer.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *inodeOperations) StateTypeName() string { +func (i *inodeOperations) StateTypeName() string { return "pkg/sentry/fs/gofer.inodeOperations" } -func (x *inodeOperations) StateFields() []string { +func (i *inodeOperations) StateFields() []string { return []string{ "fileState", "cachingInodeOps", } } -func (x *inodeOperations) beforeSave() {} +func (i *inodeOperations) beforeSave() {} -func (x *inodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileState) - m.Save(1, &x.cachingInodeOps) +func (i *inodeOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fileState) + stateSinkObject.Save(1, &i.cachingInodeOps) } -func (x *inodeOperations) afterLoad() {} +func (i *inodeOperations) afterLoad() {} -func (x *inodeOperations) StateLoad(m state.Source) { - m.LoadWait(0, &x.fileState) - m.Load(1, &x.cachingInodeOps) +func (i *inodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &i.fileState) + stateSourceObject.Load(1, &i.cachingInodeOps) } -func (x *inodeFileState) StateTypeName() string { +func (i *inodeFileState) StateTypeName() string { return "pkg/sentry/fs/gofer.inodeFileState" } -func (x *inodeFileState) StateFields() []string { +func (i *inodeFileState) StateFields() []string { return []string{ "s", "sattr", @@ -119,30 +119,30 @@ func (x *inodeFileState) StateFields() []string { } } -func (x *inodeFileState) StateSave(m state.Sink) { - x.beforeSave() - var loading struct{} = x.saveLoading() - m.SaveValue(2, loading) - m.Save(0, &x.s) - m.Save(1, &x.sattr) - m.Save(3, &x.savedUAttr) - m.Save(4, &x.hostMappable) +func (i *inodeFileState) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + var loadingValue struct{} = i.saveLoading() + stateSinkObject.SaveValue(2, loadingValue) + stateSinkObject.Save(0, &i.s) + stateSinkObject.Save(1, &i.sattr) + stateSinkObject.Save(3, &i.savedUAttr) + stateSinkObject.Save(4, &i.hostMappable) } -func (x *inodeFileState) StateLoad(m state.Source) { - m.LoadWait(0, &x.s) - m.LoadWait(1, &x.sattr) - m.Load(3, &x.savedUAttr) - m.Load(4, &x.hostMappable) - m.LoadValue(2, new(struct{}), func(y interface{}) { x.loadLoading(y.(struct{})) }) - m.AfterLoad(x.afterLoad) +func (i *inodeFileState) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &i.s) + stateSourceObject.LoadWait(1, &i.sattr) + stateSourceObject.Load(3, &i.savedUAttr) + stateSourceObject.Load(4, &i.hostMappable) + stateSourceObject.LoadValue(2, new(struct{}), func(y interface{}) { i.loadLoading(y.(struct{})) }) + stateSourceObject.AfterLoad(i.afterLoad) } -func (x *overrideInfo) StateTypeName() string { +func (o *overrideInfo) StateTypeName() string { return "pkg/sentry/fs/gofer.overrideInfo" } -func (x *overrideInfo) StateFields() []string { +func (o *overrideInfo) StateFields() []string { return []string{ "dirent", "endpoint", @@ -150,51 +150,51 @@ func (x *overrideInfo) StateFields() []string { } } -func (x *overrideInfo) beforeSave() {} +func (o *overrideInfo) beforeSave() {} -func (x *overrideInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dirent) - m.Save(1, &x.endpoint) - m.Save(2, &x.inode) +func (o *overrideInfo) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.dirent) + stateSinkObject.Save(1, &o.endpoint) + stateSinkObject.Save(2, &o.inode) } -func (x *overrideInfo) afterLoad() {} +func (o *overrideInfo) afterLoad() {} -func (x *overrideInfo) StateLoad(m state.Source) { - m.Load(0, &x.dirent) - m.Load(1, &x.endpoint) - m.Load(2, &x.inode) +func (o *overrideInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.dirent) + stateSourceObject.Load(1, &o.endpoint) + stateSourceObject.Load(2, &o.inode) } -func (x *overrideMaps) StateTypeName() string { +func (o *overrideMaps) StateTypeName() string { return "pkg/sentry/fs/gofer.overrideMaps" } -func (x *overrideMaps) StateFields() []string { +func (o *overrideMaps) StateFields() []string { return []string{ "pathMap", } } -func (x *overrideMaps) beforeSave() {} +func (o *overrideMaps) beforeSave() {} -func (x *overrideMaps) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.pathMap) +func (o *overrideMaps) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.pathMap) } -func (x *overrideMaps) afterLoad() {} +func (o *overrideMaps) afterLoad() {} -func (x *overrideMaps) StateLoad(m state.Source) { - m.Load(0, &x.pathMap) +func (o *overrideMaps) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.pathMap) } -func (x *session) StateTypeName() string { +func (s *session) StateTypeName() string { return "pkg/sentry/fs/gofer.session" } -func (x *session) StateFields() []string { +func (s *session) StateFields() []string { return []string{ "AtomicRefCount", "msize", @@ -211,36 +211,36 @@ func (x *session) StateFields() []string { } } -func (x *session) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.msize) - m.Save(2, &x.version) - m.Save(3, &x.cachePolicy) - m.Save(4, &x.aname) - m.Save(5, &x.superBlockFlags) - m.Save(6, &x.limitHostFDTranslation) - m.Save(7, &x.overlayfsStaleRead) - m.Save(8, &x.connID) - m.Save(9, &x.inodeMappings) - m.Save(10, &x.mounter) - m.Save(11, &x.overrides) -} - -func (x *session) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.LoadWait(1, &x.msize) - m.LoadWait(2, &x.version) - m.LoadWait(3, &x.cachePolicy) - m.LoadWait(4, &x.aname) - m.LoadWait(5, &x.superBlockFlags) - m.Load(6, &x.limitHostFDTranslation) - m.Load(7, &x.overlayfsStaleRead) - m.LoadWait(8, &x.connID) - m.LoadWait(9, &x.inodeMappings) - m.LoadWait(10, &x.mounter) - m.LoadWait(11, &x.overrides) - m.AfterLoad(x.afterLoad) +func (s *session) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.AtomicRefCount) + stateSinkObject.Save(1, &s.msize) + stateSinkObject.Save(2, &s.version) + stateSinkObject.Save(3, &s.cachePolicy) + stateSinkObject.Save(4, &s.aname) + stateSinkObject.Save(5, &s.superBlockFlags) + stateSinkObject.Save(6, &s.limitHostFDTranslation) + stateSinkObject.Save(7, &s.overlayfsStaleRead) + stateSinkObject.Save(8, &s.connID) + stateSinkObject.Save(9, &s.inodeMappings) + stateSinkObject.Save(10, &s.mounter) + stateSinkObject.Save(11, &s.overrides) +} + +func (s *session) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.AtomicRefCount) + stateSourceObject.LoadWait(1, &s.msize) + stateSourceObject.LoadWait(2, &s.version) + stateSourceObject.LoadWait(3, &s.cachePolicy) + stateSourceObject.LoadWait(4, &s.aname) + stateSourceObject.LoadWait(5, &s.superBlockFlags) + stateSourceObject.Load(6, &s.limitHostFDTranslation) + stateSourceObject.Load(7, &s.overlayfsStaleRead) + stateSourceObject.LoadWait(8, &s.connID) + stateSourceObject.LoadWait(9, &s.inodeMappings) + stateSourceObject.LoadWait(10, &s.mounter) + stateSourceObject.LoadWait(11, &s.overrides) + stateSourceObject.AfterLoad(s.afterLoad) } func init() { diff --git a/pkg/sentry/fs/host/host_state_autogen.go b/pkg/sentry/fs/host/host_state_autogen.go index 6a1a75ca4..baae8fffa 100644 --- a/pkg/sentry/fs/host/host_state_autogen.go +++ b/pkg/sentry/fs/host/host_state_autogen.go @@ -6,105 +6,105 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *descriptor) StateTypeName() string { +func (d *descriptor) StateTypeName() string { return "pkg/sentry/fs/host.descriptor" } -func (x *descriptor) StateFields() []string { +func (d *descriptor) StateFields() []string { return []string{ "origFD", "wouldBlock", } } -func (x *descriptor) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.origFD) - m.Save(1, &x.wouldBlock) +func (d *descriptor) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.origFD) + stateSinkObject.Save(1, &d.wouldBlock) } -func (x *descriptor) StateLoad(m state.Source) { - m.Load(0, &x.origFD) - m.Load(1, &x.wouldBlock) - m.AfterLoad(x.afterLoad) +func (d *descriptor) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.origFD) + stateSourceObject.Load(1, &d.wouldBlock) + stateSourceObject.AfterLoad(d.afterLoad) } -func (x *fileOperations) StateTypeName() string { +func (f *fileOperations) StateTypeName() string { return "pkg/sentry/fs/host.fileOperations" } -func (x *fileOperations) StateFields() []string { +func (f *fileOperations) StateFields() []string { return []string{ "iops", "dirCursor", } } -func (x *fileOperations) beforeSave() {} +func (f *fileOperations) beforeSave() {} -func (x *fileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.iops) - m.Save(1, &x.dirCursor) +func (f *fileOperations) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.iops) + stateSinkObject.Save(1, &f.dirCursor) } -func (x *fileOperations) afterLoad() {} +func (f *fileOperations) afterLoad() {} -func (x *fileOperations) StateLoad(m state.Source) { - m.LoadWait(0, &x.iops) - m.Load(1, &x.dirCursor) +func (f *fileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &f.iops) + stateSourceObject.Load(1, &f.dirCursor) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/host.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *inodeOperations) StateTypeName() string { +func (i *inodeOperations) StateTypeName() string { return "pkg/sentry/fs/host.inodeOperations" } -func (x *inodeOperations) StateFields() []string { +func (i *inodeOperations) StateFields() []string { return []string{ "fileState", "cachingInodeOps", } } -func (x *inodeOperations) beforeSave() {} +func (i *inodeOperations) beforeSave() {} -func (x *inodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileState) - m.Save(1, &x.cachingInodeOps) +func (i *inodeOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fileState) + stateSinkObject.Save(1, &i.cachingInodeOps) } -func (x *inodeOperations) afterLoad() {} +func (i *inodeOperations) afterLoad() {} -func (x *inodeOperations) StateLoad(m state.Source) { - m.LoadWait(0, &x.fileState) - m.Load(1, &x.cachingInodeOps) +func (i *inodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &i.fileState) + stateSourceObject.Load(1, &i.cachingInodeOps) } -func (x *inodeFileState) StateTypeName() string { +func (i *inodeFileState) StateTypeName() string { return "pkg/sentry/fs/host.inodeFileState" } -func (x *inodeFileState) StateFields() []string { +func (i *inodeFileState) StateFields() []string { return []string{ "descriptor", "sattr", @@ -112,30 +112,30 @@ func (x *inodeFileState) StateFields() []string { } } -func (x *inodeFileState) beforeSave() {} +func (i *inodeFileState) beforeSave() {} -func (x *inodeFileState) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.queue) { - state.Failf("queue is %#v, expected zero", &x.queue) +func (i *inodeFileState) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + if !state.IsZeroValue(&i.queue) { + state.Failf("queue is %#v, expected zero", &i.queue) } - m.Save(0, &x.descriptor) - m.Save(1, &x.sattr) - m.Save(2, &x.savedUAttr) + stateSinkObject.Save(0, &i.descriptor) + stateSinkObject.Save(1, &i.sattr) + stateSinkObject.Save(2, &i.savedUAttr) } -func (x *inodeFileState) StateLoad(m state.Source) { - m.LoadWait(0, &x.descriptor) - m.LoadWait(1, &x.sattr) - m.Load(2, &x.savedUAttr) - m.AfterLoad(x.afterLoad) +func (i *inodeFileState) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &i.descriptor) + stateSourceObject.LoadWait(1, &i.sattr) + stateSourceObject.Load(2, &i.savedUAttr) + stateSourceObject.AfterLoad(i.afterLoad) } -func (x *ConnectedEndpoint) StateTypeName() string { +func (c *ConnectedEndpoint) StateTypeName() string { return "pkg/sentry/fs/host.ConnectedEndpoint" } -func (x *ConnectedEndpoint) StateFields() []string { +func (c *ConnectedEndpoint) StateFields() []string { return []string{ "ref", "queue", @@ -145,29 +145,29 @@ func (x *ConnectedEndpoint) StateFields() []string { } } -func (x *ConnectedEndpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ref) - m.Save(1, &x.queue) - m.Save(2, &x.path) - m.Save(3, &x.srfd) - m.Save(4, &x.stype) +func (c *ConnectedEndpoint) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.ref) + stateSinkObject.Save(1, &c.queue) + stateSinkObject.Save(2, &c.path) + stateSinkObject.Save(3, &c.srfd) + stateSinkObject.Save(4, &c.stype) } -func (x *ConnectedEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.ref) - m.Load(1, &x.queue) - m.Load(2, &x.path) - m.LoadWait(3, &x.srfd) - m.Load(4, &x.stype) - m.AfterLoad(x.afterLoad) +func (c *ConnectedEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.ref) + stateSourceObject.Load(1, &c.queue) + stateSourceObject.Load(2, &c.path) + stateSourceObject.LoadWait(3, &c.srfd) + stateSourceObject.Load(4, &c.stype) + stateSourceObject.AfterLoad(c.afterLoad) } -func (x *TTYFileOperations) StateTypeName() string { +func (t *TTYFileOperations) StateTypeName() string { return "pkg/sentry/fs/host.TTYFileOperations" } -func (x *TTYFileOperations) StateFields() []string { +func (t *TTYFileOperations) StateFields() []string { return []string{ "fileOperations", "session", @@ -176,23 +176,23 @@ func (x *TTYFileOperations) StateFields() []string { } } -func (x *TTYFileOperations) beforeSave() {} +func (t *TTYFileOperations) beforeSave() {} -func (x *TTYFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileOperations) - m.Save(1, &x.session) - m.Save(2, &x.fgProcessGroup) - m.Save(3, &x.termios) +func (t *TTYFileOperations) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.fileOperations) + stateSinkObject.Save(1, &t.session) + stateSinkObject.Save(2, &t.fgProcessGroup) + stateSinkObject.Save(3, &t.termios) } -func (x *TTYFileOperations) afterLoad() {} +func (t *TTYFileOperations) afterLoad() {} -func (x *TTYFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.fileOperations) - m.Load(1, &x.session) - m.Load(2, &x.fgProcessGroup) - m.Load(3, &x.termios) +func (t *TTYFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.fileOperations) + stateSourceObject.Load(1, &t.session) + stateSourceObject.Load(2, &t.fgProcessGroup) + stateSourceObject.Load(3, &t.termios) } func init() { diff --git a/pkg/sentry/fs/lock/lock_state_autogen.go b/pkg/sentry/fs/lock/lock_state_autogen.go index 8e2768c73..2b307be59 100644 --- a/pkg/sentry/fs/lock/lock_state_autogen.go +++ b/pkg/sentry/fs/lock/lock_state_autogen.go @@ -6,113 +6,113 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Lock) StateTypeName() string { +func (l *Lock) StateTypeName() string { return "pkg/sentry/fs/lock.Lock" } -func (x *Lock) StateFields() []string { +func (l *Lock) StateFields() []string { return []string{ "Readers", "Writer", } } -func (x *Lock) beforeSave() {} +func (l *Lock) beforeSave() {} -func (x *Lock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Readers) - m.Save(1, &x.Writer) +func (l *Lock) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Readers) + stateSinkObject.Save(1, &l.Writer) } -func (x *Lock) afterLoad() {} +func (l *Lock) afterLoad() {} -func (x *Lock) StateLoad(m state.Source) { - m.Load(0, &x.Readers) - m.Load(1, &x.Writer) +func (l *Lock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Readers) + stateSourceObject.Load(1, &l.Writer) } -func (x *Locks) StateTypeName() string { +func (l *Locks) StateTypeName() string { return "pkg/sentry/fs/lock.Locks" } -func (x *Locks) StateFields() []string { +func (l *Locks) StateFields() []string { return []string{ "locks", } } -func (x *Locks) beforeSave() {} +func (l *Locks) beforeSave() {} -func (x *Locks) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.blockedQueue) { - state.Failf("blockedQueue is %#v, expected zero", &x.blockedQueue) +func (l *Locks) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + if !state.IsZeroValue(&l.blockedQueue) { + state.Failf("blockedQueue is %#v, expected zero", &l.blockedQueue) } - m.Save(0, &x.locks) + stateSinkObject.Save(0, &l.locks) } -func (x *Locks) afterLoad() {} +func (l *Locks) afterLoad() {} -func (x *Locks) StateLoad(m state.Source) { - m.Load(0, &x.locks) +func (l *Locks) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.locks) } -func (x *LockRange) StateTypeName() string { +func (l *LockRange) StateTypeName() string { return "pkg/sentry/fs/lock.LockRange" } -func (x *LockRange) StateFields() []string { +func (l *LockRange) StateFields() []string { return []string{ "Start", "End", } } -func (x *LockRange) beforeSave() {} +func (l *LockRange) beforeSave() {} -func (x *LockRange) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) +func (l *LockRange) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Start) + stateSinkObject.Save(1, &l.End) } -func (x *LockRange) afterLoad() {} +func (l *LockRange) afterLoad() {} -func (x *LockRange) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) +func (l *LockRange) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Start) + stateSourceObject.Load(1, &l.End) } -func (x *LockSet) StateTypeName() string { +func (l *LockSet) StateTypeName() string { return "pkg/sentry/fs/lock.LockSet" } -func (x *LockSet) StateFields() []string { +func (l *LockSet) StateFields() []string { return []string{ "root", } } -func (x *LockSet) beforeSave() {} +func (l *LockSet) beforeSave() {} -func (x *LockSet) StateSave(m state.Sink) { - x.beforeSave() - var root *LockSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (l *LockSet) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + var rootValue *LockSegmentDataSlices = l.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *LockSet) afterLoad() {} +func (l *LockSet) afterLoad() {} -func (x *LockSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*LockSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*LockSegmentDataSlices)) }) +func (l *LockSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*LockSegmentDataSlices), func(y interface{}) { l.loadRoot(y.(*LockSegmentDataSlices)) }) } -func (x *Locknode) StateTypeName() string { +func (l *Locknode) StateTypeName() string { return "pkg/sentry/fs/lock.Locknode" } -func (x *Locknode) StateFields() []string { +func (l *Locknode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -125,38 +125,38 @@ func (x *Locknode) StateFields() []string { } } -func (x *Locknode) beforeSave() {} +func (l *Locknode) beforeSave() {} -func (x *Locknode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (l *Locknode) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.nrSegments) + stateSinkObject.Save(1, &l.parent) + stateSinkObject.Save(2, &l.parentIndex) + stateSinkObject.Save(3, &l.hasChildren) + stateSinkObject.Save(4, &l.maxGap) + stateSinkObject.Save(5, &l.keys) + stateSinkObject.Save(6, &l.values) + stateSinkObject.Save(7, &l.children) } -func (x *Locknode) afterLoad() {} +func (l *Locknode) afterLoad() {} -func (x *Locknode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (l *Locknode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.nrSegments) + stateSourceObject.Load(1, &l.parent) + stateSourceObject.Load(2, &l.parentIndex) + stateSourceObject.Load(3, &l.hasChildren) + stateSourceObject.Load(4, &l.maxGap) + stateSourceObject.Load(5, &l.keys) + stateSourceObject.Load(6, &l.values) + stateSourceObject.Load(7, &l.children) } -func (x *LockSegmentDataSlices) StateTypeName() string { +func (l *LockSegmentDataSlices) StateTypeName() string { return "pkg/sentry/fs/lock.LockSegmentDataSlices" } -func (x *LockSegmentDataSlices) StateFields() []string { +func (l *LockSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -164,21 +164,21 @@ func (x *LockSegmentDataSlices) StateFields() []string { } } -func (x *LockSegmentDataSlices) beforeSave() {} +func (l *LockSegmentDataSlices) beforeSave() {} -func (x *LockSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (l *LockSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Start) + stateSinkObject.Save(1, &l.End) + stateSinkObject.Save(2, &l.Values) } -func (x *LockSegmentDataSlices) afterLoad() {} +func (l *LockSegmentDataSlices) afterLoad() {} -func (x *LockSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (l *LockSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Start) + stateSourceObject.Load(1, &l.End) + stateSourceObject.Load(2, &l.Values) } func init() { diff --git a/pkg/sentry/fs/proc/proc_state_autogen.go b/pkg/sentry/fs/proc/proc_state_autogen.go index de5e7de5e..ddb1f4e6e 100644 --- a/pkg/sentry/fs/proc/proc_state_autogen.go +++ b/pkg/sentry/fs/proc/proc_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *execArgInode) StateTypeName() string { +func (e *execArgInode) StateTypeName() string { return "pkg/sentry/fs/proc.execArgInode" } -func (x *execArgInode) StateFields() []string { +func (e *execArgInode) StateFields() []string { return []string{ "SimpleFileInode", "arg", @@ -18,494 +18,494 @@ func (x *execArgInode) StateFields() []string { } } -func (x *execArgInode) beforeSave() {} +func (e *execArgInode) beforeSave() {} -func (x *execArgInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.arg) - m.Save(2, &x.t) +func (e *execArgInode) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.SimpleFileInode) + stateSinkObject.Save(1, &e.arg) + stateSinkObject.Save(2, &e.t) } -func (x *execArgInode) afterLoad() {} +func (e *execArgInode) afterLoad() {} -func (x *execArgInode) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.arg) - m.Load(2, &x.t) +func (e *execArgInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.SimpleFileInode) + stateSourceObject.Load(1, &e.arg) + stateSourceObject.Load(2, &e.t) } -func (x *execArgFile) StateTypeName() string { +func (e *execArgFile) StateTypeName() string { return "pkg/sentry/fs/proc.execArgFile" } -func (x *execArgFile) StateFields() []string { +func (e *execArgFile) StateFields() []string { return []string{ "arg", "t", } } -func (x *execArgFile) beforeSave() {} +func (e *execArgFile) beforeSave() {} -func (x *execArgFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.arg) - m.Save(1, &x.t) +func (e *execArgFile) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.arg) + stateSinkObject.Save(1, &e.t) } -func (x *execArgFile) afterLoad() {} +func (e *execArgFile) afterLoad() {} -func (x *execArgFile) StateLoad(m state.Source) { - m.Load(0, &x.arg) - m.Load(1, &x.t) +func (e *execArgFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.arg) + stateSourceObject.Load(1, &e.t) } -func (x *fdDir) StateTypeName() string { +func (f *fdDir) StateTypeName() string { return "pkg/sentry/fs/proc.fdDir" } -func (x *fdDir) StateFields() []string { +func (f *fdDir) StateFields() []string { return []string{ "Dir", "t", } } -func (x *fdDir) beforeSave() {} +func (f *fdDir) beforeSave() {} -func (x *fdDir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.t) +func (f *fdDir) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Dir) + stateSinkObject.Save(1, &f.t) } -func (x *fdDir) afterLoad() {} +func (f *fdDir) afterLoad() {} -func (x *fdDir) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.t) +func (f *fdDir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Dir) + stateSourceObject.Load(1, &f.t) } -func (x *fdDirFile) StateTypeName() string { +func (f *fdDirFile) StateTypeName() string { return "pkg/sentry/fs/proc.fdDirFile" } -func (x *fdDirFile) StateFields() []string { +func (f *fdDirFile) StateFields() []string { return []string{ "isInfoFile", "t", } } -func (x *fdDirFile) beforeSave() {} +func (f *fdDirFile) beforeSave() {} -func (x *fdDirFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.isInfoFile) - m.Save(1, &x.t) +func (f *fdDirFile) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.isInfoFile) + stateSinkObject.Save(1, &f.t) } -func (x *fdDirFile) afterLoad() {} +func (f *fdDirFile) afterLoad() {} -func (x *fdDirFile) StateLoad(m state.Source) { - m.Load(0, &x.isInfoFile) - m.Load(1, &x.t) +func (f *fdDirFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.isInfoFile) + stateSourceObject.Load(1, &f.t) } -func (x *fdInfoDir) StateTypeName() string { +func (f *fdInfoDir) StateTypeName() string { return "pkg/sentry/fs/proc.fdInfoDir" } -func (x *fdInfoDir) StateFields() []string { +func (f *fdInfoDir) StateFields() []string { return []string{ "Dir", "t", } } -func (x *fdInfoDir) beforeSave() {} +func (f *fdInfoDir) beforeSave() {} -func (x *fdInfoDir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.t) +func (f *fdInfoDir) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Dir) + stateSinkObject.Save(1, &f.t) } -func (x *fdInfoDir) afterLoad() {} +func (f *fdInfoDir) afterLoad() {} -func (x *fdInfoDir) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.t) +func (f *fdInfoDir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Dir) + stateSourceObject.Load(1, &f.t) } -func (x *filesystemsData) StateTypeName() string { +func (f *filesystemsData) StateTypeName() string { return "pkg/sentry/fs/proc.filesystemsData" } -func (x *filesystemsData) StateFields() []string { +func (f *filesystemsData) StateFields() []string { return []string{} } -func (x *filesystemsData) beforeSave() {} +func (f *filesystemsData) beforeSave() {} -func (x *filesystemsData) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystemsData) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystemsData) afterLoad() {} +func (f *filesystemsData) afterLoad() {} -func (x *filesystemsData) StateLoad(m state.Source) { +func (f *filesystemsData) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/proc.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *taskOwnedInodeOps) StateTypeName() string { +func (t *taskOwnedInodeOps) StateTypeName() string { return "pkg/sentry/fs/proc.taskOwnedInodeOps" } -func (x *taskOwnedInodeOps) StateFields() []string { +func (t *taskOwnedInodeOps) StateFields() []string { return []string{ "InodeOperations", "t", } } -func (x *taskOwnedInodeOps) beforeSave() {} +func (t *taskOwnedInodeOps) beforeSave() {} -func (x *taskOwnedInodeOps) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeOperations) - m.Save(1, &x.t) +func (t *taskOwnedInodeOps) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.InodeOperations) + stateSinkObject.Save(1, &t.t) } -func (x *taskOwnedInodeOps) afterLoad() {} +func (t *taskOwnedInodeOps) afterLoad() {} -func (x *taskOwnedInodeOps) StateLoad(m state.Source) { - m.Load(0, &x.InodeOperations) - m.Load(1, &x.t) +func (t *taskOwnedInodeOps) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.InodeOperations) + stateSourceObject.Load(1, &t.t) } -func (x *staticFileInodeOps) StateTypeName() string { +func (s *staticFileInodeOps) StateTypeName() string { return "pkg/sentry/fs/proc.staticFileInodeOps" } -func (x *staticFileInodeOps) StateFields() []string { +func (s *staticFileInodeOps) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeStaticFileGetter", } } -func (x *staticFileInodeOps) beforeSave() {} +func (s *staticFileInodeOps) beforeSave() {} -func (x *staticFileInodeOps) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeStaticFileGetter) +func (s *staticFileInodeOps) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleAttributes) + stateSinkObject.Save(1, &s.InodeStaticFileGetter) } -func (x *staticFileInodeOps) afterLoad() {} +func (s *staticFileInodeOps) afterLoad() {} -func (x *staticFileInodeOps) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeStaticFileGetter) +func (s *staticFileInodeOps) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleAttributes) + stateSourceObject.Load(1, &s.InodeStaticFileGetter) } -func (x *loadavgData) StateTypeName() string { +func (l *loadavgData) StateTypeName() string { return "pkg/sentry/fs/proc.loadavgData" } -func (x *loadavgData) StateFields() []string { +func (l *loadavgData) StateFields() []string { return []string{} } -func (x *loadavgData) beforeSave() {} +func (l *loadavgData) beforeSave() {} -func (x *loadavgData) StateSave(m state.Sink) { - x.beforeSave() +func (l *loadavgData) StateSave(stateSinkObject state.Sink) { + l.beforeSave() } -func (x *loadavgData) afterLoad() {} +func (l *loadavgData) afterLoad() {} -func (x *loadavgData) StateLoad(m state.Source) { +func (l *loadavgData) StateLoad(stateSourceObject state.Source) { } -func (x *meminfoData) StateTypeName() string { +func (m *meminfoData) StateTypeName() string { return "pkg/sentry/fs/proc.meminfoData" } -func (x *meminfoData) StateFields() []string { +func (m *meminfoData) StateFields() []string { return []string{ "k", } } -func (x *meminfoData) beforeSave() {} +func (m *meminfoData) beforeSave() {} -func (x *meminfoData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (m *meminfoData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.k) } -func (x *meminfoData) afterLoad() {} +func (m *meminfoData) afterLoad() {} -func (x *meminfoData) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (m *meminfoData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.k) } -func (x *mountInfoFile) StateTypeName() string { +func (m *mountInfoFile) StateTypeName() string { return "pkg/sentry/fs/proc.mountInfoFile" } -func (x *mountInfoFile) StateFields() []string { +func (m *mountInfoFile) StateFields() []string { return []string{ "t", } } -func (x *mountInfoFile) beforeSave() {} +func (m *mountInfoFile) beforeSave() {} -func (x *mountInfoFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (m *mountInfoFile) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.t) } -func (x *mountInfoFile) afterLoad() {} +func (m *mountInfoFile) afterLoad() {} -func (x *mountInfoFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (m *mountInfoFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.t) } -func (x *mountsFile) StateTypeName() string { +func (m *mountsFile) StateTypeName() string { return "pkg/sentry/fs/proc.mountsFile" } -func (x *mountsFile) StateFields() []string { +func (m *mountsFile) StateFields() []string { return []string{ "t", } } -func (x *mountsFile) beforeSave() {} +func (m *mountsFile) beforeSave() {} -func (x *mountsFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (m *mountsFile) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.t) } -func (x *mountsFile) afterLoad() {} +func (m *mountsFile) afterLoad() {} -func (x *mountsFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (m *mountsFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.t) } -func (x *ifinet6) StateTypeName() string { +func (i *ifinet6) StateTypeName() string { return "pkg/sentry/fs/proc.ifinet6" } -func (x *ifinet6) StateFields() []string { +func (i *ifinet6) StateFields() []string { return []string{ "s", } } -func (x *ifinet6) beforeSave() {} +func (i *ifinet6) beforeSave() {} -func (x *ifinet6) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (i *ifinet6) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.s) } -func (x *ifinet6) afterLoad() {} +func (i *ifinet6) afterLoad() {} -func (x *ifinet6) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (i *ifinet6) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.s) } -func (x *netDev) StateTypeName() string { +func (n *netDev) StateTypeName() string { return "pkg/sentry/fs/proc.netDev" } -func (x *netDev) StateFields() []string { +func (n *netDev) StateFields() []string { return []string{ "s", } } -func (x *netDev) beforeSave() {} +func (n *netDev) beforeSave() {} -func (x *netDev) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (n *netDev) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.s) } -func (x *netDev) afterLoad() {} +func (n *netDev) afterLoad() {} -func (x *netDev) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (n *netDev) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.s) } -func (x *netSnmp) StateTypeName() string { +func (n *netSnmp) StateTypeName() string { return "pkg/sentry/fs/proc.netSnmp" } -func (x *netSnmp) StateFields() []string { +func (n *netSnmp) StateFields() []string { return []string{ "s", } } -func (x *netSnmp) beforeSave() {} +func (n *netSnmp) beforeSave() {} -func (x *netSnmp) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (n *netSnmp) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.s) } -func (x *netSnmp) afterLoad() {} +func (n *netSnmp) afterLoad() {} -func (x *netSnmp) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (n *netSnmp) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.s) } -func (x *netRoute) StateTypeName() string { +func (n *netRoute) StateTypeName() string { return "pkg/sentry/fs/proc.netRoute" } -func (x *netRoute) StateFields() []string { +func (n *netRoute) StateFields() []string { return []string{ "s", } } -func (x *netRoute) beforeSave() {} +func (n *netRoute) beforeSave() {} -func (x *netRoute) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (n *netRoute) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.s) } -func (x *netRoute) afterLoad() {} +func (n *netRoute) afterLoad() {} -func (x *netRoute) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (n *netRoute) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.s) } -func (x *netUnix) StateTypeName() string { +func (n *netUnix) StateTypeName() string { return "pkg/sentry/fs/proc.netUnix" } -func (x *netUnix) StateFields() []string { +func (n *netUnix) StateFields() []string { return []string{ "k", } } -func (x *netUnix) beforeSave() {} +func (n *netUnix) beforeSave() {} -func (x *netUnix) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (n *netUnix) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.k) } -func (x *netUnix) afterLoad() {} +func (n *netUnix) afterLoad() {} -func (x *netUnix) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (n *netUnix) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.k) } -func (x *netTCP) StateTypeName() string { +func (n *netTCP) StateTypeName() string { return "pkg/sentry/fs/proc.netTCP" } -func (x *netTCP) StateFields() []string { +func (n *netTCP) StateFields() []string { return []string{ "k", } } -func (x *netTCP) beforeSave() {} +func (n *netTCP) beforeSave() {} -func (x *netTCP) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (n *netTCP) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.k) } -func (x *netTCP) afterLoad() {} +func (n *netTCP) afterLoad() {} -func (x *netTCP) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (n *netTCP) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.k) } -func (x *netTCP6) StateTypeName() string { +func (n *netTCP6) StateTypeName() string { return "pkg/sentry/fs/proc.netTCP6" } -func (x *netTCP6) StateFields() []string { +func (n *netTCP6) StateFields() []string { return []string{ "k", } } -func (x *netTCP6) beforeSave() {} +func (n *netTCP6) beforeSave() {} -func (x *netTCP6) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (n *netTCP6) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.k) } -func (x *netTCP6) afterLoad() {} +func (n *netTCP6) afterLoad() {} -func (x *netTCP6) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (n *netTCP6) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.k) } -func (x *netUDP) StateTypeName() string { +func (n *netUDP) StateTypeName() string { return "pkg/sentry/fs/proc.netUDP" } -func (x *netUDP) StateFields() []string { +func (n *netUDP) StateFields() []string { return []string{ "k", } } -func (x *netUDP) beforeSave() {} +func (n *netUDP) beforeSave() {} -func (x *netUDP) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (n *netUDP) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.k) } -func (x *netUDP) afterLoad() {} +func (n *netUDP) afterLoad() {} -func (x *netUDP) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (n *netUDP) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.k) } -func (x *proc) StateTypeName() string { +func (p *proc) StateTypeName() string { return "pkg/sentry/fs/proc.proc" } -func (x *proc) StateFields() []string { +func (p *proc) StateFields() []string { return []string{ "Dir", "k", @@ -514,212 +514,212 @@ func (x *proc) StateFields() []string { } } -func (x *proc) beforeSave() {} +func (p *proc) beforeSave() {} -func (x *proc) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.k) - m.Save(2, &x.pidns) - m.Save(3, &x.cgroupControllers) +func (p *proc) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.Dir) + stateSinkObject.Save(1, &p.k) + stateSinkObject.Save(2, &p.pidns) + stateSinkObject.Save(3, &p.cgroupControllers) } -func (x *proc) afterLoad() {} +func (p *proc) afterLoad() {} -func (x *proc) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.k) - m.Load(2, &x.pidns) - m.Load(3, &x.cgroupControllers) +func (p *proc) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.Dir) + stateSourceObject.Load(1, &p.k) + stateSourceObject.Load(2, &p.pidns) + stateSourceObject.Load(3, &p.cgroupControllers) } -func (x *self) StateTypeName() string { +func (s *self) StateTypeName() string { return "pkg/sentry/fs/proc.self" } -func (x *self) StateFields() []string { +func (s *self) StateFields() []string { return []string{ "Symlink", "pidns", } } -func (x *self) beforeSave() {} +func (s *self) beforeSave() {} -func (x *self) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.pidns) +func (s *self) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Symlink) + stateSinkObject.Save(1, &s.pidns) } -func (x *self) afterLoad() {} +func (s *self) afterLoad() {} -func (x *self) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.pidns) +func (s *self) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Symlink) + stateSourceObject.Load(1, &s.pidns) } -func (x *threadSelf) StateTypeName() string { +func (t *threadSelf) StateTypeName() string { return "pkg/sentry/fs/proc.threadSelf" } -func (x *threadSelf) StateFields() []string { +func (t *threadSelf) StateFields() []string { return []string{ "Symlink", "pidns", } } -func (x *threadSelf) beforeSave() {} +func (t *threadSelf) beforeSave() {} -func (x *threadSelf) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.pidns) +func (t *threadSelf) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Symlink) + stateSinkObject.Save(1, &t.pidns) } -func (x *threadSelf) afterLoad() {} +func (t *threadSelf) afterLoad() {} -func (x *threadSelf) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.pidns) +func (t *threadSelf) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Symlink) + stateSourceObject.Load(1, &t.pidns) } -func (x *rootProcFile) StateTypeName() string { +func (r *rootProcFile) StateTypeName() string { return "pkg/sentry/fs/proc.rootProcFile" } -func (x *rootProcFile) StateFields() []string { +func (r *rootProcFile) StateFields() []string { return []string{ "iops", } } -func (x *rootProcFile) beforeSave() {} +func (r *rootProcFile) beforeSave() {} -func (x *rootProcFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.iops) +func (r *rootProcFile) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.iops) } -func (x *rootProcFile) afterLoad() {} +func (r *rootProcFile) afterLoad() {} -func (x *rootProcFile) StateLoad(m state.Source) { - m.Load(0, &x.iops) +func (r *rootProcFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.iops) } -func (x *statData) StateTypeName() string { +func (s *statData) StateTypeName() string { return "pkg/sentry/fs/proc.statData" } -func (x *statData) StateFields() []string { +func (s *statData) StateFields() []string { return []string{ "k", } } -func (x *statData) beforeSave() {} +func (s *statData) beforeSave() {} -func (x *statData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (s *statData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.k) } -func (x *statData) afterLoad() {} +func (s *statData) afterLoad() {} -func (x *statData) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (s *statData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.k) } -func (x *mmapMinAddrData) StateTypeName() string { +func (m *mmapMinAddrData) StateTypeName() string { return "pkg/sentry/fs/proc.mmapMinAddrData" } -func (x *mmapMinAddrData) StateFields() []string { +func (m *mmapMinAddrData) StateFields() []string { return []string{ "k", } } -func (x *mmapMinAddrData) beforeSave() {} +func (m *mmapMinAddrData) beforeSave() {} -func (x *mmapMinAddrData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (m *mmapMinAddrData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.k) } -func (x *mmapMinAddrData) afterLoad() {} +func (m *mmapMinAddrData) afterLoad() {} -func (x *mmapMinAddrData) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (m *mmapMinAddrData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.k) } -func (x *overcommitMemory) StateTypeName() string { +func (o *overcommitMemory) StateTypeName() string { return "pkg/sentry/fs/proc.overcommitMemory" } -func (x *overcommitMemory) StateFields() []string { +func (o *overcommitMemory) StateFields() []string { return []string{} } -func (x *overcommitMemory) beforeSave() {} +func (o *overcommitMemory) beforeSave() {} -func (x *overcommitMemory) StateSave(m state.Sink) { - x.beforeSave() +func (o *overcommitMemory) StateSave(stateSinkObject state.Sink) { + o.beforeSave() } -func (x *overcommitMemory) afterLoad() {} +func (o *overcommitMemory) afterLoad() {} -func (x *overcommitMemory) StateLoad(m state.Source) { +func (o *overcommitMemory) StateLoad(stateSourceObject state.Source) { } -func (x *hostname) StateTypeName() string { +func (h *hostname) StateTypeName() string { return "pkg/sentry/fs/proc.hostname" } -func (x *hostname) StateFields() []string { +func (h *hostname) StateFields() []string { return []string{ "SimpleFileInode", } } -func (x *hostname) beforeSave() {} +func (h *hostname) beforeSave() {} -func (x *hostname) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) +func (h *hostname) StateSave(stateSinkObject state.Sink) { + h.beforeSave() + stateSinkObject.Save(0, &h.SimpleFileInode) } -func (x *hostname) afterLoad() {} +func (h *hostname) afterLoad() {} -func (x *hostname) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) +func (h *hostname) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &h.SimpleFileInode) } -func (x *hostnameFile) StateTypeName() string { +func (h *hostnameFile) StateTypeName() string { return "pkg/sentry/fs/proc.hostnameFile" } -func (x *hostnameFile) StateFields() []string { +func (h *hostnameFile) StateFields() []string { return []string{} } -func (x *hostnameFile) beforeSave() {} +func (h *hostnameFile) beforeSave() {} -func (x *hostnameFile) StateSave(m state.Sink) { - x.beforeSave() +func (h *hostnameFile) StateSave(stateSinkObject state.Sink) { + h.beforeSave() } -func (x *hostnameFile) afterLoad() {} +func (h *hostnameFile) afterLoad() {} -func (x *hostnameFile) StateLoad(m state.Source) { +func (h *hostnameFile) StateLoad(stateSourceObject state.Source) { } -func (x *tcpMemInode) StateTypeName() string { +func (t *tcpMemInode) StateTypeName() string { return "pkg/sentry/fs/proc.tcpMemInode" } -func (x *tcpMemInode) StateFields() []string { +func (t *tcpMemInode) StateFields() []string { return []string{ "SimpleFileInode", "dir", @@ -728,50 +728,50 @@ func (x *tcpMemInode) StateFields() []string { } } -func (x *tcpMemInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.dir) - m.Save(2, &x.s) - m.Save(3, &x.size) +func (t *tcpMemInode) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.SimpleFileInode) + stateSinkObject.Save(1, &t.dir) + stateSinkObject.Save(2, &t.s) + stateSinkObject.Save(3, &t.size) } -func (x *tcpMemInode) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.dir) - m.LoadWait(2, &x.s) - m.Load(3, &x.size) - m.AfterLoad(x.afterLoad) +func (t *tcpMemInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.SimpleFileInode) + stateSourceObject.Load(1, &t.dir) + stateSourceObject.LoadWait(2, &t.s) + stateSourceObject.Load(3, &t.size) + stateSourceObject.AfterLoad(t.afterLoad) } -func (x *tcpMemFile) StateTypeName() string { +func (t *tcpMemFile) StateTypeName() string { return "pkg/sentry/fs/proc.tcpMemFile" } -func (x *tcpMemFile) StateFields() []string { +func (t *tcpMemFile) StateFields() []string { return []string{ "tcpMemInode", } } -func (x *tcpMemFile) beforeSave() {} +func (t *tcpMemFile) beforeSave() {} -func (x *tcpMemFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tcpMemInode) +func (t *tcpMemFile) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tcpMemInode) } -func (x *tcpMemFile) afterLoad() {} +func (t *tcpMemFile) afterLoad() {} -func (x *tcpMemFile) StateLoad(m state.Source) { - m.Load(0, &x.tcpMemInode) +func (t *tcpMemFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tcpMemInode) } -func (x *tcpSack) StateTypeName() string { +func (t *tcpSack) StateTypeName() string { return "pkg/sentry/fs/proc.tcpSack" } -func (x *tcpSack) StateFields() []string { +func (t *tcpSack) StateFields() []string { return []string{ "SimpleFileInode", "stack", @@ -779,53 +779,53 @@ func (x *tcpSack) StateFields() []string { } } -func (x *tcpSack) beforeSave() {} +func (t *tcpSack) beforeSave() {} -func (x *tcpSack) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.stack) - m.Save(2, &x.enabled) +func (t *tcpSack) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.SimpleFileInode) + stateSinkObject.Save(1, &t.stack) + stateSinkObject.Save(2, &t.enabled) } -func (x *tcpSack) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.LoadWait(1, &x.stack) - m.Load(2, &x.enabled) - m.AfterLoad(x.afterLoad) +func (t *tcpSack) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.SimpleFileInode) + stateSourceObject.LoadWait(1, &t.stack) + stateSourceObject.Load(2, &t.enabled) + stateSourceObject.AfterLoad(t.afterLoad) } -func (x *tcpSackFile) StateTypeName() string { +func (t *tcpSackFile) StateTypeName() string { return "pkg/sentry/fs/proc.tcpSackFile" } -func (x *tcpSackFile) StateFields() []string { +func (t *tcpSackFile) StateFields() []string { return []string{ "tcpSack", "stack", } } -func (x *tcpSackFile) beforeSave() {} +func (t *tcpSackFile) beforeSave() {} -func (x *tcpSackFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tcpSack) - m.Save(1, &x.stack) +func (t *tcpSackFile) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tcpSack) + stateSinkObject.Save(1, &t.stack) } -func (x *tcpSackFile) afterLoad() {} +func (t *tcpSackFile) afterLoad() {} -func (x *tcpSackFile) StateLoad(m state.Source) { - m.Load(0, &x.tcpSack) - m.LoadWait(1, &x.stack) +func (t *tcpSackFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tcpSack) + stateSourceObject.LoadWait(1, &t.stack) } -func (x *tcpRecovery) StateTypeName() string { +func (t *tcpRecovery) StateTypeName() string { return "pkg/sentry/fs/proc.tcpRecovery" } -func (x *tcpRecovery) StateFields() []string { +func (t *tcpRecovery) StateFields() []string { return []string{ "SimpleFileInode", "stack", @@ -833,54 +833,54 @@ func (x *tcpRecovery) StateFields() []string { } } -func (x *tcpRecovery) beforeSave() {} +func (t *tcpRecovery) beforeSave() {} -func (x *tcpRecovery) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.stack) - m.Save(2, &x.recovery) +func (t *tcpRecovery) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.SimpleFileInode) + stateSinkObject.Save(1, &t.stack) + stateSinkObject.Save(2, &t.recovery) } -func (x *tcpRecovery) afterLoad() {} +func (t *tcpRecovery) afterLoad() {} -func (x *tcpRecovery) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.LoadWait(1, &x.stack) - m.Load(2, &x.recovery) +func (t *tcpRecovery) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.SimpleFileInode) + stateSourceObject.LoadWait(1, &t.stack) + stateSourceObject.Load(2, &t.recovery) } -func (x *tcpRecoveryFile) StateTypeName() string { +func (t *tcpRecoveryFile) StateTypeName() string { return "pkg/sentry/fs/proc.tcpRecoveryFile" } -func (x *tcpRecoveryFile) StateFields() []string { +func (t *tcpRecoveryFile) StateFields() []string { return []string{ "tcpRecovery", "stack", } } -func (x *tcpRecoveryFile) beforeSave() {} +func (t *tcpRecoveryFile) beforeSave() {} -func (x *tcpRecoveryFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tcpRecovery) - m.Save(1, &x.stack) +func (t *tcpRecoveryFile) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tcpRecovery) + stateSinkObject.Save(1, &t.stack) } -func (x *tcpRecoveryFile) afterLoad() {} +func (t *tcpRecoveryFile) afterLoad() {} -func (x *tcpRecoveryFile) StateLoad(m state.Source) { - m.Load(0, &x.tcpRecovery) - m.LoadWait(1, &x.stack) +func (t *tcpRecoveryFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tcpRecovery) + stateSourceObject.LoadWait(1, &t.stack) } -func (x *ipForwarding) StateTypeName() string { +func (i *ipForwarding) StateTypeName() string { return "pkg/sentry/fs/proc.ipForwarding" } -func (x *ipForwarding) StateFields() []string { +func (i *ipForwarding) StateFields() []string { return []string{ "SimpleFileInode", "stack", @@ -888,79 +888,79 @@ func (x *ipForwarding) StateFields() []string { } } -func (x *ipForwarding) beforeSave() {} +func (i *ipForwarding) beforeSave() {} -func (x *ipForwarding) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.stack) - m.Save(2, &x.enabled) +func (i *ipForwarding) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.SimpleFileInode) + stateSinkObject.Save(1, &i.stack) + stateSinkObject.Save(2, &i.enabled) } -func (x *ipForwarding) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.LoadWait(1, &x.stack) - m.Load(2, &x.enabled) - m.AfterLoad(x.afterLoad) +func (i *ipForwarding) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.SimpleFileInode) + stateSourceObject.LoadWait(1, &i.stack) + stateSourceObject.Load(2, &i.enabled) + stateSourceObject.AfterLoad(i.afterLoad) } -func (x *ipForwardingFile) StateTypeName() string { +func (i *ipForwardingFile) StateTypeName() string { return "pkg/sentry/fs/proc.ipForwardingFile" } -func (x *ipForwardingFile) StateFields() []string { +func (i *ipForwardingFile) StateFields() []string { return []string{ "ipf", "stack", } } -func (x *ipForwardingFile) beforeSave() {} +func (i *ipForwardingFile) beforeSave() {} -func (x *ipForwardingFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ipf) - m.Save(1, &x.stack) +func (i *ipForwardingFile) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.ipf) + stateSinkObject.Save(1, &i.stack) } -func (x *ipForwardingFile) afterLoad() {} +func (i *ipForwardingFile) afterLoad() {} -func (x *ipForwardingFile) StateLoad(m state.Source) { - m.Load(0, &x.ipf) - m.LoadWait(1, &x.stack) +func (i *ipForwardingFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.ipf) + stateSourceObject.LoadWait(1, &i.stack) } -func (x *taskDir) StateTypeName() string { +func (t *taskDir) StateTypeName() string { return "pkg/sentry/fs/proc.taskDir" } -func (x *taskDir) StateFields() []string { +func (t *taskDir) StateFields() []string { return []string{ "Dir", "t", } } -func (x *taskDir) beforeSave() {} +func (t *taskDir) beforeSave() {} -func (x *taskDir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.t) +func (t *taskDir) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Dir) + stateSinkObject.Save(1, &t.t) } -func (x *taskDir) afterLoad() {} +func (t *taskDir) afterLoad() {} -func (x *taskDir) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.t) +func (t *taskDir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Dir) + stateSourceObject.Load(1, &t.t) } -func (x *subtasks) StateTypeName() string { +func (s *subtasks) StateTypeName() string { return "pkg/sentry/fs/proc.subtasks" } -func (x *subtasks) StateFields() []string { +func (s *subtasks) StateFields() []string { return []string{ "Dir", "t", @@ -968,178 +968,178 @@ func (x *subtasks) StateFields() []string { } } -func (x *subtasks) beforeSave() {} +func (s *subtasks) beforeSave() {} -func (x *subtasks) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Dir) - m.Save(1, &x.t) - m.Save(2, &x.p) +func (s *subtasks) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Dir) + stateSinkObject.Save(1, &s.t) + stateSinkObject.Save(2, &s.p) } -func (x *subtasks) afterLoad() {} +func (s *subtasks) afterLoad() {} -func (x *subtasks) StateLoad(m state.Source) { - m.Load(0, &x.Dir) - m.Load(1, &x.t) - m.Load(2, &x.p) +func (s *subtasks) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Dir) + stateSourceObject.Load(1, &s.t) + stateSourceObject.Load(2, &s.p) } -func (x *subtasksFile) StateTypeName() string { +func (s *subtasksFile) StateTypeName() string { return "pkg/sentry/fs/proc.subtasksFile" } -func (x *subtasksFile) StateFields() []string { +func (s *subtasksFile) StateFields() []string { return []string{ "t", "pidns", } } -func (x *subtasksFile) beforeSave() {} +func (s *subtasksFile) beforeSave() {} -func (x *subtasksFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) - m.Save(1, &x.pidns) +func (s *subtasksFile) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) + stateSinkObject.Save(1, &s.pidns) } -func (x *subtasksFile) afterLoad() {} +func (s *subtasksFile) afterLoad() {} -func (x *subtasksFile) StateLoad(m state.Source) { - m.Load(0, &x.t) - m.Load(1, &x.pidns) +func (s *subtasksFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) + stateSourceObject.Load(1, &s.pidns) } -func (x *exe) StateTypeName() string { +func (e *exe) StateTypeName() string { return "pkg/sentry/fs/proc.exe" } -func (x *exe) StateFields() []string { +func (e *exe) StateFields() []string { return []string{ "Symlink", "t", } } -func (x *exe) beforeSave() {} +func (e *exe) beforeSave() {} -func (x *exe) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.t) +func (e *exe) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.Symlink) + stateSinkObject.Save(1, &e.t) } -func (x *exe) afterLoad() {} +func (e *exe) afterLoad() {} -func (x *exe) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.t) +func (e *exe) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.Symlink) + stateSourceObject.Load(1, &e.t) } -func (x *cwd) StateTypeName() string { +func (c *cwd) StateTypeName() string { return "pkg/sentry/fs/proc.cwd" } -func (x *cwd) StateFields() []string { +func (c *cwd) StateFields() []string { return []string{ "Symlink", "t", } } -func (x *cwd) beforeSave() {} +func (c *cwd) beforeSave() {} -func (x *cwd) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.t) +func (c *cwd) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.Symlink) + stateSinkObject.Save(1, &c.t) } -func (x *cwd) afterLoad() {} +func (c *cwd) afterLoad() {} -func (x *cwd) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.t) +func (c *cwd) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.Symlink) + stateSourceObject.Load(1, &c.t) } -func (x *namespaceSymlink) StateTypeName() string { +func (n *namespaceSymlink) StateTypeName() string { return "pkg/sentry/fs/proc.namespaceSymlink" } -func (x *namespaceSymlink) StateFields() []string { +func (n *namespaceSymlink) StateFields() []string { return []string{ "Symlink", "t", } } -func (x *namespaceSymlink) beforeSave() {} +func (n *namespaceSymlink) beforeSave() {} -func (x *namespaceSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) - m.Save(1, &x.t) +func (n *namespaceSymlink) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.Symlink) + stateSinkObject.Save(1, &n.t) } -func (x *namespaceSymlink) afterLoad() {} +func (n *namespaceSymlink) afterLoad() {} -func (x *namespaceSymlink) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) - m.Load(1, &x.t) +func (n *namespaceSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.Symlink) + stateSourceObject.Load(1, &n.t) } -func (x *mapsData) StateTypeName() string { +func (m *mapsData) StateTypeName() string { return "pkg/sentry/fs/proc.mapsData" } -func (x *mapsData) StateFields() []string { +func (m *mapsData) StateFields() []string { return []string{ "t", } } -func (x *mapsData) beforeSave() {} +func (m *mapsData) beforeSave() {} -func (x *mapsData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (m *mapsData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.t) } -func (x *mapsData) afterLoad() {} +func (m *mapsData) afterLoad() {} -func (x *mapsData) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (m *mapsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.t) } -func (x *smapsData) StateTypeName() string { +func (s *smapsData) StateTypeName() string { return "pkg/sentry/fs/proc.smapsData" } -func (x *smapsData) StateFields() []string { +func (s *smapsData) StateFields() []string { return []string{ "t", } } -func (x *smapsData) beforeSave() {} +func (s *smapsData) beforeSave() {} -func (x *smapsData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (s *smapsData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) } -func (x *smapsData) afterLoad() {} +func (s *smapsData) afterLoad() {} -func (x *smapsData) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (s *smapsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) } -func (x *taskStatData) StateTypeName() string { +func (t *taskStatData) StateTypeName() string { return "pkg/sentry/fs/proc.taskStatData" } -func (x *taskStatData) StateFields() []string { +func (t *taskStatData) StateFields() []string { return []string{ "t", "tgstats", @@ -1147,247 +1147,247 @@ func (x *taskStatData) StateFields() []string { } } -func (x *taskStatData) beforeSave() {} +func (t *taskStatData) beforeSave() {} -func (x *taskStatData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) - m.Save(1, &x.tgstats) - m.Save(2, &x.pidns) +func (t *taskStatData) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.t) + stateSinkObject.Save(1, &t.tgstats) + stateSinkObject.Save(2, &t.pidns) } -func (x *taskStatData) afterLoad() {} +func (t *taskStatData) afterLoad() {} -func (x *taskStatData) StateLoad(m state.Source) { - m.Load(0, &x.t) - m.Load(1, &x.tgstats) - m.Load(2, &x.pidns) +func (t *taskStatData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.t) + stateSourceObject.Load(1, &t.tgstats) + stateSourceObject.Load(2, &t.pidns) } -func (x *statmData) StateTypeName() string { +func (s *statmData) StateTypeName() string { return "pkg/sentry/fs/proc.statmData" } -func (x *statmData) StateFields() []string { +func (s *statmData) StateFields() []string { return []string{ "t", } } -func (x *statmData) beforeSave() {} +func (s *statmData) beforeSave() {} -func (x *statmData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (s *statmData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) } -func (x *statmData) afterLoad() {} +func (s *statmData) afterLoad() {} -func (x *statmData) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (s *statmData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) } -func (x *statusData) StateTypeName() string { +func (s *statusData) StateTypeName() string { return "pkg/sentry/fs/proc.statusData" } -func (x *statusData) StateFields() []string { +func (s *statusData) StateFields() []string { return []string{ "t", "pidns", } } -func (x *statusData) beforeSave() {} +func (s *statusData) beforeSave() {} -func (x *statusData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) - m.Save(1, &x.pidns) +func (s *statusData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) + stateSinkObject.Save(1, &s.pidns) } -func (x *statusData) afterLoad() {} +func (s *statusData) afterLoad() {} -func (x *statusData) StateLoad(m state.Source) { - m.Load(0, &x.t) - m.Load(1, &x.pidns) +func (s *statusData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) + stateSourceObject.Load(1, &s.pidns) } -func (x *ioData) StateTypeName() string { +func (i *ioData) StateTypeName() string { return "pkg/sentry/fs/proc.ioData" } -func (x *ioData) StateFields() []string { +func (i *ioData) StateFields() []string { return []string{ "ioUsage", } } -func (x *ioData) beforeSave() {} +func (i *ioData) beforeSave() {} -func (x *ioData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ioUsage) +func (i *ioData) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.ioUsage) } -func (x *ioData) afterLoad() {} +func (i *ioData) afterLoad() {} -func (x *ioData) StateLoad(m state.Source) { - m.Load(0, &x.ioUsage) +func (i *ioData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.ioUsage) } -func (x *comm) StateTypeName() string { +func (c *comm) StateTypeName() string { return "pkg/sentry/fs/proc.comm" } -func (x *comm) StateFields() []string { +func (c *comm) StateFields() []string { return []string{ "SimpleFileInode", "t", } } -func (x *comm) beforeSave() {} +func (c *comm) beforeSave() {} -func (x *comm) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.t) +func (c *comm) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.SimpleFileInode) + stateSinkObject.Save(1, &c.t) } -func (x *comm) afterLoad() {} +func (c *comm) afterLoad() {} -func (x *comm) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.t) +func (c *comm) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.SimpleFileInode) + stateSourceObject.Load(1, &c.t) } -func (x *commFile) StateTypeName() string { +func (c *commFile) StateTypeName() string { return "pkg/sentry/fs/proc.commFile" } -func (x *commFile) StateFields() []string { +func (c *commFile) StateFields() []string { return []string{ "t", } } -func (x *commFile) beforeSave() {} +func (c *commFile) beforeSave() {} -func (x *commFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (c *commFile) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.t) } -func (x *commFile) afterLoad() {} +func (c *commFile) afterLoad() {} -func (x *commFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (c *commFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.t) } -func (x *auxvec) StateTypeName() string { +func (a *auxvec) StateTypeName() string { return "pkg/sentry/fs/proc.auxvec" } -func (x *auxvec) StateFields() []string { +func (a *auxvec) StateFields() []string { return []string{ "SimpleFileInode", "t", } } -func (x *auxvec) beforeSave() {} +func (a *auxvec) beforeSave() {} -func (x *auxvec) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.t) +func (a *auxvec) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.SimpleFileInode) + stateSinkObject.Save(1, &a.t) } -func (x *auxvec) afterLoad() {} +func (a *auxvec) afterLoad() {} -func (x *auxvec) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.t) +func (a *auxvec) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.SimpleFileInode) + stateSourceObject.Load(1, &a.t) } -func (x *auxvecFile) StateTypeName() string { +func (a *auxvecFile) StateTypeName() string { return "pkg/sentry/fs/proc.auxvecFile" } -func (x *auxvecFile) StateFields() []string { +func (a *auxvecFile) StateFields() []string { return []string{ "t", } } -func (x *auxvecFile) beforeSave() {} +func (a *auxvecFile) beforeSave() {} -func (x *auxvecFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (a *auxvecFile) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.t) } -func (x *auxvecFile) afterLoad() {} +func (a *auxvecFile) afterLoad() {} -func (x *auxvecFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (a *auxvecFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.t) } -func (x *oomScoreAdj) StateTypeName() string { +func (o *oomScoreAdj) StateTypeName() string { return "pkg/sentry/fs/proc.oomScoreAdj" } -func (x *oomScoreAdj) StateFields() []string { +func (o *oomScoreAdj) StateFields() []string { return []string{ "SimpleFileInode", "t", } } -func (x *oomScoreAdj) beforeSave() {} +func (o *oomScoreAdj) beforeSave() {} -func (x *oomScoreAdj) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.t) +func (o *oomScoreAdj) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.SimpleFileInode) + stateSinkObject.Save(1, &o.t) } -func (x *oomScoreAdj) afterLoad() {} +func (o *oomScoreAdj) afterLoad() {} -func (x *oomScoreAdj) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.t) +func (o *oomScoreAdj) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.SimpleFileInode) + stateSourceObject.Load(1, &o.t) } -func (x *oomScoreAdjFile) StateTypeName() string { +func (o *oomScoreAdjFile) StateTypeName() string { return "pkg/sentry/fs/proc.oomScoreAdjFile" } -func (x *oomScoreAdjFile) StateFields() []string { +func (o *oomScoreAdjFile) StateFields() []string { return []string{ "t", } } -func (x *oomScoreAdjFile) beforeSave() {} +func (o *oomScoreAdjFile) beforeSave() {} -func (x *oomScoreAdjFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) +func (o *oomScoreAdjFile) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.t) } -func (x *oomScoreAdjFile) afterLoad() {} +func (o *oomScoreAdjFile) afterLoad() {} -func (x *oomScoreAdjFile) StateLoad(m state.Source) { - m.Load(0, &x.t) +func (o *oomScoreAdjFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.t) } -func (x *idMapInodeOperations) StateTypeName() string { +func (i *idMapInodeOperations) StateTypeName() string { return "pkg/sentry/fs/proc.idMapInodeOperations" } -func (x *idMapInodeOperations) StateFields() []string { +func (i *idMapInodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeSimpleExtendedAttributes", @@ -1396,118 +1396,118 @@ func (x *idMapInodeOperations) StateFields() []string { } } -func (x *idMapInodeOperations) beforeSave() {} +func (i *idMapInodeOperations) beforeSave() {} -func (x *idMapInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeSimpleExtendedAttributes) - m.Save(2, &x.t) - m.Save(3, &x.gids) +func (i *idMapInodeOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.InodeSimpleAttributes) + stateSinkObject.Save(1, &i.InodeSimpleExtendedAttributes) + stateSinkObject.Save(2, &i.t) + stateSinkObject.Save(3, &i.gids) } -func (x *idMapInodeOperations) afterLoad() {} +func (i *idMapInodeOperations) afterLoad() {} -func (x *idMapInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeSimpleExtendedAttributes) - m.Load(2, &x.t) - m.Load(3, &x.gids) +func (i *idMapInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeSimpleAttributes) + stateSourceObject.Load(1, &i.InodeSimpleExtendedAttributes) + stateSourceObject.Load(2, &i.t) + stateSourceObject.Load(3, &i.gids) } -func (x *idMapFileOperations) StateTypeName() string { +func (i *idMapFileOperations) StateTypeName() string { return "pkg/sentry/fs/proc.idMapFileOperations" } -func (x *idMapFileOperations) StateFields() []string { +func (i *idMapFileOperations) StateFields() []string { return []string{ "iops", } } -func (x *idMapFileOperations) beforeSave() {} +func (i *idMapFileOperations) beforeSave() {} -func (x *idMapFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.iops) +func (i *idMapFileOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.iops) } -func (x *idMapFileOperations) afterLoad() {} +func (i *idMapFileOperations) afterLoad() {} -func (x *idMapFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.iops) +func (i *idMapFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.iops) } -func (x *uptime) StateTypeName() string { +func (u *uptime) StateTypeName() string { return "pkg/sentry/fs/proc.uptime" } -func (x *uptime) StateFields() []string { +func (u *uptime) StateFields() []string { return []string{ "SimpleFileInode", "startTime", } } -func (x *uptime) beforeSave() {} +func (u *uptime) beforeSave() {} -func (x *uptime) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.startTime) +func (u *uptime) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.SimpleFileInode) + stateSinkObject.Save(1, &u.startTime) } -func (x *uptime) afterLoad() {} +func (u *uptime) afterLoad() {} -func (x *uptime) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.startTime) +func (u *uptime) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.SimpleFileInode) + stateSourceObject.Load(1, &u.startTime) } -func (x *uptimeFile) StateTypeName() string { +func (u *uptimeFile) StateTypeName() string { return "pkg/sentry/fs/proc.uptimeFile" } -func (x *uptimeFile) StateFields() []string { +func (u *uptimeFile) StateFields() []string { return []string{ "startTime", } } -func (x *uptimeFile) beforeSave() {} +func (u *uptimeFile) beforeSave() {} -func (x *uptimeFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.startTime) +func (u *uptimeFile) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.startTime) } -func (x *uptimeFile) afterLoad() {} +func (u *uptimeFile) afterLoad() {} -func (x *uptimeFile) StateLoad(m state.Source) { - m.Load(0, &x.startTime) +func (u *uptimeFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.startTime) } -func (x *versionData) StateTypeName() string { +func (v *versionData) StateTypeName() string { return "pkg/sentry/fs/proc.versionData" } -func (x *versionData) StateFields() []string { +func (v *versionData) StateFields() []string { return []string{ "k", } } -func (x *versionData) beforeSave() {} +func (v *versionData) beforeSave() {} -func (x *versionData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) +func (v *versionData) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.k) } -func (x *versionData) afterLoad() {} +func (v *versionData) afterLoad() {} -func (x *versionData) StateLoad(m state.Source) { - m.Load(0, &x.k) +func (v *versionData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.k) } func init() { diff --git a/pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go b/pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go index 6f48a944a..cc107af96 100644 --- a/pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go +++ b/pkg/sentry/fs/proc/seqfile/seqfile_state_autogen.go @@ -6,37 +6,37 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SeqData) StateTypeName() string { +func (s *SeqData) StateTypeName() string { return "pkg/sentry/fs/proc/seqfile.SeqData" } -func (x *SeqData) StateFields() []string { +func (s *SeqData) StateFields() []string { return []string{ "Buf", "Handle", } } -func (x *SeqData) beforeSave() {} +func (s *SeqData) beforeSave() {} -func (x *SeqData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Buf) - m.Save(1, &x.Handle) +func (s *SeqData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Buf) + stateSinkObject.Save(1, &s.Handle) } -func (x *SeqData) afterLoad() {} +func (s *SeqData) afterLoad() {} -func (x *SeqData) StateLoad(m state.Source) { - m.Load(0, &x.Buf) - m.Load(1, &x.Handle) +func (s *SeqData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Buf) + stateSourceObject.Load(1, &s.Handle) } -func (x *SeqFile) StateTypeName() string { +func (s *SeqFile) StateTypeName() string { return "pkg/sentry/fs/proc/seqfile.SeqFile" } -func (x *SeqFile) StateFields() []string { +func (s *SeqFile) StateFields() []string { return []string{ "InodeSimpleExtendedAttributes", "InodeSimpleAttributes", @@ -47,50 +47,50 @@ func (x *SeqFile) StateFields() []string { } } -func (x *SeqFile) beforeSave() {} +func (s *SeqFile) beforeSave() {} -func (x *SeqFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleExtendedAttributes) - m.Save(1, &x.InodeSimpleAttributes) - m.Save(2, &x.SeqSource) - m.Save(3, &x.source) - m.Save(4, &x.generation) - m.Save(5, &x.lastRead) +func (s *SeqFile) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleExtendedAttributes) + stateSinkObject.Save(1, &s.InodeSimpleAttributes) + stateSinkObject.Save(2, &s.SeqSource) + stateSinkObject.Save(3, &s.source) + stateSinkObject.Save(4, &s.generation) + stateSinkObject.Save(5, &s.lastRead) } -func (x *SeqFile) afterLoad() {} +func (s *SeqFile) afterLoad() {} -func (x *SeqFile) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleExtendedAttributes) - m.Load(1, &x.InodeSimpleAttributes) - m.Load(2, &x.SeqSource) - m.Load(3, &x.source) - m.Load(4, &x.generation) - m.Load(5, &x.lastRead) +func (s *SeqFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleExtendedAttributes) + stateSourceObject.Load(1, &s.InodeSimpleAttributes) + stateSourceObject.Load(2, &s.SeqSource) + stateSourceObject.Load(3, &s.source) + stateSourceObject.Load(4, &s.generation) + stateSourceObject.Load(5, &s.lastRead) } -func (x *seqFileOperations) StateTypeName() string { +func (s *seqFileOperations) StateTypeName() string { return "pkg/sentry/fs/proc/seqfile.seqFileOperations" } -func (x *seqFileOperations) StateFields() []string { +func (s *seqFileOperations) StateFields() []string { return []string{ "seqFile", } } -func (x *seqFileOperations) beforeSave() {} +func (s *seqFileOperations) beforeSave() {} -func (x *seqFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.seqFile) +func (s *seqFileOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.seqFile) } -func (x *seqFileOperations) afterLoad() {} +func (s *seqFileOperations) afterLoad() {} -func (x *seqFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.seqFile) +func (s *seqFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.seqFile) } func init() { diff --git a/pkg/sentry/fs/ramfs/ramfs_state_autogen.go b/pkg/sentry/fs/ramfs/ramfs_state_autogen.go index bfa355c84..e4943e646 100644 --- a/pkg/sentry/fs/ramfs/ramfs_state_autogen.go +++ b/pkg/sentry/fs/ramfs/ramfs_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Dir) StateTypeName() string { +func (d *Dir) StateTypeName() string { return "pkg/sentry/fs/ramfs.Dir" } -func (x *Dir) StateFields() []string { +func (d *Dir) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeSimpleExtendedAttributes", @@ -19,56 +19,56 @@ func (x *Dir) StateFields() []string { } } -func (x *Dir) beforeSave() {} +func (d *Dir) beforeSave() {} -func (x *Dir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeSimpleExtendedAttributes) - m.Save(2, &x.children) - m.Save(3, &x.dentryMap) +func (d *Dir) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.InodeSimpleAttributes) + stateSinkObject.Save(1, &d.InodeSimpleExtendedAttributes) + stateSinkObject.Save(2, &d.children) + stateSinkObject.Save(3, &d.dentryMap) } -func (x *Dir) afterLoad() {} +func (d *Dir) afterLoad() {} -func (x *Dir) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeSimpleExtendedAttributes) - m.Load(2, &x.children) - m.Load(3, &x.dentryMap) +func (d *Dir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.InodeSimpleAttributes) + stateSourceObject.Load(1, &d.InodeSimpleExtendedAttributes) + stateSourceObject.Load(2, &d.children) + stateSourceObject.Load(3, &d.dentryMap) } -func (x *dirFileOperations) StateTypeName() string { +func (d *dirFileOperations) StateTypeName() string { return "pkg/sentry/fs/ramfs.dirFileOperations" } -func (x *dirFileOperations) StateFields() []string { +func (d *dirFileOperations) StateFields() []string { return []string{ "dirCursor", "dir", } } -func (x *dirFileOperations) beforeSave() {} +func (d *dirFileOperations) beforeSave() {} -func (x *dirFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dirCursor) - m.Save(1, &x.dir) +func (d *dirFileOperations) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.dirCursor) + stateSinkObject.Save(1, &d.dir) } -func (x *dirFileOperations) afterLoad() {} +func (d *dirFileOperations) afterLoad() {} -func (x *dirFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.dirCursor) - m.Load(1, &x.dir) +func (d *dirFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.dirCursor) + stateSourceObject.Load(1, &d.dir) } -func (x *Socket) StateTypeName() string { +func (s *Socket) StateTypeName() string { return "pkg/sentry/fs/ramfs.Socket" } -func (x *Socket) StateFields() []string { +func (s *Socket) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeSimpleExtendedAttributes", @@ -76,47 +76,47 @@ func (x *Socket) StateFields() []string { } } -func (x *Socket) beforeSave() {} +func (s *Socket) beforeSave() {} -func (x *Socket) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeSimpleExtendedAttributes) - m.Save(2, &x.ep) +func (s *Socket) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleAttributes) + stateSinkObject.Save(1, &s.InodeSimpleExtendedAttributes) + stateSinkObject.Save(2, &s.ep) } -func (x *Socket) afterLoad() {} +func (s *Socket) afterLoad() {} -func (x *Socket) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeSimpleExtendedAttributes) - m.Load(2, &x.ep) +func (s *Socket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleAttributes) + stateSourceObject.Load(1, &s.InodeSimpleExtendedAttributes) + stateSourceObject.Load(2, &s.ep) } -func (x *socketFileOperations) StateTypeName() string { +func (s *socketFileOperations) StateTypeName() string { return "pkg/sentry/fs/ramfs.socketFileOperations" } -func (x *socketFileOperations) StateFields() []string { +func (s *socketFileOperations) StateFields() []string { return []string{} } -func (x *socketFileOperations) beforeSave() {} +func (s *socketFileOperations) beforeSave() {} -func (x *socketFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (s *socketFileOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *socketFileOperations) afterLoad() {} +func (s *socketFileOperations) afterLoad() {} -func (x *socketFileOperations) StateLoad(m state.Source) { +func (s *socketFileOperations) StateLoad(stateSourceObject state.Source) { } -func (x *Symlink) StateTypeName() string { +func (s *Symlink) StateTypeName() string { return "pkg/sentry/fs/ramfs.Symlink" } -func (x *Symlink) StateFields() []string { +func (s *Symlink) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeSimpleExtendedAttributes", @@ -124,40 +124,40 @@ func (x *Symlink) StateFields() []string { } } -func (x *Symlink) beforeSave() {} +func (s *Symlink) beforeSave() {} -func (x *Symlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeSimpleExtendedAttributes) - m.Save(2, &x.Target) +func (s *Symlink) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeSimpleAttributes) + stateSinkObject.Save(1, &s.InodeSimpleExtendedAttributes) + stateSinkObject.Save(2, &s.Target) } -func (x *Symlink) afterLoad() {} +func (s *Symlink) afterLoad() {} -func (x *Symlink) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeSimpleExtendedAttributes) - m.Load(2, &x.Target) +func (s *Symlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeSimpleAttributes) + stateSourceObject.Load(1, &s.InodeSimpleExtendedAttributes) + stateSourceObject.Load(2, &s.Target) } -func (x *symlinkFileOperations) StateTypeName() string { +func (s *symlinkFileOperations) StateTypeName() string { return "pkg/sentry/fs/ramfs.symlinkFileOperations" } -func (x *symlinkFileOperations) StateFields() []string { +func (s *symlinkFileOperations) StateFields() []string { return []string{} } -func (x *symlinkFileOperations) beforeSave() {} +func (s *symlinkFileOperations) beforeSave() {} -func (x *symlinkFileOperations) StateSave(m state.Sink) { - x.beforeSave() +func (s *symlinkFileOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *symlinkFileOperations) afterLoad() {} +func (s *symlinkFileOperations) afterLoad() {} -func (x *symlinkFileOperations) StateLoad(m state.Source) { +func (s *symlinkFileOperations) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/fs/sys/sys_state_autogen.go b/pkg/sentry/fs/sys/sys_state_autogen.go index 71e08a167..390f092cb 100644 --- a/pkg/sentry/fs/sys/sys_state_autogen.go +++ b/pkg/sentry/fs/sys/sys_state_autogen.go @@ -6,49 +6,49 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *cpunum) StateTypeName() string { +func (c *cpunum) StateTypeName() string { return "pkg/sentry/fs/sys.cpunum" } -func (x *cpunum) StateFields() []string { +func (c *cpunum) StateFields() []string { return []string{ "InodeSimpleAttributes", "InodeStaticFileGetter", } } -func (x *cpunum) beforeSave() {} +func (c *cpunum) beforeSave() {} -func (x *cpunum) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.InodeStaticFileGetter) +func (c *cpunum) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.InodeSimpleAttributes) + stateSinkObject.Save(1, &c.InodeStaticFileGetter) } -func (x *cpunum) afterLoad() {} +func (c *cpunum) afterLoad() {} -func (x *cpunum) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.InodeStaticFileGetter) +func (c *cpunum) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.InodeSimpleAttributes) + stateSourceObject.Load(1, &c.InodeStaticFileGetter) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/sys.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go index 2a411ceab..15f2d63f6 100644 --- a/pkg/sentry/fs/timerfd/timerfd_state_autogen.go +++ b/pkg/sentry/fs/timerfd/timerfd_state_autogen.go @@ -6,33 +6,33 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *TimerOperations) StateTypeName() string { +func (t *TimerOperations) StateTypeName() string { return "pkg/sentry/fs/timerfd.TimerOperations" } -func (x *TimerOperations) StateFields() []string { +func (t *TimerOperations) StateFields() []string { return []string{ "timer", "val", } } -func (x *TimerOperations) beforeSave() {} +func (t *TimerOperations) beforeSave() {} -func (x *TimerOperations) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.events) { - state.Failf("events is %#v, expected zero", &x.events) +func (t *TimerOperations) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + if !state.IsZeroValue(&t.events) { + state.Failf("events is %#v, expected zero", &t.events) } - m.Save(0, &x.timer) - m.Save(1, &x.val) + stateSinkObject.Save(0, &t.timer) + stateSinkObject.Save(1, &t.val) } -func (x *TimerOperations) afterLoad() {} +func (t *TimerOperations) afterLoad() {} -func (x *TimerOperations) StateLoad(m state.Source) { - m.Load(0, &x.timer) - m.Load(1, &x.val) +func (t *TimerOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.timer) + stateSourceObject.Load(1, &t.val) } func init() { diff --git a/pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go b/pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go index 894d3679e..29c25b4d6 100644 --- a/pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go +++ b/pkg/sentry/fs/tmpfs/tmpfs_state_autogen.go @@ -6,53 +6,53 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *regularFileOperations) StateTypeName() string { +func (r *regularFileOperations) StateTypeName() string { return "pkg/sentry/fs/tmpfs.regularFileOperations" } -func (x *regularFileOperations) StateFields() []string { +func (r *regularFileOperations) StateFields() []string { return []string{ "iops", } } -func (x *regularFileOperations) beforeSave() {} +func (r *regularFileOperations) beforeSave() {} -func (x *regularFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.iops) +func (r *regularFileOperations) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.iops) } -func (x *regularFileOperations) afterLoad() {} +func (r *regularFileOperations) afterLoad() {} -func (x *regularFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.iops) +func (r *regularFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.iops) } -func (x *Filesystem) StateTypeName() string { +func (f *Filesystem) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Filesystem" } -func (x *Filesystem) StateFields() []string { +func (f *Filesystem) StateFields() []string { return []string{} } -func (x *Filesystem) beforeSave() {} +func (f *Filesystem) beforeSave() {} -func (x *Filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *Filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *Filesystem) afterLoad() {} +func (f *Filesystem) afterLoad() {} -func (x *Filesystem) StateLoad(m state.Source) { +func (f *Filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *fileInodeOperations) StateTypeName() string { +func (f *fileInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tmpfs.fileInodeOperations" } -func (x *fileInodeOperations) StateFields() []string { +func (f *fileInodeOperations) StateFields() []string { return []string{ "InodeSimpleExtendedAttributes", "kernel", @@ -65,125 +65,125 @@ func (x *fileInodeOperations) StateFields() []string { } } -func (x *fileInodeOperations) beforeSave() {} +func (f *fileInodeOperations) beforeSave() {} -func (x *fileInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleExtendedAttributes) - m.Save(1, &x.kernel) - m.Save(2, &x.memUsage) - m.Save(3, &x.attr) - m.Save(4, &x.mappings) - m.Save(5, &x.writableMappingPages) - m.Save(6, &x.data) - m.Save(7, &x.seals) +func (f *fileInodeOperations) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.InodeSimpleExtendedAttributes) + stateSinkObject.Save(1, &f.kernel) + stateSinkObject.Save(2, &f.memUsage) + stateSinkObject.Save(3, &f.attr) + stateSinkObject.Save(4, &f.mappings) + stateSinkObject.Save(5, &f.writableMappingPages) + stateSinkObject.Save(6, &f.data) + stateSinkObject.Save(7, &f.seals) } -func (x *fileInodeOperations) afterLoad() {} +func (f *fileInodeOperations) afterLoad() {} -func (x *fileInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleExtendedAttributes) - m.Load(1, &x.kernel) - m.Load(2, &x.memUsage) - m.Load(3, &x.attr) - m.Load(4, &x.mappings) - m.Load(5, &x.writableMappingPages) - m.Load(6, &x.data) - m.Load(7, &x.seals) +func (f *fileInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.InodeSimpleExtendedAttributes) + stateSourceObject.Load(1, &f.kernel) + stateSourceObject.Load(2, &f.memUsage) + stateSourceObject.Load(3, &f.attr) + stateSourceObject.Load(4, &f.mappings) + stateSourceObject.Load(5, &f.writableMappingPages) + stateSourceObject.Load(6, &f.data) + stateSourceObject.Load(7, &f.seals) } -func (x *Dir) StateTypeName() string { +func (d *Dir) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Dir" } -func (x *Dir) StateFields() []string { +func (d *Dir) StateFields() []string { return []string{ "ramfsDir", "kernel", } } -func (x *Dir) beforeSave() {} +func (d *Dir) beforeSave() {} -func (x *Dir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ramfsDir) - m.Save(1, &x.kernel) +func (d *Dir) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.ramfsDir) + stateSinkObject.Save(1, &d.kernel) } -func (x *Dir) StateLoad(m state.Source) { - m.Load(0, &x.ramfsDir) - m.Load(1, &x.kernel) - m.AfterLoad(x.afterLoad) +func (d *Dir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.ramfsDir) + stateSourceObject.Load(1, &d.kernel) + stateSourceObject.AfterLoad(d.afterLoad) } -func (x *Symlink) StateTypeName() string { +func (s *Symlink) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Symlink" } -func (x *Symlink) StateFields() []string { +func (s *Symlink) StateFields() []string { return []string{ "Symlink", } } -func (x *Symlink) beforeSave() {} +func (s *Symlink) beforeSave() {} -func (x *Symlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Symlink) +func (s *Symlink) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Symlink) } -func (x *Symlink) afterLoad() {} +func (s *Symlink) afterLoad() {} -func (x *Symlink) StateLoad(m state.Source) { - m.Load(0, &x.Symlink) +func (s *Symlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Symlink) } -func (x *Socket) StateTypeName() string { +func (s *Socket) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Socket" } -func (x *Socket) StateFields() []string { +func (s *Socket) StateFields() []string { return []string{ "Socket", } } -func (x *Socket) beforeSave() {} +func (s *Socket) beforeSave() {} -func (x *Socket) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Socket) +func (s *Socket) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Socket) } -func (x *Socket) afterLoad() {} +func (s *Socket) afterLoad() {} -func (x *Socket) StateLoad(m state.Source) { - m.Load(0, &x.Socket) +func (s *Socket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Socket) } -func (x *Fifo) StateTypeName() string { +func (f *Fifo) StateTypeName() string { return "pkg/sentry/fs/tmpfs.Fifo" } -func (x *Fifo) StateFields() []string { +func (f *Fifo) StateFields() []string { return []string{ "InodeOperations", } } -func (x *Fifo) beforeSave() {} +func (f *Fifo) beforeSave() {} -func (x *Fifo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeOperations) +func (f *Fifo) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.InodeOperations) } -func (x *Fifo) afterLoad() {} +func (f *Fifo) afterLoad() {} -func (x *Fifo) StateLoad(m state.Source) { - m.Load(0, &x.InodeOperations) +func (f *Fifo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.InodeOperations) } func init() { diff --git a/pkg/sentry/fs/tty/tty_state_autogen.go b/pkg/sentry/fs/tty/tty_state_autogen.go index d5c03a27f..c644ea9db 100644 --- a/pkg/sentry/fs/tty/tty_state_autogen.go +++ b/pkg/sentry/fs/tty/tty_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *dirInodeOperations) StateTypeName() string { +func (d *dirInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tty.dirInodeOperations" } -func (x *dirInodeOperations) StateFields() []string { +func (d *dirInodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", "msrc", @@ -21,98 +21,98 @@ func (x *dirInodeOperations) StateFields() []string { } } -func (x *dirInodeOperations) beforeSave() {} +func (d *dirInodeOperations) beforeSave() {} -func (x *dirInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.msrc) - m.Save(2, &x.master) - m.Save(3, &x.replicas) - m.Save(4, &x.dentryMap) - m.Save(5, &x.next) +func (d *dirInodeOperations) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.InodeSimpleAttributes) + stateSinkObject.Save(1, &d.msrc) + stateSinkObject.Save(2, &d.master) + stateSinkObject.Save(3, &d.replicas) + stateSinkObject.Save(4, &d.dentryMap) + stateSinkObject.Save(5, &d.next) } -func (x *dirInodeOperations) afterLoad() {} +func (d *dirInodeOperations) afterLoad() {} -func (x *dirInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.msrc) - m.Load(2, &x.master) - m.Load(3, &x.replicas) - m.Load(4, &x.dentryMap) - m.Load(5, &x.next) +func (d *dirInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.InodeSimpleAttributes) + stateSourceObject.Load(1, &d.msrc) + stateSourceObject.Load(2, &d.master) + stateSourceObject.Load(3, &d.replicas) + stateSourceObject.Load(4, &d.dentryMap) + stateSourceObject.Load(5, &d.next) } -func (x *dirFileOperations) StateTypeName() string { +func (d *dirFileOperations) StateTypeName() string { return "pkg/sentry/fs/tty.dirFileOperations" } -func (x *dirFileOperations) StateFields() []string { +func (d *dirFileOperations) StateFields() []string { return []string{ "di", "dirCursor", } } -func (x *dirFileOperations) beforeSave() {} +func (d *dirFileOperations) beforeSave() {} -func (x *dirFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.di) - m.Save(1, &x.dirCursor) +func (d *dirFileOperations) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.di) + stateSinkObject.Save(1, &d.dirCursor) } -func (x *dirFileOperations) afterLoad() {} +func (d *dirFileOperations) afterLoad() {} -func (x *dirFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.di) - m.Load(1, &x.dirCursor) +func (d *dirFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.di) + stateSourceObject.Load(1, &d.dirCursor) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fs/tty.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{} } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { +func (f *filesystem) StateLoad(stateSourceObject state.Source) { } -func (x *superOperations) StateTypeName() string { +func (s *superOperations) StateTypeName() string { return "pkg/sentry/fs/tty.superOperations" } -func (x *superOperations) StateFields() []string { +func (s *superOperations) StateFields() []string { return []string{} } -func (x *superOperations) beforeSave() {} +func (s *superOperations) beforeSave() {} -func (x *superOperations) StateSave(m state.Sink) { - x.beforeSave() +func (s *superOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *superOperations) afterLoad() {} +func (s *superOperations) afterLoad() {} -func (x *superOperations) StateLoad(m state.Source) { +func (s *superOperations) StateLoad(stateSourceObject state.Source) { } -func (x *lineDiscipline) StateTypeName() string { +func (l *lineDiscipline) StateTypeName() string { return "pkg/sentry/fs/tty.lineDiscipline" } -func (x *lineDiscipline) StateFields() []string { +func (l *lineDiscipline) StateFields() []string { return []string{ "size", "inQueue", @@ -122,128 +122,128 @@ func (x *lineDiscipline) StateFields() []string { } } -func (x *lineDiscipline) beforeSave() {} +func (l *lineDiscipline) beforeSave() {} -func (x *lineDiscipline) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.masterWaiter) { - state.Failf("masterWaiter is %#v, expected zero", &x.masterWaiter) +func (l *lineDiscipline) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + if !state.IsZeroValue(&l.masterWaiter) { + state.Failf("masterWaiter is %#v, expected zero", &l.masterWaiter) } - if !state.IsZeroValue(&x.replicaWaiter) { - state.Failf("replicaWaiter is %#v, expected zero", &x.replicaWaiter) + if !state.IsZeroValue(&l.replicaWaiter) { + state.Failf("replicaWaiter is %#v, expected zero", &l.replicaWaiter) } - m.Save(0, &x.size) - m.Save(1, &x.inQueue) - m.Save(2, &x.outQueue) - m.Save(3, &x.termios) - m.Save(4, &x.column) + stateSinkObject.Save(0, &l.size) + stateSinkObject.Save(1, &l.inQueue) + stateSinkObject.Save(2, &l.outQueue) + stateSinkObject.Save(3, &l.termios) + stateSinkObject.Save(4, &l.column) } -func (x *lineDiscipline) afterLoad() {} +func (l *lineDiscipline) afterLoad() {} -func (x *lineDiscipline) StateLoad(m state.Source) { - m.Load(0, &x.size) - m.Load(1, &x.inQueue) - m.Load(2, &x.outQueue) - m.Load(3, &x.termios) - m.Load(4, &x.column) +func (l *lineDiscipline) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.size) + stateSourceObject.Load(1, &l.inQueue) + stateSourceObject.Load(2, &l.outQueue) + stateSourceObject.Load(3, &l.termios) + stateSourceObject.Load(4, &l.column) } -func (x *outputQueueTransformer) StateTypeName() string { +func (o *outputQueueTransformer) StateTypeName() string { return "pkg/sentry/fs/tty.outputQueueTransformer" } -func (x *outputQueueTransformer) StateFields() []string { +func (o *outputQueueTransformer) StateFields() []string { return []string{} } -func (x *outputQueueTransformer) beforeSave() {} +func (o *outputQueueTransformer) beforeSave() {} -func (x *outputQueueTransformer) StateSave(m state.Sink) { - x.beforeSave() +func (o *outputQueueTransformer) StateSave(stateSinkObject state.Sink) { + o.beforeSave() } -func (x *outputQueueTransformer) afterLoad() {} +func (o *outputQueueTransformer) afterLoad() {} -func (x *outputQueueTransformer) StateLoad(m state.Source) { +func (o *outputQueueTransformer) StateLoad(stateSourceObject state.Source) { } -func (x *inputQueueTransformer) StateTypeName() string { +func (i *inputQueueTransformer) StateTypeName() string { return "pkg/sentry/fs/tty.inputQueueTransformer" } -func (x *inputQueueTransformer) StateFields() []string { +func (i *inputQueueTransformer) StateFields() []string { return []string{} } -func (x *inputQueueTransformer) beforeSave() {} +func (i *inputQueueTransformer) beforeSave() {} -func (x *inputQueueTransformer) StateSave(m state.Sink) { - x.beforeSave() +func (i *inputQueueTransformer) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *inputQueueTransformer) afterLoad() {} +func (i *inputQueueTransformer) afterLoad() {} -func (x *inputQueueTransformer) StateLoad(m state.Source) { +func (i *inputQueueTransformer) StateLoad(stateSourceObject state.Source) { } -func (x *masterInodeOperations) StateTypeName() string { +func (m *masterInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tty.masterInodeOperations" } -func (x *masterInodeOperations) StateFields() []string { +func (m *masterInodeOperations) StateFields() []string { return []string{ "SimpleFileInode", "d", } } -func (x *masterInodeOperations) beforeSave() {} +func (m *masterInodeOperations) beforeSave() {} -func (x *masterInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.d) +func (m *masterInodeOperations) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.SimpleFileInode) + stateSinkObject.Save(1, &m.d) } -func (x *masterInodeOperations) afterLoad() {} +func (m *masterInodeOperations) afterLoad() {} -func (x *masterInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.d) +func (m *masterInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.SimpleFileInode) + stateSourceObject.Load(1, &m.d) } -func (x *masterFileOperations) StateTypeName() string { +func (m *masterFileOperations) StateTypeName() string { return "pkg/sentry/fs/tty.masterFileOperations" } -func (x *masterFileOperations) StateFields() []string { +func (m *masterFileOperations) StateFields() []string { return []string{ "d", "t", } } -func (x *masterFileOperations) beforeSave() {} +func (m *masterFileOperations) beforeSave() {} -func (x *masterFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.d) - m.Save(1, &x.t) +func (m *masterFileOperations) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.d) + stateSinkObject.Save(1, &m.t) } -func (x *masterFileOperations) afterLoad() {} +func (m *masterFileOperations) afterLoad() {} -func (x *masterFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.d) - m.Load(1, &x.t) +func (m *masterFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.d) + stateSourceObject.Load(1, &m.t) } -func (x *queue) StateTypeName() string { +func (q *queue) StateTypeName() string { return "pkg/sentry/fs/tty.queue" } -func (x *queue) StateFields() []string { +func (q *queue) StateFields() []string { return []string{ "readBuf", "waitBuf", @@ -253,32 +253,32 @@ func (x *queue) StateFields() []string { } } -func (x *queue) beforeSave() {} +func (q *queue) beforeSave() {} -func (x *queue) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.readBuf) - m.Save(1, &x.waitBuf) - m.Save(2, &x.waitBufLen) - m.Save(3, &x.readable) - m.Save(4, &x.transformer) +func (q *queue) StateSave(stateSinkObject state.Sink) { + q.beforeSave() + stateSinkObject.Save(0, &q.readBuf) + stateSinkObject.Save(1, &q.waitBuf) + stateSinkObject.Save(2, &q.waitBufLen) + stateSinkObject.Save(3, &q.readable) + stateSinkObject.Save(4, &q.transformer) } -func (x *queue) afterLoad() {} +func (q *queue) afterLoad() {} -func (x *queue) StateLoad(m state.Source) { - m.Load(0, &x.readBuf) - m.Load(1, &x.waitBuf) - m.Load(2, &x.waitBufLen) - m.Load(3, &x.readable) - m.Load(4, &x.transformer) +func (q *queue) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &q.readBuf) + stateSourceObject.Load(1, &q.waitBuf) + stateSourceObject.Load(2, &q.waitBufLen) + stateSourceObject.Load(3, &q.readable) + stateSourceObject.Load(4, &q.transformer) } -func (x *replicaInodeOperations) StateTypeName() string { +func (r *replicaInodeOperations) StateTypeName() string { return "pkg/sentry/fs/tty.replicaInodeOperations" } -func (x *replicaInodeOperations) StateFields() []string { +func (r *replicaInodeOperations) StateFields() []string { return []string{ "SimpleFileInode", "d", @@ -286,51 +286,51 @@ func (x *replicaInodeOperations) StateFields() []string { } } -func (x *replicaInodeOperations) beforeSave() {} +func (r *replicaInodeOperations) beforeSave() {} -func (x *replicaInodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SimpleFileInode) - m.Save(1, &x.d) - m.Save(2, &x.t) +func (r *replicaInodeOperations) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.SimpleFileInode) + stateSinkObject.Save(1, &r.d) + stateSinkObject.Save(2, &r.t) } -func (x *replicaInodeOperations) afterLoad() {} +func (r *replicaInodeOperations) afterLoad() {} -func (x *replicaInodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.SimpleFileInode) - m.Load(1, &x.d) - m.Load(2, &x.t) +func (r *replicaInodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.SimpleFileInode) + stateSourceObject.Load(1, &r.d) + stateSourceObject.Load(2, &r.t) } -func (x *replicaFileOperations) StateTypeName() string { +func (r *replicaFileOperations) StateTypeName() string { return "pkg/sentry/fs/tty.replicaFileOperations" } -func (x *replicaFileOperations) StateFields() []string { +func (r *replicaFileOperations) StateFields() []string { return []string{ "si", } } -func (x *replicaFileOperations) beforeSave() {} +func (r *replicaFileOperations) beforeSave() {} -func (x *replicaFileOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.si) +func (r *replicaFileOperations) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.si) } -func (x *replicaFileOperations) afterLoad() {} +func (r *replicaFileOperations) afterLoad() {} -func (x *replicaFileOperations) StateLoad(m state.Source) { - m.Load(0, &x.si) +func (r *replicaFileOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.si) } -func (x *Terminal) StateTypeName() string { +func (t *Terminal) StateTypeName() string { return "pkg/sentry/fs/tty.Terminal" } -func (x *Terminal) StateFields() []string { +func (t *Terminal) StateFields() []string { return []string{ "AtomicRefCount", "n", @@ -341,27 +341,27 @@ func (x *Terminal) StateFields() []string { } } -func (x *Terminal) beforeSave() {} +func (t *Terminal) beforeSave() {} -func (x *Terminal) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AtomicRefCount) - m.Save(1, &x.n) - m.Save(2, &x.d) - m.Save(3, &x.ld) - m.Save(4, &x.masterKTTY) - m.Save(5, &x.replicaKTTY) +func (t *Terminal) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.AtomicRefCount) + stateSinkObject.Save(1, &t.n) + stateSinkObject.Save(2, &t.d) + stateSinkObject.Save(3, &t.ld) + stateSinkObject.Save(4, &t.masterKTTY) + stateSinkObject.Save(5, &t.replicaKTTY) } -func (x *Terminal) afterLoad() {} +func (t *Terminal) afterLoad() {} -func (x *Terminal) StateLoad(m state.Source) { - m.Load(0, &x.AtomicRefCount) - m.Load(1, &x.n) - m.Load(2, &x.d) - m.Load(3, &x.ld) - m.Load(4, &x.masterKTTY) - m.Load(5, &x.replicaKTTY) +func (t *Terminal) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.AtomicRefCount) + stateSourceObject.Load(1, &t.n) + stateSourceObject.Load(2, &t.d) + stateSourceObject.Load(3, &t.ld) + stateSourceObject.Load(4, &t.masterKTTY) + stateSourceObject.Load(5, &t.replicaKTTY) } func init() { diff --git a/pkg/sentry/fsbridge/fsbridge_state_autogen.go b/pkg/sentry/fsbridge/fsbridge_state_autogen.go index d69b50c28..37696303d 100644 --- a/pkg/sentry/fsbridge/fsbridge_state_autogen.go +++ b/pkg/sentry/fsbridge/fsbridge_state_autogen.go @@ -6,34 +6,34 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *fsFile) StateTypeName() string { +func (f *fsFile) StateTypeName() string { return "pkg/sentry/fsbridge.fsFile" } -func (x *fsFile) StateFields() []string { +func (f *fsFile) StateFields() []string { return []string{ "file", } } -func (x *fsFile) beforeSave() {} +func (f *fsFile) beforeSave() {} -func (x *fsFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.file) +func (f *fsFile) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.file) } -func (x *fsFile) afterLoad() {} +func (f *fsFile) afterLoad() {} -func (x *fsFile) StateLoad(m state.Source) { - m.Load(0, &x.file) +func (f *fsFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.file) } -func (x *fsLookup) StateTypeName() string { +func (f *fsLookup) StateTypeName() string { return "pkg/sentry/fsbridge.fsLookup" } -func (x *fsLookup) StateFields() []string { +func (f *fsLookup) StateFields() []string { return []string{ "mntns", "root", @@ -41,51 +41,51 @@ func (x *fsLookup) StateFields() []string { } } -func (x *fsLookup) beforeSave() {} +func (f *fsLookup) beforeSave() {} -func (x *fsLookup) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.mntns) - m.Save(1, &x.root) - m.Save(2, &x.workingDir) +func (f *fsLookup) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.mntns) + stateSinkObject.Save(1, &f.root) + stateSinkObject.Save(2, &f.workingDir) } -func (x *fsLookup) afterLoad() {} +func (f *fsLookup) afterLoad() {} -func (x *fsLookup) StateLoad(m state.Source) { - m.Load(0, &x.mntns) - m.Load(1, &x.root) - m.Load(2, &x.workingDir) +func (f *fsLookup) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.mntns) + stateSourceObject.Load(1, &f.root) + stateSourceObject.Load(2, &f.workingDir) } -func (x *VFSFile) StateTypeName() string { +func (v *VFSFile) StateTypeName() string { return "pkg/sentry/fsbridge.VFSFile" } -func (x *VFSFile) StateFields() []string { +func (v *VFSFile) StateFields() []string { return []string{ "file", } } -func (x *VFSFile) beforeSave() {} +func (v *VFSFile) beforeSave() {} -func (x *VFSFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.file) +func (v *VFSFile) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.file) } -func (x *VFSFile) afterLoad() {} +func (v *VFSFile) afterLoad() {} -func (x *VFSFile) StateLoad(m state.Source) { - m.Load(0, &x.file) +func (v *VFSFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.file) } -func (x *vfsLookup) StateTypeName() string { +func (v *vfsLookup) StateTypeName() string { return "pkg/sentry/fsbridge.vfsLookup" } -func (x *vfsLookup) StateFields() []string { +func (v *vfsLookup) StateFields() []string { return []string{ "mntns", "root", @@ -93,21 +93,21 @@ func (x *vfsLookup) StateFields() []string { } } -func (x *vfsLookup) beforeSave() {} +func (v *vfsLookup) beforeSave() {} -func (x *vfsLookup) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.mntns) - m.Save(1, &x.root) - m.Save(2, &x.workingDir) +func (v *vfsLookup) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.mntns) + stateSinkObject.Save(1, &v.root) + stateSinkObject.Save(2, &v.workingDir) } -func (x *vfsLookup) afterLoad() {} +func (v *vfsLookup) afterLoad() {} -func (x *vfsLookup) StateLoad(m state.Source) { - m.Load(0, &x.mntns) - m.Load(1, &x.root) - m.Load(2, &x.workingDir) +func (v *vfsLookup) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.mntns) + stateSourceObject.Load(1, &v.root) + stateSourceObject.Load(2, &v.workingDir) } func init() { diff --git a/pkg/sentry/fsimpl/devpts/devpts_state_autogen.go b/pkg/sentry/fsimpl/devpts/devpts_state_autogen.go index 61e4f6fdf..d02c88a3b 100644 --- a/pkg/sentry/fsimpl/devpts/devpts_state_autogen.go +++ b/pkg/sentry/fsimpl/devpts/devpts_state_autogen.go @@ -6,56 +6,56 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *FilesystemType) StateTypeName() string { +func (f *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.FilesystemType" } -func (x *FilesystemType) StateFields() []string { +func (f *FilesystemType) StateFields() []string { return []string{} } -func (x *FilesystemType) beforeSave() {} +func (f *FilesystemType) beforeSave() {} -func (x *FilesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *FilesystemType) afterLoad() {} +func (f *FilesystemType) afterLoad() {} -func (x *FilesystemType) StateLoad(m state.Source) { +func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Filesystem) - m.Save(1, &x.devMinor) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Filesystem) + stateSinkObject.Save(1, &f.devMinor) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.Filesystem) - m.Load(1, &x.devMinor) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Filesystem) + stateSourceObject.Load(1, &f.devMinor) } -func (x *rootInode) StateTypeName() string { +func (r *rootInode) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.rootInode" } -func (x *rootInode) StateFields() []string { +func (r *rootInode) StateFields() []string { return []string{ "implStatFS", "AlwaysValid", @@ -73,67 +73,67 @@ func (x *rootInode) StateFields() []string { } } -func (x *rootInode) beforeSave() {} - -func (x *rootInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.AlwaysValid) - m.Save(2, &x.InodeAttrs) - m.Save(3, &x.InodeDirectoryNoNewChildren) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.OrderedChildren) - m.Save(6, &x.rootInodeRefs) - m.Save(7, &x.locks) - m.Save(8, &x.dentry) - m.Save(9, &x.master) - m.Save(10, &x.root) - m.Save(11, &x.replicas) - m.Save(12, &x.nextIdx) -} - -func (x *rootInode) afterLoad() {} - -func (x *rootInode) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.AlwaysValid) - m.Load(2, &x.InodeAttrs) - m.Load(3, &x.InodeDirectoryNoNewChildren) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.OrderedChildren) - m.Load(6, &x.rootInodeRefs) - m.Load(7, &x.locks) - m.Load(8, &x.dentry) - m.Load(9, &x.master) - m.Load(10, &x.root) - m.Load(11, &x.replicas) - m.Load(12, &x.nextIdx) -} - -func (x *implStatFS) StateTypeName() string { +func (r *rootInode) beforeSave() {} + +func (r *rootInode) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.implStatFS) + stateSinkObject.Save(1, &r.AlwaysValid) + stateSinkObject.Save(2, &r.InodeAttrs) + stateSinkObject.Save(3, &r.InodeDirectoryNoNewChildren) + stateSinkObject.Save(4, &r.InodeNotSymlink) + stateSinkObject.Save(5, &r.OrderedChildren) + stateSinkObject.Save(6, &r.rootInodeRefs) + stateSinkObject.Save(7, &r.locks) + stateSinkObject.Save(8, &r.dentry) + stateSinkObject.Save(9, &r.master) + stateSinkObject.Save(10, &r.root) + stateSinkObject.Save(11, &r.replicas) + stateSinkObject.Save(12, &r.nextIdx) +} + +func (r *rootInode) afterLoad() {} + +func (r *rootInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.implStatFS) + stateSourceObject.Load(1, &r.AlwaysValid) + stateSourceObject.Load(2, &r.InodeAttrs) + stateSourceObject.Load(3, &r.InodeDirectoryNoNewChildren) + stateSourceObject.Load(4, &r.InodeNotSymlink) + stateSourceObject.Load(5, &r.OrderedChildren) + stateSourceObject.Load(6, &r.rootInodeRefs) + stateSourceObject.Load(7, &r.locks) + stateSourceObject.Load(8, &r.dentry) + stateSourceObject.Load(9, &r.master) + stateSourceObject.Load(10, &r.root) + stateSourceObject.Load(11, &r.replicas) + stateSourceObject.Load(12, &r.nextIdx) +} + +func (i *implStatFS) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.implStatFS" } -func (x *implStatFS) StateFields() []string { +func (i *implStatFS) StateFields() []string { return []string{} } -func (x *implStatFS) beforeSave() {} +func (i *implStatFS) beforeSave() {} -func (x *implStatFS) StateSave(m state.Sink) { - x.beforeSave() +func (i *implStatFS) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *implStatFS) afterLoad() {} +func (i *implStatFS) afterLoad() {} -func (x *implStatFS) StateLoad(m state.Source) { +func (i *implStatFS) StateLoad(stateSourceObject state.Source) { } -func (x *lineDiscipline) StateTypeName() string { +func (l *lineDiscipline) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.lineDiscipline" } -func (x *lineDiscipline) StateFields() []string { +func (l *lineDiscipline) StateFields() []string { return []string{ "size", "inQueue", @@ -143,76 +143,76 @@ func (x *lineDiscipline) StateFields() []string { } } -func (x *lineDiscipline) beforeSave() {} +func (l *lineDiscipline) beforeSave() {} -func (x *lineDiscipline) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.masterWaiter) { - state.Failf("masterWaiter is %#v, expected zero", &x.masterWaiter) +func (l *lineDiscipline) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + if !state.IsZeroValue(&l.masterWaiter) { + state.Failf("masterWaiter is %#v, expected zero", &l.masterWaiter) } - if !state.IsZeroValue(&x.replicaWaiter) { - state.Failf("replicaWaiter is %#v, expected zero", &x.replicaWaiter) + if !state.IsZeroValue(&l.replicaWaiter) { + state.Failf("replicaWaiter is %#v, expected zero", &l.replicaWaiter) } - m.Save(0, &x.size) - m.Save(1, &x.inQueue) - m.Save(2, &x.outQueue) - m.Save(3, &x.termios) - m.Save(4, &x.column) + stateSinkObject.Save(0, &l.size) + stateSinkObject.Save(1, &l.inQueue) + stateSinkObject.Save(2, &l.outQueue) + stateSinkObject.Save(3, &l.termios) + stateSinkObject.Save(4, &l.column) } -func (x *lineDiscipline) afterLoad() {} +func (l *lineDiscipline) afterLoad() {} -func (x *lineDiscipline) StateLoad(m state.Source) { - m.Load(0, &x.size) - m.Load(1, &x.inQueue) - m.Load(2, &x.outQueue) - m.Load(3, &x.termios) - m.Load(4, &x.column) +func (l *lineDiscipline) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.size) + stateSourceObject.Load(1, &l.inQueue) + stateSourceObject.Load(2, &l.outQueue) + stateSourceObject.Load(3, &l.termios) + stateSourceObject.Load(4, &l.column) } -func (x *outputQueueTransformer) StateTypeName() string { +func (o *outputQueueTransformer) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.outputQueueTransformer" } -func (x *outputQueueTransformer) StateFields() []string { +func (o *outputQueueTransformer) StateFields() []string { return []string{} } -func (x *outputQueueTransformer) beforeSave() {} +func (o *outputQueueTransformer) beforeSave() {} -func (x *outputQueueTransformer) StateSave(m state.Sink) { - x.beforeSave() +func (o *outputQueueTransformer) StateSave(stateSinkObject state.Sink) { + o.beforeSave() } -func (x *outputQueueTransformer) afterLoad() {} +func (o *outputQueueTransformer) afterLoad() {} -func (x *outputQueueTransformer) StateLoad(m state.Source) { +func (o *outputQueueTransformer) StateLoad(stateSourceObject state.Source) { } -func (x *inputQueueTransformer) StateTypeName() string { +func (i *inputQueueTransformer) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.inputQueueTransformer" } -func (x *inputQueueTransformer) StateFields() []string { +func (i *inputQueueTransformer) StateFields() []string { return []string{} } -func (x *inputQueueTransformer) beforeSave() {} +func (i *inputQueueTransformer) beforeSave() {} -func (x *inputQueueTransformer) StateSave(m state.Sink) { - x.beforeSave() +func (i *inputQueueTransformer) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *inputQueueTransformer) afterLoad() {} +func (i *inputQueueTransformer) afterLoad() {} -func (x *inputQueueTransformer) StateLoad(m state.Source) { +func (i *inputQueueTransformer) StateLoad(stateSourceObject state.Source) { } -func (x *masterInode) StateTypeName() string { +func (m *masterInode) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.masterInode" } -func (x *masterInode) StateFields() []string { +func (m *masterInode) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -225,38 +225,38 @@ func (x *masterInode) StateFields() []string { } } -func (x *masterInode) beforeSave() {} +func (m *masterInode) beforeSave() {} -func (x *masterInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeNotDirectory) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.locks) - m.Save(6, &x.dentry) - m.Save(7, &x.root) +func (m *masterInode) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.implStatFS) + stateSinkObject.Save(1, &m.InodeAttrs) + stateSinkObject.Save(2, &m.InodeNoopRefCount) + stateSinkObject.Save(3, &m.InodeNotDirectory) + stateSinkObject.Save(4, &m.InodeNotSymlink) + stateSinkObject.Save(5, &m.locks) + stateSinkObject.Save(6, &m.dentry) + stateSinkObject.Save(7, &m.root) } -func (x *masterInode) afterLoad() {} +func (m *masterInode) afterLoad() {} -func (x *masterInode) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeNotDirectory) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.locks) - m.Load(6, &x.dentry) - m.Load(7, &x.root) +func (m *masterInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.implStatFS) + stateSourceObject.Load(1, &m.InodeAttrs) + stateSourceObject.Load(2, &m.InodeNoopRefCount) + stateSourceObject.Load(3, &m.InodeNotDirectory) + stateSourceObject.Load(4, &m.InodeNotSymlink) + stateSourceObject.Load(5, &m.locks) + stateSourceObject.Load(6, &m.dentry) + stateSourceObject.Load(7, &m.root) } -func (x *masterFileDescription) StateTypeName() string { +func (m *masterFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.masterFileDescription" } -func (x *masterFileDescription) StateFields() []string { +func (m *masterFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -266,32 +266,32 @@ func (x *masterFileDescription) StateFields() []string { } } -func (x *masterFileDescription) beforeSave() {} +func (m *masterFileDescription) beforeSave() {} -func (x *masterFileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.LockFD) - m.Save(3, &x.inode) - m.Save(4, &x.t) +func (m *masterFileDescription) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.vfsfd) + stateSinkObject.Save(1, &m.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &m.LockFD) + stateSinkObject.Save(3, &m.inode) + stateSinkObject.Save(4, &m.t) } -func (x *masterFileDescription) afterLoad() {} +func (m *masterFileDescription) afterLoad() {} -func (x *masterFileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.LockFD) - m.Load(3, &x.inode) - m.Load(4, &x.t) +func (m *masterFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.vfsfd) + stateSourceObject.Load(1, &m.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &m.LockFD) + stateSourceObject.Load(3, &m.inode) + stateSourceObject.Load(4, &m.t) } -func (x *queue) StateTypeName() string { +func (q *queue) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.queue" } -func (x *queue) StateFields() []string { +func (q *queue) StateFields() []string { return []string{ "readBuf", "waitBuf", @@ -301,32 +301,32 @@ func (x *queue) StateFields() []string { } } -func (x *queue) beforeSave() {} +func (q *queue) beforeSave() {} -func (x *queue) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.readBuf) - m.Save(1, &x.waitBuf) - m.Save(2, &x.waitBufLen) - m.Save(3, &x.readable) - m.Save(4, &x.transformer) +func (q *queue) StateSave(stateSinkObject state.Sink) { + q.beforeSave() + stateSinkObject.Save(0, &q.readBuf) + stateSinkObject.Save(1, &q.waitBuf) + stateSinkObject.Save(2, &q.waitBufLen) + stateSinkObject.Save(3, &q.readable) + stateSinkObject.Save(4, &q.transformer) } -func (x *queue) afterLoad() {} +func (q *queue) afterLoad() {} -func (x *queue) StateLoad(m state.Source) { - m.Load(0, &x.readBuf) - m.Load(1, &x.waitBuf) - m.Load(2, &x.waitBufLen) - m.Load(3, &x.readable) - m.Load(4, &x.transformer) +func (q *queue) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &q.readBuf) + stateSourceObject.Load(1, &q.waitBuf) + stateSourceObject.Load(2, &q.waitBufLen) + stateSourceObject.Load(3, &q.readable) + stateSourceObject.Load(4, &q.transformer) } -func (x *replicaInode) StateTypeName() string { +func (r *replicaInode) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.replicaInode" } -func (x *replicaInode) StateFields() []string { +func (r *replicaInode) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -340,40 +340,40 @@ func (x *replicaInode) StateFields() []string { } } -func (x *replicaInode) beforeSave() {} +func (r *replicaInode) beforeSave() {} -func (x *replicaInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeNotDirectory) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.locks) - m.Save(6, &x.dentry) - m.Save(7, &x.root) - m.Save(8, &x.t) +func (r *replicaInode) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.implStatFS) + stateSinkObject.Save(1, &r.InodeAttrs) + stateSinkObject.Save(2, &r.InodeNoopRefCount) + stateSinkObject.Save(3, &r.InodeNotDirectory) + stateSinkObject.Save(4, &r.InodeNotSymlink) + stateSinkObject.Save(5, &r.locks) + stateSinkObject.Save(6, &r.dentry) + stateSinkObject.Save(7, &r.root) + stateSinkObject.Save(8, &r.t) } -func (x *replicaInode) afterLoad() {} +func (r *replicaInode) afterLoad() {} -func (x *replicaInode) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeNotDirectory) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.locks) - m.Load(6, &x.dentry) - m.Load(7, &x.root) - m.Load(8, &x.t) +func (r *replicaInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.implStatFS) + stateSourceObject.Load(1, &r.InodeAttrs) + stateSourceObject.Load(2, &r.InodeNoopRefCount) + stateSourceObject.Load(3, &r.InodeNotDirectory) + stateSourceObject.Load(4, &r.InodeNotSymlink) + stateSourceObject.Load(5, &r.locks) + stateSourceObject.Load(6, &r.dentry) + stateSourceObject.Load(7, &r.root) + stateSourceObject.Load(8, &r.t) } -func (x *replicaFileDescription) StateTypeName() string { +func (r *replicaFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.replicaFileDescription" } -func (x *replicaFileDescription) StateFields() []string { +func (r *replicaFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -382,53 +382,53 @@ func (x *replicaFileDescription) StateFields() []string { } } -func (x *replicaFileDescription) beforeSave() {} +func (r *replicaFileDescription) beforeSave() {} -func (x *replicaFileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.LockFD) - m.Save(3, &x.inode) +func (r *replicaFileDescription) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.vfsfd) + stateSinkObject.Save(1, &r.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &r.LockFD) + stateSinkObject.Save(3, &r.inode) } -func (x *replicaFileDescription) afterLoad() {} +func (r *replicaFileDescription) afterLoad() {} -func (x *replicaFileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.LockFD) - m.Load(3, &x.inode) +func (r *replicaFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.vfsfd) + stateSourceObject.Load(1, &r.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &r.LockFD) + stateSourceObject.Load(3, &r.inode) } -func (x *rootInodeRefs) StateTypeName() string { +func (r *rootInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.rootInodeRefs" } -func (x *rootInodeRefs) StateFields() []string { +func (r *rootInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *rootInodeRefs) beforeSave() {} +func (r *rootInodeRefs) beforeSave() {} -func (x *rootInodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (r *rootInodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (x *rootInodeRefs) afterLoad() {} +func (r *rootInodeRefs) afterLoad() {} -func (x *rootInodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (r *rootInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } -func (x *Terminal) StateTypeName() string { +func (t *Terminal) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.Terminal" } -func (x *Terminal) StateFields() []string { +func (t *Terminal) StateFields() []string { return []string{ "n", "ld", @@ -437,23 +437,23 @@ func (x *Terminal) StateFields() []string { } } -func (x *Terminal) beforeSave() {} +func (t *Terminal) beforeSave() {} -func (x *Terminal) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.n) - m.Save(1, &x.ld) - m.Save(2, &x.masterKTTY) - m.Save(3, &x.replicaKTTY) +func (t *Terminal) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.n) + stateSinkObject.Save(1, &t.ld) + stateSinkObject.Save(2, &t.masterKTTY) + stateSinkObject.Save(3, &t.replicaKTTY) } -func (x *Terminal) afterLoad() {} +func (t *Terminal) afterLoad() {} -func (x *Terminal) StateLoad(m state.Source) { - m.Load(0, &x.n) - m.Load(1, &x.ld) - m.Load(2, &x.masterKTTY) - m.Load(3, &x.replicaKTTY) +func (t *Terminal) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.n) + stateSourceObject.Load(1, &t.ld) + stateSourceObject.Load(2, &t.masterKTTY) + stateSourceObject.Load(3, &t.replicaKTTY) } func init() { diff --git a/pkg/sentry/fsimpl/devtmpfs/devtmpfs_state_autogen.go b/pkg/sentry/fsimpl/devtmpfs/devtmpfs_state_autogen.go index 1253bed4e..b9885df45 100644 --- a/pkg/sentry/fsimpl/devtmpfs/devtmpfs_state_autogen.go +++ b/pkg/sentry/fsimpl/devtmpfs/devtmpfs_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *FilesystemType) StateTypeName() string { +func (f *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/devtmpfs.FilesystemType" } -func (x *FilesystemType) StateFields() []string { +func (f *FilesystemType) StateFields() []string { return []string{ "initErr", "fs", @@ -18,21 +18,21 @@ func (x *FilesystemType) StateFields() []string { } } -func (x *FilesystemType) beforeSave() {} +func (f *FilesystemType) beforeSave() {} -func (x *FilesystemType) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.initErr) - m.Save(1, &x.fs) - m.Save(2, &x.root) +func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.initErr) + stateSinkObject.Save(1, &f.fs) + stateSinkObject.Save(2, &f.root) } -func (x *FilesystemType) afterLoad() {} +func (f *FilesystemType) afterLoad() {} -func (x *FilesystemType) StateLoad(m state.Source) { - m.Load(0, &x.initErr) - m.Load(1, &x.fs) - m.Load(2, &x.root) +func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.initErr) + stateSourceObject.Load(1, &f.fs) + stateSourceObject.Load(2, &f.root) } func init() { diff --git a/pkg/sentry/fsimpl/eventfd/eventfd_state_autogen.go b/pkg/sentry/fsimpl/eventfd/eventfd_state_autogen.go index 0507be064..3de6bc3bb 100644 --- a/pkg/sentry/fsimpl/eventfd/eventfd_state_autogen.go +++ b/pkg/sentry/fsimpl/eventfd/eventfd_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *EventFileDescription) StateTypeName() string { +func (e *EventFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/eventfd.EventFileDescription" } -func (x *EventFileDescription) StateFields() []string { +func (e *EventFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -22,32 +22,32 @@ func (x *EventFileDescription) StateFields() []string { } } -func (x *EventFileDescription) beforeSave() {} +func (e *EventFileDescription) beforeSave() {} -func (x *EventFileDescription) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.queue) { - state.Failf("queue is %#v, expected zero", &x.queue) +func (e *EventFileDescription) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + if !state.IsZeroValue(&e.queue) { + state.Failf("queue is %#v, expected zero", &e.queue) } - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) - m.Save(4, &x.val) - m.Save(5, &x.semMode) - m.Save(6, &x.hostfd) + stateSinkObject.Save(0, &e.vfsfd) + stateSinkObject.Save(1, &e.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &e.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &e.NoLockFD) + stateSinkObject.Save(4, &e.val) + stateSinkObject.Save(5, &e.semMode) + stateSinkObject.Save(6, &e.hostfd) } -func (x *EventFileDescription) afterLoad() {} +func (e *EventFileDescription) afterLoad() {} -func (x *EventFileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) - m.Load(4, &x.val) - m.Load(5, &x.semMode) - m.Load(6, &x.hostfd) +func (e *EventFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.vfsfd) + stateSourceObject.Load(1, &e.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &e.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &e.NoLockFD) + stateSourceObject.Load(4, &e.val) + stateSourceObject.Load(5, &e.semMode) + stateSourceObject.Load(6, &e.hostfd) } func init() { diff --git a/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go b/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go index b127b2015..fc0da410c 100644 --- a/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go +++ b/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *connection) StateTypeName() string { +func (c *connection) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.connection" } -func (x *connection) StateFields() []string { +func (c *connection) StateFields() []string { return []string{ "fd", "attributeVersion", @@ -37,86 +37,86 @@ func (x *connection) StateFields() []string { } } -func (x *connection) beforeSave() {} - -func (x *connection) StateSave(m state.Sink) { - x.beforeSave() - var initializedChan bool = x.saveInitializedChan() - m.SaveValue(3, initializedChan) - m.Save(0, &x.fd) - m.Save(1, &x.attributeVersion) - m.Save(2, &x.initialized) - m.Save(4, &x.connected) - m.Save(5, &x.connInitError) - m.Save(6, &x.connInitSuccess) - m.Save(7, &x.aborted) - m.Save(8, &x.numWaiting) - m.Save(9, &x.asyncNum) - m.Save(10, &x.asyncCongestionThreshold) - m.Save(11, &x.asyncNumMax) - m.Save(12, &x.maxRead) - m.Save(13, &x.maxWrite) - m.Save(14, &x.maxPages) - m.Save(15, &x.minor) - m.Save(16, &x.atomicOTrunc) - m.Save(17, &x.asyncRead) - m.Save(18, &x.writebackCache) - m.Save(19, &x.bigWrites) - m.Save(20, &x.dontMask) - m.Save(21, &x.noOpen) -} - -func (x *connection) afterLoad() {} - -func (x *connection) StateLoad(m state.Source) { - m.Load(0, &x.fd) - m.Load(1, &x.attributeVersion) - m.Load(2, &x.initialized) - m.Load(4, &x.connected) - m.Load(5, &x.connInitError) - m.Load(6, &x.connInitSuccess) - m.Load(7, &x.aborted) - m.Load(8, &x.numWaiting) - m.Load(9, &x.asyncNum) - m.Load(10, &x.asyncCongestionThreshold) - m.Load(11, &x.asyncNumMax) - m.Load(12, &x.maxRead) - m.Load(13, &x.maxWrite) - m.Load(14, &x.maxPages) - m.Load(15, &x.minor) - m.Load(16, &x.atomicOTrunc) - m.Load(17, &x.asyncRead) - m.Load(18, &x.writebackCache) - m.Load(19, &x.bigWrites) - m.Load(20, &x.dontMask) - m.Load(21, &x.noOpen) - m.LoadValue(3, new(bool), func(y interface{}) { x.loadInitializedChan(y.(bool)) }) -} - -func (x *fuseDevice) StateTypeName() string { +func (c *connection) beforeSave() {} + +func (c *connection) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + var initializedChanValue bool = c.saveInitializedChan() + stateSinkObject.SaveValue(3, initializedChanValue) + stateSinkObject.Save(0, &c.fd) + stateSinkObject.Save(1, &c.attributeVersion) + stateSinkObject.Save(2, &c.initialized) + stateSinkObject.Save(4, &c.connected) + stateSinkObject.Save(5, &c.connInitError) + stateSinkObject.Save(6, &c.connInitSuccess) + stateSinkObject.Save(7, &c.aborted) + stateSinkObject.Save(8, &c.numWaiting) + stateSinkObject.Save(9, &c.asyncNum) + stateSinkObject.Save(10, &c.asyncCongestionThreshold) + stateSinkObject.Save(11, &c.asyncNumMax) + stateSinkObject.Save(12, &c.maxRead) + stateSinkObject.Save(13, &c.maxWrite) + stateSinkObject.Save(14, &c.maxPages) + stateSinkObject.Save(15, &c.minor) + stateSinkObject.Save(16, &c.atomicOTrunc) + stateSinkObject.Save(17, &c.asyncRead) + stateSinkObject.Save(18, &c.writebackCache) + stateSinkObject.Save(19, &c.bigWrites) + stateSinkObject.Save(20, &c.dontMask) + stateSinkObject.Save(21, &c.noOpen) +} + +func (c *connection) afterLoad() {} + +func (c *connection) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.fd) + stateSourceObject.Load(1, &c.attributeVersion) + stateSourceObject.Load(2, &c.initialized) + stateSourceObject.Load(4, &c.connected) + stateSourceObject.Load(5, &c.connInitError) + stateSourceObject.Load(6, &c.connInitSuccess) + stateSourceObject.Load(7, &c.aborted) + stateSourceObject.Load(8, &c.numWaiting) + stateSourceObject.Load(9, &c.asyncNum) + stateSourceObject.Load(10, &c.asyncCongestionThreshold) + stateSourceObject.Load(11, &c.asyncNumMax) + stateSourceObject.Load(12, &c.maxRead) + stateSourceObject.Load(13, &c.maxWrite) + stateSourceObject.Load(14, &c.maxPages) + stateSourceObject.Load(15, &c.minor) + stateSourceObject.Load(16, &c.atomicOTrunc) + stateSourceObject.Load(17, &c.asyncRead) + stateSourceObject.Load(18, &c.writebackCache) + stateSourceObject.Load(19, &c.bigWrites) + stateSourceObject.Load(20, &c.dontMask) + stateSourceObject.Load(21, &c.noOpen) + stateSourceObject.LoadValue(3, new(bool), func(y interface{}) { c.loadInitializedChan(y.(bool)) }) +} + +func (f *fuseDevice) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.fuseDevice" } -func (x *fuseDevice) StateFields() []string { +func (f *fuseDevice) StateFields() []string { return []string{} } -func (x *fuseDevice) beforeSave() {} +func (f *fuseDevice) beforeSave() {} -func (x *fuseDevice) StateSave(m state.Sink) { - x.beforeSave() +func (f *fuseDevice) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *fuseDevice) afterLoad() {} +func (f *fuseDevice) afterLoad() {} -func (x *fuseDevice) StateLoad(m state.Source) { +func (f *fuseDevice) StateLoad(stateSourceObject state.Source) { } -func (x *DeviceFD) StateTypeName() string { +func (d *DeviceFD) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.DeviceFD" } -func (x *DeviceFD) StateFields() []string { +func (d *DeviceFD) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -135,70 +135,70 @@ func (x *DeviceFD) StateFields() []string { } } -func (x *DeviceFD) beforeSave() {} - -func (x *DeviceFD) StateSave(m state.Sink) { - x.beforeSave() - var fullQueueCh int = x.saveFullQueueCh() - m.SaveValue(12, fullQueueCh) - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) - m.Save(4, &x.nextOpID) - m.Save(5, &x.queue) - m.Save(6, &x.numActiveRequests) - m.Save(7, &x.completions) - m.Save(8, &x.writeCursor) - m.Save(9, &x.writeBuf) - m.Save(10, &x.writeCursorFR) - m.Save(11, &x.waitQueue) - m.Save(13, &x.fs) -} - -func (x *DeviceFD) afterLoad() {} - -func (x *DeviceFD) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) - m.Load(4, &x.nextOpID) - m.Load(5, &x.queue) - m.Load(6, &x.numActiveRequests) - m.Load(7, &x.completions) - m.Load(8, &x.writeCursor) - m.Load(9, &x.writeBuf) - m.Load(10, &x.writeCursorFR) - m.Load(11, &x.waitQueue) - m.Load(13, &x.fs) - m.LoadValue(12, new(int), func(y interface{}) { x.loadFullQueueCh(y.(int)) }) -} - -func (x *FilesystemType) StateTypeName() string { +func (d *DeviceFD) beforeSave() {} + +func (d *DeviceFD) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + var fullQueueChValue int = d.saveFullQueueCh() + stateSinkObject.SaveValue(12, fullQueueChValue) + stateSinkObject.Save(0, &d.vfsfd) + stateSinkObject.Save(1, &d.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &d.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &d.NoLockFD) + stateSinkObject.Save(4, &d.nextOpID) + stateSinkObject.Save(5, &d.queue) + stateSinkObject.Save(6, &d.numActiveRequests) + stateSinkObject.Save(7, &d.completions) + stateSinkObject.Save(8, &d.writeCursor) + stateSinkObject.Save(9, &d.writeBuf) + stateSinkObject.Save(10, &d.writeCursorFR) + stateSinkObject.Save(11, &d.waitQueue) + stateSinkObject.Save(13, &d.fs) +} + +func (d *DeviceFD) afterLoad() {} + +func (d *DeviceFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.vfsfd) + stateSourceObject.Load(1, &d.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &d.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &d.NoLockFD) + stateSourceObject.Load(4, &d.nextOpID) + stateSourceObject.Load(5, &d.queue) + stateSourceObject.Load(6, &d.numActiveRequests) + stateSourceObject.Load(7, &d.completions) + stateSourceObject.Load(8, &d.writeCursor) + stateSourceObject.Load(9, &d.writeBuf) + stateSourceObject.Load(10, &d.writeCursorFR) + stateSourceObject.Load(11, &d.waitQueue) + stateSourceObject.Load(13, &d.fs) + stateSourceObject.LoadValue(12, new(int), func(y interface{}) { d.loadFullQueueCh(y.(int)) }) +} + +func (f *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.FilesystemType" } -func (x *FilesystemType) StateFields() []string { +func (f *FilesystemType) StateFields() []string { return []string{} } -func (x *FilesystemType) beforeSave() {} +func (f *FilesystemType) beforeSave() {} -func (x *FilesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *FilesystemType) afterLoad() {} +func (f *FilesystemType) afterLoad() {} -func (x *FilesystemType) StateLoad(m state.Source) { +func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystemOptions) StateTypeName() string { +func (f *filesystemOptions) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.filesystemOptions" } -func (x *filesystemOptions) StateFields() []string { +func (f *filesystemOptions) StateFields() []string { return []string{ "userID", "groupID", @@ -208,32 +208,32 @@ func (x *filesystemOptions) StateFields() []string { } } -func (x *filesystemOptions) beforeSave() {} +func (f *filesystemOptions) beforeSave() {} -func (x *filesystemOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.userID) - m.Save(1, &x.groupID) - m.Save(2, &x.rootMode) - m.Save(3, &x.maxActiveRequests) - m.Save(4, &x.maxRead) +func (f *filesystemOptions) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.userID) + stateSinkObject.Save(1, &f.groupID) + stateSinkObject.Save(2, &f.rootMode) + stateSinkObject.Save(3, &f.maxActiveRequests) + stateSinkObject.Save(4, &f.maxRead) } -func (x *filesystemOptions) afterLoad() {} +func (f *filesystemOptions) afterLoad() {} -func (x *filesystemOptions) StateLoad(m state.Source) { - m.Load(0, &x.userID) - m.Load(1, &x.groupID) - m.Load(2, &x.rootMode) - m.Load(3, &x.maxActiveRequests) - m.Load(4, &x.maxRead) +func (f *filesystemOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.userID) + stateSourceObject.Load(1, &f.groupID) + stateSourceObject.Load(2, &f.rootMode) + stateSourceObject.Load(3, &f.maxActiveRequests) + stateSourceObject.Load(4, &f.maxRead) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", @@ -243,32 +243,32 @@ func (x *filesystem) StateFields() []string { } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Filesystem) - m.Save(1, &x.devMinor) - m.Save(2, &x.conn) - m.Save(3, &x.opts) - m.Save(4, &x.umounted) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Filesystem) + stateSinkObject.Save(1, &f.devMinor) + stateSinkObject.Save(2, &f.conn) + stateSinkObject.Save(3, &f.opts) + stateSinkObject.Save(4, &f.umounted) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.Filesystem) - m.Load(1, &x.devMinor) - m.Load(2, &x.conn) - m.Load(3, &x.opts) - m.Load(4, &x.umounted) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Filesystem) + stateSourceObject.Load(1, &f.devMinor) + stateSourceObject.Load(2, &f.conn) + stateSourceObject.Load(3, &f.opts) + stateSourceObject.Load(4, &f.umounted) } -func (x *inode) StateTypeName() string { +func (i *inode) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.inode" } -func (x *inode) StateFields() []string { +func (i *inode) StateFields() []string { return []string{ "inodeRefs", "InodeAttrs", @@ -289,129 +289,129 @@ func (x *inode) StateFields() []string { } } -func (x *inode) beforeSave() {} - -func (x *inode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inodeRefs) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeDirectoryNoNewChildren) - m.Save(3, &x.InodeNoDynamicLookup) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.OrderedChildren) - m.Save(6, &x.dentry) - m.Save(7, &x.fs) - m.Save(8, &x.metadataMu) - m.Save(9, &x.nodeID) - m.Save(10, &x.locks) - m.Save(11, &x.size) - m.Save(12, &x.attributeVersion) - m.Save(13, &x.attributeTime) - m.Save(14, &x.version) - m.Save(15, &x.link) -} - -func (x *inode) afterLoad() {} - -func (x *inode) StateLoad(m state.Source) { - m.Load(0, &x.inodeRefs) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeDirectoryNoNewChildren) - m.Load(3, &x.InodeNoDynamicLookup) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.OrderedChildren) - m.Load(6, &x.dentry) - m.Load(7, &x.fs) - m.Load(8, &x.metadataMu) - m.Load(9, &x.nodeID) - m.Load(10, &x.locks) - m.Load(11, &x.size) - m.Load(12, &x.attributeVersion) - m.Load(13, &x.attributeTime) - m.Load(14, &x.version) - m.Load(15, &x.link) -} - -func (x *inodeRefs) StateTypeName() string { +func (i *inode) beforeSave() {} + +func (i *inode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.inodeRefs) + stateSinkObject.Save(1, &i.InodeAttrs) + stateSinkObject.Save(2, &i.InodeDirectoryNoNewChildren) + stateSinkObject.Save(3, &i.InodeNoDynamicLookup) + stateSinkObject.Save(4, &i.InodeNotSymlink) + stateSinkObject.Save(5, &i.OrderedChildren) + stateSinkObject.Save(6, &i.dentry) + stateSinkObject.Save(7, &i.fs) + stateSinkObject.Save(8, &i.metadataMu) + stateSinkObject.Save(9, &i.nodeID) + stateSinkObject.Save(10, &i.locks) + stateSinkObject.Save(11, &i.size) + stateSinkObject.Save(12, &i.attributeVersion) + stateSinkObject.Save(13, &i.attributeTime) + stateSinkObject.Save(14, &i.version) + stateSinkObject.Save(15, &i.link) +} + +func (i *inode) afterLoad() {} + +func (i *inode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.inodeRefs) + stateSourceObject.Load(1, &i.InodeAttrs) + stateSourceObject.Load(2, &i.InodeDirectoryNoNewChildren) + stateSourceObject.Load(3, &i.InodeNoDynamicLookup) + stateSourceObject.Load(4, &i.InodeNotSymlink) + stateSourceObject.Load(5, &i.OrderedChildren) + stateSourceObject.Load(6, &i.dentry) + stateSourceObject.Load(7, &i.fs) + stateSourceObject.Load(8, &i.metadataMu) + stateSourceObject.Load(9, &i.nodeID) + stateSourceObject.Load(10, &i.locks) + stateSourceObject.Load(11, &i.size) + stateSourceObject.Load(12, &i.attributeVersion) + stateSourceObject.Load(13, &i.attributeTime) + stateSourceObject.Load(14, &i.version) + stateSourceObject.Load(15, &i.link) +} + +func (i *inodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.inodeRefs" } -func (x *inodeRefs) StateFields() []string { +func (i *inodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *inodeRefs) beforeSave() {} +func (i *inodeRefs) beforeSave() {} -func (x *inodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (i *inodeRefs) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.refCount) } -func (x *inodeRefs) afterLoad() {} +func (i *inodeRefs) afterLoad() {} -func (x *inodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (i *inodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.refCount) } -func (x *requestList) StateTypeName() string { +func (r *requestList) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.requestList" } -func (x *requestList) StateFields() []string { +func (r *requestList) StateFields() []string { return []string{ "head", "tail", } } -func (x *requestList) beforeSave() {} +func (r *requestList) beforeSave() {} -func (x *requestList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (r *requestList) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.head) + stateSinkObject.Save(1, &r.tail) } -func (x *requestList) afterLoad() {} +func (r *requestList) afterLoad() {} -func (x *requestList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (r *requestList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.head) + stateSourceObject.Load(1, &r.tail) } -func (x *requestEntry) StateTypeName() string { +func (r *requestEntry) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.requestEntry" } -func (x *requestEntry) StateFields() []string { +func (r *requestEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *requestEntry) beforeSave() {} +func (r *requestEntry) beforeSave() {} -func (x *requestEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (r *requestEntry) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.next) + stateSinkObject.Save(1, &r.prev) } -func (x *requestEntry) afterLoad() {} +func (r *requestEntry) afterLoad() {} -func (x *requestEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (r *requestEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.next) + stateSourceObject.Load(1, &r.prev) } -func (x *Request) StateTypeName() string { +func (r *Request) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.Request" } -func (x *Request) StateFields() []string { +func (r *Request) StateFields() []string { return []string{ "requestEntry", "id", @@ -423,36 +423,36 @@ func (x *Request) StateFields() []string { } } -func (x *Request) beforeSave() {} +func (r *Request) beforeSave() {} -func (x *Request) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.requestEntry) - m.Save(1, &x.id) - m.Save(2, &x.hdr) - m.Save(3, &x.data) - m.Save(4, &x.payload) - m.Save(5, &x.async) - m.Save(6, &x.noReply) +func (r *Request) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.requestEntry) + stateSinkObject.Save(1, &r.id) + stateSinkObject.Save(2, &r.hdr) + stateSinkObject.Save(3, &r.data) + stateSinkObject.Save(4, &r.payload) + stateSinkObject.Save(5, &r.async) + stateSinkObject.Save(6, &r.noReply) } -func (x *Request) afterLoad() {} +func (r *Request) afterLoad() {} -func (x *Request) StateLoad(m state.Source) { - m.Load(0, &x.requestEntry) - m.Load(1, &x.id) - m.Load(2, &x.hdr) - m.Load(3, &x.data) - m.Load(4, &x.payload) - m.Load(5, &x.async) - m.Load(6, &x.noReply) +func (r *Request) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.requestEntry) + stateSourceObject.Load(1, &r.id) + stateSourceObject.Load(2, &r.hdr) + stateSourceObject.Load(3, &r.data) + stateSourceObject.Load(4, &r.payload) + stateSourceObject.Load(5, &r.async) + stateSourceObject.Load(6, &r.noReply) } -func (x *futureResponse) StateTypeName() string { +func (f *futureResponse) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.futureResponse" } -func (x *futureResponse) StateFields() []string { +func (f *futureResponse) StateFields() []string { return []string{ "opcode", "ch", @@ -462,32 +462,32 @@ func (x *futureResponse) StateFields() []string { } } -func (x *futureResponse) beforeSave() {} +func (f *futureResponse) beforeSave() {} -func (x *futureResponse) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.opcode) - m.Save(1, &x.ch) - m.Save(2, &x.hdr) - m.Save(3, &x.data) - m.Save(4, &x.async) +func (f *futureResponse) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.opcode) + stateSinkObject.Save(1, &f.ch) + stateSinkObject.Save(2, &f.hdr) + stateSinkObject.Save(3, &f.data) + stateSinkObject.Save(4, &f.async) } -func (x *futureResponse) afterLoad() {} +func (f *futureResponse) afterLoad() {} -func (x *futureResponse) StateLoad(m state.Source) { - m.Load(0, &x.opcode) - m.Load(1, &x.ch) - m.Load(2, &x.hdr) - m.Load(3, &x.data) - m.Load(4, &x.async) +func (f *futureResponse) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.opcode) + stateSourceObject.Load(1, &f.ch) + stateSourceObject.Load(2, &f.hdr) + stateSourceObject.Load(3, &f.data) + stateSourceObject.Load(4, &f.async) } -func (x *Response) StateTypeName() string { +func (r *Response) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.Response" } -func (x *Response) StateFields() []string { +func (r *Response) StateFields() []string { return []string{ "opcode", "hdr", @@ -495,21 +495,21 @@ func (x *Response) StateFields() []string { } } -func (x *Response) beforeSave() {} +func (r *Response) beforeSave() {} -func (x *Response) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.opcode) - m.Save(1, &x.hdr) - m.Save(2, &x.data) +func (r *Response) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.opcode) + stateSinkObject.Save(1, &r.hdr) + stateSinkObject.Save(2, &r.data) } -func (x *Response) afterLoad() {} +func (r *Response) afterLoad() {} -func (x *Response) StateLoad(m state.Source) { - m.Load(0, &x.opcode) - m.Load(1, &x.hdr) - m.Load(2, &x.data) +func (r *Response) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.opcode) + stateSourceObject.Load(1, &r.hdr) + stateSourceObject.Load(2, &r.data) } func init() { diff --git a/pkg/sentry/fsimpl/gofer/gofer_state_autogen.go b/pkg/sentry/fsimpl/gofer/gofer_state_autogen.go index 7831e1830..1316e29e5 100644 --- a/pkg/sentry/fsimpl/gofer/gofer_state_autogen.go +++ b/pkg/sentry/fsimpl/gofer/gofer_state_autogen.go @@ -6,63 +6,63 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *dentryList) StateTypeName() string { +func (d *dentryList) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.dentryList" } -func (x *dentryList) StateFields() []string { +func (d *dentryList) StateFields() []string { return []string{ "head", "tail", } } -func (x *dentryList) beforeSave() {} +func (d *dentryList) beforeSave() {} -func (x *dentryList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (d *dentryList) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.head) + stateSinkObject.Save(1, &d.tail) } -func (x *dentryList) afterLoad() {} +func (d *dentryList) afterLoad() {} -func (x *dentryList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (d *dentryList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.head) + stateSourceObject.Load(1, &d.tail) } -func (x *dentryEntry) StateTypeName() string { +func (d *dentryEntry) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.dentryEntry" } -func (x *dentryEntry) StateFields() []string { +func (d *dentryEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *dentryEntry) beforeSave() {} +func (d *dentryEntry) beforeSave() {} -func (x *dentryEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (d *dentryEntry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.next) + stateSinkObject.Save(1, &d.prev) } -func (x *dentryEntry) afterLoad() {} +func (d *dentryEntry) afterLoad() {} -func (x *dentryEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (d *dentryEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.next) + stateSourceObject.Load(1, &d.prev) } -func (x *directoryFD) StateTypeName() string { +func (d *directoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.directoryFD" } -func (x *directoryFD) StateFields() []string { +func (d *directoryFD) StateFields() []string { return []string{ "fileDescription", "DirectoryFileDescriptionDefaultImpl", @@ -71,49 +71,49 @@ func (x *directoryFD) StateFields() []string { } } -func (x *directoryFD) beforeSave() {} +func (d *directoryFD) beforeSave() {} -func (x *directoryFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileDescription) - m.Save(1, &x.DirectoryFileDescriptionDefaultImpl) - m.Save(2, &x.off) - m.Save(3, &x.dirents) +func (d *directoryFD) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.fileDescription) + stateSinkObject.Save(1, &d.DirectoryFileDescriptionDefaultImpl) + stateSinkObject.Save(2, &d.off) + stateSinkObject.Save(3, &d.dirents) } -func (x *directoryFD) afterLoad() {} +func (d *directoryFD) afterLoad() {} -func (x *directoryFD) StateLoad(m state.Source) { - m.Load(0, &x.fileDescription) - m.Load(1, &x.DirectoryFileDescriptionDefaultImpl) - m.Load(2, &x.off) - m.Load(3, &x.dirents) +func (d *directoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.fileDescription) + stateSourceObject.Load(1, &d.DirectoryFileDescriptionDefaultImpl) + stateSourceObject.Load(2, &d.off) + stateSourceObject.Load(3, &d.dirents) } -func (x *FilesystemType) StateTypeName() string { +func (f *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.FilesystemType" } -func (x *FilesystemType) StateFields() []string { +func (f *FilesystemType) StateFields() []string { return []string{} } -func (x *FilesystemType) beforeSave() {} +func (f *FilesystemType) beforeSave() {} -func (x *FilesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *FilesystemType) afterLoad() {} +func (f *FilesystemType) afterLoad() {} -func (x *FilesystemType) StateLoad(m state.Source) { +func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "vfsfs", "mfp", @@ -129,52 +129,52 @@ func (x *filesystem) StateFields() []string { } } -func (x *filesystem) beforeSave() {} - -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfs) - m.Save(1, &x.mfp) - m.Save(2, &x.opts) - m.Save(3, &x.iopts) - m.Save(4, &x.clock) - m.Save(5, &x.devMinor) - m.Save(6, &x.cachedDentries) - m.Save(7, &x.cachedDentriesLen) - m.Save(8, &x.syncableDentries) - m.Save(9, &x.specialFileFDs) - m.Save(10, &x.syntheticSeq) -} - -func (x *filesystem) afterLoad() {} - -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.vfsfs) - m.Load(1, &x.mfp) - m.Load(2, &x.opts) - m.Load(3, &x.iopts) - m.Load(4, &x.clock) - m.Load(5, &x.devMinor) - m.Load(6, &x.cachedDentries) - m.Load(7, &x.cachedDentriesLen) - m.Load(8, &x.syncableDentries) - m.Load(9, &x.specialFileFDs) - m.Load(10, &x.syntheticSeq) -} - -func (x *inodeNumber) StateTypeName() string { +func (f *filesystem) beforeSave() {} + +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfs) + stateSinkObject.Save(1, &f.mfp) + stateSinkObject.Save(2, &f.opts) + stateSinkObject.Save(3, &f.iopts) + stateSinkObject.Save(4, &f.clock) + stateSinkObject.Save(5, &f.devMinor) + stateSinkObject.Save(6, &f.cachedDentries) + stateSinkObject.Save(7, &f.cachedDentriesLen) + stateSinkObject.Save(8, &f.syncableDentries) + stateSinkObject.Save(9, &f.specialFileFDs) + stateSinkObject.Save(10, &f.syntheticSeq) +} + +func (f *filesystem) afterLoad() {} + +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfs) + stateSourceObject.Load(1, &f.mfp) + stateSourceObject.Load(2, &f.opts) + stateSourceObject.Load(3, &f.iopts) + stateSourceObject.Load(4, &f.clock) + stateSourceObject.Load(5, &f.devMinor) + stateSourceObject.Load(6, &f.cachedDentries) + stateSourceObject.Load(7, &f.cachedDentriesLen) + stateSourceObject.Load(8, &f.syncableDentries) + stateSourceObject.Load(9, &f.specialFileFDs) + stateSourceObject.Load(10, &f.syntheticSeq) +} + +func (i *inodeNumber) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.inodeNumber" } -func (x *inodeNumber) StateFields() []string { +func (i *inodeNumber) StateFields() []string { return nil } -func (x *filesystemOptions) StateTypeName() string { +func (f *filesystemOptions) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.filesystemOptions" } -func (x *filesystemOptions) StateFields() []string { +func (f *filesystemOptions) StateFields() []string { return []string{ "fd", "aname", @@ -191,80 +191,80 @@ func (x *filesystemOptions) StateFields() []string { } } -func (x *filesystemOptions) beforeSave() {} - -func (x *filesystemOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fd) - m.Save(1, &x.aname) - m.Save(2, &x.interop) - m.Save(3, &x.dfltuid) - m.Save(4, &x.dfltgid) - m.Save(5, &x.msize) - m.Save(6, &x.version) - m.Save(7, &x.maxCachedDentries) - m.Save(8, &x.forcePageCache) - m.Save(9, &x.limitHostFDTranslation) - m.Save(10, &x.overlayfsStaleRead) - m.Save(11, &x.regularFilesUseSpecialFileFD) -} - -func (x *filesystemOptions) afterLoad() {} - -func (x *filesystemOptions) StateLoad(m state.Source) { - m.Load(0, &x.fd) - m.Load(1, &x.aname) - m.Load(2, &x.interop) - m.Load(3, &x.dfltuid) - m.Load(4, &x.dfltgid) - m.Load(5, &x.msize) - m.Load(6, &x.version) - m.Load(7, &x.maxCachedDentries) - m.Load(8, &x.forcePageCache) - m.Load(9, &x.limitHostFDTranslation) - m.Load(10, &x.overlayfsStaleRead) - m.Load(11, &x.regularFilesUseSpecialFileFD) -} - -func (x *InteropMode) StateTypeName() string { +func (f *filesystemOptions) beforeSave() {} + +func (f *filesystemOptions) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.fd) + stateSinkObject.Save(1, &f.aname) + stateSinkObject.Save(2, &f.interop) + stateSinkObject.Save(3, &f.dfltuid) + stateSinkObject.Save(4, &f.dfltgid) + stateSinkObject.Save(5, &f.msize) + stateSinkObject.Save(6, &f.version) + stateSinkObject.Save(7, &f.maxCachedDentries) + stateSinkObject.Save(8, &f.forcePageCache) + stateSinkObject.Save(9, &f.limitHostFDTranslation) + stateSinkObject.Save(10, &f.overlayfsStaleRead) + stateSinkObject.Save(11, &f.regularFilesUseSpecialFileFD) +} + +func (f *filesystemOptions) afterLoad() {} + +func (f *filesystemOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.fd) + stateSourceObject.Load(1, &f.aname) + stateSourceObject.Load(2, &f.interop) + stateSourceObject.Load(3, &f.dfltuid) + stateSourceObject.Load(4, &f.dfltgid) + stateSourceObject.Load(5, &f.msize) + stateSourceObject.Load(6, &f.version) + stateSourceObject.Load(7, &f.maxCachedDentries) + stateSourceObject.Load(8, &f.forcePageCache) + stateSourceObject.Load(9, &f.limitHostFDTranslation) + stateSourceObject.Load(10, &f.overlayfsStaleRead) + stateSourceObject.Load(11, &f.regularFilesUseSpecialFileFD) +} + +func (i *InteropMode) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.InteropMode" } -func (x *InteropMode) StateFields() []string { +func (i *InteropMode) StateFields() []string { return nil } -func (x *InternalFilesystemOptions) StateTypeName() string { +func (i *InternalFilesystemOptions) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.InternalFilesystemOptions" } -func (x *InternalFilesystemOptions) StateFields() []string { +func (i *InternalFilesystemOptions) StateFields() []string { return []string{ "LeakConnection", "OpenSocketsByConnecting", } } -func (x *InternalFilesystemOptions) beforeSave() {} +func (i *InternalFilesystemOptions) beforeSave() {} -func (x *InternalFilesystemOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.LeakConnection) - m.Save(1, &x.OpenSocketsByConnecting) +func (i *InternalFilesystemOptions) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.LeakConnection) + stateSinkObject.Save(1, &i.OpenSocketsByConnecting) } -func (x *InternalFilesystemOptions) afterLoad() {} +func (i *InternalFilesystemOptions) afterLoad() {} -func (x *InternalFilesystemOptions) StateLoad(m state.Source) { - m.Load(0, &x.LeakConnection) - m.Load(1, &x.OpenSocketsByConnecting) +func (i *InternalFilesystemOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.LeakConnection) + stateSourceObject.Load(1, &i.OpenSocketsByConnecting) } -func (x *dentry) StateTypeName() string { +func (d *dentry) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.dentry" } -func (x *dentry) StateFields() []string { +func (d *dentry) StateFields() []string { return []string{ "vfsd", "refs", @@ -304,92 +304,92 @@ func (x *dentry) StateFields() []string { } } -func (x *dentry) beforeSave() {} - -func (x *dentry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsd) - m.Save(1, &x.refs) - m.Save(2, &x.fs) - m.Save(3, &x.parent) - m.Save(4, &x.name) - m.Save(5, &x.deleted) - m.Save(6, &x.cached) - m.Save(7, &x.dentryEntry) - m.Save(8, &x.children) - m.Save(9, &x.syntheticChildren) - m.Save(10, &x.dirents) - m.Save(11, &x.ino) - m.Save(12, &x.mode) - m.Save(13, &x.uid) - m.Save(14, &x.gid) - m.Save(15, &x.blockSize) - m.Save(16, &x.atime) - m.Save(17, &x.mtime) - m.Save(18, &x.ctime) - m.Save(19, &x.btime) - m.Save(20, &x.size) - m.Save(21, &x.atimeDirty) - m.Save(22, &x.mtimeDirty) - m.Save(23, &x.nlink) - m.Save(24, &x.mappings) - m.Save(25, &x.hostFD) - m.Save(26, &x.cache) - m.Save(27, &x.dirty) - m.Save(28, &x.pf) - m.Save(29, &x.haveTarget) - m.Save(30, &x.target) - m.Save(31, &x.endpoint) - m.Save(32, &x.pipe) - m.Save(33, &x.locks) - m.Save(34, &x.watches) -} - -func (x *dentry) afterLoad() {} - -func (x *dentry) StateLoad(m state.Source) { - m.Load(0, &x.vfsd) - m.Load(1, &x.refs) - m.Load(2, &x.fs) - m.Load(3, &x.parent) - m.Load(4, &x.name) - m.Load(5, &x.deleted) - m.Load(6, &x.cached) - m.Load(7, &x.dentryEntry) - m.Load(8, &x.children) - m.Load(9, &x.syntheticChildren) - m.Load(10, &x.dirents) - m.Load(11, &x.ino) - m.Load(12, &x.mode) - m.Load(13, &x.uid) - m.Load(14, &x.gid) - m.Load(15, &x.blockSize) - m.Load(16, &x.atime) - m.Load(17, &x.mtime) - m.Load(18, &x.ctime) - m.Load(19, &x.btime) - m.Load(20, &x.size) - m.Load(21, &x.atimeDirty) - m.Load(22, &x.mtimeDirty) - m.Load(23, &x.nlink) - m.Load(24, &x.mappings) - m.Load(25, &x.hostFD) - m.Load(26, &x.cache) - m.Load(27, &x.dirty) - m.Load(28, &x.pf) - m.Load(29, &x.haveTarget) - m.Load(30, &x.target) - m.Load(31, &x.endpoint) - m.Load(32, &x.pipe) - m.Load(33, &x.locks) - m.Load(34, &x.watches) -} - -func (x *fileDescription) StateTypeName() string { +func (d *dentry) beforeSave() {} + +func (d *dentry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.vfsd) + stateSinkObject.Save(1, &d.refs) + stateSinkObject.Save(2, &d.fs) + stateSinkObject.Save(3, &d.parent) + stateSinkObject.Save(4, &d.name) + stateSinkObject.Save(5, &d.deleted) + stateSinkObject.Save(6, &d.cached) + stateSinkObject.Save(7, &d.dentryEntry) + stateSinkObject.Save(8, &d.children) + stateSinkObject.Save(9, &d.syntheticChildren) + stateSinkObject.Save(10, &d.dirents) + stateSinkObject.Save(11, &d.ino) + stateSinkObject.Save(12, &d.mode) + stateSinkObject.Save(13, &d.uid) + stateSinkObject.Save(14, &d.gid) + stateSinkObject.Save(15, &d.blockSize) + stateSinkObject.Save(16, &d.atime) + stateSinkObject.Save(17, &d.mtime) + stateSinkObject.Save(18, &d.ctime) + stateSinkObject.Save(19, &d.btime) + stateSinkObject.Save(20, &d.size) + stateSinkObject.Save(21, &d.atimeDirty) + stateSinkObject.Save(22, &d.mtimeDirty) + stateSinkObject.Save(23, &d.nlink) + stateSinkObject.Save(24, &d.mappings) + stateSinkObject.Save(25, &d.hostFD) + stateSinkObject.Save(26, &d.cache) + stateSinkObject.Save(27, &d.dirty) + stateSinkObject.Save(28, &d.pf) + stateSinkObject.Save(29, &d.haveTarget) + stateSinkObject.Save(30, &d.target) + stateSinkObject.Save(31, &d.endpoint) + stateSinkObject.Save(32, &d.pipe) + stateSinkObject.Save(33, &d.locks) + stateSinkObject.Save(34, &d.watches) +} + +func (d *dentry) afterLoad() {} + +func (d *dentry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.vfsd) + stateSourceObject.Load(1, &d.refs) + stateSourceObject.Load(2, &d.fs) + stateSourceObject.Load(3, &d.parent) + stateSourceObject.Load(4, &d.name) + stateSourceObject.Load(5, &d.deleted) + stateSourceObject.Load(6, &d.cached) + stateSourceObject.Load(7, &d.dentryEntry) + stateSourceObject.Load(8, &d.children) + stateSourceObject.Load(9, &d.syntheticChildren) + stateSourceObject.Load(10, &d.dirents) + stateSourceObject.Load(11, &d.ino) + stateSourceObject.Load(12, &d.mode) + stateSourceObject.Load(13, &d.uid) + stateSourceObject.Load(14, &d.gid) + stateSourceObject.Load(15, &d.blockSize) + stateSourceObject.Load(16, &d.atime) + stateSourceObject.Load(17, &d.mtime) + stateSourceObject.Load(18, &d.ctime) + stateSourceObject.Load(19, &d.btime) + stateSourceObject.Load(20, &d.size) + stateSourceObject.Load(21, &d.atimeDirty) + stateSourceObject.Load(22, &d.mtimeDirty) + stateSourceObject.Load(23, &d.nlink) + stateSourceObject.Load(24, &d.mappings) + stateSourceObject.Load(25, &d.hostFD) + stateSourceObject.Load(26, &d.cache) + stateSourceObject.Load(27, &d.dirty) + stateSourceObject.Load(28, &d.pf) + stateSourceObject.Load(29, &d.haveTarget) + stateSourceObject.Load(30, &d.target) + stateSourceObject.Load(31, &d.endpoint) + stateSourceObject.Load(32, &d.pipe) + stateSourceObject.Load(33, &d.locks) + stateSourceObject.Load(34, &d.watches) +} + +func (f *fileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.fileDescription" } -func (x *fileDescription) StateFields() []string { +func (f *fileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -397,54 +397,54 @@ func (x *fileDescription) StateFields() []string { } } -func (x *fileDescription) beforeSave() {} +func (f *fileDescription) beforeSave() {} -func (x *fileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.LockFD) +func (f *fileDescription) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfd) + stateSinkObject.Save(1, &f.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &f.LockFD) } -func (x *fileDescription) afterLoad() {} +func (f *fileDescription) afterLoad() {} -func (x *fileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.LockFD) +func (f *fileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfd) + stateSourceObject.Load(1, &f.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &f.LockFD) } -func (x *regularFileFD) StateTypeName() string { +func (r *regularFileFD) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.regularFileFD" } -func (x *regularFileFD) StateFields() []string { +func (r *regularFileFD) StateFields() []string { return []string{ "fileDescription", "off", } } -func (x *regularFileFD) beforeSave() {} +func (r *regularFileFD) beforeSave() {} -func (x *regularFileFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileDescription) - m.Save(1, &x.off) +func (r *regularFileFD) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.fileDescription) + stateSinkObject.Save(1, &r.off) } -func (x *regularFileFD) afterLoad() {} +func (r *regularFileFD) afterLoad() {} -func (x *regularFileFD) StateLoad(m state.Source) { - m.Load(0, &x.fileDescription) - m.Load(1, &x.off) +func (r *regularFileFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.fileDescription) + stateSourceObject.Load(1, &r.off) } -func (x *dentryPlatformFile) StateTypeName() string { +func (d *dentryPlatformFile) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.dentryPlatformFile" } -func (x *dentryPlatformFile) StateFields() []string { +func (d *dentryPlatformFile) StateFields() []string { return []string{ "dentry", "fdRefs", @@ -452,54 +452,54 @@ func (x *dentryPlatformFile) StateFields() []string { } } -func (x *dentryPlatformFile) beforeSave() {} +func (d *dentryPlatformFile) beforeSave() {} -func (x *dentryPlatformFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dentry) - m.Save(1, &x.fdRefs) - m.Save(2, &x.hostFileMapper) +func (d *dentryPlatformFile) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.dentry) + stateSinkObject.Save(1, &d.fdRefs) + stateSinkObject.Save(2, &d.hostFileMapper) } -func (x *dentryPlatformFile) afterLoad() {} +func (d *dentryPlatformFile) afterLoad() {} -func (x *dentryPlatformFile) StateLoad(m state.Source) { - m.Load(0, &x.dentry) - m.Load(1, &x.fdRefs) - m.Load(2, &x.hostFileMapper) +func (d *dentryPlatformFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.dentry) + stateSourceObject.Load(1, &d.fdRefs) + stateSourceObject.Load(2, &d.hostFileMapper) } -func (x *endpoint) StateTypeName() string { +func (e *endpoint) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.endpoint" } -func (x *endpoint) StateFields() []string { +func (e *endpoint) StateFields() []string { return []string{ "dentry", "path", } } -func (x *endpoint) beforeSave() {} +func (e *endpoint) beforeSave() {} -func (x *endpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dentry) - m.Save(1, &x.path) +func (e *endpoint) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.dentry) + stateSinkObject.Save(1, &e.path) } -func (x *endpoint) afterLoad() {} +func (e *endpoint) afterLoad() {} -func (x *endpoint) StateLoad(m state.Source) { - m.Load(0, &x.dentry) - m.Load(1, &x.path) +func (e *endpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.dentry) + stateSourceObject.Load(1, &e.path) } -func (x *specialFileFD) StateTypeName() string { +func (s *specialFileFD) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.specialFileFD" } -func (x *specialFileFD) StateFields() []string { +func (s *specialFileFD) StateFields() []string { return []string{ "fileDescription", "isRegularFile", @@ -510,27 +510,27 @@ func (x *specialFileFD) StateFields() []string { } } -func (x *specialFileFD) beforeSave() {} +func (s *specialFileFD) beforeSave() {} -func (x *specialFileFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileDescription) - m.Save(1, &x.isRegularFile) - m.Save(2, &x.seekable) - m.Save(3, &x.haveQueue) - m.Save(4, &x.queue) - m.Save(5, &x.off) +func (s *specialFileFD) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.fileDescription) + stateSinkObject.Save(1, &s.isRegularFile) + stateSinkObject.Save(2, &s.seekable) + stateSinkObject.Save(3, &s.haveQueue) + stateSinkObject.Save(4, &s.queue) + stateSinkObject.Save(5, &s.off) } -func (x *specialFileFD) afterLoad() {} +func (s *specialFileFD) afterLoad() {} -func (x *specialFileFD) StateLoad(m state.Source) { - m.Load(0, &x.fileDescription) - m.Load(1, &x.isRegularFile) - m.Load(2, &x.seekable) - m.Load(3, &x.haveQueue) - m.Load(4, &x.queue) - m.Load(5, &x.off) +func (s *specialFileFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.fileDescription) + stateSourceObject.Load(1, &s.isRegularFile) + stateSourceObject.Load(2, &s.seekable) + stateSourceObject.Load(3, &s.haveQueue) + stateSourceObject.Load(4, &s.queue) + stateSourceObject.Load(5, &s.off) } func init() { diff --git a/pkg/sentry/fsimpl/host/host_state_autogen.go b/pkg/sentry/fsimpl/host/host_state_autogen.go index c97fa7212..76a2fdbdd 100644 --- a/pkg/sentry/fsimpl/host/host_state_autogen.go +++ b/pkg/sentry/fsimpl/host/host_state_autogen.go @@ -6,79 +6,79 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *ConnectedEndpointRefs) StateTypeName() string { +func (c *ConnectedEndpointRefs) StateTypeName() string { return "pkg/sentry/fsimpl/host.ConnectedEndpointRefs" } -func (x *ConnectedEndpointRefs) StateFields() []string { +func (c *ConnectedEndpointRefs) StateFields() []string { return []string{ "refCount", } } -func (x *ConnectedEndpointRefs) beforeSave() {} +func (c *ConnectedEndpointRefs) beforeSave() {} -func (x *ConnectedEndpointRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (c *ConnectedEndpointRefs) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.refCount) } -func (x *ConnectedEndpointRefs) afterLoad() {} +func (c *ConnectedEndpointRefs) afterLoad() {} -func (x *ConnectedEndpointRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (c *ConnectedEndpointRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.refCount) } -func (x *filesystemType) StateTypeName() string { +func (f *filesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/host.filesystemType" } -func (x *filesystemType) StateFields() []string { +func (f *filesystemType) StateFields() []string { return []string{} } -func (x *filesystemType) beforeSave() {} +func (f *filesystemType) beforeSave() {} -func (x *filesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystemType) afterLoad() {} +func (f *filesystemType) afterLoad() {} -func (x *filesystemType) StateLoad(m state.Source) { +func (f *filesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/host.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Filesystem) - m.Save(1, &x.devMinor) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Filesystem) + stateSinkObject.Save(1, &f.devMinor) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.Filesystem) - m.Load(1, &x.devMinor) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Filesystem) + stateSourceObject.Load(1, &f.devMinor) } -func (x *inode) StateTypeName() string { +func (i *inode) StateTypeName() string { return "pkg/sentry/fsimpl/host.inode" } -func (x *inode) StateFields() []string { +func (i *inode) StateFields() []string { return []string{ "InodeNoStatFS", "InodeNotDirectory", @@ -97,50 +97,50 @@ func (x *inode) StateFields() []string { } } -func (x *inode) beforeSave() {} - -func (x *inode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeNoStatFS) - m.Save(1, &x.InodeNotDirectory) - m.Save(2, &x.InodeNotSymlink) - m.Save(3, &x.locks) - m.Save(4, &x.inodeRefs) - m.Save(5, &x.hostFD) - m.Save(6, &x.ino) - m.Save(7, &x.isTTY) - m.Save(8, &x.seekable) - m.Save(9, &x.wouldBlock) - m.Save(10, &x.queue) - m.Save(11, &x.canMap) - m.Save(12, &x.mappings) - m.Save(13, &x.pf) -} - -func (x *inode) afterLoad() {} - -func (x *inode) StateLoad(m state.Source) { - m.Load(0, &x.InodeNoStatFS) - m.Load(1, &x.InodeNotDirectory) - m.Load(2, &x.InodeNotSymlink) - m.Load(3, &x.locks) - m.Load(4, &x.inodeRefs) - m.Load(5, &x.hostFD) - m.Load(6, &x.ino) - m.Load(7, &x.isTTY) - m.Load(8, &x.seekable) - m.Load(9, &x.wouldBlock) - m.Load(10, &x.queue) - m.Load(11, &x.canMap) - m.Load(12, &x.mappings) - m.Load(13, &x.pf) -} - -func (x *fileDescription) StateTypeName() string { +func (i *inode) beforeSave() {} + +func (i *inode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.InodeNoStatFS) + stateSinkObject.Save(1, &i.InodeNotDirectory) + stateSinkObject.Save(2, &i.InodeNotSymlink) + stateSinkObject.Save(3, &i.locks) + stateSinkObject.Save(4, &i.inodeRefs) + stateSinkObject.Save(5, &i.hostFD) + stateSinkObject.Save(6, &i.ino) + stateSinkObject.Save(7, &i.isTTY) + stateSinkObject.Save(8, &i.seekable) + stateSinkObject.Save(9, &i.wouldBlock) + stateSinkObject.Save(10, &i.queue) + stateSinkObject.Save(11, &i.canMap) + stateSinkObject.Save(12, &i.mappings) + stateSinkObject.Save(13, &i.pf) +} + +func (i *inode) afterLoad() {} + +func (i *inode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeNoStatFS) + stateSourceObject.Load(1, &i.InodeNotDirectory) + stateSourceObject.Load(2, &i.InodeNotSymlink) + stateSourceObject.Load(3, &i.locks) + stateSourceObject.Load(4, &i.inodeRefs) + stateSourceObject.Load(5, &i.hostFD) + stateSourceObject.Load(6, &i.ino) + stateSourceObject.Load(7, &i.isTTY) + stateSourceObject.Load(8, &i.seekable) + stateSourceObject.Load(9, &i.wouldBlock) + stateSourceObject.Load(10, &i.queue) + stateSourceObject.Load(11, &i.canMap) + stateSourceObject.Load(12, &i.mappings) + stateSourceObject.Load(13, &i.pf) +} + +func (f *fileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/host.fileDescription" } -func (x *fileDescription) StateFields() []string { +func (f *fileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -150,55 +150,55 @@ func (x *fileDescription) StateFields() []string { } } -func (x *fileDescription) beforeSave() {} +func (f *fileDescription) beforeSave() {} -func (x *fileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.LockFD) - m.Save(3, &x.inode) - m.Save(4, &x.offset) +func (f *fileDescription) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfd) + stateSinkObject.Save(1, &f.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &f.LockFD) + stateSinkObject.Save(3, &f.inode) + stateSinkObject.Save(4, &f.offset) } -func (x *fileDescription) afterLoad() {} +func (f *fileDescription) afterLoad() {} -func (x *fileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.LockFD) - m.Load(3, &x.inode) - m.Load(4, &x.offset) +func (f *fileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfd) + stateSourceObject.Load(1, &f.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &f.LockFD) + stateSourceObject.Load(3, &f.inode) + stateSourceObject.Load(4, &f.offset) } -func (x *inodeRefs) StateTypeName() string { +func (i *inodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/host.inodeRefs" } -func (x *inodeRefs) StateFields() []string { +func (i *inodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *inodeRefs) beforeSave() {} +func (i *inodeRefs) beforeSave() {} -func (x *inodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (i *inodeRefs) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.refCount) } -func (x *inodeRefs) afterLoad() {} +func (i *inodeRefs) afterLoad() {} -func (x *inodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (i *inodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.refCount) } -func (x *inodePlatformFile) StateTypeName() string { +func (i *inodePlatformFile) StateTypeName() string { return "pkg/sentry/fsimpl/host.inodePlatformFile" } -func (x *inodePlatformFile) StateFields() []string { +func (i *inodePlatformFile) StateFields() []string { return []string{ "inode", "fdRefs", @@ -206,28 +206,28 @@ func (x *inodePlatformFile) StateFields() []string { } } -func (x *inodePlatformFile) beforeSave() {} +func (i *inodePlatformFile) beforeSave() {} -func (x *inodePlatformFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inode) - m.Save(1, &x.fdRefs) - m.Save(2, &x.fileMapper) +func (i *inodePlatformFile) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.inode) + stateSinkObject.Save(1, &i.fdRefs) + stateSinkObject.Save(2, &i.fileMapper) } -func (x *inodePlatformFile) afterLoad() {} +func (i *inodePlatformFile) afterLoad() {} -func (x *inodePlatformFile) StateLoad(m state.Source) { - m.Load(0, &x.inode) - m.Load(1, &x.fdRefs) - m.Load(2, &x.fileMapper) +func (i *inodePlatformFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.inode) + stateSourceObject.Load(1, &i.fdRefs) + stateSourceObject.Load(2, &i.fileMapper) } -func (x *ConnectedEndpoint) StateTypeName() string { +func (c *ConnectedEndpoint) StateTypeName() string { return "pkg/sentry/fsimpl/host.ConnectedEndpoint" } -func (x *ConnectedEndpoint) StateFields() []string { +func (c *ConnectedEndpoint) StateFields() []string { return []string{ "ConnectedEndpointRefs", "fd", @@ -236,30 +236,30 @@ func (x *ConnectedEndpoint) StateFields() []string { } } -func (x *ConnectedEndpoint) beforeSave() {} +func (c *ConnectedEndpoint) beforeSave() {} -func (x *ConnectedEndpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ConnectedEndpointRefs) - m.Save(1, &x.fd) - m.Save(2, &x.addr) - m.Save(3, &x.stype) +func (c *ConnectedEndpoint) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.ConnectedEndpointRefs) + stateSinkObject.Save(1, &c.fd) + stateSinkObject.Save(2, &c.addr) + stateSinkObject.Save(3, &c.stype) } -func (x *ConnectedEndpoint) afterLoad() {} +func (c *ConnectedEndpoint) afterLoad() {} -func (x *ConnectedEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.ConnectedEndpointRefs) - m.Load(1, &x.fd) - m.Load(2, &x.addr) - m.Load(3, &x.stype) +func (c *ConnectedEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.ConnectedEndpointRefs) + stateSourceObject.Load(1, &c.fd) + stateSourceObject.Load(2, &c.addr) + stateSourceObject.Load(3, &c.stype) } -func (x *TTYFileDescription) StateTypeName() string { +func (t *TTYFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/host.TTYFileDescription" } -func (x *TTYFileDescription) StateFields() []string { +func (t *TTYFileDescription) StateFields() []string { return []string{ "fileDescription", "session", @@ -268,23 +268,23 @@ func (x *TTYFileDescription) StateFields() []string { } } -func (x *TTYFileDescription) beforeSave() {} +func (t *TTYFileDescription) beforeSave() {} -func (x *TTYFileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileDescription) - m.Save(1, &x.session) - m.Save(2, &x.fgProcessGroup) - m.Save(3, &x.termios) +func (t *TTYFileDescription) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.fileDescription) + stateSinkObject.Save(1, &t.session) + stateSinkObject.Save(2, &t.fgProcessGroup) + stateSinkObject.Save(3, &t.termios) } -func (x *TTYFileDescription) afterLoad() {} +func (t *TTYFileDescription) afterLoad() {} -func (x *TTYFileDescription) StateLoad(m state.Source) { - m.Load(0, &x.fileDescription) - m.Load(1, &x.session) - m.Load(2, &x.fgProcessGroup) - m.Load(3, &x.termios) +func (t *TTYFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.fileDescription) + stateSourceObject.Load(1, &t.session) + stateSourceObject.Load(2, &t.fgProcessGroup) + stateSourceObject.Load(3, &t.termios) } func init() { diff --git a/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go b/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go index f42662d2d..dc7a033ab 100644 --- a/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go +++ b/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go @@ -6,34 +6,34 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *DentryRefs) StateTypeName() string { +func (d *DentryRefs) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.DentryRefs" } -func (x *DentryRefs) StateFields() []string { +func (d *DentryRefs) StateFields() []string { return []string{ "refCount", } } -func (x *DentryRefs) beforeSave() {} +func (d *DentryRefs) beforeSave() {} -func (x *DentryRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (d *DentryRefs) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.refCount) } -func (x *DentryRefs) afterLoad() {} +func (d *DentryRefs) afterLoad() {} -func (x *DentryRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (d *DentryRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.refCount) } -func (x *DynamicBytesFile) StateTypeName() string { +func (d *DynamicBytesFile) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.DynamicBytesFile" } -func (x *DynamicBytesFile) StateFields() []string { +func (d *DynamicBytesFile) StateFields() []string { return []string{ "InodeAttrs", "InodeNoStatFS", @@ -45,36 +45,36 @@ func (x *DynamicBytesFile) StateFields() []string { } } -func (x *DynamicBytesFile) beforeSave() {} +func (d *DynamicBytesFile) beforeSave() {} -func (x *DynamicBytesFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeAttrs) - m.Save(1, &x.InodeNoStatFS) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeNotDirectory) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.locks) - m.Save(6, &x.data) +func (d *DynamicBytesFile) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.InodeAttrs) + stateSinkObject.Save(1, &d.InodeNoStatFS) + stateSinkObject.Save(2, &d.InodeNoopRefCount) + stateSinkObject.Save(3, &d.InodeNotDirectory) + stateSinkObject.Save(4, &d.InodeNotSymlink) + stateSinkObject.Save(5, &d.locks) + stateSinkObject.Save(6, &d.data) } -func (x *DynamicBytesFile) afterLoad() {} +func (d *DynamicBytesFile) afterLoad() {} -func (x *DynamicBytesFile) StateLoad(m state.Source) { - m.Load(0, &x.InodeAttrs) - m.Load(1, &x.InodeNoStatFS) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeNotDirectory) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.locks) - m.Load(6, &x.data) +func (d *DynamicBytesFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.InodeAttrs) + stateSourceObject.Load(1, &d.InodeNoStatFS) + stateSourceObject.Load(2, &d.InodeNoopRefCount) + stateSourceObject.Load(3, &d.InodeNotDirectory) + stateSourceObject.Load(4, &d.InodeNotSymlink) + stateSourceObject.Load(5, &d.locks) + stateSourceObject.Load(6, &d.data) } -func (x *DynamicBytesFD) StateTypeName() string { +func (d *DynamicBytesFD) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.DynamicBytesFD" } -func (x *DynamicBytesFD) StateFields() []string { +func (d *DynamicBytesFD) StateFields() []string { return []string{ "FileDescriptionDefaultImpl", "DynamicBytesFileDescriptionImpl", @@ -84,63 +84,63 @@ func (x *DynamicBytesFD) StateFields() []string { } } -func (x *DynamicBytesFD) beforeSave() {} +func (d *DynamicBytesFD) beforeSave() {} -func (x *DynamicBytesFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FileDescriptionDefaultImpl) - m.Save(1, &x.DynamicBytesFileDescriptionImpl) - m.Save(2, &x.LockFD) - m.Save(3, &x.vfsfd) - m.Save(4, &x.inode) +func (d *DynamicBytesFD) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.FileDescriptionDefaultImpl) + stateSinkObject.Save(1, &d.DynamicBytesFileDescriptionImpl) + stateSinkObject.Save(2, &d.LockFD) + stateSinkObject.Save(3, &d.vfsfd) + stateSinkObject.Save(4, &d.inode) } -func (x *DynamicBytesFD) afterLoad() {} +func (d *DynamicBytesFD) afterLoad() {} -func (x *DynamicBytesFD) StateLoad(m state.Source) { - m.Load(0, &x.FileDescriptionDefaultImpl) - m.Load(1, &x.DynamicBytesFileDescriptionImpl) - m.Load(2, &x.LockFD) - m.Load(3, &x.vfsfd) - m.Load(4, &x.inode) +func (d *DynamicBytesFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.FileDescriptionDefaultImpl) + stateSourceObject.Load(1, &d.DynamicBytesFileDescriptionImpl) + stateSourceObject.Load(2, &d.LockFD) + stateSourceObject.Load(3, &d.vfsfd) + stateSourceObject.Load(4, &d.inode) } -func (x *SeekEndConfig) StateTypeName() string { +func (s *SeekEndConfig) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.SeekEndConfig" } -func (x *SeekEndConfig) StateFields() []string { +func (s *SeekEndConfig) StateFields() []string { return nil } -func (x *GenericDirectoryFDOptions) StateTypeName() string { +func (g *GenericDirectoryFDOptions) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.GenericDirectoryFDOptions" } -func (x *GenericDirectoryFDOptions) StateFields() []string { +func (g *GenericDirectoryFDOptions) StateFields() []string { return []string{ "SeekEnd", } } -func (x *GenericDirectoryFDOptions) beforeSave() {} +func (g *GenericDirectoryFDOptions) beforeSave() {} -func (x *GenericDirectoryFDOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SeekEnd) +func (g *GenericDirectoryFDOptions) StateSave(stateSinkObject state.Sink) { + g.beforeSave() + stateSinkObject.Save(0, &g.SeekEnd) } -func (x *GenericDirectoryFDOptions) afterLoad() {} +func (g *GenericDirectoryFDOptions) afterLoad() {} -func (x *GenericDirectoryFDOptions) StateLoad(m state.Source) { - m.Load(0, &x.SeekEnd) +func (g *GenericDirectoryFDOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &g.SeekEnd) } -func (x *GenericDirectoryFD) StateTypeName() string { +func (g *GenericDirectoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.GenericDirectoryFD" } -func (x *GenericDirectoryFD) StateFields() []string { +func (g *GenericDirectoryFD) StateFields() []string { return []string{ "FileDescriptionDefaultImpl", "DirectoryFileDescriptionDefaultImpl", @@ -152,131 +152,131 @@ func (x *GenericDirectoryFD) StateFields() []string { } } -func (x *GenericDirectoryFD) beforeSave() {} +func (g *GenericDirectoryFD) beforeSave() {} -func (x *GenericDirectoryFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FileDescriptionDefaultImpl) - m.Save(1, &x.DirectoryFileDescriptionDefaultImpl) - m.Save(2, &x.LockFD) - m.Save(3, &x.seekEnd) - m.Save(4, &x.vfsfd) - m.Save(5, &x.children) - m.Save(6, &x.off) +func (g *GenericDirectoryFD) StateSave(stateSinkObject state.Sink) { + g.beforeSave() + stateSinkObject.Save(0, &g.FileDescriptionDefaultImpl) + stateSinkObject.Save(1, &g.DirectoryFileDescriptionDefaultImpl) + stateSinkObject.Save(2, &g.LockFD) + stateSinkObject.Save(3, &g.seekEnd) + stateSinkObject.Save(4, &g.vfsfd) + stateSinkObject.Save(5, &g.children) + stateSinkObject.Save(6, &g.off) } -func (x *GenericDirectoryFD) afterLoad() {} +func (g *GenericDirectoryFD) afterLoad() {} -func (x *GenericDirectoryFD) StateLoad(m state.Source) { - m.Load(0, &x.FileDescriptionDefaultImpl) - m.Load(1, &x.DirectoryFileDescriptionDefaultImpl) - m.Load(2, &x.LockFD) - m.Load(3, &x.seekEnd) - m.Load(4, &x.vfsfd) - m.Load(5, &x.children) - m.Load(6, &x.off) +func (g *GenericDirectoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &g.FileDescriptionDefaultImpl) + stateSourceObject.Load(1, &g.DirectoryFileDescriptionDefaultImpl) + stateSourceObject.Load(2, &g.LockFD) + stateSourceObject.Load(3, &g.seekEnd) + stateSourceObject.Load(4, &g.vfsfd) + stateSourceObject.Load(5, &g.children) + stateSourceObject.Load(6, &g.off) } -func (x *InodeNoopRefCount) StateTypeName() string { +func (i *InodeNoopRefCount) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeNoopRefCount" } -func (x *InodeNoopRefCount) StateFields() []string { +func (i *InodeNoopRefCount) StateFields() []string { return []string{} } -func (x *InodeNoopRefCount) beforeSave() {} +func (i *InodeNoopRefCount) beforeSave() {} -func (x *InodeNoopRefCount) StateSave(m state.Sink) { - x.beforeSave() +func (i *InodeNoopRefCount) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *InodeNoopRefCount) afterLoad() {} +func (i *InodeNoopRefCount) afterLoad() {} -func (x *InodeNoopRefCount) StateLoad(m state.Source) { +func (i *InodeNoopRefCount) StateLoad(stateSourceObject state.Source) { } -func (x *InodeDirectoryNoNewChildren) StateTypeName() string { +func (i *InodeDirectoryNoNewChildren) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeDirectoryNoNewChildren" } -func (x *InodeDirectoryNoNewChildren) StateFields() []string { +func (i *InodeDirectoryNoNewChildren) StateFields() []string { return []string{} } -func (x *InodeDirectoryNoNewChildren) beforeSave() {} +func (i *InodeDirectoryNoNewChildren) beforeSave() {} -func (x *InodeDirectoryNoNewChildren) StateSave(m state.Sink) { - x.beforeSave() +func (i *InodeDirectoryNoNewChildren) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *InodeDirectoryNoNewChildren) afterLoad() {} +func (i *InodeDirectoryNoNewChildren) afterLoad() {} -func (x *InodeDirectoryNoNewChildren) StateLoad(m state.Source) { +func (i *InodeDirectoryNoNewChildren) StateLoad(stateSourceObject state.Source) { } -func (x *InodeNotDirectory) StateTypeName() string { +func (i *InodeNotDirectory) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeNotDirectory" } -func (x *InodeNotDirectory) StateFields() []string { +func (i *InodeNotDirectory) StateFields() []string { return []string{} } -func (x *InodeNotDirectory) beforeSave() {} +func (i *InodeNotDirectory) beforeSave() {} -func (x *InodeNotDirectory) StateSave(m state.Sink) { - x.beforeSave() +func (i *InodeNotDirectory) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *InodeNotDirectory) afterLoad() {} +func (i *InodeNotDirectory) afterLoad() {} -func (x *InodeNotDirectory) StateLoad(m state.Source) { +func (i *InodeNotDirectory) StateLoad(stateSourceObject state.Source) { } -func (x *InodeNoDynamicLookup) StateTypeName() string { +func (i *InodeNoDynamicLookup) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeNoDynamicLookup" } -func (x *InodeNoDynamicLookup) StateFields() []string { +func (i *InodeNoDynamicLookup) StateFields() []string { return []string{} } -func (x *InodeNoDynamicLookup) beforeSave() {} +func (i *InodeNoDynamicLookup) beforeSave() {} -func (x *InodeNoDynamicLookup) StateSave(m state.Sink) { - x.beforeSave() +func (i *InodeNoDynamicLookup) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *InodeNoDynamicLookup) afterLoad() {} +func (i *InodeNoDynamicLookup) afterLoad() {} -func (x *InodeNoDynamicLookup) StateLoad(m state.Source) { +func (i *InodeNoDynamicLookup) StateLoad(stateSourceObject state.Source) { } -func (x *InodeNotSymlink) StateTypeName() string { +func (i *InodeNotSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeNotSymlink" } -func (x *InodeNotSymlink) StateFields() []string { +func (i *InodeNotSymlink) StateFields() []string { return []string{} } -func (x *InodeNotSymlink) beforeSave() {} +func (i *InodeNotSymlink) beforeSave() {} -func (x *InodeNotSymlink) StateSave(m state.Sink) { - x.beforeSave() +func (i *InodeNotSymlink) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *InodeNotSymlink) afterLoad() {} +func (i *InodeNotSymlink) afterLoad() {} -func (x *InodeNotSymlink) StateLoad(m state.Source) { +func (i *InodeNotSymlink) StateLoad(stateSourceObject state.Source) { } -func (x *InodeAttrs) StateTypeName() string { +func (i *InodeAttrs) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeAttrs" } -func (x *InodeAttrs) StateFields() []string { +func (i *InodeAttrs) StateFields() []string { return []string{ "devMajor", "devMinor", @@ -288,36 +288,36 @@ func (x *InodeAttrs) StateFields() []string { } } -func (x *InodeAttrs) beforeSave() {} +func (i *InodeAttrs) beforeSave() {} -func (x *InodeAttrs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.devMajor) - m.Save(1, &x.devMinor) - m.Save(2, &x.ino) - m.Save(3, &x.mode) - m.Save(4, &x.uid) - m.Save(5, &x.gid) - m.Save(6, &x.nlink) +func (i *InodeAttrs) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.devMajor) + stateSinkObject.Save(1, &i.devMinor) + stateSinkObject.Save(2, &i.ino) + stateSinkObject.Save(3, &i.mode) + stateSinkObject.Save(4, &i.uid) + stateSinkObject.Save(5, &i.gid) + stateSinkObject.Save(6, &i.nlink) } -func (x *InodeAttrs) afterLoad() {} +func (i *InodeAttrs) afterLoad() {} -func (x *InodeAttrs) StateLoad(m state.Source) { - m.Load(0, &x.devMajor) - m.Load(1, &x.devMinor) - m.Load(2, &x.ino) - m.Load(3, &x.mode) - m.Load(4, &x.uid) - m.Load(5, &x.gid) - m.Load(6, &x.nlink) +func (i *InodeAttrs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.devMajor) + stateSourceObject.Load(1, &i.devMinor) + stateSourceObject.Load(2, &i.ino) + stateSourceObject.Load(3, &i.mode) + stateSourceObject.Load(4, &i.uid) + stateSourceObject.Load(5, &i.gid) + stateSourceObject.Load(6, &i.nlink) } -func (x *slot) StateTypeName() string { +func (s *slot) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.slot" } -func (x *slot) StateFields() []string { +func (s *slot) StateFields() []string { return []string{ "Name", "Dentry", @@ -325,51 +325,51 @@ func (x *slot) StateFields() []string { } } -func (x *slot) beforeSave() {} +func (s *slot) beforeSave() {} -func (x *slot) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Name) - m.Save(1, &x.Dentry) - m.Save(2, &x.slotEntry) +func (s *slot) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Name) + stateSinkObject.Save(1, &s.Dentry) + stateSinkObject.Save(2, &s.slotEntry) } -func (x *slot) afterLoad() {} +func (s *slot) afterLoad() {} -func (x *slot) StateLoad(m state.Source) { - m.Load(0, &x.Name) - m.Load(1, &x.Dentry) - m.Load(2, &x.slotEntry) +func (s *slot) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Name) + stateSourceObject.Load(1, &s.Dentry) + stateSourceObject.Load(2, &s.slotEntry) } -func (x *OrderedChildrenOptions) StateTypeName() string { +func (o *OrderedChildrenOptions) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.OrderedChildrenOptions" } -func (x *OrderedChildrenOptions) StateFields() []string { +func (o *OrderedChildrenOptions) StateFields() []string { return []string{ "Writable", } } -func (x *OrderedChildrenOptions) beforeSave() {} +func (o *OrderedChildrenOptions) beforeSave() {} -func (x *OrderedChildrenOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Writable) +func (o *OrderedChildrenOptions) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.Writable) } -func (x *OrderedChildrenOptions) afterLoad() {} +func (o *OrderedChildrenOptions) afterLoad() {} -func (x *OrderedChildrenOptions) StateLoad(m state.Source) { - m.Load(0, &x.Writable) +func (o *OrderedChildrenOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.Writable) } -func (x *OrderedChildren) StateTypeName() string { +func (o *OrderedChildren) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.OrderedChildren" } -func (x *OrderedChildren) StateFields() []string { +func (o *OrderedChildren) StateFields() []string { return []string{ "writable", "order", @@ -377,70 +377,70 @@ func (x *OrderedChildren) StateFields() []string { } } -func (x *OrderedChildren) beforeSave() {} +func (o *OrderedChildren) beforeSave() {} -func (x *OrderedChildren) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.writable) - m.Save(1, &x.order) - m.Save(2, &x.set) +func (o *OrderedChildren) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.writable) + stateSinkObject.Save(1, &o.order) + stateSinkObject.Save(2, &o.set) } -func (x *OrderedChildren) afterLoad() {} +func (o *OrderedChildren) afterLoad() {} -func (x *OrderedChildren) StateLoad(m state.Source) { - m.Load(0, &x.writable) - m.Load(1, &x.order) - m.Load(2, &x.set) +func (o *OrderedChildren) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.writable) + stateSourceObject.Load(1, &o.order) + stateSourceObject.Load(2, &o.set) } -func (x *renameAcrossDifferentImplementationsError) StateTypeName() string { +func (r *renameAcrossDifferentImplementationsError) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.renameAcrossDifferentImplementationsError" } -func (x *renameAcrossDifferentImplementationsError) StateFields() []string { +func (r *renameAcrossDifferentImplementationsError) StateFields() []string { return []string{} } -func (x *renameAcrossDifferentImplementationsError) beforeSave() {} +func (r *renameAcrossDifferentImplementationsError) beforeSave() {} -func (x *renameAcrossDifferentImplementationsError) StateSave(m state.Sink) { - x.beforeSave() +func (r *renameAcrossDifferentImplementationsError) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *renameAcrossDifferentImplementationsError) afterLoad() {} +func (r *renameAcrossDifferentImplementationsError) afterLoad() {} -func (x *renameAcrossDifferentImplementationsError) StateLoad(m state.Source) { +func (r *renameAcrossDifferentImplementationsError) StateLoad(stateSourceObject state.Source) { } -func (x *InodeSymlink) StateTypeName() string { +func (i *InodeSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeSymlink" } -func (x *InodeSymlink) StateFields() []string { +func (i *InodeSymlink) StateFields() []string { return []string{ "InodeNotDirectory", } } -func (x *InodeSymlink) beforeSave() {} +func (i *InodeSymlink) beforeSave() {} -func (x *InodeSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeNotDirectory) +func (i *InodeSymlink) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.InodeNotDirectory) } -func (x *InodeSymlink) afterLoad() {} +func (i *InodeSymlink) afterLoad() {} -func (x *InodeSymlink) StateLoad(m state.Source) { - m.Load(0, &x.InodeNotDirectory) +func (i *InodeSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeNotDirectory) } -func (x *StaticDirectory) StateTypeName() string { +func (s *StaticDirectory) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.StaticDirectory" } -func (x *StaticDirectory) StateFields() []string { +func (s *StaticDirectory) StateFields() []string { return []string{ "InodeAttrs", "InodeDirectoryNoNewChildren", @@ -454,78 +454,78 @@ func (x *StaticDirectory) StateFields() []string { } } -func (x *StaticDirectory) beforeSave() {} +func (s *StaticDirectory) beforeSave() {} -func (x *StaticDirectory) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeAttrs) - m.Save(1, &x.InodeDirectoryNoNewChildren) - m.Save(2, &x.InodeNoDynamicLookup) - m.Save(3, &x.InodeNoStatFS) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.OrderedChildren) - m.Save(6, &x.StaticDirectoryRefs) - m.Save(7, &x.locks) - m.Save(8, &x.fdOpts) +func (s *StaticDirectory) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeAttrs) + stateSinkObject.Save(1, &s.InodeDirectoryNoNewChildren) + stateSinkObject.Save(2, &s.InodeNoDynamicLookup) + stateSinkObject.Save(3, &s.InodeNoStatFS) + stateSinkObject.Save(4, &s.InodeNotSymlink) + stateSinkObject.Save(5, &s.OrderedChildren) + stateSinkObject.Save(6, &s.StaticDirectoryRefs) + stateSinkObject.Save(7, &s.locks) + stateSinkObject.Save(8, &s.fdOpts) } -func (x *StaticDirectory) afterLoad() {} +func (s *StaticDirectory) afterLoad() {} -func (x *StaticDirectory) StateLoad(m state.Source) { - m.Load(0, &x.InodeAttrs) - m.Load(1, &x.InodeDirectoryNoNewChildren) - m.Load(2, &x.InodeNoDynamicLookup) - m.Load(3, &x.InodeNoStatFS) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.OrderedChildren) - m.Load(6, &x.StaticDirectoryRefs) - m.Load(7, &x.locks) - m.Load(8, &x.fdOpts) +func (s *StaticDirectory) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeAttrs) + stateSourceObject.Load(1, &s.InodeDirectoryNoNewChildren) + stateSourceObject.Load(2, &s.InodeNoDynamicLookup) + stateSourceObject.Load(3, &s.InodeNoStatFS) + stateSourceObject.Load(4, &s.InodeNotSymlink) + stateSourceObject.Load(5, &s.OrderedChildren) + stateSourceObject.Load(6, &s.StaticDirectoryRefs) + stateSourceObject.Load(7, &s.locks) + stateSourceObject.Load(8, &s.fdOpts) } -func (x *AlwaysValid) StateTypeName() string { +func (a *AlwaysValid) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.AlwaysValid" } -func (x *AlwaysValid) StateFields() []string { +func (a *AlwaysValid) StateFields() []string { return []string{} } -func (x *AlwaysValid) beforeSave() {} +func (a *AlwaysValid) beforeSave() {} -func (x *AlwaysValid) StateSave(m state.Sink) { - x.beforeSave() +func (a *AlwaysValid) StateSave(stateSinkObject state.Sink) { + a.beforeSave() } -func (x *AlwaysValid) afterLoad() {} +func (a *AlwaysValid) afterLoad() {} -func (x *AlwaysValid) StateLoad(m state.Source) { +func (a *AlwaysValid) StateLoad(stateSourceObject state.Source) { } -func (x *InodeNoStatFS) StateTypeName() string { +func (i *InodeNoStatFS) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeNoStatFS" } -func (x *InodeNoStatFS) StateFields() []string { +func (i *InodeNoStatFS) StateFields() []string { return []string{} } -func (x *InodeNoStatFS) beforeSave() {} +func (i *InodeNoStatFS) beforeSave() {} -func (x *InodeNoStatFS) StateSave(m state.Sink) { - x.beforeSave() +func (i *InodeNoStatFS) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *InodeNoStatFS) afterLoad() {} +func (i *InodeNoStatFS) afterLoad() {} -func (x *InodeNoStatFS) StateLoad(m state.Source) { +func (i *InodeNoStatFS) StateLoad(stateSourceObject state.Source) { } -func (x *Filesystem) StateTypeName() string { +func (f *Filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.Filesystem" } -func (x *Filesystem) StateFields() []string { +func (f *Filesystem) StateFields() []string { return []string{ "vfsfs", "droppedDentries", @@ -533,28 +533,28 @@ func (x *Filesystem) StateFields() []string { } } -func (x *Filesystem) beforeSave() {} +func (f *Filesystem) beforeSave() {} -func (x *Filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfs) - m.Save(1, &x.droppedDentries) - m.Save(2, &x.nextInoMinusOne) +func (f *Filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfs) + stateSinkObject.Save(1, &f.droppedDentries) + stateSinkObject.Save(2, &f.nextInoMinusOne) } -func (x *Filesystem) afterLoad() {} +func (f *Filesystem) afterLoad() {} -func (x *Filesystem) StateLoad(m state.Source) { - m.Load(0, &x.vfsfs) - m.Load(1, &x.droppedDentries) - m.Load(2, &x.nextInoMinusOne) +func (f *Filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfs) + stateSourceObject.Load(1, &f.droppedDentries) + stateSourceObject.Load(2, &f.nextInoMinusOne) } -func (x *Dentry) StateTypeName() string { +func (d *Dentry) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.Dentry" } -func (x *Dentry) StateFields() []string { +func (d *Dentry) StateFields() []string { return []string{ "DentryRefs", "vfsd", @@ -566,111 +566,111 @@ func (x *Dentry) StateFields() []string { } } -func (x *Dentry) beforeSave() {} +func (d *Dentry) beforeSave() {} -func (x *Dentry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DentryRefs) - m.Save(1, &x.vfsd) - m.Save(2, &x.flags) - m.Save(3, &x.parent) - m.Save(4, &x.name) - m.Save(5, &x.children) - m.Save(6, &x.inode) +func (d *Dentry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DentryRefs) + stateSinkObject.Save(1, &d.vfsd) + stateSinkObject.Save(2, &d.flags) + stateSinkObject.Save(3, &d.parent) + stateSinkObject.Save(4, &d.name) + stateSinkObject.Save(5, &d.children) + stateSinkObject.Save(6, &d.inode) } -func (x *Dentry) afterLoad() {} +func (d *Dentry) afterLoad() {} -func (x *Dentry) StateLoad(m state.Source) { - m.Load(0, &x.DentryRefs) - m.Load(1, &x.vfsd) - m.Load(2, &x.flags) - m.Load(3, &x.parent) - m.Load(4, &x.name) - m.Load(5, &x.children) - m.Load(6, &x.inode) +func (d *Dentry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DentryRefs) + stateSourceObject.Load(1, &d.vfsd) + stateSourceObject.Load(2, &d.flags) + stateSourceObject.Load(3, &d.parent) + stateSourceObject.Load(4, &d.name) + stateSourceObject.Load(5, &d.children) + stateSourceObject.Load(6, &d.inode) } -func (x *slotList) StateTypeName() string { +func (s *slotList) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.slotList" } -func (x *slotList) StateFields() []string { +func (s *slotList) StateFields() []string { return []string{ "head", "tail", } } -func (x *slotList) beforeSave() {} +func (s *slotList) beforeSave() {} -func (x *slotList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (s *slotList) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.head) + stateSinkObject.Save(1, &s.tail) } -func (x *slotList) afterLoad() {} +func (s *slotList) afterLoad() {} -func (x *slotList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (s *slotList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.head) + stateSourceObject.Load(1, &s.tail) } -func (x *slotEntry) StateTypeName() string { +func (s *slotEntry) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.slotEntry" } -func (x *slotEntry) StateFields() []string { +func (s *slotEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *slotEntry) beforeSave() {} +func (s *slotEntry) beforeSave() {} -func (x *slotEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (s *slotEntry) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.next) + stateSinkObject.Save(1, &s.prev) } -func (x *slotEntry) afterLoad() {} +func (s *slotEntry) afterLoad() {} -func (x *slotEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (s *slotEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.next) + stateSourceObject.Load(1, &s.prev) } -func (x *StaticDirectoryRefs) StateTypeName() string { +func (s *StaticDirectoryRefs) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.StaticDirectoryRefs" } -func (x *StaticDirectoryRefs) StateFields() []string { +func (s *StaticDirectoryRefs) StateFields() []string { return []string{ "refCount", } } -func (x *StaticDirectoryRefs) beforeSave() {} +func (s *StaticDirectoryRefs) beforeSave() {} -func (x *StaticDirectoryRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (s *StaticDirectoryRefs) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.refCount) } -func (x *StaticDirectoryRefs) afterLoad() {} +func (s *StaticDirectoryRefs) afterLoad() {} -func (x *StaticDirectoryRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (s *StaticDirectoryRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.refCount) } -func (x *StaticSymlink) StateTypeName() string { +func (s *StaticSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.StaticSymlink" } -func (x *StaticSymlink) StateFields() []string { +func (s *StaticSymlink) StateFields() []string { return []string{ "InodeAttrs", "InodeNoopRefCount", @@ -680,32 +680,32 @@ func (x *StaticSymlink) StateFields() []string { } } -func (x *StaticSymlink) beforeSave() {} +func (s *StaticSymlink) beforeSave() {} -func (x *StaticSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeAttrs) - m.Save(1, &x.InodeNoopRefCount) - m.Save(2, &x.InodeSymlink) - m.Save(3, &x.InodeNoStatFS) - m.Save(4, &x.target) +func (s *StaticSymlink) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeAttrs) + stateSinkObject.Save(1, &s.InodeNoopRefCount) + stateSinkObject.Save(2, &s.InodeSymlink) + stateSinkObject.Save(3, &s.InodeNoStatFS) + stateSinkObject.Save(4, &s.target) } -func (x *StaticSymlink) afterLoad() {} +func (s *StaticSymlink) afterLoad() {} -func (x *StaticSymlink) StateLoad(m state.Source) { - m.Load(0, &x.InodeAttrs) - m.Load(1, &x.InodeNoopRefCount) - m.Load(2, &x.InodeSymlink) - m.Load(3, &x.InodeNoStatFS) - m.Load(4, &x.target) +func (s *StaticSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeAttrs) + stateSourceObject.Load(1, &s.InodeNoopRefCount) + stateSourceObject.Load(2, &s.InodeSymlink) + stateSourceObject.Load(3, &s.InodeNoStatFS) + stateSourceObject.Load(4, &s.target) } -func (x *syntheticDirectory) StateTypeName() string { +func (s *syntheticDirectory) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.syntheticDirectory" } -func (x *syntheticDirectory) StateFields() []string { +func (s *syntheticDirectory) StateFields() []string { return []string{ "InodeAttrs", "InodeNoStatFS", @@ -717,29 +717,29 @@ func (x *syntheticDirectory) StateFields() []string { } } -func (x *syntheticDirectory) beforeSave() {} +func (s *syntheticDirectory) beforeSave() {} -func (x *syntheticDirectory) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeAttrs) - m.Save(1, &x.InodeNoStatFS) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeNoDynamicLookup) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.OrderedChildren) - m.Save(6, &x.locks) +func (s *syntheticDirectory) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.InodeAttrs) + stateSinkObject.Save(1, &s.InodeNoStatFS) + stateSinkObject.Save(2, &s.InodeNoopRefCount) + stateSinkObject.Save(3, &s.InodeNoDynamicLookup) + stateSinkObject.Save(4, &s.InodeNotSymlink) + stateSinkObject.Save(5, &s.OrderedChildren) + stateSinkObject.Save(6, &s.locks) } -func (x *syntheticDirectory) afterLoad() {} +func (s *syntheticDirectory) afterLoad() {} -func (x *syntheticDirectory) StateLoad(m state.Source) { - m.Load(0, &x.InodeAttrs) - m.Load(1, &x.InodeNoStatFS) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeNoDynamicLookup) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.OrderedChildren) - m.Load(6, &x.locks) +func (s *syntheticDirectory) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.InodeAttrs) + stateSourceObject.Load(1, &s.InodeNoStatFS) + stateSourceObject.Load(2, &s.InodeNoopRefCount) + stateSourceObject.Load(3, &s.InodeNoDynamicLookup) + stateSourceObject.Load(4, &s.InodeNotSymlink) + stateSourceObject.Load(5, &s.OrderedChildren) + stateSourceObject.Load(6, &s.locks) } func init() { diff --git a/pkg/sentry/fsimpl/overlay/overlay_state_autogen.go b/pkg/sentry/fsimpl/overlay/overlay_state_autogen.go index d3e649672..bf2f3fb30 100644 --- a/pkg/sentry/fsimpl/overlay/overlay_state_autogen.go +++ b/pkg/sentry/fsimpl/overlay/overlay_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *directoryFD) StateTypeName() string { +func (d *directoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.directoryFD" } -func (x *directoryFD) StateFields() []string { +func (d *directoryFD) StateFields() []string { return []string{ "fileDescription", "DirectoryFileDescriptionDefaultImpl", @@ -20,32 +20,32 @@ func (x *directoryFD) StateFields() []string { } } -func (x *directoryFD) beforeSave() {} +func (d *directoryFD) beforeSave() {} -func (x *directoryFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileDescription) - m.Save(1, &x.DirectoryFileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.off) - m.Save(4, &x.dirents) +func (d *directoryFD) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.fileDescription) + stateSinkObject.Save(1, &d.DirectoryFileDescriptionDefaultImpl) + stateSinkObject.Save(2, &d.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &d.off) + stateSinkObject.Save(4, &d.dirents) } -func (x *directoryFD) afterLoad() {} +func (d *directoryFD) afterLoad() {} -func (x *directoryFD) StateLoad(m state.Source) { - m.Load(0, &x.fileDescription) - m.Load(1, &x.DirectoryFileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.off) - m.Load(4, &x.dirents) +func (d *directoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.fileDescription) + stateSourceObject.Load(1, &d.DirectoryFileDescriptionDefaultImpl) + stateSourceObject.Load(2, &d.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &d.off) + stateSourceObject.Load(4, &d.dirents) } -func (x *nonDirectoryFD) StateTypeName() string { +func (n *nonDirectoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.nonDirectoryFD" } -func (x *nonDirectoryFD) StateFields() []string { +func (n *nonDirectoryFD) StateFields() []string { return []string{ "fileDescription", "copiedUp", @@ -54,75 +54,75 @@ func (x *nonDirectoryFD) StateFields() []string { } } -func (x *nonDirectoryFD) beforeSave() {} +func (n *nonDirectoryFD) beforeSave() {} -func (x *nonDirectoryFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileDescription) - m.Save(1, &x.copiedUp) - m.Save(2, &x.cachedFD) - m.Save(3, &x.cachedFlags) +func (n *nonDirectoryFD) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.fileDescription) + stateSinkObject.Save(1, &n.copiedUp) + stateSinkObject.Save(2, &n.cachedFD) + stateSinkObject.Save(3, &n.cachedFlags) } -func (x *nonDirectoryFD) afterLoad() {} +func (n *nonDirectoryFD) afterLoad() {} -func (x *nonDirectoryFD) StateLoad(m state.Source) { - m.Load(0, &x.fileDescription) - m.Load(1, &x.copiedUp) - m.Load(2, &x.cachedFD) - m.Load(3, &x.cachedFlags) +func (n *nonDirectoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.fileDescription) + stateSourceObject.Load(1, &n.copiedUp) + stateSourceObject.Load(2, &n.cachedFD) + stateSourceObject.Load(3, &n.cachedFlags) } -func (x *FilesystemType) StateTypeName() string { +func (f *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.FilesystemType" } -func (x *FilesystemType) StateFields() []string { +func (f *FilesystemType) StateFields() []string { return []string{} } -func (x *FilesystemType) beforeSave() {} +func (f *FilesystemType) beforeSave() {} -func (x *FilesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *FilesystemType) afterLoad() {} +func (f *FilesystemType) afterLoad() {} -func (x *FilesystemType) StateLoad(m state.Source) { +func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *FilesystemOptions) StateTypeName() string { +func (f *FilesystemOptions) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.FilesystemOptions" } -func (x *FilesystemOptions) StateFields() []string { +func (f *FilesystemOptions) StateFields() []string { return []string{ "UpperRoot", "LowerRoots", } } -func (x *FilesystemOptions) beforeSave() {} +func (f *FilesystemOptions) beforeSave() {} -func (x *FilesystemOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.UpperRoot) - m.Save(1, &x.LowerRoots) +func (f *FilesystemOptions) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.UpperRoot) + stateSinkObject.Save(1, &f.LowerRoots) } -func (x *FilesystemOptions) afterLoad() {} +func (f *FilesystemOptions) afterLoad() {} -func (x *FilesystemOptions) StateLoad(m state.Source) { - m.Load(0, &x.UpperRoot) - m.Load(1, &x.LowerRoots) +func (f *FilesystemOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.UpperRoot) + stateSourceObject.Load(1, &f.LowerRoots) } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "vfsfs", "opts", @@ -133,34 +133,34 @@ func (x *filesystem) StateFields() []string { } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfs) - m.Save(1, &x.opts) - m.Save(2, &x.creds) - m.Save(3, &x.dirDevMinor) - m.Save(4, &x.lowerDevMinors) - m.Save(5, &x.lastDirIno) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfs) + stateSinkObject.Save(1, &f.opts) + stateSinkObject.Save(2, &f.creds) + stateSinkObject.Save(3, &f.dirDevMinor) + stateSinkObject.Save(4, &f.lowerDevMinors) + stateSinkObject.Save(5, &f.lastDirIno) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.vfsfs) - m.Load(1, &x.opts) - m.Load(2, &x.creds) - m.Load(3, &x.dirDevMinor) - m.Load(4, &x.lowerDevMinors) - m.Load(5, &x.lastDirIno) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfs) + stateSourceObject.Load(1, &f.opts) + stateSourceObject.Load(2, &f.creds) + stateSourceObject.Load(3, &f.dirDevMinor) + stateSourceObject.Load(4, &f.lowerDevMinors) + stateSourceObject.Load(5, &f.lastDirIno) } -func (x *dentry) StateTypeName() string { +func (d *dentry) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.dentry" } -func (x *dentry) StateFields() []string { +func (d *dentry) StateFields() []string { return []string{ "vfsd", "refs", @@ -189,70 +189,70 @@ func (x *dentry) StateFields() []string { } } -func (x *dentry) beforeSave() {} - -func (x *dentry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsd) - m.Save(1, &x.refs) - m.Save(2, &x.fs) - m.Save(3, &x.mode) - m.Save(4, &x.uid) - m.Save(5, &x.gid) - m.Save(6, &x.copiedUp) - m.Save(7, &x.parent) - m.Save(8, &x.name) - m.Save(9, &x.children) - m.Save(10, &x.dirents) - m.Save(11, &x.upperVD) - m.Save(12, &x.lowerVDs) - m.Save(13, &x.inlineLowerVDs) - m.Save(14, &x.devMajor) - m.Save(15, &x.devMinor) - m.Save(16, &x.ino) - m.Save(17, &x.mapsMu) - m.Save(18, &x.lowerMappings) - m.Save(19, &x.dataMu) - m.Save(20, &x.wrappedMappable) - m.Save(21, &x.isMappable) - m.Save(22, &x.locks) - m.Save(23, &x.watches) +func (d *dentry) beforeSave() {} + +func (d *dentry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.vfsd) + stateSinkObject.Save(1, &d.refs) + stateSinkObject.Save(2, &d.fs) + stateSinkObject.Save(3, &d.mode) + stateSinkObject.Save(4, &d.uid) + stateSinkObject.Save(5, &d.gid) + stateSinkObject.Save(6, &d.copiedUp) + stateSinkObject.Save(7, &d.parent) + stateSinkObject.Save(8, &d.name) + stateSinkObject.Save(9, &d.children) + stateSinkObject.Save(10, &d.dirents) + stateSinkObject.Save(11, &d.upperVD) + stateSinkObject.Save(12, &d.lowerVDs) + stateSinkObject.Save(13, &d.inlineLowerVDs) + stateSinkObject.Save(14, &d.devMajor) + stateSinkObject.Save(15, &d.devMinor) + stateSinkObject.Save(16, &d.ino) + stateSinkObject.Save(17, &d.mapsMu) + stateSinkObject.Save(18, &d.lowerMappings) + stateSinkObject.Save(19, &d.dataMu) + stateSinkObject.Save(20, &d.wrappedMappable) + stateSinkObject.Save(21, &d.isMappable) + stateSinkObject.Save(22, &d.locks) + stateSinkObject.Save(23, &d.watches) } -func (x *dentry) afterLoad() {} - -func (x *dentry) StateLoad(m state.Source) { - m.Load(0, &x.vfsd) - m.Load(1, &x.refs) - m.Load(2, &x.fs) - m.Load(3, &x.mode) - m.Load(4, &x.uid) - m.Load(5, &x.gid) - m.Load(6, &x.copiedUp) - m.Load(7, &x.parent) - m.Load(8, &x.name) - m.Load(9, &x.children) - m.Load(10, &x.dirents) - m.Load(11, &x.upperVD) - m.Load(12, &x.lowerVDs) - m.Load(13, &x.inlineLowerVDs) - m.Load(14, &x.devMajor) - m.Load(15, &x.devMinor) - m.Load(16, &x.ino) - m.Load(17, &x.mapsMu) - m.Load(18, &x.lowerMappings) - m.Load(19, &x.dataMu) - m.Load(20, &x.wrappedMappable) - m.Load(21, &x.isMappable) - m.Load(22, &x.locks) - m.Load(23, &x.watches) +func (d *dentry) afterLoad() {} + +func (d *dentry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.vfsd) + stateSourceObject.Load(1, &d.refs) + stateSourceObject.Load(2, &d.fs) + stateSourceObject.Load(3, &d.mode) + stateSourceObject.Load(4, &d.uid) + stateSourceObject.Load(5, &d.gid) + stateSourceObject.Load(6, &d.copiedUp) + stateSourceObject.Load(7, &d.parent) + stateSourceObject.Load(8, &d.name) + stateSourceObject.Load(9, &d.children) + stateSourceObject.Load(10, &d.dirents) + stateSourceObject.Load(11, &d.upperVD) + stateSourceObject.Load(12, &d.lowerVDs) + stateSourceObject.Load(13, &d.inlineLowerVDs) + stateSourceObject.Load(14, &d.devMajor) + stateSourceObject.Load(15, &d.devMinor) + stateSourceObject.Load(16, &d.ino) + stateSourceObject.Load(17, &d.mapsMu) + stateSourceObject.Load(18, &d.lowerMappings) + stateSourceObject.Load(19, &d.dataMu) + stateSourceObject.Load(20, &d.wrappedMappable) + stateSourceObject.Load(21, &d.isMappable) + stateSourceObject.Load(22, &d.locks) + stateSourceObject.Load(23, &d.watches) } -func (x *fileDescription) StateTypeName() string { +func (f *fileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.fileDescription" } -func (x *fileDescription) StateFields() []string { +func (f *fileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -260,21 +260,21 @@ func (x *fileDescription) StateFields() []string { } } -func (x *fileDescription) beforeSave() {} +func (f *fileDescription) beforeSave() {} -func (x *fileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.LockFD) +func (f *fileDescription) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfd) + stateSinkObject.Save(1, &f.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &f.LockFD) } -func (x *fileDescription) afterLoad() {} +func (f *fileDescription) afterLoad() {} -func (x *fileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.LockFD) +func (f *fileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfd) + stateSourceObject.Load(1, &f.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &f.LockFD) } func init() { diff --git a/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go b/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go index bdb899396..384af5bf0 100644 --- a/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go +++ b/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go @@ -6,56 +6,56 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *filesystemType) StateTypeName() string { +func (f *filesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/pipefs.filesystemType" } -func (x *filesystemType) StateFields() []string { +func (f *filesystemType) StateFields() []string { return []string{} } -func (x *filesystemType) beforeSave() {} +func (f *filesystemType) beforeSave() {} -func (x *filesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystemType) afterLoad() {} +func (f *filesystemType) afterLoad() {} -func (x *filesystemType) StateLoad(m state.Source) { +func (f *filesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/pipefs.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Filesystem) - m.Save(1, &x.devMinor) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Filesystem) + stateSinkObject.Save(1, &f.devMinor) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.Filesystem) - m.Load(1, &x.devMinor) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Filesystem) + stateSourceObject.Load(1, &f.devMinor) } -func (x *inode) StateTypeName() string { +func (i *inode) StateTypeName() string { return "pkg/sentry/fsimpl/pipefs.inode" } -func (x *inode) StateFields() []string { +func (i *inode) StateFields() []string { return []string{ "InodeNotDirectory", "InodeNotSymlink", @@ -69,33 +69,33 @@ func (x *inode) StateFields() []string { } } -func (x *inode) beforeSave() {} - -func (x *inode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeNotDirectory) - m.Save(1, &x.InodeNotSymlink) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.locks) - m.Save(4, &x.pipe) - m.Save(5, &x.ino) - m.Save(6, &x.uid) - m.Save(7, &x.gid) - m.Save(8, &x.ctime) +func (i *inode) beforeSave() {} + +func (i *inode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.InodeNotDirectory) + stateSinkObject.Save(1, &i.InodeNotSymlink) + stateSinkObject.Save(2, &i.InodeNoopRefCount) + stateSinkObject.Save(3, &i.locks) + stateSinkObject.Save(4, &i.pipe) + stateSinkObject.Save(5, &i.ino) + stateSinkObject.Save(6, &i.uid) + stateSinkObject.Save(7, &i.gid) + stateSinkObject.Save(8, &i.ctime) } -func (x *inode) afterLoad() {} - -func (x *inode) StateLoad(m state.Source) { - m.Load(0, &x.InodeNotDirectory) - m.Load(1, &x.InodeNotSymlink) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.locks) - m.Load(4, &x.pipe) - m.Load(5, &x.ino) - m.Load(6, &x.uid) - m.Load(7, &x.gid) - m.Load(8, &x.ctime) +func (i *inode) afterLoad() {} + +func (i *inode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeNotDirectory) + stateSourceObject.Load(1, &i.InodeNotSymlink) + stateSourceObject.Load(2, &i.InodeNoopRefCount) + stateSourceObject.Load(3, &i.locks) + stateSourceObject.Load(4, &i.pipe) + stateSourceObject.Load(5, &i.ino) + stateSourceObject.Load(6, &i.uid) + stateSourceObject.Load(7, &i.gid) + stateSourceObject.Load(8, &i.ctime) } func init() { diff --git a/pkg/sentry/fsimpl/proc/proc_state_autogen.go b/pkg/sentry/fsimpl/proc/proc_state_autogen.go index 83100aa15..72fc112e2 100644 --- a/pkg/sentry/fsimpl/proc/proc_state_autogen.go +++ b/pkg/sentry/fsimpl/proc/proc_state_autogen.go @@ -6,170 +6,170 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *fdDirInodeRefs) StateTypeName() string { +func (f *fdDirInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdDirInodeRefs" } -func (x *fdDirInodeRefs) StateFields() []string { +func (f *fdDirInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *fdDirInodeRefs) beforeSave() {} +func (f *fdDirInodeRefs) beforeSave() {} -func (x *fdDirInodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (f *fdDirInodeRefs) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.refCount) } -func (x *fdDirInodeRefs) afterLoad() {} +func (f *fdDirInodeRefs) afterLoad() {} -func (x *fdDirInodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (f *fdDirInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.refCount) } -func (x *fdInfoDirInodeRefs) StateTypeName() string { +func (f *fdInfoDirInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdInfoDirInodeRefs" } -func (x *fdInfoDirInodeRefs) StateFields() []string { +func (f *fdInfoDirInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *fdInfoDirInodeRefs) beforeSave() {} +func (f *fdInfoDirInodeRefs) beforeSave() {} -func (x *fdInfoDirInodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (f *fdInfoDirInodeRefs) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.refCount) } -func (x *fdInfoDirInodeRefs) afterLoad() {} +func (f *fdInfoDirInodeRefs) afterLoad() {} -func (x *fdInfoDirInodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (f *fdInfoDirInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.refCount) } -func (x *FilesystemType) StateTypeName() string { +func (f *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/proc.FilesystemType" } -func (x *FilesystemType) StateFields() []string { +func (f *FilesystemType) StateFields() []string { return []string{} } -func (x *FilesystemType) beforeSave() {} +func (f *FilesystemType) beforeSave() {} -func (x *FilesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *FilesystemType) afterLoad() {} +func (f *FilesystemType) afterLoad() {} -func (x *FilesystemType) StateLoad(m state.Source) { +func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/proc.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Filesystem) - m.Save(1, &x.devMinor) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Filesystem) + stateSinkObject.Save(1, &f.devMinor) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.Filesystem) - m.Load(1, &x.devMinor) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Filesystem) + stateSourceObject.Load(1, &f.devMinor) } -func (x *staticFile) StateTypeName() string { +func (s *staticFile) StateTypeName() string { return "pkg/sentry/fsimpl/proc.staticFile" } -func (x *staticFile) StateFields() []string { +func (s *staticFile) StateFields() []string { return []string{ "DynamicBytesFile", "StaticData", } } -func (x *staticFile) beforeSave() {} +func (s *staticFile) beforeSave() {} -func (x *staticFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.StaticData) +func (s *staticFile) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.DynamicBytesFile) + stateSinkObject.Save(1, &s.StaticData) } -func (x *staticFile) afterLoad() {} +func (s *staticFile) afterLoad() {} -func (x *staticFile) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.StaticData) +func (s *staticFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.DynamicBytesFile) + stateSourceObject.Load(1, &s.StaticData) } -func (x *InternalData) StateTypeName() string { +func (i *InternalData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.InternalData" } -func (x *InternalData) StateFields() []string { +func (i *InternalData) StateFields() []string { return []string{ "Cgroups", } } -func (x *InternalData) beforeSave() {} +func (i *InternalData) beforeSave() {} -func (x *InternalData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Cgroups) +func (i *InternalData) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Cgroups) } -func (x *InternalData) afterLoad() {} +func (i *InternalData) afterLoad() {} -func (x *InternalData) StateLoad(m state.Source) { - m.Load(0, &x.Cgroups) +func (i *InternalData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Cgroups) } -func (x *implStatFS) StateTypeName() string { +func (i *implStatFS) StateTypeName() string { return "pkg/sentry/fsimpl/proc.implStatFS" } -func (x *implStatFS) StateFields() []string { +func (i *implStatFS) StateFields() []string { return []string{} } -func (x *implStatFS) beforeSave() {} +func (i *implStatFS) beforeSave() {} -func (x *implStatFS) StateSave(m state.Sink) { - x.beforeSave() +func (i *implStatFS) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *implStatFS) afterLoad() {} +func (i *implStatFS) afterLoad() {} -func (x *implStatFS) StateLoad(m state.Source) { +func (i *implStatFS) StateLoad(stateSourceObject state.Source) { } -func (x *subtasksInode) StateTypeName() string { +func (s *subtasksInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.subtasksInode" } -func (x *subtasksInode) StateFields() []string { +func (s *subtasksInode) StateFields() []string { return []string{ "implStatFS", "AlwaysValid", @@ -186,95 +186,95 @@ func (x *subtasksInode) StateFields() []string { } } -func (x *subtasksInode) beforeSave() {} +func (s *subtasksInode) beforeSave() {} -func (x *subtasksInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.AlwaysValid) - m.Save(2, &x.InodeAttrs) - m.Save(3, &x.InodeDirectoryNoNewChildren) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.OrderedChildren) - m.Save(6, &x.subtasksInodeRefs) - m.Save(7, &x.locks) - m.Save(8, &x.fs) - m.Save(9, &x.task) - m.Save(10, &x.pidns) - m.Save(11, &x.cgroupControllers) +func (s *subtasksInode) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.implStatFS) + stateSinkObject.Save(1, &s.AlwaysValid) + stateSinkObject.Save(2, &s.InodeAttrs) + stateSinkObject.Save(3, &s.InodeDirectoryNoNewChildren) + stateSinkObject.Save(4, &s.InodeNotSymlink) + stateSinkObject.Save(5, &s.OrderedChildren) + stateSinkObject.Save(6, &s.subtasksInodeRefs) + stateSinkObject.Save(7, &s.locks) + stateSinkObject.Save(8, &s.fs) + stateSinkObject.Save(9, &s.task) + stateSinkObject.Save(10, &s.pidns) + stateSinkObject.Save(11, &s.cgroupControllers) } -func (x *subtasksInode) afterLoad() {} +func (s *subtasksInode) afterLoad() {} -func (x *subtasksInode) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.AlwaysValid) - m.Load(2, &x.InodeAttrs) - m.Load(3, &x.InodeDirectoryNoNewChildren) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.OrderedChildren) - m.Load(6, &x.subtasksInodeRefs) - m.Load(7, &x.locks) - m.Load(8, &x.fs) - m.Load(9, &x.task) - m.Load(10, &x.pidns) - m.Load(11, &x.cgroupControllers) +func (s *subtasksInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.implStatFS) + stateSourceObject.Load(1, &s.AlwaysValid) + stateSourceObject.Load(2, &s.InodeAttrs) + stateSourceObject.Load(3, &s.InodeDirectoryNoNewChildren) + stateSourceObject.Load(4, &s.InodeNotSymlink) + stateSourceObject.Load(5, &s.OrderedChildren) + stateSourceObject.Load(6, &s.subtasksInodeRefs) + stateSourceObject.Load(7, &s.locks) + stateSourceObject.Load(8, &s.fs) + stateSourceObject.Load(9, &s.task) + stateSourceObject.Load(10, &s.pidns) + stateSourceObject.Load(11, &s.cgroupControllers) } -func (x *subtasksFD) StateTypeName() string { +func (s *subtasksFD) StateTypeName() string { return "pkg/sentry/fsimpl/proc.subtasksFD" } -func (x *subtasksFD) StateFields() []string { +func (s *subtasksFD) StateFields() []string { return []string{ "GenericDirectoryFD", "task", } } -func (x *subtasksFD) beforeSave() {} +func (s *subtasksFD) beforeSave() {} -func (x *subtasksFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.GenericDirectoryFD) - m.Save(1, &x.task) +func (s *subtasksFD) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.GenericDirectoryFD) + stateSinkObject.Save(1, &s.task) } -func (x *subtasksFD) afterLoad() {} +func (s *subtasksFD) afterLoad() {} -func (x *subtasksFD) StateLoad(m state.Source) { - m.Load(0, &x.GenericDirectoryFD) - m.Load(1, &x.task) +func (s *subtasksFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.GenericDirectoryFD) + stateSourceObject.Load(1, &s.task) } -func (x *subtasksInodeRefs) StateTypeName() string { +func (s *subtasksInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.subtasksInodeRefs" } -func (x *subtasksInodeRefs) StateFields() []string { +func (s *subtasksInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *subtasksInodeRefs) beforeSave() {} +func (s *subtasksInodeRefs) beforeSave() {} -func (x *subtasksInodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (s *subtasksInodeRefs) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.refCount) } -func (x *subtasksInodeRefs) afterLoad() {} +func (s *subtasksInodeRefs) afterLoad() {} -func (x *subtasksInodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (s *subtasksInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.refCount) } -func (x *taskInode) StateTypeName() string { +func (t *taskInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.taskInode" } -func (x *taskInode) StateFields() []string { +func (t *taskInode) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -288,66 +288,66 @@ func (x *taskInode) StateFields() []string { } } -func (x *taskInode) beforeSave() {} +func (t *taskInode) beforeSave() {} -func (x *taskInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeDirectoryNoNewChildren) - m.Save(3, &x.InodeNoDynamicLookup) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.OrderedChildren) - m.Save(6, &x.taskInodeRefs) - m.Save(7, &x.locks) - m.Save(8, &x.task) +func (t *taskInode) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.implStatFS) + stateSinkObject.Save(1, &t.InodeAttrs) + stateSinkObject.Save(2, &t.InodeDirectoryNoNewChildren) + stateSinkObject.Save(3, &t.InodeNoDynamicLookup) + stateSinkObject.Save(4, &t.InodeNotSymlink) + stateSinkObject.Save(5, &t.OrderedChildren) + stateSinkObject.Save(6, &t.taskInodeRefs) + stateSinkObject.Save(7, &t.locks) + stateSinkObject.Save(8, &t.task) } -func (x *taskInode) afterLoad() {} +func (t *taskInode) afterLoad() {} -func (x *taskInode) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeDirectoryNoNewChildren) - m.Load(3, &x.InodeNoDynamicLookup) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.OrderedChildren) - m.Load(6, &x.taskInodeRefs) - m.Load(7, &x.locks) - m.Load(8, &x.task) +func (t *taskInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.implStatFS) + stateSourceObject.Load(1, &t.InodeAttrs) + stateSourceObject.Load(2, &t.InodeDirectoryNoNewChildren) + stateSourceObject.Load(3, &t.InodeNoDynamicLookup) + stateSourceObject.Load(4, &t.InodeNotSymlink) + stateSourceObject.Load(5, &t.OrderedChildren) + stateSourceObject.Load(6, &t.taskInodeRefs) + stateSourceObject.Load(7, &t.locks) + stateSourceObject.Load(8, &t.task) } -func (x *taskOwnedInode) StateTypeName() string { +func (t *taskOwnedInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.taskOwnedInode" } -func (x *taskOwnedInode) StateFields() []string { +func (t *taskOwnedInode) StateFields() []string { return []string{ "Inode", "owner", } } -func (x *taskOwnedInode) beforeSave() {} +func (t *taskOwnedInode) beforeSave() {} -func (x *taskOwnedInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Inode) - m.Save(1, &x.owner) +func (t *taskOwnedInode) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Inode) + stateSinkObject.Save(1, &t.owner) } -func (x *taskOwnedInode) afterLoad() {} +func (t *taskOwnedInode) afterLoad() {} -func (x *taskOwnedInode) StateLoad(m state.Source) { - m.Load(0, &x.Inode) - m.Load(1, &x.owner) +func (t *taskOwnedInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Inode) + stateSourceObject.Load(1, &t.owner) } -func (x *fdDir) StateTypeName() string { +func (f *fdDir) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdDir" } -func (x *fdDir) StateFields() []string { +func (f *fdDir) StateFields() []string { return []string{ "locks", "fs", @@ -356,30 +356,30 @@ func (x *fdDir) StateFields() []string { } } -func (x *fdDir) beforeSave() {} +func (f *fdDir) beforeSave() {} -func (x *fdDir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.locks) - m.Save(1, &x.fs) - m.Save(2, &x.task) - m.Save(3, &x.produceSymlink) +func (f *fdDir) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.locks) + stateSinkObject.Save(1, &f.fs) + stateSinkObject.Save(2, &f.task) + stateSinkObject.Save(3, &f.produceSymlink) } -func (x *fdDir) afterLoad() {} +func (f *fdDir) afterLoad() {} -func (x *fdDir) StateLoad(m state.Source) { - m.Load(0, &x.locks) - m.Load(1, &x.fs) - m.Load(2, &x.task) - m.Load(3, &x.produceSymlink) +func (f *fdDir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.locks) + stateSourceObject.Load(1, &f.fs) + stateSourceObject.Load(2, &f.task) + stateSourceObject.Load(3, &f.produceSymlink) } -func (x *fdDirInode) StateTypeName() string { +func (f *fdDirInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdDirInode" } -func (x *fdDirInode) StateFields() []string { +func (f *fdDirInode) StateFields() []string { return []string{ "fdDir", "fdDirInodeRefs", @@ -392,38 +392,38 @@ func (x *fdDirInode) StateFields() []string { } } -func (x *fdDirInode) beforeSave() {} +func (f *fdDirInode) beforeSave() {} -func (x *fdDirInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fdDir) - m.Save(1, &x.fdDirInodeRefs) - m.Save(2, &x.implStatFS) - m.Save(3, &x.AlwaysValid) - m.Save(4, &x.InodeAttrs) - m.Save(5, &x.InodeDirectoryNoNewChildren) - m.Save(6, &x.InodeNotSymlink) - m.Save(7, &x.OrderedChildren) +func (f *fdDirInode) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.fdDir) + stateSinkObject.Save(1, &f.fdDirInodeRefs) + stateSinkObject.Save(2, &f.implStatFS) + stateSinkObject.Save(3, &f.AlwaysValid) + stateSinkObject.Save(4, &f.InodeAttrs) + stateSinkObject.Save(5, &f.InodeDirectoryNoNewChildren) + stateSinkObject.Save(6, &f.InodeNotSymlink) + stateSinkObject.Save(7, &f.OrderedChildren) } -func (x *fdDirInode) afterLoad() {} +func (f *fdDirInode) afterLoad() {} -func (x *fdDirInode) StateLoad(m state.Source) { - m.Load(0, &x.fdDir) - m.Load(1, &x.fdDirInodeRefs) - m.Load(2, &x.implStatFS) - m.Load(3, &x.AlwaysValid) - m.Load(4, &x.InodeAttrs) - m.Load(5, &x.InodeDirectoryNoNewChildren) - m.Load(6, &x.InodeNotSymlink) - m.Load(7, &x.OrderedChildren) +func (f *fdDirInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.fdDir) + stateSourceObject.Load(1, &f.fdDirInodeRefs) + stateSourceObject.Load(2, &f.implStatFS) + stateSourceObject.Load(3, &f.AlwaysValid) + stateSourceObject.Load(4, &f.InodeAttrs) + stateSourceObject.Load(5, &f.InodeDirectoryNoNewChildren) + stateSourceObject.Load(6, &f.InodeNotSymlink) + stateSourceObject.Load(7, &f.OrderedChildren) } -func (x *fdSymlink) StateTypeName() string { +func (f *fdSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdSymlink" } -func (x *fdSymlink) StateFields() []string { +func (f *fdSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -434,34 +434,34 @@ func (x *fdSymlink) StateFields() []string { } } -func (x *fdSymlink) beforeSave() {} +func (f *fdSymlink) beforeSave() {} -func (x *fdSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeSymlink) - m.Save(4, &x.task) - m.Save(5, &x.fd) +func (f *fdSymlink) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.implStatFS) + stateSinkObject.Save(1, &f.InodeAttrs) + stateSinkObject.Save(2, &f.InodeNoopRefCount) + stateSinkObject.Save(3, &f.InodeSymlink) + stateSinkObject.Save(4, &f.task) + stateSinkObject.Save(5, &f.fd) } -func (x *fdSymlink) afterLoad() {} +func (f *fdSymlink) afterLoad() {} -func (x *fdSymlink) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeSymlink) - m.Load(4, &x.task) - m.Load(5, &x.fd) +func (f *fdSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.implStatFS) + stateSourceObject.Load(1, &f.InodeAttrs) + stateSourceObject.Load(2, &f.InodeNoopRefCount) + stateSourceObject.Load(3, &f.InodeSymlink) + stateSourceObject.Load(4, &f.task) + stateSourceObject.Load(5, &f.fd) } -func (x *fdInfoDirInode) StateTypeName() string { +func (f *fdInfoDirInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdInfoDirInode" } -func (x *fdInfoDirInode) StateFields() []string { +func (f *fdInfoDirInode) StateFields() []string { return []string{ "fdDir", "fdInfoDirInodeRefs", @@ -474,38 +474,38 @@ func (x *fdInfoDirInode) StateFields() []string { } } -func (x *fdInfoDirInode) beforeSave() {} +func (f *fdInfoDirInode) beforeSave() {} -func (x *fdInfoDirInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fdDir) - m.Save(1, &x.fdInfoDirInodeRefs) - m.Save(2, &x.implStatFS) - m.Save(3, &x.AlwaysValid) - m.Save(4, &x.InodeAttrs) - m.Save(5, &x.InodeDirectoryNoNewChildren) - m.Save(6, &x.InodeNotSymlink) - m.Save(7, &x.OrderedChildren) +func (f *fdInfoDirInode) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.fdDir) + stateSinkObject.Save(1, &f.fdInfoDirInodeRefs) + stateSinkObject.Save(2, &f.implStatFS) + stateSinkObject.Save(3, &f.AlwaysValid) + stateSinkObject.Save(4, &f.InodeAttrs) + stateSinkObject.Save(5, &f.InodeDirectoryNoNewChildren) + stateSinkObject.Save(6, &f.InodeNotSymlink) + stateSinkObject.Save(7, &f.OrderedChildren) } -func (x *fdInfoDirInode) afterLoad() {} +func (f *fdInfoDirInode) afterLoad() {} -func (x *fdInfoDirInode) StateLoad(m state.Source) { - m.Load(0, &x.fdDir) - m.Load(1, &x.fdInfoDirInodeRefs) - m.Load(2, &x.implStatFS) - m.Load(3, &x.AlwaysValid) - m.Load(4, &x.InodeAttrs) - m.Load(5, &x.InodeDirectoryNoNewChildren) - m.Load(6, &x.InodeNotSymlink) - m.Load(7, &x.OrderedChildren) +func (f *fdInfoDirInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.fdDir) + stateSourceObject.Load(1, &f.fdInfoDirInodeRefs) + stateSourceObject.Load(2, &f.implStatFS) + stateSourceObject.Load(3, &f.AlwaysValid) + stateSourceObject.Load(4, &f.InodeAttrs) + stateSourceObject.Load(5, &f.InodeDirectoryNoNewChildren) + stateSourceObject.Load(6, &f.InodeNotSymlink) + stateSourceObject.Load(7, &f.OrderedChildren) } -func (x *fdInfoData) StateTypeName() string { +func (f *fdInfoData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdInfoData" } -func (x *fdInfoData) StateFields() []string { +func (f *fdInfoData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -513,54 +513,54 @@ func (x *fdInfoData) StateFields() []string { } } -func (x *fdInfoData) beforeSave() {} +func (f *fdInfoData) beforeSave() {} -func (x *fdInfoData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) - m.Save(2, &x.fd) +func (f *fdInfoData) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.DynamicBytesFile) + stateSinkObject.Save(1, &f.task) + stateSinkObject.Save(2, &f.fd) } -func (x *fdInfoData) afterLoad() {} +func (f *fdInfoData) afterLoad() {} -func (x *fdInfoData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) - m.Load(2, &x.fd) +func (f *fdInfoData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.DynamicBytesFile) + stateSourceObject.Load(1, &f.task) + stateSourceObject.Load(2, &f.fd) } -func (x *auxvData) StateTypeName() string { +func (a *auxvData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.auxvData" } -func (x *auxvData) StateFields() []string { +func (a *auxvData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *auxvData) beforeSave() {} +func (a *auxvData) beforeSave() {} -func (x *auxvData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (a *auxvData) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.DynamicBytesFile) + stateSinkObject.Save(1, &a.task) } -func (x *auxvData) afterLoad() {} +func (a *auxvData) afterLoad() {} -func (x *auxvData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (a *auxvData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.DynamicBytesFile) + stateSourceObject.Load(1, &a.task) } -func (x *cmdlineData) StateTypeName() string { +func (c *cmdlineData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.cmdlineData" } -func (x *cmdlineData) StateFields() []string { +func (c *cmdlineData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -568,80 +568,80 @@ func (x *cmdlineData) StateFields() []string { } } -func (x *cmdlineData) beforeSave() {} +func (c *cmdlineData) beforeSave() {} -func (x *cmdlineData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) - m.Save(2, &x.arg) +func (c *cmdlineData) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.DynamicBytesFile) + stateSinkObject.Save(1, &c.task) + stateSinkObject.Save(2, &c.arg) } -func (x *cmdlineData) afterLoad() {} +func (c *cmdlineData) afterLoad() {} -func (x *cmdlineData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) - m.Load(2, &x.arg) +func (c *cmdlineData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.DynamicBytesFile) + stateSourceObject.Load(1, &c.task) + stateSourceObject.Load(2, &c.arg) } -func (x *commInode) StateTypeName() string { +func (c *commInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.commInode" } -func (x *commInode) StateFields() []string { +func (c *commInode) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *commInode) beforeSave() {} +func (c *commInode) beforeSave() {} -func (x *commInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (c *commInode) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.DynamicBytesFile) + stateSinkObject.Save(1, &c.task) } -func (x *commInode) afterLoad() {} +func (c *commInode) afterLoad() {} -func (x *commInode) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (c *commInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.DynamicBytesFile) + stateSourceObject.Load(1, &c.task) } -func (x *commData) StateTypeName() string { +func (c *commData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.commData" } -func (x *commData) StateFields() []string { +func (c *commData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *commData) beforeSave() {} +func (c *commData) beforeSave() {} -func (x *commData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (c *commData) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.DynamicBytesFile) + stateSinkObject.Save(1, &c.task) } -func (x *commData) afterLoad() {} +func (c *commData) afterLoad() {} -func (x *commData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (c *commData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.DynamicBytesFile) + stateSourceObject.Load(1, &c.task) } -func (x *idMapData) StateTypeName() string { +func (i *idMapData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.idMapData" } -func (x *idMapData) StateFields() []string { +func (i *idMapData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -649,80 +649,80 @@ func (x *idMapData) StateFields() []string { } } -func (x *idMapData) beforeSave() {} +func (i *idMapData) beforeSave() {} -func (x *idMapData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) - m.Save(2, &x.gids) +func (i *idMapData) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.DynamicBytesFile) + stateSinkObject.Save(1, &i.task) + stateSinkObject.Save(2, &i.gids) } -func (x *idMapData) afterLoad() {} +func (i *idMapData) afterLoad() {} -func (x *idMapData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) - m.Load(2, &x.gids) +func (i *idMapData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.DynamicBytesFile) + stateSourceObject.Load(1, &i.task) + stateSourceObject.Load(2, &i.gids) } -func (x *mapsData) StateTypeName() string { +func (m *mapsData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.mapsData" } -func (x *mapsData) StateFields() []string { +func (m *mapsData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *mapsData) beforeSave() {} +func (m *mapsData) beforeSave() {} -func (x *mapsData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (m *mapsData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.DynamicBytesFile) + stateSinkObject.Save(1, &m.task) } -func (x *mapsData) afterLoad() {} +func (m *mapsData) afterLoad() {} -func (x *mapsData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (m *mapsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.DynamicBytesFile) + stateSourceObject.Load(1, &m.task) } -func (x *smapsData) StateTypeName() string { +func (s *smapsData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.smapsData" } -func (x *smapsData) StateFields() []string { +func (s *smapsData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *smapsData) beforeSave() {} +func (s *smapsData) beforeSave() {} -func (x *smapsData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (s *smapsData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.DynamicBytesFile) + stateSinkObject.Save(1, &s.task) } -func (x *smapsData) afterLoad() {} +func (s *smapsData) afterLoad() {} -func (x *smapsData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (s *smapsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.DynamicBytesFile) + stateSourceObject.Load(1, &s.task) } -func (x *taskStatData) StateTypeName() string { +func (t *taskStatData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.taskStatData" } -func (x *taskStatData) StateFields() []string { +func (t *taskStatData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -731,56 +731,56 @@ func (x *taskStatData) StateFields() []string { } } -func (x *taskStatData) beforeSave() {} +func (t *taskStatData) beforeSave() {} -func (x *taskStatData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) - m.Save(2, &x.tgstats) - m.Save(3, &x.pidns) +func (t *taskStatData) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.DynamicBytesFile) + stateSinkObject.Save(1, &t.task) + stateSinkObject.Save(2, &t.tgstats) + stateSinkObject.Save(3, &t.pidns) } -func (x *taskStatData) afterLoad() {} +func (t *taskStatData) afterLoad() {} -func (x *taskStatData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) - m.Load(2, &x.tgstats) - m.Load(3, &x.pidns) +func (t *taskStatData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.DynamicBytesFile) + stateSourceObject.Load(1, &t.task) + stateSourceObject.Load(2, &t.tgstats) + stateSourceObject.Load(3, &t.pidns) } -func (x *statmData) StateTypeName() string { +func (s *statmData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.statmData" } -func (x *statmData) StateFields() []string { +func (s *statmData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *statmData) beforeSave() {} +func (s *statmData) beforeSave() {} -func (x *statmData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (s *statmData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.DynamicBytesFile) + stateSinkObject.Save(1, &s.task) } -func (x *statmData) afterLoad() {} +func (s *statmData) afterLoad() {} -func (x *statmData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (s *statmData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.DynamicBytesFile) + stateSourceObject.Load(1, &s.task) } -func (x *statusData) StateTypeName() string { +func (s *statusData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.statusData" } -func (x *statusData) StateFields() []string { +func (s *statusData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -788,80 +788,80 @@ func (x *statusData) StateFields() []string { } } -func (x *statusData) beforeSave() {} +func (s *statusData) beforeSave() {} -func (x *statusData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) - m.Save(2, &x.pidns) +func (s *statusData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.DynamicBytesFile) + stateSinkObject.Save(1, &s.task) + stateSinkObject.Save(2, &s.pidns) } -func (x *statusData) afterLoad() {} +func (s *statusData) afterLoad() {} -func (x *statusData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) - m.Load(2, &x.pidns) +func (s *statusData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.DynamicBytesFile) + stateSourceObject.Load(1, &s.task) + stateSourceObject.Load(2, &s.pidns) } -func (x *ioData) StateTypeName() string { +func (i *ioData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.ioData" } -func (x *ioData) StateFields() []string { +func (i *ioData) StateFields() []string { return []string{ "DynamicBytesFile", "ioUsage", } } -func (x *ioData) beforeSave() {} +func (i *ioData) beforeSave() {} -func (x *ioData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.ioUsage) +func (i *ioData) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.DynamicBytesFile) + stateSinkObject.Save(1, &i.ioUsage) } -func (x *ioData) afterLoad() {} +func (i *ioData) afterLoad() {} -func (x *ioData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.ioUsage) +func (i *ioData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.DynamicBytesFile) + stateSourceObject.Load(1, &i.ioUsage) } -func (x *oomScoreAdj) StateTypeName() string { +func (o *oomScoreAdj) StateTypeName() string { return "pkg/sentry/fsimpl/proc.oomScoreAdj" } -func (x *oomScoreAdj) StateFields() []string { +func (o *oomScoreAdj) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *oomScoreAdj) beforeSave() {} +func (o *oomScoreAdj) beforeSave() {} -func (x *oomScoreAdj) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (o *oomScoreAdj) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.DynamicBytesFile) + stateSinkObject.Save(1, &o.task) } -func (x *oomScoreAdj) afterLoad() {} +func (o *oomScoreAdj) afterLoad() {} -func (x *oomScoreAdj) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (o *oomScoreAdj) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.DynamicBytesFile) + stateSourceObject.Load(1, &o.task) } -func (x *exeSymlink) StateTypeName() string { +func (e *exeSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.exeSymlink" } -func (x *exeSymlink) StateFields() []string { +func (e *exeSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -871,32 +871,32 @@ func (x *exeSymlink) StateFields() []string { } } -func (x *exeSymlink) beforeSave() {} +func (e *exeSymlink) beforeSave() {} -func (x *exeSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeSymlink) - m.Save(4, &x.task) +func (e *exeSymlink) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.implStatFS) + stateSinkObject.Save(1, &e.InodeAttrs) + stateSinkObject.Save(2, &e.InodeNoopRefCount) + stateSinkObject.Save(3, &e.InodeSymlink) + stateSinkObject.Save(4, &e.task) } -func (x *exeSymlink) afterLoad() {} +func (e *exeSymlink) afterLoad() {} -func (x *exeSymlink) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeSymlink) - m.Load(4, &x.task) +func (e *exeSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.implStatFS) + stateSourceObject.Load(1, &e.InodeAttrs) + stateSourceObject.Load(2, &e.InodeNoopRefCount) + stateSourceObject.Load(3, &e.InodeSymlink) + stateSourceObject.Load(4, &e.task) } -func (x *cwdSymlink) StateTypeName() string { +func (c *cwdSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.cwdSymlink" } -func (x *cwdSymlink) StateFields() []string { +func (c *cwdSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -906,110 +906,110 @@ func (x *cwdSymlink) StateFields() []string { } } -func (x *cwdSymlink) beforeSave() {} +func (c *cwdSymlink) beforeSave() {} -func (x *cwdSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeSymlink) - m.Save(4, &x.task) +func (c *cwdSymlink) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.implStatFS) + stateSinkObject.Save(1, &c.InodeAttrs) + stateSinkObject.Save(2, &c.InodeNoopRefCount) + stateSinkObject.Save(3, &c.InodeSymlink) + stateSinkObject.Save(4, &c.task) } -func (x *cwdSymlink) afterLoad() {} +func (c *cwdSymlink) afterLoad() {} -func (x *cwdSymlink) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeSymlink) - m.Load(4, &x.task) +func (c *cwdSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.implStatFS) + stateSourceObject.Load(1, &c.InodeAttrs) + stateSourceObject.Load(2, &c.InodeNoopRefCount) + stateSourceObject.Load(3, &c.InodeSymlink) + stateSourceObject.Load(4, &c.task) } -func (x *mountInfoData) StateTypeName() string { +func (m *mountInfoData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.mountInfoData" } -func (x *mountInfoData) StateFields() []string { +func (m *mountInfoData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *mountInfoData) beforeSave() {} +func (m *mountInfoData) beforeSave() {} -func (x *mountInfoData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (m *mountInfoData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.DynamicBytesFile) + stateSinkObject.Save(1, &m.task) } -func (x *mountInfoData) afterLoad() {} +func (m *mountInfoData) afterLoad() {} -func (x *mountInfoData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (m *mountInfoData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.DynamicBytesFile) + stateSourceObject.Load(1, &m.task) } -func (x *mountsData) StateTypeName() string { +func (m *mountsData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.mountsData" } -func (x *mountsData) StateFields() []string { +func (m *mountsData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (x *mountsData) beforeSave() {} +func (m *mountsData) beforeSave() {} -func (x *mountsData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.task) +func (m *mountsData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.DynamicBytesFile) + stateSinkObject.Save(1, &m.task) } -func (x *mountsData) afterLoad() {} +func (m *mountsData) afterLoad() {} -func (x *mountsData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.task) +func (m *mountsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.DynamicBytesFile) + stateSourceObject.Load(1, &m.task) } -func (x *namespaceSymlink) StateTypeName() string { +func (n *namespaceSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.namespaceSymlink" } -func (x *namespaceSymlink) StateFields() []string { +func (n *namespaceSymlink) StateFields() []string { return []string{ "StaticSymlink", "task", } } -func (x *namespaceSymlink) beforeSave() {} +func (n *namespaceSymlink) beforeSave() {} -func (x *namespaceSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.StaticSymlink) - m.Save(1, &x.task) +func (n *namespaceSymlink) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.StaticSymlink) + stateSinkObject.Save(1, &n.task) } -func (x *namespaceSymlink) afterLoad() {} +func (n *namespaceSymlink) afterLoad() {} -func (x *namespaceSymlink) StateLoad(m state.Source) { - m.Load(0, &x.StaticSymlink) - m.Load(1, &x.task) +func (n *namespaceSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.StaticSymlink) + stateSourceObject.Load(1, &n.task) } -func (x *namespaceInode) StateTypeName() string { +func (n *namespaceInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.namespaceInode" } -func (x *namespaceInode) StateFields() []string { +func (n *namespaceInode) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -1020,34 +1020,34 @@ func (x *namespaceInode) StateFields() []string { } } -func (x *namespaceInode) beforeSave() {} +func (n *namespaceInode) beforeSave() {} -func (x *namespaceInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeNotDirectory) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.locks) +func (n *namespaceInode) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.implStatFS) + stateSinkObject.Save(1, &n.InodeAttrs) + stateSinkObject.Save(2, &n.InodeNoopRefCount) + stateSinkObject.Save(3, &n.InodeNotDirectory) + stateSinkObject.Save(4, &n.InodeNotSymlink) + stateSinkObject.Save(5, &n.locks) } -func (x *namespaceInode) afterLoad() {} +func (n *namespaceInode) afterLoad() {} -func (x *namespaceInode) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeNotDirectory) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.locks) +func (n *namespaceInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.implStatFS) + stateSourceObject.Load(1, &n.InodeAttrs) + stateSourceObject.Load(2, &n.InodeNoopRefCount) + stateSourceObject.Load(3, &n.InodeNotDirectory) + stateSourceObject.Load(4, &n.InodeNotSymlink) + stateSourceObject.Load(5, &n.locks) } -func (x *namespaceFD) StateTypeName() string { +func (n *namespaceFD) StateTypeName() string { return "pkg/sentry/fsimpl/proc.namespaceFD" } -func (x *namespaceFD) StateFields() []string { +func (n *namespaceFD) StateFields() []string { return []string{ "FileDescriptionDefaultImpl", "LockFD", @@ -1056,313 +1056,313 @@ func (x *namespaceFD) StateFields() []string { } } -func (x *namespaceFD) beforeSave() {} +func (n *namespaceFD) beforeSave() {} -func (x *namespaceFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FileDescriptionDefaultImpl) - m.Save(1, &x.LockFD) - m.Save(2, &x.vfsfd) - m.Save(3, &x.inode) +func (n *namespaceFD) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.FileDescriptionDefaultImpl) + stateSinkObject.Save(1, &n.LockFD) + stateSinkObject.Save(2, &n.vfsfd) + stateSinkObject.Save(3, &n.inode) } -func (x *namespaceFD) afterLoad() {} +func (n *namespaceFD) afterLoad() {} -func (x *namespaceFD) StateLoad(m state.Source) { - m.Load(0, &x.FileDescriptionDefaultImpl) - m.Load(1, &x.LockFD) - m.Load(2, &x.vfsfd) - m.Load(3, &x.inode) +func (n *namespaceFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.FileDescriptionDefaultImpl) + stateSourceObject.Load(1, &n.LockFD) + stateSourceObject.Load(2, &n.vfsfd) + stateSourceObject.Load(3, &n.inode) } -func (x *taskInodeRefs) StateTypeName() string { +func (t *taskInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.taskInodeRefs" } -func (x *taskInodeRefs) StateFields() []string { +func (t *taskInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *taskInodeRefs) beforeSave() {} +func (t *taskInodeRefs) beforeSave() {} -func (x *taskInodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (t *taskInodeRefs) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.refCount) } -func (x *taskInodeRefs) afterLoad() {} +func (t *taskInodeRefs) afterLoad() {} -func (x *taskInodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (t *taskInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.refCount) } -func (x *ifinet6) StateTypeName() string { +func (i *ifinet6) StateTypeName() string { return "pkg/sentry/fsimpl/proc.ifinet6" } -func (x *ifinet6) StateFields() []string { +func (i *ifinet6) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (x *ifinet6) beforeSave() {} +func (i *ifinet6) beforeSave() {} -func (x *ifinet6) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.stack) +func (i *ifinet6) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.DynamicBytesFile) + stateSinkObject.Save(1, &i.stack) } -func (x *ifinet6) afterLoad() {} +func (i *ifinet6) afterLoad() {} -func (x *ifinet6) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.stack) +func (i *ifinet6) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.DynamicBytesFile) + stateSourceObject.Load(1, &i.stack) } -func (x *netDevData) StateTypeName() string { +func (n *netDevData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netDevData" } -func (x *netDevData) StateFields() []string { +func (n *netDevData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (x *netDevData) beforeSave() {} +func (n *netDevData) beforeSave() {} -func (x *netDevData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.stack) +func (n *netDevData) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.stack) } -func (x *netDevData) afterLoad() {} +func (n *netDevData) afterLoad() {} -func (x *netDevData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.stack) +func (n *netDevData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.stack) } -func (x *netUnixData) StateTypeName() string { +func (n *netUnixData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netUnixData" } -func (x *netUnixData) StateFields() []string { +func (n *netUnixData) StateFields() []string { return []string{ "DynamicBytesFile", "kernel", } } -func (x *netUnixData) beforeSave() {} +func (n *netUnixData) beforeSave() {} -func (x *netUnixData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.kernel) +func (n *netUnixData) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.kernel) } -func (x *netUnixData) afterLoad() {} +func (n *netUnixData) afterLoad() {} -func (x *netUnixData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.kernel) +func (n *netUnixData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.kernel) } -func (x *netTCPData) StateTypeName() string { +func (n *netTCPData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netTCPData" } -func (x *netTCPData) StateFields() []string { +func (n *netTCPData) StateFields() []string { return []string{ "DynamicBytesFile", "kernel", } } -func (x *netTCPData) beforeSave() {} +func (n *netTCPData) beforeSave() {} -func (x *netTCPData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.kernel) +func (n *netTCPData) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.kernel) } -func (x *netTCPData) afterLoad() {} +func (n *netTCPData) afterLoad() {} -func (x *netTCPData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.kernel) +func (n *netTCPData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.kernel) } -func (x *netTCP6Data) StateTypeName() string { +func (n *netTCP6Data) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netTCP6Data" } -func (x *netTCP6Data) StateFields() []string { +func (n *netTCP6Data) StateFields() []string { return []string{ "DynamicBytesFile", "kernel", } } -func (x *netTCP6Data) beforeSave() {} +func (n *netTCP6Data) beforeSave() {} -func (x *netTCP6Data) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.kernel) +func (n *netTCP6Data) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.kernel) } -func (x *netTCP6Data) afterLoad() {} +func (n *netTCP6Data) afterLoad() {} -func (x *netTCP6Data) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.kernel) +func (n *netTCP6Data) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.kernel) } -func (x *netUDPData) StateTypeName() string { +func (n *netUDPData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netUDPData" } -func (x *netUDPData) StateFields() []string { +func (n *netUDPData) StateFields() []string { return []string{ "DynamicBytesFile", "kernel", } } -func (x *netUDPData) beforeSave() {} +func (n *netUDPData) beforeSave() {} -func (x *netUDPData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.kernel) +func (n *netUDPData) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.kernel) } -func (x *netUDPData) afterLoad() {} +func (n *netUDPData) afterLoad() {} -func (x *netUDPData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.kernel) +func (n *netUDPData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.kernel) } -func (x *netSnmpData) StateTypeName() string { +func (n *netSnmpData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netSnmpData" } -func (x *netSnmpData) StateFields() []string { +func (n *netSnmpData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (x *netSnmpData) beforeSave() {} +func (n *netSnmpData) beforeSave() {} -func (x *netSnmpData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.stack) +func (n *netSnmpData) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.stack) } -func (x *netSnmpData) afterLoad() {} +func (n *netSnmpData) afterLoad() {} -func (x *netSnmpData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.stack) +func (n *netSnmpData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.stack) } -func (x *snmpLine) StateTypeName() string { +func (s *snmpLine) StateTypeName() string { return "pkg/sentry/fsimpl/proc.snmpLine" } -func (x *snmpLine) StateFields() []string { +func (s *snmpLine) StateFields() []string { return []string{ "prefix", "header", } } -func (x *snmpLine) beforeSave() {} +func (s *snmpLine) beforeSave() {} -func (x *snmpLine) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.prefix) - m.Save(1, &x.header) +func (s *snmpLine) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.prefix) + stateSinkObject.Save(1, &s.header) } -func (x *snmpLine) afterLoad() {} +func (s *snmpLine) afterLoad() {} -func (x *snmpLine) StateLoad(m state.Source) { - m.Load(0, &x.prefix) - m.Load(1, &x.header) +func (s *snmpLine) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.prefix) + stateSourceObject.Load(1, &s.header) } -func (x *netRouteData) StateTypeName() string { +func (n *netRouteData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netRouteData" } -func (x *netRouteData) StateFields() []string { +func (n *netRouteData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (x *netRouteData) beforeSave() {} +func (n *netRouteData) beforeSave() {} -func (x *netRouteData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.stack) +func (n *netRouteData) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.stack) } -func (x *netRouteData) afterLoad() {} +func (n *netRouteData) afterLoad() {} -func (x *netRouteData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.stack) +func (n *netRouteData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.stack) } -func (x *netStatData) StateTypeName() string { +func (n *netStatData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netStatData" } -func (x *netStatData) StateFields() []string { +func (n *netStatData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (x *netStatData) beforeSave() {} +func (n *netStatData) beforeSave() {} -func (x *netStatData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.stack) +func (n *netStatData) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.stack) } -func (x *netStatData) afterLoad() {} +func (n *netStatData) afterLoad() {} -func (x *netStatData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.stack) +func (n *netStatData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.stack) } -func (x *tasksInode) StateTypeName() string { +func (t *tasksInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tasksInode" } -func (x *tasksInode) StateFields() []string { +func (t *tasksInode) StateFields() []string { return []string{ "implStatFS", "AlwaysValid", @@ -1380,74 +1380,74 @@ func (x *tasksInode) StateFields() []string { } } -func (x *tasksInode) beforeSave() {} - -func (x *tasksInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.AlwaysValid) - m.Save(2, &x.InodeAttrs) - m.Save(3, &x.InodeDirectoryNoNewChildren) - m.Save(4, &x.InodeNotSymlink) - m.Save(5, &x.OrderedChildren) - m.Save(6, &x.tasksInodeRefs) - m.Save(7, &x.locks) - m.Save(8, &x.fs) - m.Save(9, &x.pidns) - m.Save(10, &x.selfSymlink) - m.Save(11, &x.threadSelfSymlink) - m.Save(12, &x.cgroupControllers) -} - -func (x *tasksInode) afterLoad() {} - -func (x *tasksInode) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.AlwaysValid) - m.Load(2, &x.InodeAttrs) - m.Load(3, &x.InodeDirectoryNoNewChildren) - m.Load(4, &x.InodeNotSymlink) - m.Load(5, &x.OrderedChildren) - m.Load(6, &x.tasksInodeRefs) - m.Load(7, &x.locks) - m.Load(8, &x.fs) - m.Load(9, &x.pidns) - m.Load(10, &x.selfSymlink) - m.Load(11, &x.threadSelfSymlink) - m.Load(12, &x.cgroupControllers) -} - -func (x *staticFileSetStat) StateTypeName() string { +func (t *tasksInode) beforeSave() {} + +func (t *tasksInode) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.implStatFS) + stateSinkObject.Save(1, &t.AlwaysValid) + stateSinkObject.Save(2, &t.InodeAttrs) + stateSinkObject.Save(3, &t.InodeDirectoryNoNewChildren) + stateSinkObject.Save(4, &t.InodeNotSymlink) + stateSinkObject.Save(5, &t.OrderedChildren) + stateSinkObject.Save(6, &t.tasksInodeRefs) + stateSinkObject.Save(7, &t.locks) + stateSinkObject.Save(8, &t.fs) + stateSinkObject.Save(9, &t.pidns) + stateSinkObject.Save(10, &t.selfSymlink) + stateSinkObject.Save(11, &t.threadSelfSymlink) + stateSinkObject.Save(12, &t.cgroupControllers) +} + +func (t *tasksInode) afterLoad() {} + +func (t *tasksInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.implStatFS) + stateSourceObject.Load(1, &t.AlwaysValid) + stateSourceObject.Load(2, &t.InodeAttrs) + stateSourceObject.Load(3, &t.InodeDirectoryNoNewChildren) + stateSourceObject.Load(4, &t.InodeNotSymlink) + stateSourceObject.Load(5, &t.OrderedChildren) + stateSourceObject.Load(6, &t.tasksInodeRefs) + stateSourceObject.Load(7, &t.locks) + stateSourceObject.Load(8, &t.fs) + stateSourceObject.Load(9, &t.pidns) + stateSourceObject.Load(10, &t.selfSymlink) + stateSourceObject.Load(11, &t.threadSelfSymlink) + stateSourceObject.Load(12, &t.cgroupControllers) +} + +func (s *staticFileSetStat) StateTypeName() string { return "pkg/sentry/fsimpl/proc.staticFileSetStat" } -func (x *staticFileSetStat) StateFields() []string { +func (s *staticFileSetStat) StateFields() []string { return []string{ "dynamicBytesFileSetAttr", "StaticData", } } -func (x *staticFileSetStat) beforeSave() {} +func (s *staticFileSetStat) beforeSave() {} -func (x *staticFileSetStat) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dynamicBytesFileSetAttr) - m.Save(1, &x.StaticData) +func (s *staticFileSetStat) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.dynamicBytesFileSetAttr) + stateSinkObject.Save(1, &s.StaticData) } -func (x *staticFileSetStat) afterLoad() {} +func (s *staticFileSetStat) afterLoad() {} -func (x *staticFileSetStat) StateLoad(m state.Source) { - m.Load(0, &x.dynamicBytesFileSetAttr) - m.Load(1, &x.StaticData) +func (s *staticFileSetStat) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.dynamicBytesFileSetAttr) + stateSourceObject.Load(1, &s.StaticData) } -func (x *selfSymlink) StateTypeName() string { +func (s *selfSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.selfSymlink" } -func (x *selfSymlink) StateFields() []string { +func (s *selfSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -1457,32 +1457,32 @@ func (x *selfSymlink) StateFields() []string { } } -func (x *selfSymlink) beforeSave() {} +func (s *selfSymlink) beforeSave() {} -func (x *selfSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeSymlink) - m.Save(4, &x.pidns) +func (s *selfSymlink) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.implStatFS) + stateSinkObject.Save(1, &s.InodeAttrs) + stateSinkObject.Save(2, &s.InodeNoopRefCount) + stateSinkObject.Save(3, &s.InodeSymlink) + stateSinkObject.Save(4, &s.pidns) } -func (x *selfSymlink) afterLoad() {} +func (s *selfSymlink) afterLoad() {} -func (x *selfSymlink) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeSymlink) - m.Load(4, &x.pidns) +func (s *selfSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.implStatFS) + stateSourceObject.Load(1, &s.InodeAttrs) + stateSourceObject.Load(2, &s.InodeNoopRefCount) + stateSourceObject.Load(3, &s.InodeSymlink) + stateSourceObject.Load(4, &s.pidns) } -func (x *threadSelfSymlink) StateTypeName() string { +func (t *threadSelfSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.threadSelfSymlink" } -func (x *threadSelfSymlink) StateFields() []string { +func (t *threadSelfSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -1492,55 +1492,55 @@ func (x *threadSelfSymlink) StateFields() []string { } } -func (x *threadSelfSymlink) beforeSave() {} +func (t *threadSelfSymlink) beforeSave() {} -func (x *threadSelfSymlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoopRefCount) - m.Save(3, &x.InodeSymlink) - m.Save(4, &x.pidns) +func (t *threadSelfSymlink) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.implStatFS) + stateSinkObject.Save(1, &t.InodeAttrs) + stateSinkObject.Save(2, &t.InodeNoopRefCount) + stateSinkObject.Save(3, &t.InodeSymlink) + stateSinkObject.Save(4, &t.pidns) } -func (x *threadSelfSymlink) afterLoad() {} +func (t *threadSelfSymlink) afterLoad() {} -func (x *threadSelfSymlink) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoopRefCount) - m.Load(3, &x.InodeSymlink) - m.Load(4, &x.pidns) +func (t *threadSelfSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.implStatFS) + stateSourceObject.Load(1, &t.InodeAttrs) + stateSourceObject.Load(2, &t.InodeNoopRefCount) + stateSourceObject.Load(3, &t.InodeSymlink) + stateSourceObject.Load(4, &t.pidns) } -func (x *dynamicBytesFileSetAttr) StateTypeName() string { +func (d *dynamicBytesFileSetAttr) StateTypeName() string { return "pkg/sentry/fsimpl/proc.dynamicBytesFileSetAttr" } -func (x *dynamicBytesFileSetAttr) StateFields() []string { +func (d *dynamicBytesFileSetAttr) StateFields() []string { return []string{ "DynamicBytesFile", } } -func (x *dynamicBytesFileSetAttr) beforeSave() {} +func (d *dynamicBytesFileSetAttr) beforeSave() {} -func (x *dynamicBytesFileSetAttr) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) +func (d *dynamicBytesFileSetAttr) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) } -func (x *dynamicBytesFileSetAttr) afterLoad() {} +func (d *dynamicBytesFileSetAttr) afterLoad() {} -func (x *dynamicBytesFileSetAttr) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) +func (d *dynamicBytesFileSetAttr) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) } -func (x *cpuStats) StateTypeName() string { +func (c *cpuStats) StateTypeName() string { return "pkg/sentry/fsimpl/proc.cpuStats" } -func (x *cpuStats) StateFields() []string { +func (c *cpuStats) StateFields() []string { return []string{ "user", "nice", @@ -1555,260 +1555,260 @@ func (x *cpuStats) StateFields() []string { } } -func (x *cpuStats) beforeSave() {} +func (c *cpuStats) beforeSave() {} -func (x *cpuStats) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.user) - m.Save(1, &x.nice) - m.Save(2, &x.system) - m.Save(3, &x.idle) - m.Save(4, &x.ioWait) - m.Save(5, &x.irq) - m.Save(6, &x.softirq) - m.Save(7, &x.steal) - m.Save(8, &x.guest) - m.Save(9, &x.guestNice) +func (c *cpuStats) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.user) + stateSinkObject.Save(1, &c.nice) + stateSinkObject.Save(2, &c.system) + stateSinkObject.Save(3, &c.idle) + stateSinkObject.Save(4, &c.ioWait) + stateSinkObject.Save(5, &c.irq) + stateSinkObject.Save(6, &c.softirq) + stateSinkObject.Save(7, &c.steal) + stateSinkObject.Save(8, &c.guest) + stateSinkObject.Save(9, &c.guestNice) } -func (x *cpuStats) afterLoad() {} +func (c *cpuStats) afterLoad() {} -func (x *cpuStats) StateLoad(m state.Source) { - m.Load(0, &x.user) - m.Load(1, &x.nice) - m.Load(2, &x.system) - m.Load(3, &x.idle) - m.Load(4, &x.ioWait) - m.Load(5, &x.irq) - m.Load(6, &x.softirq) - m.Load(7, &x.steal) - m.Load(8, &x.guest) - m.Load(9, &x.guestNice) +func (c *cpuStats) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.user) + stateSourceObject.Load(1, &c.nice) + stateSourceObject.Load(2, &c.system) + stateSourceObject.Load(3, &c.idle) + stateSourceObject.Load(4, &c.ioWait) + stateSourceObject.Load(5, &c.irq) + stateSourceObject.Load(6, &c.softirq) + stateSourceObject.Load(7, &c.steal) + stateSourceObject.Load(8, &c.guest) + stateSourceObject.Load(9, &c.guestNice) } -func (x *statData) StateTypeName() string { +func (s *statData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.statData" } -func (x *statData) StateFields() []string { +func (s *statData) StateFields() []string { return []string{ "dynamicBytesFileSetAttr", } } -func (x *statData) beforeSave() {} +func (s *statData) beforeSave() {} -func (x *statData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dynamicBytesFileSetAttr) +func (s *statData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.dynamicBytesFileSetAttr) } -func (x *statData) afterLoad() {} +func (s *statData) afterLoad() {} -func (x *statData) StateLoad(m state.Source) { - m.Load(0, &x.dynamicBytesFileSetAttr) +func (s *statData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.dynamicBytesFileSetAttr) } -func (x *loadavgData) StateTypeName() string { +func (l *loadavgData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.loadavgData" } -func (x *loadavgData) StateFields() []string { +func (l *loadavgData) StateFields() []string { return []string{ "dynamicBytesFileSetAttr", } } -func (x *loadavgData) beforeSave() {} +func (l *loadavgData) beforeSave() {} -func (x *loadavgData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dynamicBytesFileSetAttr) +func (l *loadavgData) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.dynamicBytesFileSetAttr) } -func (x *loadavgData) afterLoad() {} +func (l *loadavgData) afterLoad() {} -func (x *loadavgData) StateLoad(m state.Source) { - m.Load(0, &x.dynamicBytesFileSetAttr) +func (l *loadavgData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.dynamicBytesFileSetAttr) } -func (x *meminfoData) StateTypeName() string { +func (m *meminfoData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.meminfoData" } -func (x *meminfoData) StateFields() []string { +func (m *meminfoData) StateFields() []string { return []string{ "dynamicBytesFileSetAttr", } } -func (x *meminfoData) beforeSave() {} +func (m *meminfoData) beforeSave() {} -func (x *meminfoData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dynamicBytesFileSetAttr) +func (m *meminfoData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.dynamicBytesFileSetAttr) } -func (x *meminfoData) afterLoad() {} +func (m *meminfoData) afterLoad() {} -func (x *meminfoData) StateLoad(m state.Source) { - m.Load(0, &x.dynamicBytesFileSetAttr) +func (m *meminfoData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.dynamicBytesFileSetAttr) } -func (x *uptimeData) StateTypeName() string { +func (u *uptimeData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.uptimeData" } -func (x *uptimeData) StateFields() []string { +func (u *uptimeData) StateFields() []string { return []string{ "dynamicBytesFileSetAttr", } } -func (x *uptimeData) beforeSave() {} +func (u *uptimeData) beforeSave() {} -func (x *uptimeData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dynamicBytesFileSetAttr) +func (u *uptimeData) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.dynamicBytesFileSetAttr) } -func (x *uptimeData) afterLoad() {} +func (u *uptimeData) afterLoad() {} -func (x *uptimeData) StateLoad(m state.Source) { - m.Load(0, &x.dynamicBytesFileSetAttr) +func (u *uptimeData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.dynamicBytesFileSetAttr) } -func (x *versionData) StateTypeName() string { +func (v *versionData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.versionData" } -func (x *versionData) StateFields() []string { +func (v *versionData) StateFields() []string { return []string{ "dynamicBytesFileSetAttr", } } -func (x *versionData) beforeSave() {} +func (v *versionData) beforeSave() {} -func (x *versionData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dynamicBytesFileSetAttr) +func (v *versionData) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.dynamicBytesFileSetAttr) } -func (x *versionData) afterLoad() {} +func (v *versionData) afterLoad() {} -func (x *versionData) StateLoad(m state.Source) { - m.Load(0, &x.dynamicBytesFileSetAttr) +func (v *versionData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.dynamicBytesFileSetAttr) } -func (x *filesystemsData) StateTypeName() string { +func (f *filesystemsData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.filesystemsData" } -func (x *filesystemsData) StateFields() []string { +func (f *filesystemsData) StateFields() []string { return []string{ "DynamicBytesFile", } } -func (x *filesystemsData) beforeSave() {} +func (f *filesystemsData) beforeSave() {} -func (x *filesystemsData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) +func (f *filesystemsData) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.DynamicBytesFile) } -func (x *filesystemsData) afterLoad() {} +func (f *filesystemsData) afterLoad() {} -func (x *filesystemsData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) +func (f *filesystemsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.DynamicBytesFile) } -func (x *tasksInodeRefs) StateTypeName() string { +func (t *tasksInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tasksInodeRefs" } -func (x *tasksInodeRefs) StateFields() []string { +func (t *tasksInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *tasksInodeRefs) beforeSave() {} +func (t *tasksInodeRefs) beforeSave() {} -func (x *tasksInodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (t *tasksInodeRefs) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.refCount) } -func (x *tasksInodeRefs) afterLoad() {} +func (t *tasksInodeRefs) afterLoad() {} -func (x *tasksInodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (t *tasksInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.refCount) } -func (x *tcpMemDir) StateTypeName() string { +func (t *tcpMemDir) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tcpMemDir" } -func (x *tcpMemDir) StateFields() []string { +func (t *tcpMemDir) StateFields() []string { return nil } -func (x *mmapMinAddrData) StateTypeName() string { +func (m *mmapMinAddrData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.mmapMinAddrData" } -func (x *mmapMinAddrData) StateFields() []string { +func (m *mmapMinAddrData) StateFields() []string { return []string{ "DynamicBytesFile", "k", } } -func (x *mmapMinAddrData) beforeSave() {} +func (m *mmapMinAddrData) beforeSave() {} -func (x *mmapMinAddrData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.k) +func (m *mmapMinAddrData) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.DynamicBytesFile) + stateSinkObject.Save(1, &m.k) } -func (x *mmapMinAddrData) afterLoad() {} +func (m *mmapMinAddrData) afterLoad() {} -func (x *mmapMinAddrData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.k) +func (m *mmapMinAddrData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.DynamicBytesFile) + stateSourceObject.Load(1, &m.k) } -func (x *hostnameData) StateTypeName() string { +func (h *hostnameData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.hostnameData" } -func (x *hostnameData) StateFields() []string { +func (h *hostnameData) StateFields() []string { return []string{ "DynamicBytesFile", } } -func (x *hostnameData) beforeSave() {} +func (h *hostnameData) beforeSave() {} -func (x *hostnameData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) +func (h *hostnameData) StateSave(stateSinkObject state.Sink) { + h.beforeSave() + stateSinkObject.Save(0, &h.DynamicBytesFile) } -func (x *hostnameData) afterLoad() {} +func (h *hostnameData) afterLoad() {} -func (x *hostnameData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) +func (h *hostnameData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &h.DynamicBytesFile) } -func (x *tcpSackData) StateTypeName() string { +func (t *tcpSackData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tcpSackData" } -func (x *tcpSackData) StateFields() []string { +func (t *tcpSackData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", @@ -1816,54 +1816,54 @@ func (x *tcpSackData) StateFields() []string { } } -func (x *tcpSackData) beforeSave() {} +func (t *tcpSackData) beforeSave() {} -func (x *tcpSackData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.stack) - m.Save(2, &x.enabled) +func (t *tcpSackData) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.DynamicBytesFile) + stateSinkObject.Save(1, &t.stack) + stateSinkObject.Save(2, &t.enabled) } -func (x *tcpSackData) afterLoad() {} +func (t *tcpSackData) afterLoad() {} -func (x *tcpSackData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.LoadWait(1, &x.stack) - m.Load(2, &x.enabled) +func (t *tcpSackData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.DynamicBytesFile) + stateSourceObject.LoadWait(1, &t.stack) + stateSourceObject.Load(2, &t.enabled) } -func (x *tcpRecoveryData) StateTypeName() string { +func (t *tcpRecoveryData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tcpRecoveryData" } -func (x *tcpRecoveryData) StateFields() []string { +func (t *tcpRecoveryData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (x *tcpRecoveryData) beforeSave() {} +func (t *tcpRecoveryData) beforeSave() {} -func (x *tcpRecoveryData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.stack) +func (t *tcpRecoveryData) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.DynamicBytesFile) + stateSinkObject.Save(1, &t.stack) } -func (x *tcpRecoveryData) afterLoad() {} +func (t *tcpRecoveryData) afterLoad() {} -func (x *tcpRecoveryData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.LoadWait(1, &x.stack) +func (t *tcpRecoveryData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.DynamicBytesFile) + stateSourceObject.LoadWait(1, &t.stack) } -func (x *tcpMemData) StateTypeName() string { +func (t *tcpMemData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tcpMemData" } -func (x *tcpMemData) StateFields() []string { +func (t *tcpMemData) StateFields() []string { return []string{ "DynamicBytesFile", "dir", @@ -1871,28 +1871,28 @@ func (x *tcpMemData) StateFields() []string { } } -func (x *tcpMemData) beforeSave() {} +func (t *tcpMemData) beforeSave() {} -func (x *tcpMemData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.dir) - m.Save(2, &x.stack) +func (t *tcpMemData) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.DynamicBytesFile) + stateSinkObject.Save(1, &t.dir) + stateSinkObject.Save(2, &t.stack) } -func (x *tcpMemData) afterLoad() {} +func (t *tcpMemData) afterLoad() {} -func (x *tcpMemData) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.Load(1, &x.dir) - m.LoadWait(2, &x.stack) +func (t *tcpMemData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.DynamicBytesFile) + stateSourceObject.Load(1, &t.dir) + stateSourceObject.LoadWait(2, &t.stack) } -func (x *ipForwarding) StateTypeName() string { +func (i *ipForwarding) StateTypeName() string { return "pkg/sentry/fsimpl/proc.ipForwarding" } -func (x *ipForwarding) StateFields() []string { +func (i *ipForwarding) StateFields() []string { return []string{ "DynamicBytesFile", "stack", @@ -1900,21 +1900,21 @@ func (x *ipForwarding) StateFields() []string { } } -func (x *ipForwarding) beforeSave() {} +func (i *ipForwarding) beforeSave() {} -func (x *ipForwarding) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.DynamicBytesFile) - m.Save(1, &x.stack) - m.Save(2, &x.enabled) +func (i *ipForwarding) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.DynamicBytesFile) + stateSinkObject.Save(1, &i.stack) + stateSinkObject.Save(2, &i.enabled) } -func (x *ipForwarding) afterLoad() {} +func (i *ipForwarding) afterLoad() {} -func (x *ipForwarding) StateLoad(m state.Source) { - m.Load(0, &x.DynamicBytesFile) - m.LoadWait(1, &x.stack) - m.Load(2, &x.enabled) +func (i *ipForwarding) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.DynamicBytesFile) + stateSourceObject.LoadWait(1, &i.stack) + stateSourceObject.Load(2, &i.enabled) } func init() { diff --git a/pkg/sentry/fsimpl/signalfd/signalfd_state_autogen.go b/pkg/sentry/fsimpl/signalfd/signalfd_state_autogen.go index acd2ff5b4..4a1496528 100644 --- a/pkg/sentry/fsimpl/signalfd/signalfd_state_autogen.go +++ b/pkg/sentry/fsimpl/signalfd/signalfd_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SignalFileDescription) StateTypeName() string { +func (s *SignalFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/signalfd.SignalFileDescription" } -func (x *SignalFileDescription) StateFields() []string { +func (s *SignalFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -21,27 +21,27 @@ func (x *SignalFileDescription) StateFields() []string { } } -func (x *SignalFileDescription) beforeSave() {} +func (s *SignalFileDescription) beforeSave() {} -func (x *SignalFileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) - m.Save(4, &x.target) - m.Save(5, &x.mask) +func (s *SignalFileDescription) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.vfsfd) + stateSinkObject.Save(1, &s.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &s.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &s.NoLockFD) + stateSinkObject.Save(4, &s.target) + stateSinkObject.Save(5, &s.mask) } -func (x *SignalFileDescription) afterLoad() {} +func (s *SignalFileDescription) afterLoad() {} -func (x *SignalFileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) - m.Load(4, &x.target) - m.Load(5, &x.mask) +func (s *SignalFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.vfsfd) + stateSourceObject.Load(1, &s.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &s.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &s.NoLockFD) + stateSourceObject.Load(4, &s.target) + stateSourceObject.Load(5, &s.mask) } func init() { diff --git a/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go b/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go index bbc868a48..38bbf9eb5 100644 --- a/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go +++ b/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go @@ -6,56 +6,56 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *filesystemType) StateTypeName() string { +func (f *filesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/sockfs.filesystemType" } -func (x *filesystemType) StateFields() []string { +func (f *filesystemType) StateFields() []string { return []string{} } -func (x *filesystemType) beforeSave() {} +func (f *filesystemType) beforeSave() {} -func (x *filesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *filesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *filesystemType) afterLoad() {} +func (f *filesystemType) afterLoad() {} -func (x *filesystemType) StateLoad(m state.Source) { +func (f *filesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/sockfs.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Filesystem) - m.Save(1, &x.devMinor) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Filesystem) + stateSinkObject.Save(1, &f.devMinor) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.Filesystem) - m.Load(1, &x.devMinor) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Filesystem) + stateSourceObject.Load(1, &f.devMinor) } -func (x *inode) StateTypeName() string { +func (i *inode) StateTypeName() string { return "pkg/sentry/fsimpl/sockfs.inode" } -func (x *inode) StateFields() []string { +func (i *inode) StateFields() []string { return []string{ "InodeAttrs", "InodeNoopRefCount", @@ -64,23 +64,23 @@ func (x *inode) StateFields() []string { } } -func (x *inode) beforeSave() {} +func (i *inode) beforeSave() {} -func (x *inode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeAttrs) - m.Save(1, &x.InodeNoopRefCount) - m.Save(2, &x.InodeNotDirectory) - m.Save(3, &x.InodeNotSymlink) +func (i *inode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.InodeAttrs) + stateSinkObject.Save(1, &i.InodeNoopRefCount) + stateSinkObject.Save(2, &i.InodeNotDirectory) + stateSinkObject.Save(3, &i.InodeNotSymlink) } -func (x *inode) afterLoad() {} +func (i *inode) afterLoad() {} -func (x *inode) StateLoad(m state.Source) { - m.Load(0, &x.InodeAttrs) - m.Load(1, &x.InodeNoopRefCount) - m.Load(2, &x.InodeNotDirectory) - m.Load(3, &x.InodeNotSymlink) +func (i *inode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeAttrs) + stateSourceObject.Load(1, &i.InodeNoopRefCount) + stateSourceObject.Load(2, &i.InodeNotDirectory) + stateSourceObject.Load(3, &i.InodeNotSymlink) } func init() { diff --git a/pkg/sentry/fsimpl/sys/sys_state_autogen.go b/pkg/sentry/fsimpl/sys/sys_state_autogen.go index 14d4efce9..6ba7397ba 100644 --- a/pkg/sentry/fsimpl/sys/sys_state_autogen.go +++ b/pkg/sentry/fsimpl/sys/sys_state_autogen.go @@ -6,34 +6,34 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *dirRefs) StateTypeName() string { +func (d *dirRefs) StateTypeName() string { return "pkg/sentry/fsimpl/sys.dirRefs" } -func (x *dirRefs) StateFields() []string { +func (d *dirRefs) StateFields() []string { return []string{ "refCount", } } -func (x *dirRefs) beforeSave() {} +func (d *dirRefs) beforeSave() {} -func (x *dirRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (d *dirRefs) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.refCount) } -func (x *dirRefs) afterLoad() {} +func (d *dirRefs) afterLoad() {} -func (x *dirRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (d *dirRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.refCount) } -func (x *kcovInode) StateTypeName() string { +func (k *kcovInode) StateTypeName() string { return "pkg/sentry/fsimpl/sys.kcovInode" } -func (x *kcovInode) StateFields() []string { +func (k *kcovInode) StateFields() []string { return []string{ "InodeAttrs", "InodeNoopRefCount", @@ -43,32 +43,32 @@ func (x *kcovInode) StateFields() []string { } } -func (x *kcovInode) beforeSave() {} +func (k *kcovInode) beforeSave() {} -func (x *kcovInode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeAttrs) - m.Save(1, &x.InodeNoopRefCount) - m.Save(2, &x.InodeNotDirectory) - m.Save(3, &x.InodeNotSymlink) - m.Save(4, &x.implStatFS) +func (k *kcovInode) StateSave(stateSinkObject state.Sink) { + k.beforeSave() + stateSinkObject.Save(0, &k.InodeAttrs) + stateSinkObject.Save(1, &k.InodeNoopRefCount) + stateSinkObject.Save(2, &k.InodeNotDirectory) + stateSinkObject.Save(3, &k.InodeNotSymlink) + stateSinkObject.Save(4, &k.implStatFS) } -func (x *kcovInode) afterLoad() {} +func (k *kcovInode) afterLoad() {} -func (x *kcovInode) StateLoad(m state.Source) { - m.Load(0, &x.InodeAttrs) - m.Load(1, &x.InodeNoopRefCount) - m.Load(2, &x.InodeNotDirectory) - m.Load(3, &x.InodeNotSymlink) - m.Load(4, &x.implStatFS) +func (k *kcovInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &k.InodeAttrs) + stateSourceObject.Load(1, &k.InodeNoopRefCount) + stateSourceObject.Load(2, &k.InodeNotDirectory) + stateSourceObject.Load(3, &k.InodeNotSymlink) + stateSourceObject.Load(4, &k.implStatFS) } -func (x *kcovFD) StateTypeName() string { +func (k *kcovFD) StateTypeName() string { return "pkg/sentry/fsimpl/sys.kcovFD" } -func (x *kcovFD) StateFields() []string { +func (k *kcovFD) StateFields() []string { return []string{ "FileDescriptionDefaultImpl", "NoLockFD", @@ -78,77 +78,77 @@ func (x *kcovFD) StateFields() []string { } } -func (x *kcovFD) beforeSave() {} +func (k *kcovFD) beforeSave() {} -func (x *kcovFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FileDescriptionDefaultImpl) - m.Save(1, &x.NoLockFD) - m.Save(2, &x.vfsfd) - m.Save(3, &x.inode) - m.Save(4, &x.kcov) +func (k *kcovFD) StateSave(stateSinkObject state.Sink) { + k.beforeSave() + stateSinkObject.Save(0, &k.FileDescriptionDefaultImpl) + stateSinkObject.Save(1, &k.NoLockFD) + stateSinkObject.Save(2, &k.vfsfd) + stateSinkObject.Save(3, &k.inode) + stateSinkObject.Save(4, &k.kcov) } -func (x *kcovFD) afterLoad() {} +func (k *kcovFD) afterLoad() {} -func (x *kcovFD) StateLoad(m state.Source) { - m.Load(0, &x.FileDescriptionDefaultImpl) - m.Load(1, &x.NoLockFD) - m.Load(2, &x.vfsfd) - m.Load(3, &x.inode) - m.Load(4, &x.kcov) +func (k *kcovFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &k.FileDescriptionDefaultImpl) + stateSourceObject.Load(1, &k.NoLockFD) + stateSourceObject.Load(2, &k.vfsfd) + stateSourceObject.Load(3, &k.inode) + stateSourceObject.Load(4, &k.kcov) } -func (x *FilesystemType) StateTypeName() string { +func (f *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/sys.FilesystemType" } -func (x *FilesystemType) StateFields() []string { +func (f *FilesystemType) StateFields() []string { return []string{} } -func (x *FilesystemType) beforeSave() {} +func (f *FilesystemType) beforeSave() {} -func (x *FilesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *FilesystemType) afterLoad() {} +func (f *FilesystemType) afterLoad() {} -func (x *FilesystemType) StateLoad(m state.Source) { +func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/sys.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Filesystem) - m.Save(1, &x.devMinor) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Filesystem) + stateSinkObject.Save(1, &f.devMinor) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.Filesystem) - m.Load(1, &x.devMinor) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Filesystem) + stateSourceObject.Load(1, &f.devMinor) } -func (x *dir) StateTypeName() string { +func (d *dir) StateTypeName() string { return "pkg/sentry/fsimpl/sys.dir" } -func (x *dir) StateFields() []string { +func (d *dir) StateFields() []string { return []string{ "dirRefs", "InodeAttrs", @@ -161,38 +161,38 @@ func (x *dir) StateFields() []string { } } -func (x *dir) beforeSave() {} +func (d *dir) beforeSave() {} -func (x *dir) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dirRefs) - m.Save(1, &x.InodeAttrs) - m.Save(2, &x.InodeNoDynamicLookup) - m.Save(3, &x.InodeNotSymlink) - m.Save(4, &x.InodeDirectoryNoNewChildren) - m.Save(5, &x.OrderedChildren) - m.Save(6, &x.locks) - m.Save(7, &x.dentry) +func (d *dir) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.dirRefs) + stateSinkObject.Save(1, &d.InodeAttrs) + stateSinkObject.Save(2, &d.InodeNoDynamicLookup) + stateSinkObject.Save(3, &d.InodeNotSymlink) + stateSinkObject.Save(4, &d.InodeDirectoryNoNewChildren) + stateSinkObject.Save(5, &d.OrderedChildren) + stateSinkObject.Save(6, &d.locks) + stateSinkObject.Save(7, &d.dentry) } -func (x *dir) afterLoad() {} +func (d *dir) afterLoad() {} -func (x *dir) StateLoad(m state.Source) { - m.Load(0, &x.dirRefs) - m.Load(1, &x.InodeAttrs) - m.Load(2, &x.InodeNoDynamicLookup) - m.Load(3, &x.InodeNotSymlink) - m.Load(4, &x.InodeDirectoryNoNewChildren) - m.Load(5, &x.OrderedChildren) - m.Load(6, &x.locks) - m.Load(7, &x.dentry) +func (d *dir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.dirRefs) + stateSourceObject.Load(1, &d.InodeAttrs) + stateSourceObject.Load(2, &d.InodeNoDynamicLookup) + stateSourceObject.Load(3, &d.InodeNotSymlink) + stateSourceObject.Load(4, &d.InodeDirectoryNoNewChildren) + stateSourceObject.Load(5, &d.OrderedChildren) + stateSourceObject.Load(6, &d.locks) + stateSourceObject.Load(7, &d.dentry) } -func (x *cpuFile) StateTypeName() string { +func (c *cpuFile) StateTypeName() string { return "pkg/sentry/fsimpl/sys.cpuFile" } -func (x *cpuFile) StateFields() []string { +func (c *cpuFile) StateFields() []string { return []string{ "implStatFS", "DynamicBytesFile", @@ -200,40 +200,40 @@ func (x *cpuFile) StateFields() []string { } } -func (x *cpuFile) beforeSave() {} +func (c *cpuFile) beforeSave() {} -func (x *cpuFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.implStatFS) - m.Save(1, &x.DynamicBytesFile) - m.Save(2, &x.maxCores) +func (c *cpuFile) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.implStatFS) + stateSinkObject.Save(1, &c.DynamicBytesFile) + stateSinkObject.Save(2, &c.maxCores) } -func (x *cpuFile) afterLoad() {} +func (c *cpuFile) afterLoad() {} -func (x *cpuFile) StateLoad(m state.Source) { - m.Load(0, &x.implStatFS) - m.Load(1, &x.DynamicBytesFile) - m.Load(2, &x.maxCores) +func (c *cpuFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.implStatFS) + stateSourceObject.Load(1, &c.DynamicBytesFile) + stateSourceObject.Load(2, &c.maxCores) } -func (x *implStatFS) StateTypeName() string { +func (i *implStatFS) StateTypeName() string { return "pkg/sentry/fsimpl/sys.implStatFS" } -func (x *implStatFS) StateFields() []string { +func (i *implStatFS) StateFields() []string { return []string{} } -func (x *implStatFS) beforeSave() {} +func (i *implStatFS) beforeSave() {} -func (x *implStatFS) StateSave(m state.Sink) { - x.beforeSave() +func (i *implStatFS) StateSave(stateSinkObject state.Sink) { + i.beforeSave() } -func (x *implStatFS) afterLoad() {} +func (i *implStatFS) afterLoad() {} -func (x *implStatFS) StateLoad(m state.Source) { +func (i *implStatFS) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go b/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go index 722153ff8..0bfca83b9 100644 --- a/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go +++ b/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *TimerFileDescription) StateTypeName() string { +func (t *TimerFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/timerfd.TimerFileDescription" } -func (x *TimerFileDescription) StateFields() []string { +func (t *TimerFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -22,29 +22,29 @@ func (x *TimerFileDescription) StateFields() []string { } } -func (x *TimerFileDescription) beforeSave() {} - -func (x *TimerFileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) - m.Save(4, &x.events) - m.Save(5, &x.timer) - m.Save(6, &x.val) +func (t *TimerFileDescription) beforeSave() {} + +func (t *TimerFileDescription) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.vfsfd) + stateSinkObject.Save(1, &t.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &t.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &t.NoLockFD) + stateSinkObject.Save(4, &t.events) + stateSinkObject.Save(5, &t.timer) + stateSinkObject.Save(6, &t.val) } -func (x *TimerFileDescription) afterLoad() {} +func (t *TimerFileDescription) afterLoad() {} -func (x *TimerFileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) - m.Load(4, &x.events) - m.Load(5, &x.timer) - m.Load(6, &x.val) +func (t *TimerFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.vfsfd) + stateSourceObject.Load(1, &t.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &t.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &t.NoLockFD) + stateSourceObject.Load(4, &t.events) + stateSourceObject.Load(5, &t.timer) + stateSourceObject.Load(6, &t.val) } func init() { diff --git a/pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go b/pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go index 4252b95e6..8fa28e3da 100644 --- a/pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go +++ b/pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go @@ -6,63 +6,63 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *dentryList) StateTypeName() string { +func (d *dentryList) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.dentryList" } -func (x *dentryList) StateFields() []string { +func (d *dentryList) StateFields() []string { return []string{ "head", "tail", } } -func (x *dentryList) beforeSave() {} +func (d *dentryList) beforeSave() {} -func (x *dentryList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (d *dentryList) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.head) + stateSinkObject.Save(1, &d.tail) } -func (x *dentryList) afterLoad() {} +func (d *dentryList) afterLoad() {} -func (x *dentryList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (d *dentryList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.head) + stateSourceObject.Load(1, &d.tail) } -func (x *dentryEntry) StateTypeName() string { +func (d *dentryEntry) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.dentryEntry" } -func (x *dentryEntry) StateFields() []string { +func (d *dentryEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *dentryEntry) beforeSave() {} +func (d *dentryEntry) beforeSave() {} -func (x *dentryEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (d *dentryEntry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.next) + stateSinkObject.Save(1, &d.prev) } -func (x *dentryEntry) afterLoad() {} +func (d *dentryEntry) afterLoad() {} -func (x *dentryEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (d *dentryEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.next) + stateSourceObject.Load(1, &d.prev) } -func (x *deviceFile) StateTypeName() string { +func (d *deviceFile) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.deviceFile" } -func (x *deviceFile) StateFields() []string { +func (d *deviceFile) StateFields() []string { return []string{ "inode", "kind", @@ -71,30 +71,30 @@ func (x *deviceFile) StateFields() []string { } } -func (x *deviceFile) beforeSave() {} +func (d *deviceFile) beforeSave() {} -func (x *deviceFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inode) - m.Save(1, &x.kind) - m.Save(2, &x.major) - m.Save(3, &x.minor) +func (d *deviceFile) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.inode) + stateSinkObject.Save(1, &d.kind) + stateSinkObject.Save(2, &d.major) + stateSinkObject.Save(3, &d.minor) } -func (x *deviceFile) afterLoad() {} +func (d *deviceFile) afterLoad() {} -func (x *deviceFile) StateLoad(m state.Source) { - m.Load(0, &x.inode) - m.Load(1, &x.kind) - m.Load(2, &x.major) - m.Load(3, &x.minor) +func (d *deviceFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.inode) + stateSourceObject.Load(1, &d.kind) + stateSourceObject.Load(2, &d.major) + stateSourceObject.Load(3, &d.minor) } -func (x *directory) StateTypeName() string { +func (d *directory) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.directory" } -func (x *directory) StateFields() []string { +func (d *directory) StateFields() []string { return []string{ "dentry", "inode", @@ -104,32 +104,32 @@ func (x *directory) StateFields() []string { } } -func (x *directory) beforeSave() {} +func (d *directory) beforeSave() {} -func (x *directory) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dentry) - m.Save(1, &x.inode) - m.Save(2, &x.childMap) - m.Save(3, &x.numChildren) - m.Save(4, &x.childList) +func (d *directory) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.dentry) + stateSinkObject.Save(1, &d.inode) + stateSinkObject.Save(2, &d.childMap) + stateSinkObject.Save(3, &d.numChildren) + stateSinkObject.Save(4, &d.childList) } -func (x *directory) afterLoad() {} +func (d *directory) afterLoad() {} -func (x *directory) StateLoad(m state.Source) { - m.Load(0, &x.dentry) - m.Load(1, &x.inode) - m.Load(2, &x.childMap) - m.Load(3, &x.numChildren) - m.Load(4, &x.childList) +func (d *directory) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.dentry) + stateSourceObject.Load(1, &d.inode) + stateSourceObject.Load(2, &d.childMap) + stateSourceObject.Load(3, &d.numChildren) + stateSourceObject.Load(4, &d.childList) } -func (x *directoryFD) StateTypeName() string { +func (d *directoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.directoryFD" } -func (x *directoryFD) StateFields() []string { +func (d *directoryFD) StateFields() []string { return []string{ "fileDescription", "DirectoryFileDescriptionDefaultImpl", @@ -138,79 +138,79 @@ func (x *directoryFD) StateFields() []string { } } -func (x *directoryFD) beforeSave() {} +func (d *directoryFD) beforeSave() {} -func (x *directoryFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileDescription) - m.Save(1, &x.DirectoryFileDescriptionDefaultImpl) - m.Save(2, &x.iter) - m.Save(3, &x.off) +func (d *directoryFD) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.fileDescription) + stateSinkObject.Save(1, &d.DirectoryFileDescriptionDefaultImpl) + stateSinkObject.Save(2, &d.iter) + stateSinkObject.Save(3, &d.off) } -func (x *directoryFD) afterLoad() {} +func (d *directoryFD) afterLoad() {} -func (x *directoryFD) StateLoad(m state.Source) { - m.Load(0, &x.fileDescription) - m.Load(1, &x.DirectoryFileDescriptionDefaultImpl) - m.Load(2, &x.iter) - m.Load(3, &x.off) +func (d *directoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.fileDescription) + stateSourceObject.Load(1, &d.DirectoryFileDescriptionDefaultImpl) + stateSourceObject.Load(2, &d.iter) + stateSourceObject.Load(3, &d.off) } -func (x *inodeRefs) StateTypeName() string { +func (i *inodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.inodeRefs" } -func (x *inodeRefs) StateFields() []string { +func (i *inodeRefs) StateFields() []string { return []string{ "refCount", } } -func (x *inodeRefs) beforeSave() {} +func (i *inodeRefs) beforeSave() {} -func (x *inodeRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (i *inodeRefs) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.refCount) } -func (x *inodeRefs) afterLoad() {} +func (i *inodeRefs) afterLoad() {} -func (x *inodeRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (i *inodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.refCount) } -func (x *namedPipe) StateTypeName() string { +func (n *namedPipe) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.namedPipe" } -func (x *namedPipe) StateFields() []string { +func (n *namedPipe) StateFields() []string { return []string{ "inode", "pipe", } } -func (x *namedPipe) beforeSave() {} +func (n *namedPipe) beforeSave() {} -func (x *namedPipe) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inode) - m.Save(1, &x.pipe) +func (n *namedPipe) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.inode) + stateSinkObject.Save(1, &n.pipe) } -func (x *namedPipe) afterLoad() {} +func (n *namedPipe) afterLoad() {} -func (x *namedPipe) StateLoad(m state.Source) { - m.Load(0, &x.inode) - m.Load(1, &x.pipe) +func (n *namedPipe) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.inode) + stateSourceObject.Load(1, &n.pipe) } -func (x *regularFile) StateTypeName() string { +func (r *regularFile) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.regularFile" } -func (x *regularFile) StateFields() []string { +func (r *regularFile) StateFields() []string { return []string{ "inode", "memFile", @@ -223,135 +223,135 @@ func (x *regularFile) StateFields() []string { } } -func (x *regularFile) beforeSave() {} +func (r *regularFile) beforeSave() {} -func (x *regularFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inode) - m.Save(1, &x.memFile) - m.Save(2, &x.memoryUsageKind) - m.Save(3, &x.mappings) - m.Save(4, &x.writableMappingPages) - m.Save(5, &x.data) - m.Save(6, &x.seals) - m.Save(7, &x.size) +func (r *regularFile) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.inode) + stateSinkObject.Save(1, &r.memFile) + stateSinkObject.Save(2, &r.memoryUsageKind) + stateSinkObject.Save(3, &r.mappings) + stateSinkObject.Save(4, &r.writableMappingPages) + stateSinkObject.Save(5, &r.data) + stateSinkObject.Save(6, &r.seals) + stateSinkObject.Save(7, &r.size) } -func (x *regularFile) afterLoad() {} +func (r *regularFile) afterLoad() {} -func (x *regularFile) StateLoad(m state.Source) { - m.Load(0, &x.inode) - m.Load(1, &x.memFile) - m.Load(2, &x.memoryUsageKind) - m.Load(3, &x.mappings) - m.Load(4, &x.writableMappingPages) - m.Load(5, &x.data) - m.Load(6, &x.seals) - m.Load(7, &x.size) +func (r *regularFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.inode) + stateSourceObject.Load(1, &r.memFile) + stateSourceObject.Load(2, &r.memoryUsageKind) + stateSourceObject.Load(3, &r.mappings) + stateSourceObject.Load(4, &r.writableMappingPages) + stateSourceObject.Load(5, &r.data) + stateSourceObject.Load(6, &r.seals) + stateSourceObject.Load(7, &r.size) } -func (x *regularFileFD) StateTypeName() string { +func (r *regularFileFD) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.regularFileFD" } -func (x *regularFileFD) StateFields() []string { +func (r *regularFileFD) StateFields() []string { return []string{ "fileDescription", "off", } } -func (x *regularFileFD) beforeSave() {} +func (r *regularFileFD) beforeSave() {} -func (x *regularFileFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fileDescription) - m.Save(1, &x.off) +func (r *regularFileFD) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.fileDescription) + stateSinkObject.Save(1, &r.off) } -func (x *regularFileFD) afterLoad() {} +func (r *regularFileFD) afterLoad() {} -func (x *regularFileFD) StateLoad(m state.Source) { - m.Load(0, &x.fileDescription) - m.Load(1, &x.off) +func (r *regularFileFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.fileDescription) + stateSourceObject.Load(1, &r.off) } -func (x *socketFile) StateTypeName() string { +func (s *socketFile) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.socketFile" } -func (x *socketFile) StateFields() []string { +func (s *socketFile) StateFields() []string { return []string{ "inode", "ep", } } -func (x *socketFile) beforeSave() {} +func (s *socketFile) beforeSave() {} -func (x *socketFile) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inode) - m.Save(1, &x.ep) +func (s *socketFile) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.inode) + stateSinkObject.Save(1, &s.ep) } -func (x *socketFile) afterLoad() {} +func (s *socketFile) afterLoad() {} -func (x *socketFile) StateLoad(m state.Source) { - m.Load(0, &x.inode) - m.Load(1, &x.ep) +func (s *socketFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.inode) + stateSourceObject.Load(1, &s.ep) } -func (x *symlink) StateTypeName() string { +func (s *symlink) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.symlink" } -func (x *symlink) StateFields() []string { +func (s *symlink) StateFields() []string { return []string{ "inode", "target", } } -func (x *symlink) beforeSave() {} +func (s *symlink) beforeSave() {} -func (x *symlink) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.inode) - m.Save(1, &x.target) +func (s *symlink) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.inode) + stateSinkObject.Save(1, &s.target) } -func (x *symlink) afterLoad() {} +func (s *symlink) afterLoad() {} -func (x *symlink) StateLoad(m state.Source) { - m.Load(0, &x.inode) - m.Load(1, &x.target) +func (s *symlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.inode) + stateSourceObject.Load(1, &s.target) } -func (x *FilesystemType) StateTypeName() string { +func (f *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.FilesystemType" } -func (x *FilesystemType) StateFields() []string { +func (f *FilesystemType) StateFields() []string { return []string{} } -func (x *FilesystemType) beforeSave() {} +func (f *FilesystemType) beforeSave() {} -func (x *FilesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *FilesystemType) afterLoad() {} +func (f *FilesystemType) afterLoad() {} -func (x *FilesystemType) StateLoad(m state.Source) { +func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *filesystem) StateTypeName() string { +func (f *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.filesystem" } -func (x *filesystem) StateFields() []string { +func (f *filesystem) StateFields() []string { return []string{ "vfsfs", "memFile", @@ -361,32 +361,32 @@ func (x *filesystem) StateFields() []string { } } -func (x *filesystem) beforeSave() {} +func (f *filesystem) beforeSave() {} -func (x *filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfs) - m.Save(1, &x.memFile) - m.Save(2, &x.clock) - m.Save(3, &x.devMinor) - m.Save(4, &x.nextInoMinusOne) +func (f *filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfs) + stateSinkObject.Save(1, &f.memFile) + stateSinkObject.Save(2, &f.clock) + stateSinkObject.Save(3, &f.devMinor) + stateSinkObject.Save(4, &f.nextInoMinusOne) } -func (x *filesystem) afterLoad() {} +func (f *filesystem) afterLoad() {} -func (x *filesystem) StateLoad(m state.Source) { - m.Load(0, &x.vfsfs) - m.Load(1, &x.memFile) - m.Load(2, &x.clock) - m.Load(3, &x.devMinor) - m.Load(4, &x.nextInoMinusOne) +func (f *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfs) + stateSourceObject.Load(1, &f.memFile) + stateSourceObject.Load(2, &f.clock) + stateSourceObject.Load(3, &f.devMinor) + stateSourceObject.Load(4, &f.nextInoMinusOne) } -func (x *FilesystemOpts) StateTypeName() string { +func (f *FilesystemOpts) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.FilesystemOpts" } -func (x *FilesystemOpts) StateFields() []string { +func (f *FilesystemOpts) StateFields() []string { return []string{ "RootFileType", "RootSymlinkTarget", @@ -394,28 +394,28 @@ func (x *FilesystemOpts) StateFields() []string { } } -func (x *FilesystemOpts) beforeSave() {} +func (f *FilesystemOpts) beforeSave() {} -func (x *FilesystemOpts) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.RootFileType) - m.Save(1, &x.RootSymlinkTarget) - m.Save(2, &x.FilesystemType) +func (f *FilesystemOpts) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.RootFileType) + stateSinkObject.Save(1, &f.RootSymlinkTarget) + stateSinkObject.Save(2, &f.FilesystemType) } -func (x *FilesystemOpts) afterLoad() {} +func (f *FilesystemOpts) afterLoad() {} -func (x *FilesystemOpts) StateLoad(m state.Source) { - m.Load(0, &x.RootFileType) - m.Load(1, &x.RootSymlinkTarget) - m.Load(2, &x.FilesystemType) +func (f *FilesystemOpts) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.RootFileType) + stateSourceObject.Load(1, &f.RootSymlinkTarget) + stateSourceObject.Load(2, &f.FilesystemType) } -func (x *dentry) StateTypeName() string { +func (d *dentry) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.dentry" } -func (x *dentry) StateFields() []string { +func (d *dentry) StateFields() []string { return []string{ "vfsd", "parent", @@ -425,32 +425,32 @@ func (x *dentry) StateFields() []string { } } -func (x *dentry) beforeSave() {} +func (d *dentry) beforeSave() {} -func (x *dentry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsd) - m.Save(1, &x.parent) - m.Save(2, &x.name) - m.Save(3, &x.dentryEntry) - m.Save(4, &x.inode) +func (d *dentry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.vfsd) + stateSinkObject.Save(1, &d.parent) + stateSinkObject.Save(2, &d.name) + stateSinkObject.Save(3, &d.dentryEntry) + stateSinkObject.Save(4, &d.inode) } -func (x *dentry) afterLoad() {} +func (d *dentry) afterLoad() {} -func (x *dentry) StateLoad(m state.Source) { - m.Load(0, &x.vfsd) - m.Load(1, &x.parent) - m.Load(2, &x.name) - m.Load(3, &x.dentryEntry) - m.Load(4, &x.inode) +func (d *dentry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.vfsd) + stateSourceObject.Load(1, &d.parent) + stateSourceObject.Load(2, &d.name) + stateSourceObject.Load(3, &d.dentryEntry) + stateSourceObject.Load(4, &d.inode) } -func (x *inode) StateTypeName() string { +func (i *inode) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.inode" } -func (x *inode) StateFields() []string { +func (i *inode) StateFields() []string { return []string{ "fs", "refs", @@ -469,50 +469,50 @@ func (x *inode) StateFields() []string { } } -func (x *inode) beforeSave() {} - -func (x *inode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fs) - m.Save(1, &x.refs) - m.Save(2, &x.xattrs) - m.Save(3, &x.mode) - m.Save(4, &x.nlink) - m.Save(5, &x.uid) - m.Save(6, &x.gid) - m.Save(7, &x.ino) - m.Save(8, &x.atime) - m.Save(9, &x.ctime) - m.Save(10, &x.mtime) - m.Save(11, &x.locks) - m.Save(12, &x.watches) - m.Save(13, &x.impl) -} - -func (x *inode) afterLoad() {} - -func (x *inode) StateLoad(m state.Source) { - m.Load(0, &x.fs) - m.Load(1, &x.refs) - m.Load(2, &x.xattrs) - m.Load(3, &x.mode) - m.Load(4, &x.nlink) - m.Load(5, &x.uid) - m.Load(6, &x.gid) - m.Load(7, &x.ino) - m.Load(8, &x.atime) - m.Load(9, &x.ctime) - m.Load(10, &x.mtime) - m.Load(11, &x.locks) - m.Load(12, &x.watches) - m.Load(13, &x.impl) -} - -func (x *fileDescription) StateTypeName() string { +func (i *inode) beforeSave() {} + +func (i *inode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fs) + stateSinkObject.Save(1, &i.refs) + stateSinkObject.Save(2, &i.xattrs) + stateSinkObject.Save(3, &i.mode) + stateSinkObject.Save(4, &i.nlink) + stateSinkObject.Save(5, &i.uid) + stateSinkObject.Save(6, &i.gid) + stateSinkObject.Save(7, &i.ino) + stateSinkObject.Save(8, &i.atime) + stateSinkObject.Save(9, &i.ctime) + stateSinkObject.Save(10, &i.mtime) + stateSinkObject.Save(11, &i.locks) + stateSinkObject.Save(12, &i.watches) + stateSinkObject.Save(13, &i.impl) +} + +func (i *inode) afterLoad() {} + +func (i *inode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.fs) + stateSourceObject.Load(1, &i.refs) + stateSourceObject.Load(2, &i.xattrs) + stateSourceObject.Load(3, &i.mode) + stateSourceObject.Load(4, &i.nlink) + stateSourceObject.Load(5, &i.uid) + stateSourceObject.Load(6, &i.gid) + stateSourceObject.Load(7, &i.ino) + stateSourceObject.Load(8, &i.atime) + stateSourceObject.Load(9, &i.ctime) + stateSourceObject.Load(10, &i.mtime) + stateSourceObject.Load(11, &i.locks) + stateSourceObject.Load(12, &i.watches) + stateSourceObject.Load(13, &i.impl) +} + +func (f *fileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.fileDescription" } -func (x *fileDescription) StateFields() []string { +func (f *fileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -520,21 +520,21 @@ func (x *fileDescription) StateFields() []string { } } -func (x *fileDescription) beforeSave() {} +func (f *fileDescription) beforeSave() {} -func (x *fileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.LockFD) +func (f *fileDescription) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.vfsfd) + stateSinkObject.Save(1, &f.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &f.LockFD) } -func (x *fileDescription) afterLoad() {} +func (f *fileDescription) afterLoad() {} -func (x *fileDescription) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.LockFD) +func (f *fileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.vfsfd) + stateSourceObject.Load(1, &f.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &f.LockFD) } func init() { diff --git a/pkg/sentry/inet/inet_state_autogen.go b/pkg/sentry/inet/inet_state_autogen.go index dc382a657..372a3d50a 100644 --- a/pkg/sentry/inet/inet_state_autogen.go +++ b/pkg/sentry/inet/inet_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *TCPBufferSize) StateTypeName() string { +func (t *TCPBufferSize) StateTypeName() string { return "pkg/sentry/inet.TCPBufferSize" } -func (x *TCPBufferSize) StateFields() []string { +func (t *TCPBufferSize) StateFields() []string { return []string{ "Min", "Default", @@ -18,46 +18,46 @@ func (x *TCPBufferSize) StateFields() []string { } } -func (x *TCPBufferSize) beforeSave() {} +func (t *TCPBufferSize) beforeSave() {} -func (x *TCPBufferSize) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Min) - m.Save(1, &x.Default) - m.Save(2, &x.Max) +func (t *TCPBufferSize) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Min) + stateSinkObject.Save(1, &t.Default) + stateSinkObject.Save(2, &t.Max) } -func (x *TCPBufferSize) afterLoad() {} +func (t *TCPBufferSize) afterLoad() {} -func (x *TCPBufferSize) StateLoad(m state.Source) { - m.Load(0, &x.Min) - m.Load(1, &x.Default) - m.Load(2, &x.Max) +func (t *TCPBufferSize) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Min) + stateSourceObject.Load(1, &t.Default) + stateSourceObject.Load(2, &t.Max) } -func (x *Namespace) StateTypeName() string { +func (n *Namespace) StateTypeName() string { return "pkg/sentry/inet.Namespace" } -func (x *Namespace) StateFields() []string { +func (n *Namespace) StateFields() []string { return []string{ "creator", "isRoot", } } -func (x *Namespace) beforeSave() {} +func (n *Namespace) beforeSave() {} -func (x *Namespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.creator) - m.Save(1, &x.isRoot) +func (n *Namespace) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.creator) + stateSinkObject.Save(1, &n.isRoot) } -func (x *Namespace) StateLoad(m state.Source) { - m.LoadWait(0, &x.creator) - m.Load(1, &x.isRoot) - m.AfterLoad(x.afterLoad) +func (n *Namespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &n.creator) + stateSourceObject.Load(1, &n.isRoot) + stateSourceObject.AfterLoad(n.afterLoad) } func init() { diff --git a/pkg/sentry/kernel/auth/auth_state_autogen.go b/pkg/sentry/kernel/auth/auth_state_autogen.go index 7a710d06d..7381b79ea 100644 --- a/pkg/sentry/kernel/auth/auth_state_autogen.go +++ b/pkg/sentry/kernel/auth/auth_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Credentials) StateTypeName() string { +func (c *Credentials) StateTypeName() string { return "pkg/sentry/kernel/auth.Credentials" } -func (x *Credentials) StateFields() []string { +func (c *Credentials) StateFields() []string { return []string{ "RealKUID", "EffectiveKUID", @@ -28,48 +28,48 @@ func (x *Credentials) StateFields() []string { } } -func (x *Credentials) beforeSave() {} - -func (x *Credentials) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.RealKUID) - m.Save(1, &x.EffectiveKUID) - m.Save(2, &x.SavedKUID) - m.Save(3, &x.RealKGID) - m.Save(4, &x.EffectiveKGID) - m.Save(5, &x.SavedKGID) - m.Save(6, &x.ExtraKGIDs) - m.Save(7, &x.PermittedCaps) - m.Save(8, &x.InheritableCaps) - m.Save(9, &x.EffectiveCaps) - m.Save(10, &x.BoundingCaps) - m.Save(11, &x.KeepCaps) - m.Save(12, &x.UserNamespace) +func (c *Credentials) beforeSave() {} + +func (c *Credentials) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.RealKUID) + stateSinkObject.Save(1, &c.EffectiveKUID) + stateSinkObject.Save(2, &c.SavedKUID) + stateSinkObject.Save(3, &c.RealKGID) + stateSinkObject.Save(4, &c.EffectiveKGID) + stateSinkObject.Save(5, &c.SavedKGID) + stateSinkObject.Save(6, &c.ExtraKGIDs) + stateSinkObject.Save(7, &c.PermittedCaps) + stateSinkObject.Save(8, &c.InheritableCaps) + stateSinkObject.Save(9, &c.EffectiveCaps) + stateSinkObject.Save(10, &c.BoundingCaps) + stateSinkObject.Save(11, &c.KeepCaps) + stateSinkObject.Save(12, &c.UserNamespace) } -func (x *Credentials) afterLoad() {} - -func (x *Credentials) StateLoad(m state.Source) { - m.Load(0, &x.RealKUID) - m.Load(1, &x.EffectiveKUID) - m.Load(2, &x.SavedKUID) - m.Load(3, &x.RealKGID) - m.Load(4, &x.EffectiveKGID) - m.Load(5, &x.SavedKGID) - m.Load(6, &x.ExtraKGIDs) - m.Load(7, &x.PermittedCaps) - m.Load(8, &x.InheritableCaps) - m.Load(9, &x.EffectiveCaps) - m.Load(10, &x.BoundingCaps) - m.Load(11, &x.KeepCaps) - m.Load(12, &x.UserNamespace) +func (c *Credentials) afterLoad() {} + +func (c *Credentials) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.RealKUID) + stateSourceObject.Load(1, &c.EffectiveKUID) + stateSourceObject.Load(2, &c.SavedKUID) + stateSourceObject.Load(3, &c.RealKGID) + stateSourceObject.Load(4, &c.EffectiveKGID) + stateSourceObject.Load(5, &c.SavedKGID) + stateSourceObject.Load(6, &c.ExtraKGIDs) + stateSourceObject.Load(7, &c.PermittedCaps) + stateSourceObject.Load(8, &c.InheritableCaps) + stateSourceObject.Load(9, &c.EffectiveCaps) + stateSourceObject.Load(10, &c.BoundingCaps) + stateSourceObject.Load(11, &c.KeepCaps) + stateSourceObject.Load(12, &c.UserNamespace) } -func (x *IDMapEntry) StateTypeName() string { +func (i *IDMapEntry) StateTypeName() string { return "pkg/sentry/kernel/auth.IDMapEntry" } -func (x *IDMapEntry) StateFields() []string { +func (i *IDMapEntry) StateFields() []string { return []string{ "FirstID", "FirstParentID", @@ -77,78 +77,78 @@ func (x *IDMapEntry) StateFields() []string { } } -func (x *IDMapEntry) beforeSave() {} +func (i *IDMapEntry) beforeSave() {} -func (x *IDMapEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FirstID) - m.Save(1, &x.FirstParentID) - m.Save(2, &x.Length) +func (i *IDMapEntry) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.FirstID) + stateSinkObject.Save(1, &i.FirstParentID) + stateSinkObject.Save(2, &i.Length) } -func (x *IDMapEntry) afterLoad() {} +func (i *IDMapEntry) afterLoad() {} -func (x *IDMapEntry) StateLoad(m state.Source) { - m.Load(0, &x.FirstID) - m.Load(1, &x.FirstParentID) - m.Load(2, &x.Length) +func (i *IDMapEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.FirstID) + stateSourceObject.Load(1, &i.FirstParentID) + stateSourceObject.Load(2, &i.Length) } -func (x *idMapRange) StateTypeName() string { +func (i *idMapRange) StateTypeName() string { return "pkg/sentry/kernel/auth.idMapRange" } -func (x *idMapRange) StateFields() []string { +func (i *idMapRange) StateFields() []string { return []string{ "Start", "End", } } -func (x *idMapRange) beforeSave() {} +func (i *idMapRange) beforeSave() {} -func (x *idMapRange) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) +func (i *idMapRange) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Start) + stateSinkObject.Save(1, &i.End) } -func (x *idMapRange) afterLoad() {} +func (i *idMapRange) afterLoad() {} -func (x *idMapRange) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) +func (i *idMapRange) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Start) + stateSourceObject.Load(1, &i.End) } -func (x *idMapSet) StateTypeName() string { +func (i *idMapSet) StateTypeName() string { return "pkg/sentry/kernel/auth.idMapSet" } -func (x *idMapSet) StateFields() []string { +func (i *idMapSet) StateFields() []string { return []string{ "root", } } -func (x *idMapSet) beforeSave() {} +func (i *idMapSet) beforeSave() {} -func (x *idMapSet) StateSave(m state.Sink) { - x.beforeSave() - var root *idMapSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (i *idMapSet) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + var rootValue *idMapSegmentDataSlices = i.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *idMapSet) afterLoad() {} +func (i *idMapSet) afterLoad() {} -func (x *idMapSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*idMapSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*idMapSegmentDataSlices)) }) +func (i *idMapSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*idMapSegmentDataSlices), func(y interface{}) { i.loadRoot(y.(*idMapSegmentDataSlices)) }) } -func (x *idMapnode) StateTypeName() string { +func (i *idMapnode) StateTypeName() string { return "pkg/sentry/kernel/auth.idMapnode" } -func (x *idMapnode) StateFields() []string { +func (i *idMapnode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -161,38 +161,38 @@ func (x *idMapnode) StateFields() []string { } } -func (x *idMapnode) beforeSave() {} - -func (x *idMapnode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (i *idMapnode) beforeSave() {} + +func (i *idMapnode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.nrSegments) + stateSinkObject.Save(1, &i.parent) + stateSinkObject.Save(2, &i.parentIndex) + stateSinkObject.Save(3, &i.hasChildren) + stateSinkObject.Save(4, &i.maxGap) + stateSinkObject.Save(5, &i.keys) + stateSinkObject.Save(6, &i.values) + stateSinkObject.Save(7, &i.children) } -func (x *idMapnode) afterLoad() {} - -func (x *idMapnode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (i *idMapnode) afterLoad() {} + +func (i *idMapnode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.nrSegments) + stateSourceObject.Load(1, &i.parent) + stateSourceObject.Load(2, &i.parentIndex) + stateSourceObject.Load(3, &i.hasChildren) + stateSourceObject.Load(4, &i.maxGap) + stateSourceObject.Load(5, &i.keys) + stateSourceObject.Load(6, &i.values) + stateSourceObject.Load(7, &i.children) } -func (x *idMapSegmentDataSlices) StateTypeName() string { +func (i *idMapSegmentDataSlices) StateTypeName() string { return "pkg/sentry/kernel/auth.idMapSegmentDataSlices" } -func (x *idMapSegmentDataSlices) StateFields() []string { +func (i *idMapSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -200,28 +200,28 @@ func (x *idMapSegmentDataSlices) StateFields() []string { } } -func (x *idMapSegmentDataSlices) beforeSave() {} +func (i *idMapSegmentDataSlices) beforeSave() {} -func (x *idMapSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (i *idMapSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Start) + stateSinkObject.Save(1, &i.End) + stateSinkObject.Save(2, &i.Values) } -func (x *idMapSegmentDataSlices) afterLoad() {} +func (i *idMapSegmentDataSlices) afterLoad() {} -func (x *idMapSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (i *idMapSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Start) + stateSourceObject.Load(1, &i.End) + stateSourceObject.Load(2, &i.Values) } -func (x *UserNamespace) StateTypeName() string { +func (u *UserNamespace) StateTypeName() string { return "pkg/sentry/kernel/auth.UserNamespace" } -func (x *UserNamespace) StateFields() []string { +func (u *UserNamespace) StateFields() []string { return []string{ "parent", "owner", @@ -232,27 +232,27 @@ func (x *UserNamespace) StateFields() []string { } } -func (x *UserNamespace) beforeSave() {} +func (u *UserNamespace) beforeSave() {} -func (x *UserNamespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.parent) - m.Save(1, &x.owner) - m.Save(2, &x.uidMapFromParent) - m.Save(3, &x.uidMapToParent) - m.Save(4, &x.gidMapFromParent) - m.Save(5, &x.gidMapToParent) +func (u *UserNamespace) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.parent) + stateSinkObject.Save(1, &u.owner) + stateSinkObject.Save(2, &u.uidMapFromParent) + stateSinkObject.Save(3, &u.uidMapToParent) + stateSinkObject.Save(4, &u.gidMapFromParent) + stateSinkObject.Save(5, &u.gidMapToParent) } -func (x *UserNamespace) afterLoad() {} +func (u *UserNamespace) afterLoad() {} -func (x *UserNamespace) StateLoad(m state.Source) { - m.Load(0, &x.parent) - m.Load(1, &x.owner) - m.Load(2, &x.uidMapFromParent) - m.Load(3, &x.uidMapToParent) - m.Load(4, &x.gidMapFromParent) - m.Load(5, &x.gidMapToParent) +func (u *UserNamespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.parent) + stateSourceObject.Load(1, &u.owner) + stateSourceObject.Load(2, &u.uidMapFromParent) + stateSourceObject.Load(3, &u.uidMapToParent) + stateSourceObject.Load(4, &u.gidMapFromParent) + stateSourceObject.Load(5, &u.gidMapToParent) } func init() { diff --git a/pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go b/pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go index 0a3507dd5..4002e0cb2 100644 --- a/pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go +++ b/pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go @@ -6,28 +6,28 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *AtomicPtrCredentials) StateTypeName() string { +func (a *AtomicPtrCredentials) StateTypeName() string { return "pkg/sentry/kernel/auth.AtomicPtrCredentials" } -func (x *AtomicPtrCredentials) StateFields() []string { +func (a *AtomicPtrCredentials) StateFields() []string { return []string{ "ptr", } } -func (x *AtomicPtrCredentials) beforeSave() {} +func (a *AtomicPtrCredentials) beforeSave() {} -func (x *AtomicPtrCredentials) StateSave(m state.Sink) { - x.beforeSave() - var ptr *Credentials = x.savePtr() - m.SaveValue(0, ptr) +func (a *AtomicPtrCredentials) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + var ptrValue *Credentials = a.savePtr() + stateSinkObject.SaveValue(0, ptrValue) } -func (x *AtomicPtrCredentials) afterLoad() {} +func (a *AtomicPtrCredentials) afterLoad() {} -func (x *AtomicPtrCredentials) StateLoad(m state.Source) { - m.LoadValue(0, new(*Credentials), func(y interface{}) { x.loadPtr(y.(*Credentials)) }) +func (a *AtomicPtrCredentials) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*Credentials), func(y interface{}) { a.loadPtr(y.(*Credentials)) }) } func init() { diff --git a/pkg/sentry/kernel/epoll/epoll_state_autogen.go b/pkg/sentry/kernel/epoll/epoll_state_autogen.go index 3b9d76751..cdeadd3e1 100644 --- a/pkg/sentry/kernel/epoll/epoll_state_autogen.go +++ b/pkg/sentry/kernel/epoll/epoll_state_autogen.go @@ -6,37 +6,37 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *FileIdentifier) StateTypeName() string { +func (f *FileIdentifier) StateTypeName() string { return "pkg/sentry/kernel/epoll.FileIdentifier" } -func (x *FileIdentifier) StateFields() []string { +func (f *FileIdentifier) StateFields() []string { return []string{ "File", "Fd", } } -func (x *FileIdentifier) beforeSave() {} +func (f *FileIdentifier) beforeSave() {} -func (x *FileIdentifier) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.File) - m.Save(1, &x.Fd) +func (f *FileIdentifier) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.File) + stateSinkObject.Save(1, &f.Fd) } -func (x *FileIdentifier) afterLoad() {} +func (f *FileIdentifier) afterLoad() {} -func (x *FileIdentifier) StateLoad(m state.Source) { - m.LoadWait(0, &x.File) - m.Load(1, &x.Fd) +func (f *FileIdentifier) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &f.File) + stateSourceObject.Load(1, &f.Fd) } -func (x *pollEntry) StateTypeName() string { +func (p *pollEntry) StateTypeName() string { return "pkg/sentry/kernel/epoll.pollEntry" } -func (x *pollEntry) StateFields() []string { +func (p *pollEntry) StateFields() []string { return []string{ "pollEntryEntry", "id", @@ -47,33 +47,33 @@ func (x *pollEntry) StateFields() []string { } } -func (x *pollEntry) beforeSave() {} +func (p *pollEntry) beforeSave() {} -func (x *pollEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.pollEntryEntry) - m.Save(1, &x.id) - m.Save(2, &x.userData) - m.Save(3, &x.mask) - m.Save(4, &x.flags) - m.Save(5, &x.epoll) +func (p *pollEntry) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.pollEntryEntry) + stateSinkObject.Save(1, &p.id) + stateSinkObject.Save(2, &p.userData) + stateSinkObject.Save(3, &p.mask) + stateSinkObject.Save(4, &p.flags) + stateSinkObject.Save(5, &p.epoll) } -func (x *pollEntry) StateLoad(m state.Source) { - m.Load(0, &x.pollEntryEntry) - m.LoadWait(1, &x.id) - m.Load(2, &x.userData) - m.Load(3, &x.mask) - m.Load(4, &x.flags) - m.Load(5, &x.epoll) - m.AfterLoad(x.afterLoad) +func (p *pollEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.pollEntryEntry) + stateSourceObject.LoadWait(1, &p.id) + stateSourceObject.Load(2, &p.userData) + stateSourceObject.Load(3, &p.mask) + stateSourceObject.Load(4, &p.flags) + stateSourceObject.Load(5, &p.epoll) + stateSourceObject.AfterLoad(p.afterLoad) } -func (x *EventPoll) StateTypeName() string { +func (e *EventPoll) StateTypeName() string { return "pkg/sentry/kernel/epoll.EventPoll" } -func (x *EventPoll) StateFields() []string { +func (e *EventPoll) StateFields() []string { return []string{ "files", "readyList", @@ -82,95 +82,95 @@ func (x *EventPoll) StateFields() []string { } } -func (x *EventPoll) beforeSave() {} +func (e *EventPoll) beforeSave() {} -func (x *EventPoll) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.FilePipeSeek) { - state.Failf("FilePipeSeek is %#v, expected zero", &x.FilePipeSeek) +func (e *EventPoll) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + if !state.IsZeroValue(&e.FilePipeSeek) { + state.Failf("FilePipeSeek is %#v, expected zero", &e.FilePipeSeek) } - if !state.IsZeroValue(&x.FileNotDirReaddir) { - state.Failf("FileNotDirReaddir is %#v, expected zero", &x.FileNotDirReaddir) + if !state.IsZeroValue(&e.FileNotDirReaddir) { + state.Failf("FileNotDirReaddir is %#v, expected zero", &e.FileNotDirReaddir) } - if !state.IsZeroValue(&x.FileNoFsync) { - state.Failf("FileNoFsync is %#v, expected zero", &x.FileNoFsync) + if !state.IsZeroValue(&e.FileNoFsync) { + state.Failf("FileNoFsync is %#v, expected zero", &e.FileNoFsync) } - if !state.IsZeroValue(&x.FileNoopFlush) { - state.Failf("FileNoopFlush is %#v, expected zero", &x.FileNoopFlush) + if !state.IsZeroValue(&e.FileNoopFlush) { + state.Failf("FileNoopFlush is %#v, expected zero", &e.FileNoopFlush) } - if !state.IsZeroValue(&x.FileNoIoctl) { - state.Failf("FileNoIoctl is %#v, expected zero", &x.FileNoIoctl) + if !state.IsZeroValue(&e.FileNoIoctl) { + state.Failf("FileNoIoctl is %#v, expected zero", &e.FileNoIoctl) } - if !state.IsZeroValue(&x.FileNoMMap) { - state.Failf("FileNoMMap is %#v, expected zero", &x.FileNoMMap) + if !state.IsZeroValue(&e.FileNoMMap) { + state.Failf("FileNoMMap is %#v, expected zero", &e.FileNoMMap) } - if !state.IsZeroValue(&x.Queue) { - state.Failf("Queue is %#v, expected zero", &x.Queue) + if !state.IsZeroValue(&e.Queue) { + state.Failf("Queue is %#v, expected zero", &e.Queue) } - m.Save(0, &x.files) - m.Save(1, &x.readyList) - m.Save(2, &x.waitingList) - m.Save(3, &x.disabledList) + stateSinkObject.Save(0, &e.files) + stateSinkObject.Save(1, &e.readyList) + stateSinkObject.Save(2, &e.waitingList) + stateSinkObject.Save(3, &e.disabledList) } -func (x *EventPoll) StateLoad(m state.Source) { - m.Load(0, &x.files) - m.Load(1, &x.readyList) - m.Load(2, &x.waitingList) - m.Load(3, &x.disabledList) - m.AfterLoad(x.afterLoad) +func (e *EventPoll) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.files) + stateSourceObject.Load(1, &e.readyList) + stateSourceObject.Load(2, &e.waitingList) + stateSourceObject.Load(3, &e.disabledList) + stateSourceObject.AfterLoad(e.afterLoad) } -func (x *pollEntryList) StateTypeName() string { +func (p *pollEntryList) StateTypeName() string { return "pkg/sentry/kernel/epoll.pollEntryList" } -func (x *pollEntryList) StateFields() []string { +func (p *pollEntryList) StateFields() []string { return []string{ "head", "tail", } } -func (x *pollEntryList) beforeSave() {} +func (p *pollEntryList) beforeSave() {} -func (x *pollEntryList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (p *pollEntryList) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.head) + stateSinkObject.Save(1, &p.tail) } -func (x *pollEntryList) afterLoad() {} +func (p *pollEntryList) afterLoad() {} -func (x *pollEntryList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (p *pollEntryList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.head) + stateSourceObject.Load(1, &p.tail) } -func (x *pollEntryEntry) StateTypeName() string { +func (p *pollEntryEntry) StateTypeName() string { return "pkg/sentry/kernel/epoll.pollEntryEntry" } -func (x *pollEntryEntry) StateFields() []string { +func (p *pollEntryEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *pollEntryEntry) beforeSave() {} +func (p *pollEntryEntry) beforeSave() {} -func (x *pollEntryEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (p *pollEntryEntry) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.next) + stateSinkObject.Save(1, &p.prev) } -func (x *pollEntryEntry) afterLoad() {} +func (p *pollEntryEntry) afterLoad() {} -func (x *pollEntryEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (p *pollEntryEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.next) + stateSourceObject.Load(1, &p.prev) } func init() { diff --git a/pkg/sentry/kernel/eventfd/eventfd_state_autogen.go b/pkg/sentry/kernel/eventfd/eventfd_state_autogen.go index 72a285daa..336262eed 100644 --- a/pkg/sentry/kernel/eventfd/eventfd_state_autogen.go +++ b/pkg/sentry/kernel/eventfd/eventfd_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *EventOperations) StateTypeName() string { +func (e *EventOperations) StateTypeName() string { return "pkg/sentry/kernel/eventfd.EventOperations" } -func (x *EventOperations) StateFields() []string { +func (e *EventOperations) StateFields() []string { return []string{ "val", "semMode", @@ -18,24 +18,24 @@ func (x *EventOperations) StateFields() []string { } } -func (x *EventOperations) beforeSave() {} +func (e *EventOperations) beforeSave() {} -func (x *EventOperations) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.wq) { - state.Failf("wq is %#v, expected zero", &x.wq) +func (e *EventOperations) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + if !state.IsZeroValue(&e.wq) { + state.Failf("wq is %#v, expected zero", &e.wq) } - m.Save(0, &x.val) - m.Save(1, &x.semMode) - m.Save(2, &x.hostfd) + stateSinkObject.Save(0, &e.val) + stateSinkObject.Save(1, &e.semMode) + stateSinkObject.Save(2, &e.hostfd) } -func (x *EventOperations) afterLoad() {} +func (e *EventOperations) afterLoad() {} -func (x *EventOperations) StateLoad(m state.Source) { - m.Load(0, &x.val) - m.Load(1, &x.semMode) - m.Load(2, &x.hostfd) +func (e *EventOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.val) + stateSourceObject.Load(1, &e.semMode) + stateSourceObject.Load(2, &e.hostfd) } func init() { diff --git a/pkg/sentry/kernel/fasync/fasync_state_autogen.go b/pkg/sentry/kernel/fasync/fasync_state_autogen.go index 8da4a1b44..e4a0b5695 100644 --- a/pkg/sentry/kernel/fasync/fasync_state_autogen.go +++ b/pkg/sentry/kernel/fasync/fasync_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *FileAsync) StateTypeName() string { +func (f *FileAsync) StateTypeName() string { return "pkg/sentry/kernel/fasync.FileAsync" } -func (x *FileAsync) StateFields() []string { +func (f *FileAsync) StateFields() []string { return []string{ "e", "requester", @@ -21,27 +21,27 @@ func (x *FileAsync) StateFields() []string { } } -func (x *FileAsync) beforeSave() {} +func (f *FileAsync) beforeSave() {} -func (x *FileAsync) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.e) - m.Save(1, &x.requester) - m.Save(2, &x.registered) - m.Save(3, &x.recipientPG) - m.Save(4, &x.recipientTG) - m.Save(5, &x.recipientT) +func (f *FileAsync) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.e) + stateSinkObject.Save(1, &f.requester) + stateSinkObject.Save(2, &f.registered) + stateSinkObject.Save(3, &f.recipientPG) + stateSinkObject.Save(4, &f.recipientTG) + stateSinkObject.Save(5, &f.recipientT) } -func (x *FileAsync) afterLoad() {} +func (f *FileAsync) afterLoad() {} -func (x *FileAsync) StateLoad(m state.Source) { - m.Load(0, &x.e) - m.Load(1, &x.requester) - m.Load(2, &x.registered) - m.Load(3, &x.recipientPG) - m.Load(4, &x.recipientTG) - m.Load(5, &x.recipientT) +func (f *FileAsync) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.e) + stateSourceObject.Load(1, &f.requester) + stateSourceObject.Load(2, &f.registered) + stateSourceObject.Load(3, &f.recipientPG) + stateSourceObject.Load(4, &f.recipientTG) + stateSourceObject.Load(5, &f.recipientT) } func init() { diff --git a/pkg/sentry/kernel/futex/futex_state_autogen.go b/pkg/sentry/kernel/futex/futex_state_autogen.go index 13e9a97d0..f36f5ccfc 100644 --- a/pkg/sentry/kernel/futex/futex_state_autogen.go +++ b/pkg/sentry/kernel/futex/futex_state_autogen.go @@ -6,104 +6,104 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *bucket) StateTypeName() string { +func (b *bucket) StateTypeName() string { return "pkg/sentry/kernel/futex.bucket" } -func (x *bucket) StateFields() []string { +func (b *bucket) StateFields() []string { return []string{} } -func (x *bucket) beforeSave() {} +func (b *bucket) beforeSave() {} -func (x *bucket) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.waiters) { - state.Failf("waiters is %#v, expected zero", &x.waiters) +func (b *bucket) StateSave(stateSinkObject state.Sink) { + b.beforeSave() + if !state.IsZeroValue(&b.waiters) { + state.Failf("waiters is %#v, expected zero", &b.waiters) } } -func (x *bucket) afterLoad() {} +func (b *bucket) afterLoad() {} -func (x *bucket) StateLoad(m state.Source) { +func (b *bucket) StateLoad(stateSourceObject state.Source) { } -func (x *Manager) StateTypeName() string { +func (m *Manager) StateTypeName() string { return "pkg/sentry/kernel/futex.Manager" } -func (x *Manager) StateFields() []string { +func (m *Manager) StateFields() []string { return []string{ "sharedBucket", } } -func (x *Manager) beforeSave() {} +func (m *Manager) beforeSave() {} -func (x *Manager) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.privateBuckets) { - state.Failf("privateBuckets is %#v, expected zero", &x.privateBuckets) +func (m *Manager) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + if !state.IsZeroValue(&m.privateBuckets) { + state.Failf("privateBuckets is %#v, expected zero", &m.privateBuckets) } - m.Save(0, &x.sharedBucket) + stateSinkObject.Save(0, &m.sharedBucket) } -func (x *Manager) afterLoad() {} +func (m *Manager) afterLoad() {} -func (x *Manager) StateLoad(m state.Source) { - m.Load(0, &x.sharedBucket) +func (m *Manager) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.sharedBucket) } -func (x *waiterList) StateTypeName() string { +func (w *waiterList) StateTypeName() string { return "pkg/sentry/kernel/futex.waiterList" } -func (x *waiterList) StateFields() []string { +func (w *waiterList) StateFields() []string { return []string{ "head", "tail", } } -func (x *waiterList) beforeSave() {} +func (w *waiterList) beforeSave() {} -func (x *waiterList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (w *waiterList) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.head) + stateSinkObject.Save(1, &w.tail) } -func (x *waiterList) afterLoad() {} +func (w *waiterList) afterLoad() {} -func (x *waiterList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (w *waiterList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.head) + stateSourceObject.Load(1, &w.tail) } -func (x *waiterEntry) StateTypeName() string { +func (w *waiterEntry) StateTypeName() string { return "pkg/sentry/kernel/futex.waiterEntry" } -func (x *waiterEntry) StateFields() []string { +func (w *waiterEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *waiterEntry) beforeSave() {} +func (w *waiterEntry) beforeSave() {} -func (x *waiterEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (w *waiterEntry) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.next) + stateSinkObject.Save(1, &w.prev) } -func (x *waiterEntry) afterLoad() {} +func (w *waiterEntry) afterLoad() {} -func (x *waiterEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (w *waiterEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.next) + stateSourceObject.Load(1, &w.prev) } func init() { diff --git a/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go b/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go index 244cdb502..6a9953ffa 100644 --- a/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go +++ b/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go @@ -6,28 +6,28 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *AtomicPtrBucket) StateTypeName() string { +func (a *AtomicPtrBucket) StateTypeName() string { return "pkg/sentry/kernel/futex.AtomicPtrBucket" } -func (x *AtomicPtrBucket) StateFields() []string { +func (a *AtomicPtrBucket) StateFields() []string { return []string{ "ptr", } } -func (x *AtomicPtrBucket) beforeSave() {} +func (a *AtomicPtrBucket) beforeSave() {} -func (x *AtomicPtrBucket) StateSave(m state.Sink) { - x.beforeSave() - var ptr *bucket = x.savePtr() - m.SaveValue(0, ptr) +func (a *AtomicPtrBucket) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + var ptrValue *bucket = a.savePtr() + stateSinkObject.SaveValue(0, ptrValue) } -func (x *AtomicPtrBucket) afterLoad() {} +func (a *AtomicPtrBucket) afterLoad() {} -func (x *AtomicPtrBucket) StateLoad(m state.Source) { - m.LoadValue(0, new(*bucket), func(y interface{}) { x.loadPtr(y.(*bucket)) }) +func (a *AtomicPtrBucket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*bucket), func(y interface{}) { a.loadPtr(y.(*bucket)) }) } func init() { diff --git a/pkg/sentry/kernel/kernel_opts_state_autogen.go b/pkg/sentry/kernel/kernel_opts_state_autogen.go index a01604159..7780c995f 100644 --- a/pkg/sentry/kernel/kernel_opts_state_autogen.go +++ b/pkg/sentry/kernel/kernel_opts_state_autogen.go @@ -6,23 +6,23 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SpecialOpts) StateTypeName() string { +func (s *SpecialOpts) StateTypeName() string { return "pkg/sentry/kernel.SpecialOpts" } -func (x *SpecialOpts) StateFields() []string { +func (s *SpecialOpts) StateFields() []string { return []string{} } -func (x *SpecialOpts) beforeSave() {} +func (s *SpecialOpts) beforeSave() {} -func (x *SpecialOpts) StateSave(m state.Sink) { - x.beforeSave() +func (s *SpecialOpts) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *SpecialOpts) afterLoad() {} +func (s *SpecialOpts) afterLoad() {} -func (x *SpecialOpts) StateLoad(m state.Source) { +func (s *SpecialOpts) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/kernel/kernel_state_autogen.go b/pkg/sentry/kernel/kernel_state_autogen.go index 7ff5e1eb9..101c137de 100644 --- a/pkg/sentry/kernel/kernel_state_autogen.go +++ b/pkg/sentry/kernel/kernel_state_autogen.go @@ -9,11 +9,11 @@ import ( "gvisor.dev/gvisor/pkg/tcpip" ) -func (x *abstractEndpoint) StateTypeName() string { +func (a *abstractEndpoint) StateTypeName() string { return "pkg/sentry/kernel.abstractEndpoint" } -func (x *abstractEndpoint) StateFields() []string { +func (a *abstractEndpoint) StateFields() []string { return []string{ "ep", "socket", @@ -22,76 +22,76 @@ func (x *abstractEndpoint) StateFields() []string { } } -func (x *abstractEndpoint) beforeSave() {} +func (a *abstractEndpoint) beforeSave() {} -func (x *abstractEndpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ep) - m.Save(1, &x.socket) - m.Save(2, &x.name) - m.Save(3, &x.ns) +func (a *abstractEndpoint) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.ep) + stateSinkObject.Save(1, &a.socket) + stateSinkObject.Save(2, &a.name) + stateSinkObject.Save(3, &a.ns) } -func (x *abstractEndpoint) afterLoad() {} +func (a *abstractEndpoint) afterLoad() {} -func (x *abstractEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.ep) - m.Load(1, &x.socket) - m.Load(2, &x.name) - m.Load(3, &x.ns) +func (a *abstractEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.ep) + stateSourceObject.Load(1, &a.socket) + stateSourceObject.Load(2, &a.name) + stateSourceObject.Load(3, &a.ns) } -func (x *AbstractSocketNamespace) StateTypeName() string { +func (a *AbstractSocketNamespace) StateTypeName() string { return "pkg/sentry/kernel.AbstractSocketNamespace" } -func (x *AbstractSocketNamespace) StateFields() []string { +func (a *AbstractSocketNamespace) StateFields() []string { return []string{ "endpoints", } } -func (x *AbstractSocketNamespace) beforeSave() {} +func (a *AbstractSocketNamespace) beforeSave() {} -func (x *AbstractSocketNamespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.endpoints) +func (a *AbstractSocketNamespace) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.endpoints) } -func (x *AbstractSocketNamespace) afterLoad() {} +func (a *AbstractSocketNamespace) afterLoad() {} -func (x *AbstractSocketNamespace) StateLoad(m state.Source) { - m.Load(0, &x.endpoints) +func (a *AbstractSocketNamespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.endpoints) } -func (x *FDFlags) StateTypeName() string { +func (f *FDFlags) StateTypeName() string { return "pkg/sentry/kernel.FDFlags" } -func (x *FDFlags) StateFields() []string { +func (f *FDFlags) StateFields() []string { return []string{ "CloseOnExec", } } -func (x *FDFlags) beforeSave() {} +func (f *FDFlags) beforeSave() {} -func (x *FDFlags) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.CloseOnExec) +func (f *FDFlags) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.CloseOnExec) } -func (x *FDFlags) afterLoad() {} +func (f *FDFlags) afterLoad() {} -func (x *FDFlags) StateLoad(m state.Source) { - m.Load(0, &x.CloseOnExec) +func (f *FDFlags) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.CloseOnExec) } -func (x *descriptor) StateTypeName() string { +func (d *descriptor) StateTypeName() string { return "pkg/sentry/kernel.descriptor" } -func (x *descriptor) StateFields() []string { +func (d *descriptor) StateFields() []string { return []string{ "file", "fileVFS2", @@ -99,28 +99,28 @@ func (x *descriptor) StateFields() []string { } } -func (x *descriptor) beforeSave() {} +func (d *descriptor) beforeSave() {} -func (x *descriptor) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.file) - m.Save(1, &x.fileVFS2) - m.Save(2, &x.flags) +func (d *descriptor) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.file) + stateSinkObject.Save(1, &d.fileVFS2) + stateSinkObject.Save(2, &d.flags) } -func (x *descriptor) afterLoad() {} +func (d *descriptor) afterLoad() {} -func (x *descriptor) StateLoad(m state.Source) { - m.Load(0, &x.file) - m.Load(1, &x.fileVFS2) - m.Load(2, &x.flags) +func (d *descriptor) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.file) + stateSourceObject.Load(1, &d.fileVFS2) + stateSourceObject.Load(2, &d.flags) } -func (x *FDTable) StateTypeName() string { +func (f *FDTable) StateTypeName() string { return "pkg/sentry/kernel.FDTable" } -func (x *FDTable) StateFields() []string { +func (f *FDTable) StateFields() []string { return []string{ "FDTableRefs", "k", @@ -130,56 +130,56 @@ func (x *FDTable) StateFields() []string { } } -func (x *FDTable) beforeSave() {} +func (f *FDTable) beforeSave() {} -func (x *FDTable) StateSave(m state.Sink) { - x.beforeSave() - var descriptorTable map[int32]descriptor = x.saveDescriptorTable() - m.SaveValue(4, descriptorTable) - m.Save(0, &x.FDTableRefs) - m.Save(1, &x.k) - m.Save(2, &x.next) - m.Save(3, &x.used) +func (f *FDTable) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + var descriptorTableValue map[int32]descriptor = f.saveDescriptorTable() + stateSinkObject.SaveValue(4, descriptorTableValue) + stateSinkObject.Save(0, &f.FDTableRefs) + stateSinkObject.Save(1, &f.k) + stateSinkObject.Save(2, &f.next) + stateSinkObject.Save(3, &f.used) } -func (x *FDTable) afterLoad() {} +func (f *FDTable) afterLoad() {} -func (x *FDTable) StateLoad(m state.Source) { - m.Load(0, &x.FDTableRefs) - m.Load(1, &x.k) - m.Load(2, &x.next) - m.Load(3, &x.used) - m.LoadValue(4, new(map[int32]descriptor), func(y interface{}) { x.loadDescriptorTable(y.(map[int32]descriptor)) }) +func (f *FDTable) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.FDTableRefs) + stateSourceObject.Load(1, &f.k) + stateSourceObject.Load(2, &f.next) + stateSourceObject.Load(3, &f.used) + stateSourceObject.LoadValue(4, new(map[int32]descriptor), func(y interface{}) { f.loadDescriptorTable(y.(map[int32]descriptor)) }) } -func (x *FDTableRefs) StateTypeName() string { +func (f *FDTableRefs) StateTypeName() string { return "pkg/sentry/kernel.FDTableRefs" } -func (x *FDTableRefs) StateFields() []string { +func (f *FDTableRefs) StateFields() []string { return []string{ "refCount", } } -func (x *FDTableRefs) beforeSave() {} +func (f *FDTableRefs) beforeSave() {} -func (x *FDTableRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (f *FDTableRefs) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.refCount) } -func (x *FDTableRefs) afterLoad() {} +func (f *FDTableRefs) afterLoad() {} -func (x *FDTableRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (f *FDTableRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.refCount) } -func (x *FSContext) StateTypeName() string { +func (f *FSContext) StateTypeName() string { return "pkg/sentry/kernel.FSContext" } -func (x *FSContext) StateFields() []string { +func (f *FSContext) StateFields() []string { return []string{ "FSContextRefs", "root", @@ -190,57 +190,57 @@ func (x *FSContext) StateFields() []string { } } -func (x *FSContext) beforeSave() {} +func (f *FSContext) beforeSave() {} -func (x *FSContext) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FSContextRefs) - m.Save(1, &x.root) - m.Save(2, &x.rootVFS2) - m.Save(3, &x.cwd) - m.Save(4, &x.cwdVFS2) - m.Save(5, &x.umask) +func (f *FSContext) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.FSContextRefs) + stateSinkObject.Save(1, &f.root) + stateSinkObject.Save(2, &f.rootVFS2) + stateSinkObject.Save(3, &f.cwd) + stateSinkObject.Save(4, &f.cwdVFS2) + stateSinkObject.Save(5, &f.umask) } -func (x *FSContext) afterLoad() {} +func (f *FSContext) afterLoad() {} -func (x *FSContext) StateLoad(m state.Source) { - m.Load(0, &x.FSContextRefs) - m.Load(1, &x.root) - m.Load(2, &x.rootVFS2) - m.Load(3, &x.cwd) - m.Load(4, &x.cwdVFS2) - m.Load(5, &x.umask) +func (f *FSContext) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.FSContextRefs) + stateSourceObject.Load(1, &f.root) + stateSourceObject.Load(2, &f.rootVFS2) + stateSourceObject.Load(3, &f.cwd) + stateSourceObject.Load(4, &f.cwdVFS2) + stateSourceObject.Load(5, &f.umask) } -func (x *FSContextRefs) StateTypeName() string { +func (f *FSContextRefs) StateTypeName() string { return "pkg/sentry/kernel.FSContextRefs" } -func (x *FSContextRefs) StateFields() []string { +func (f *FSContextRefs) StateFields() []string { return []string{ "refCount", } } -func (x *FSContextRefs) beforeSave() {} +func (f *FSContextRefs) beforeSave() {} -func (x *FSContextRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (f *FSContextRefs) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.refCount) } -func (x *FSContextRefs) afterLoad() {} +func (f *FSContextRefs) afterLoad() {} -func (x *FSContextRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (f *FSContextRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.refCount) } -func (x *IPCNamespace) StateTypeName() string { +func (i *IPCNamespace) StateTypeName() string { return "pkg/sentry/kernel.IPCNamespace" } -func (x *IPCNamespace) StateFields() []string { +func (i *IPCNamespace) StateFields() []string { return []string{ "userNS", "semaphores", @@ -248,28 +248,28 @@ func (x *IPCNamespace) StateFields() []string { } } -func (x *IPCNamespace) beforeSave() {} +func (i *IPCNamespace) beforeSave() {} -func (x *IPCNamespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.userNS) - m.Save(1, &x.semaphores) - m.Save(2, &x.shms) +func (i *IPCNamespace) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.userNS) + stateSinkObject.Save(1, &i.semaphores) + stateSinkObject.Save(2, &i.shms) } -func (x *IPCNamespace) afterLoad() {} +func (i *IPCNamespace) afterLoad() {} -func (x *IPCNamespace) StateLoad(m state.Source) { - m.Load(0, &x.userNS) - m.Load(1, &x.semaphores) - m.Load(2, &x.shms) +func (i *IPCNamespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.userNS) + stateSourceObject.Load(1, &i.semaphores) + stateSourceObject.Load(2, &i.shms) } -func (x *Kernel) StateTypeName() string { +func (k *Kernel) StateTypeName() string { return "pkg/sentry/kernel.Kernel" } -func (x *Kernel) StateFields() []string { +func (k *Kernel) StateFields() []string { return []string{ "featureSet", "timekeeper", @@ -311,98 +311,98 @@ func (x *Kernel) StateFields() []string { } } -func (x *Kernel) beforeSave() {} - -func (x *Kernel) StateSave(m state.Sink) { - x.beforeSave() - var danglingEndpoints []tcpip.Endpoint = x.saveDanglingEndpoints() - m.SaveValue(24, danglingEndpoints) - var deviceRegistry *device.Registry = x.saveDeviceRegistry() - m.SaveValue(28, deviceRegistry) - m.Save(0, &x.featureSet) - m.Save(1, &x.timekeeper) - m.Save(2, &x.tasks) - m.Save(3, &x.rootUserNamespace) - m.Save(4, &x.rootNetworkNamespace) - m.Save(5, &x.applicationCores) - m.Save(6, &x.useHostCores) - m.Save(7, &x.extraAuxv) - m.Save(8, &x.vdso) - m.Save(9, &x.rootUTSNamespace) - m.Save(10, &x.rootIPCNamespace) - m.Save(11, &x.rootAbstractSocketNamespace) - m.Save(12, &x.futexes) - m.Save(13, &x.globalInit) - m.Save(14, &x.realtimeClock) - m.Save(15, &x.monotonicClock) - m.Save(16, &x.syslog) - m.Save(17, &x.runningTasks) - m.Save(18, &x.cpuClock) - m.Save(19, &x.cpuClockTickerDisabled) - m.Save(20, &x.cpuClockTickerSetting) - m.Save(21, &x.uniqueID) - m.Save(22, &x.nextInotifyCookie) - m.Save(23, &x.netlinkPorts) - m.Save(25, &x.sockets) - m.Save(26, &x.socketsVFS2) - m.Save(27, &x.nextSocketRecord) - m.Save(29, &x.DirentCacheLimiter) - m.Save(30, &x.SpecialOpts) - m.Save(31, &x.vfs) - m.Save(32, &x.hostMount) - m.Save(33, &x.pipeMount) - m.Save(34, &x.shmMount) - m.Save(35, &x.socketMount) - m.Save(36, &x.SleepForAddressSpaceActivation) -} - -func (x *Kernel) afterLoad() {} - -func (x *Kernel) StateLoad(m state.Source) { - m.Load(0, &x.featureSet) - m.Load(1, &x.timekeeper) - m.Load(2, &x.tasks) - m.Load(3, &x.rootUserNamespace) - m.Load(4, &x.rootNetworkNamespace) - m.Load(5, &x.applicationCores) - m.Load(6, &x.useHostCores) - m.Load(7, &x.extraAuxv) - m.Load(8, &x.vdso) - m.Load(9, &x.rootUTSNamespace) - m.Load(10, &x.rootIPCNamespace) - m.Load(11, &x.rootAbstractSocketNamespace) - m.Load(12, &x.futexes) - m.Load(13, &x.globalInit) - m.Load(14, &x.realtimeClock) - m.Load(15, &x.monotonicClock) - m.Load(16, &x.syslog) - m.Load(17, &x.runningTasks) - m.Load(18, &x.cpuClock) - m.Load(19, &x.cpuClockTickerDisabled) - m.Load(20, &x.cpuClockTickerSetting) - m.Load(21, &x.uniqueID) - m.Load(22, &x.nextInotifyCookie) - m.Load(23, &x.netlinkPorts) - m.Load(25, &x.sockets) - m.Load(26, &x.socketsVFS2) - m.Load(27, &x.nextSocketRecord) - m.Load(29, &x.DirentCacheLimiter) - m.Load(30, &x.SpecialOpts) - m.Load(31, &x.vfs) - m.Load(32, &x.hostMount) - m.Load(33, &x.pipeMount) - m.Load(34, &x.shmMount) - m.Load(35, &x.socketMount) - m.Load(36, &x.SleepForAddressSpaceActivation) - m.LoadValue(24, new([]tcpip.Endpoint), func(y interface{}) { x.loadDanglingEndpoints(y.([]tcpip.Endpoint)) }) - m.LoadValue(28, new(*device.Registry), func(y interface{}) { x.loadDeviceRegistry(y.(*device.Registry)) }) -} - -func (x *SocketRecord) StateTypeName() string { +func (k *Kernel) beforeSave() {} + +func (k *Kernel) StateSave(stateSinkObject state.Sink) { + k.beforeSave() + var danglingEndpointsValue []tcpip.Endpoint = k.saveDanglingEndpoints() + stateSinkObject.SaveValue(24, danglingEndpointsValue) + var deviceRegistryValue *device.Registry = k.saveDeviceRegistry() + stateSinkObject.SaveValue(28, deviceRegistryValue) + stateSinkObject.Save(0, &k.featureSet) + stateSinkObject.Save(1, &k.timekeeper) + stateSinkObject.Save(2, &k.tasks) + stateSinkObject.Save(3, &k.rootUserNamespace) + stateSinkObject.Save(4, &k.rootNetworkNamespace) + stateSinkObject.Save(5, &k.applicationCores) + stateSinkObject.Save(6, &k.useHostCores) + stateSinkObject.Save(7, &k.extraAuxv) + stateSinkObject.Save(8, &k.vdso) + stateSinkObject.Save(9, &k.rootUTSNamespace) + stateSinkObject.Save(10, &k.rootIPCNamespace) + stateSinkObject.Save(11, &k.rootAbstractSocketNamespace) + stateSinkObject.Save(12, &k.futexes) + stateSinkObject.Save(13, &k.globalInit) + stateSinkObject.Save(14, &k.realtimeClock) + stateSinkObject.Save(15, &k.monotonicClock) + stateSinkObject.Save(16, &k.syslog) + stateSinkObject.Save(17, &k.runningTasks) + stateSinkObject.Save(18, &k.cpuClock) + stateSinkObject.Save(19, &k.cpuClockTickerDisabled) + stateSinkObject.Save(20, &k.cpuClockTickerSetting) + stateSinkObject.Save(21, &k.uniqueID) + stateSinkObject.Save(22, &k.nextInotifyCookie) + stateSinkObject.Save(23, &k.netlinkPorts) + stateSinkObject.Save(25, &k.sockets) + stateSinkObject.Save(26, &k.socketsVFS2) + stateSinkObject.Save(27, &k.nextSocketRecord) + stateSinkObject.Save(29, &k.DirentCacheLimiter) + stateSinkObject.Save(30, &k.SpecialOpts) + stateSinkObject.Save(31, &k.vfs) + stateSinkObject.Save(32, &k.hostMount) + stateSinkObject.Save(33, &k.pipeMount) + stateSinkObject.Save(34, &k.shmMount) + stateSinkObject.Save(35, &k.socketMount) + stateSinkObject.Save(36, &k.SleepForAddressSpaceActivation) +} + +func (k *Kernel) afterLoad() {} + +func (k *Kernel) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &k.featureSet) + stateSourceObject.Load(1, &k.timekeeper) + stateSourceObject.Load(2, &k.tasks) + stateSourceObject.Load(3, &k.rootUserNamespace) + stateSourceObject.Load(4, &k.rootNetworkNamespace) + stateSourceObject.Load(5, &k.applicationCores) + stateSourceObject.Load(6, &k.useHostCores) + stateSourceObject.Load(7, &k.extraAuxv) + stateSourceObject.Load(8, &k.vdso) + stateSourceObject.Load(9, &k.rootUTSNamespace) + stateSourceObject.Load(10, &k.rootIPCNamespace) + stateSourceObject.Load(11, &k.rootAbstractSocketNamespace) + stateSourceObject.Load(12, &k.futexes) + stateSourceObject.Load(13, &k.globalInit) + stateSourceObject.Load(14, &k.realtimeClock) + stateSourceObject.Load(15, &k.monotonicClock) + stateSourceObject.Load(16, &k.syslog) + stateSourceObject.Load(17, &k.runningTasks) + stateSourceObject.Load(18, &k.cpuClock) + stateSourceObject.Load(19, &k.cpuClockTickerDisabled) + stateSourceObject.Load(20, &k.cpuClockTickerSetting) + stateSourceObject.Load(21, &k.uniqueID) + stateSourceObject.Load(22, &k.nextInotifyCookie) + stateSourceObject.Load(23, &k.netlinkPorts) + stateSourceObject.Load(25, &k.sockets) + stateSourceObject.Load(26, &k.socketsVFS2) + stateSourceObject.Load(27, &k.nextSocketRecord) + stateSourceObject.Load(29, &k.DirentCacheLimiter) + stateSourceObject.Load(30, &k.SpecialOpts) + stateSourceObject.Load(31, &k.vfs) + stateSourceObject.Load(32, &k.hostMount) + stateSourceObject.Load(33, &k.pipeMount) + stateSourceObject.Load(34, &k.shmMount) + stateSourceObject.Load(35, &k.socketMount) + stateSourceObject.Load(36, &k.SleepForAddressSpaceActivation) + stateSourceObject.LoadValue(24, new([]tcpip.Endpoint), func(y interface{}) { k.loadDanglingEndpoints(y.([]tcpip.Endpoint)) }) + stateSourceObject.LoadValue(28, new(*device.Registry), func(y interface{}) { k.loadDeviceRegistry(y.(*device.Registry)) }) +} + +func (s *SocketRecord) StateTypeName() string { return "pkg/sentry/kernel.SocketRecord" } -func (x *SocketRecord) StateFields() []string { +func (s *SocketRecord) StateFields() []string { return []string{ "k", "Sock", @@ -411,106 +411,106 @@ func (x *SocketRecord) StateFields() []string { } } -func (x *SocketRecord) beforeSave() {} +func (s *SocketRecord) beforeSave() {} -func (x *SocketRecord) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.k) - m.Save(1, &x.Sock) - m.Save(2, &x.SockVFS2) - m.Save(3, &x.ID) +func (s *SocketRecord) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.k) + stateSinkObject.Save(1, &s.Sock) + stateSinkObject.Save(2, &s.SockVFS2) + stateSinkObject.Save(3, &s.ID) } -func (x *SocketRecord) afterLoad() {} +func (s *SocketRecord) afterLoad() {} -func (x *SocketRecord) StateLoad(m state.Source) { - m.Load(0, &x.k) - m.Load(1, &x.Sock) - m.Load(2, &x.SockVFS2) - m.Load(3, &x.ID) +func (s *SocketRecord) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.k) + stateSourceObject.Load(1, &s.Sock) + stateSourceObject.Load(2, &s.SockVFS2) + stateSourceObject.Load(3, &s.ID) } -func (x *SocketRecordVFS1) StateTypeName() string { +func (s *SocketRecordVFS1) StateTypeName() string { return "pkg/sentry/kernel.SocketRecordVFS1" } -func (x *SocketRecordVFS1) StateFields() []string { +func (s *SocketRecordVFS1) StateFields() []string { return []string{ "socketEntry", "SocketRecord", } } -func (x *SocketRecordVFS1) beforeSave() {} +func (s *SocketRecordVFS1) beforeSave() {} -func (x *SocketRecordVFS1) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.socketEntry) - m.Save(1, &x.SocketRecord) +func (s *SocketRecordVFS1) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.socketEntry) + stateSinkObject.Save(1, &s.SocketRecord) } -func (x *SocketRecordVFS1) afterLoad() {} +func (s *SocketRecordVFS1) afterLoad() {} -func (x *SocketRecordVFS1) StateLoad(m state.Source) { - m.Load(0, &x.socketEntry) - m.Load(1, &x.SocketRecord) +func (s *SocketRecordVFS1) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.socketEntry) + stateSourceObject.Load(1, &s.SocketRecord) } -func (x *pendingSignals) StateTypeName() string { +func (p *pendingSignals) StateTypeName() string { return "pkg/sentry/kernel.pendingSignals" } -func (x *pendingSignals) StateFields() []string { +func (p *pendingSignals) StateFields() []string { return []string{ "signals", } } -func (x *pendingSignals) beforeSave() {} +func (p *pendingSignals) beforeSave() {} -func (x *pendingSignals) StateSave(m state.Sink) { - x.beforeSave() - var signals []savedPendingSignal = x.saveSignals() - m.SaveValue(0, signals) +func (p *pendingSignals) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + var signalsValue []savedPendingSignal = p.saveSignals() + stateSinkObject.SaveValue(0, signalsValue) } -func (x *pendingSignals) afterLoad() {} +func (p *pendingSignals) afterLoad() {} -func (x *pendingSignals) StateLoad(m state.Source) { - m.LoadValue(0, new([]savedPendingSignal), func(y interface{}) { x.loadSignals(y.([]savedPendingSignal)) }) +func (p *pendingSignals) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new([]savedPendingSignal), func(y interface{}) { p.loadSignals(y.([]savedPendingSignal)) }) } -func (x *pendingSignalQueue) StateTypeName() string { +func (p *pendingSignalQueue) StateTypeName() string { return "pkg/sentry/kernel.pendingSignalQueue" } -func (x *pendingSignalQueue) StateFields() []string { +func (p *pendingSignalQueue) StateFields() []string { return []string{ "pendingSignalList", "length", } } -func (x *pendingSignalQueue) beforeSave() {} +func (p *pendingSignalQueue) beforeSave() {} -func (x *pendingSignalQueue) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.pendingSignalList) - m.Save(1, &x.length) +func (p *pendingSignalQueue) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.pendingSignalList) + stateSinkObject.Save(1, &p.length) } -func (x *pendingSignalQueue) afterLoad() {} +func (p *pendingSignalQueue) afterLoad() {} -func (x *pendingSignalQueue) StateLoad(m state.Source) { - m.Load(0, &x.pendingSignalList) - m.Load(1, &x.length) +func (p *pendingSignalQueue) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.pendingSignalList) + stateSourceObject.Load(1, &p.length) } -func (x *pendingSignal) StateTypeName() string { +func (p *pendingSignal) StateTypeName() string { return "pkg/sentry/kernel.pendingSignal" } -func (x *pendingSignal) StateFields() []string { +func (p *pendingSignal) StateFields() []string { return []string{ "pendingSignalEntry", "SignalInfo", @@ -518,106 +518,106 @@ func (x *pendingSignal) StateFields() []string { } } -func (x *pendingSignal) beforeSave() {} +func (p *pendingSignal) beforeSave() {} -func (x *pendingSignal) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.pendingSignalEntry) - m.Save(1, &x.SignalInfo) - m.Save(2, &x.timer) +func (p *pendingSignal) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.pendingSignalEntry) + stateSinkObject.Save(1, &p.SignalInfo) + stateSinkObject.Save(2, &p.timer) } -func (x *pendingSignal) afterLoad() {} +func (p *pendingSignal) afterLoad() {} -func (x *pendingSignal) StateLoad(m state.Source) { - m.Load(0, &x.pendingSignalEntry) - m.Load(1, &x.SignalInfo) - m.Load(2, &x.timer) +func (p *pendingSignal) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.pendingSignalEntry) + stateSourceObject.Load(1, &p.SignalInfo) + stateSourceObject.Load(2, &p.timer) } -func (x *pendingSignalList) StateTypeName() string { +func (p *pendingSignalList) StateTypeName() string { return "pkg/sentry/kernel.pendingSignalList" } -func (x *pendingSignalList) StateFields() []string { +func (p *pendingSignalList) StateFields() []string { return []string{ "head", "tail", } } -func (x *pendingSignalList) beforeSave() {} +func (p *pendingSignalList) beforeSave() {} -func (x *pendingSignalList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (p *pendingSignalList) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.head) + stateSinkObject.Save(1, &p.tail) } -func (x *pendingSignalList) afterLoad() {} +func (p *pendingSignalList) afterLoad() {} -func (x *pendingSignalList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (p *pendingSignalList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.head) + stateSourceObject.Load(1, &p.tail) } -func (x *pendingSignalEntry) StateTypeName() string { +func (p *pendingSignalEntry) StateTypeName() string { return "pkg/sentry/kernel.pendingSignalEntry" } -func (x *pendingSignalEntry) StateFields() []string { +func (p *pendingSignalEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *pendingSignalEntry) beforeSave() {} +func (p *pendingSignalEntry) beforeSave() {} -func (x *pendingSignalEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (p *pendingSignalEntry) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.next) + stateSinkObject.Save(1, &p.prev) } -func (x *pendingSignalEntry) afterLoad() {} +func (p *pendingSignalEntry) afterLoad() {} -func (x *pendingSignalEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (p *pendingSignalEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.next) + stateSourceObject.Load(1, &p.prev) } -func (x *savedPendingSignal) StateTypeName() string { +func (s *savedPendingSignal) StateTypeName() string { return "pkg/sentry/kernel.savedPendingSignal" } -func (x *savedPendingSignal) StateFields() []string { +func (s *savedPendingSignal) StateFields() []string { return []string{ "si", "timer", } } -func (x *savedPendingSignal) beforeSave() {} +func (s *savedPendingSignal) beforeSave() {} -func (x *savedPendingSignal) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.si) - m.Save(1, &x.timer) +func (s *savedPendingSignal) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.si) + stateSinkObject.Save(1, &s.timer) } -func (x *savedPendingSignal) afterLoad() {} +func (s *savedPendingSignal) afterLoad() {} -func (x *savedPendingSignal) StateLoad(m state.Source) { - m.Load(0, &x.si) - m.Load(1, &x.timer) +func (s *savedPendingSignal) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.si) + stateSourceObject.Load(1, &s.timer) } -func (x *IntervalTimer) StateTypeName() string { +func (i *IntervalTimer) StateTypeName() string { return "pkg/sentry/kernel.IntervalTimer" } -func (x *IntervalTimer) StateFields() []string { +func (i *IntervalTimer) StateFields() []string { return []string{ "timer", "target", @@ -632,117 +632,117 @@ func (x *IntervalTimer) StateFields() []string { } } -func (x *IntervalTimer) beforeSave() {} +func (i *IntervalTimer) beforeSave() {} -func (x *IntervalTimer) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.timer) - m.Save(1, &x.target) - m.Save(2, &x.signo) - m.Save(3, &x.id) - m.Save(4, &x.sigval) - m.Save(5, &x.group) - m.Save(6, &x.sigpending) - m.Save(7, &x.sigorphan) - m.Save(8, &x.overrunCur) - m.Save(9, &x.overrunLast) +func (i *IntervalTimer) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.timer) + stateSinkObject.Save(1, &i.target) + stateSinkObject.Save(2, &i.signo) + stateSinkObject.Save(3, &i.id) + stateSinkObject.Save(4, &i.sigval) + stateSinkObject.Save(5, &i.group) + stateSinkObject.Save(6, &i.sigpending) + stateSinkObject.Save(7, &i.sigorphan) + stateSinkObject.Save(8, &i.overrunCur) + stateSinkObject.Save(9, &i.overrunLast) } -func (x *IntervalTimer) afterLoad() {} +func (i *IntervalTimer) afterLoad() {} -func (x *IntervalTimer) StateLoad(m state.Source) { - m.Load(0, &x.timer) - m.Load(1, &x.target) - m.Load(2, &x.signo) - m.Load(3, &x.id) - m.Load(4, &x.sigval) - m.Load(5, &x.group) - m.Load(6, &x.sigpending) - m.Load(7, &x.sigorphan) - m.Load(8, &x.overrunCur) - m.Load(9, &x.overrunLast) +func (i *IntervalTimer) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.timer) + stateSourceObject.Load(1, &i.target) + stateSourceObject.Load(2, &i.signo) + stateSourceObject.Load(3, &i.id) + stateSourceObject.Load(4, &i.sigval) + stateSourceObject.Load(5, &i.group) + stateSourceObject.Load(6, &i.sigpending) + stateSourceObject.Load(7, &i.sigorphan) + stateSourceObject.Load(8, &i.overrunCur) + stateSourceObject.Load(9, &i.overrunLast) } -func (x *processGroupList) StateTypeName() string { +func (p *processGroupList) StateTypeName() string { return "pkg/sentry/kernel.processGroupList" } -func (x *processGroupList) StateFields() []string { +func (p *processGroupList) StateFields() []string { return []string{ "head", "tail", } } -func (x *processGroupList) beforeSave() {} +func (p *processGroupList) beforeSave() {} -func (x *processGroupList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (p *processGroupList) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.head) + stateSinkObject.Save(1, &p.tail) } -func (x *processGroupList) afterLoad() {} +func (p *processGroupList) afterLoad() {} -func (x *processGroupList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (p *processGroupList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.head) + stateSourceObject.Load(1, &p.tail) } -func (x *processGroupEntry) StateTypeName() string { +func (p *processGroupEntry) StateTypeName() string { return "pkg/sentry/kernel.processGroupEntry" } -func (x *processGroupEntry) StateFields() []string { +func (p *processGroupEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *processGroupEntry) beforeSave() {} +func (p *processGroupEntry) beforeSave() {} -func (x *processGroupEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (p *processGroupEntry) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.next) + stateSinkObject.Save(1, &p.prev) } -func (x *processGroupEntry) afterLoad() {} +func (p *processGroupEntry) afterLoad() {} -func (x *processGroupEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (p *processGroupEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.next) + stateSourceObject.Load(1, &p.prev) } -func (x *ProcessGroupRefs) StateTypeName() string { +func (p *ProcessGroupRefs) StateTypeName() string { return "pkg/sentry/kernel.ProcessGroupRefs" } -func (x *ProcessGroupRefs) StateFields() []string { +func (p *ProcessGroupRefs) StateFields() []string { return []string{ "refCount", } } -func (x *ProcessGroupRefs) beforeSave() {} +func (p *ProcessGroupRefs) beforeSave() {} -func (x *ProcessGroupRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (p *ProcessGroupRefs) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.refCount) } -func (x *ProcessGroupRefs) afterLoad() {} +func (p *ProcessGroupRefs) afterLoad() {} -func (x *ProcessGroupRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (p *ProcessGroupRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.refCount) } -func (x *ptraceOptions) StateTypeName() string { +func (p *ptraceOptions) StateTypeName() string { return "pkg/sentry/kernel.ptraceOptions" } -func (x *ptraceOptions) StateFields() []string { +func (p *ptraceOptions) StateFields() []string { return []string{ "ExitKill", "SysGood", @@ -756,167 +756,167 @@ func (x *ptraceOptions) StateFields() []string { } } -func (x *ptraceOptions) beforeSave() {} +func (p *ptraceOptions) beforeSave() {} -func (x *ptraceOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ExitKill) - m.Save(1, &x.SysGood) - m.Save(2, &x.TraceClone) - m.Save(3, &x.TraceExec) - m.Save(4, &x.TraceExit) - m.Save(5, &x.TraceFork) - m.Save(6, &x.TraceSeccomp) - m.Save(7, &x.TraceVfork) - m.Save(8, &x.TraceVforkDone) +func (p *ptraceOptions) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.ExitKill) + stateSinkObject.Save(1, &p.SysGood) + stateSinkObject.Save(2, &p.TraceClone) + stateSinkObject.Save(3, &p.TraceExec) + stateSinkObject.Save(4, &p.TraceExit) + stateSinkObject.Save(5, &p.TraceFork) + stateSinkObject.Save(6, &p.TraceSeccomp) + stateSinkObject.Save(7, &p.TraceVfork) + stateSinkObject.Save(8, &p.TraceVforkDone) } -func (x *ptraceOptions) afterLoad() {} +func (p *ptraceOptions) afterLoad() {} -func (x *ptraceOptions) StateLoad(m state.Source) { - m.Load(0, &x.ExitKill) - m.Load(1, &x.SysGood) - m.Load(2, &x.TraceClone) - m.Load(3, &x.TraceExec) - m.Load(4, &x.TraceExit) - m.Load(5, &x.TraceFork) - m.Load(6, &x.TraceSeccomp) - m.Load(7, &x.TraceVfork) - m.Load(8, &x.TraceVforkDone) +func (p *ptraceOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.ExitKill) + stateSourceObject.Load(1, &p.SysGood) + stateSourceObject.Load(2, &p.TraceClone) + stateSourceObject.Load(3, &p.TraceExec) + stateSourceObject.Load(4, &p.TraceExit) + stateSourceObject.Load(5, &p.TraceFork) + stateSourceObject.Load(6, &p.TraceSeccomp) + stateSourceObject.Load(7, &p.TraceVfork) + stateSourceObject.Load(8, &p.TraceVforkDone) } -func (x *ptraceStop) StateTypeName() string { +func (p *ptraceStop) StateTypeName() string { return "pkg/sentry/kernel.ptraceStop" } -func (x *ptraceStop) StateFields() []string { +func (p *ptraceStop) StateFields() []string { return []string{ "frozen", "listen", } } -func (x *ptraceStop) beforeSave() {} +func (p *ptraceStop) beforeSave() {} -func (x *ptraceStop) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.frozen) - m.Save(1, &x.listen) +func (p *ptraceStop) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.frozen) + stateSinkObject.Save(1, &p.listen) } -func (x *ptraceStop) afterLoad() {} +func (p *ptraceStop) afterLoad() {} -func (x *ptraceStop) StateLoad(m state.Source) { - m.Load(0, &x.frozen) - m.Load(1, &x.listen) +func (p *ptraceStop) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.frozen) + stateSourceObject.Load(1, &p.listen) } -func (x *OldRSeqCriticalRegion) StateTypeName() string { +func (o *OldRSeqCriticalRegion) StateTypeName() string { return "pkg/sentry/kernel.OldRSeqCriticalRegion" } -func (x *OldRSeqCriticalRegion) StateFields() []string { +func (o *OldRSeqCriticalRegion) StateFields() []string { return []string{ "CriticalSection", "Restart", } } -func (x *OldRSeqCriticalRegion) beforeSave() {} +func (o *OldRSeqCriticalRegion) beforeSave() {} -func (x *OldRSeqCriticalRegion) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.CriticalSection) - m.Save(1, &x.Restart) +func (o *OldRSeqCriticalRegion) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.CriticalSection) + stateSinkObject.Save(1, &o.Restart) } -func (x *OldRSeqCriticalRegion) afterLoad() {} +func (o *OldRSeqCriticalRegion) afterLoad() {} -func (x *OldRSeqCriticalRegion) StateLoad(m state.Source) { - m.Load(0, &x.CriticalSection) - m.Load(1, &x.Restart) +func (o *OldRSeqCriticalRegion) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.CriticalSection) + stateSourceObject.Load(1, &o.Restart) } -func (x *sessionList) StateTypeName() string { +func (s *sessionList) StateTypeName() string { return "pkg/sentry/kernel.sessionList" } -func (x *sessionList) StateFields() []string { +func (s *sessionList) StateFields() []string { return []string{ "head", "tail", } } -func (x *sessionList) beforeSave() {} +func (s *sessionList) beforeSave() {} -func (x *sessionList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (s *sessionList) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.head) + stateSinkObject.Save(1, &s.tail) } -func (x *sessionList) afterLoad() {} +func (s *sessionList) afterLoad() {} -func (x *sessionList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (s *sessionList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.head) + stateSourceObject.Load(1, &s.tail) } -func (x *sessionEntry) StateTypeName() string { +func (s *sessionEntry) StateTypeName() string { return "pkg/sentry/kernel.sessionEntry" } -func (x *sessionEntry) StateFields() []string { +func (s *sessionEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *sessionEntry) beforeSave() {} +func (s *sessionEntry) beforeSave() {} -func (x *sessionEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (s *sessionEntry) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.next) + stateSinkObject.Save(1, &s.prev) } -func (x *sessionEntry) afterLoad() {} +func (s *sessionEntry) afterLoad() {} -func (x *sessionEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (s *sessionEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.next) + stateSourceObject.Load(1, &s.prev) } -func (x *SessionRefs) StateTypeName() string { +func (s *SessionRefs) StateTypeName() string { return "pkg/sentry/kernel.SessionRefs" } -func (x *SessionRefs) StateFields() []string { +func (s *SessionRefs) StateFields() []string { return []string{ "refCount", } } -func (x *SessionRefs) beforeSave() {} +func (s *SessionRefs) beforeSave() {} -func (x *SessionRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (s *SessionRefs) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.refCount) } -func (x *SessionRefs) afterLoad() {} +func (s *SessionRefs) afterLoad() {} -func (x *SessionRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (s *SessionRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.refCount) } -func (x *Session) StateTypeName() string { +func (s *Session) StateTypeName() string { return "pkg/sentry/kernel.Session" } -func (x *Session) StateFields() []string { +func (s *Session) StateFields() []string { return []string{ "SessionRefs", "leader", @@ -927,34 +927,34 @@ func (x *Session) StateFields() []string { } } -func (x *Session) beforeSave() {} +func (s *Session) beforeSave() {} -func (x *Session) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SessionRefs) - m.Save(1, &x.leader) - m.Save(2, &x.id) - m.Save(3, &x.foreground) - m.Save(4, &x.processGroups) - m.Save(5, &x.sessionEntry) +func (s *Session) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.SessionRefs) + stateSinkObject.Save(1, &s.leader) + stateSinkObject.Save(2, &s.id) + stateSinkObject.Save(3, &s.foreground) + stateSinkObject.Save(4, &s.processGroups) + stateSinkObject.Save(5, &s.sessionEntry) } -func (x *Session) afterLoad() {} +func (s *Session) afterLoad() {} -func (x *Session) StateLoad(m state.Source) { - m.Load(0, &x.SessionRefs) - m.Load(1, &x.leader) - m.Load(2, &x.id) - m.Load(3, &x.foreground) - m.Load(4, &x.processGroups) - m.Load(5, &x.sessionEntry) +func (s *Session) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.SessionRefs) + stateSourceObject.Load(1, &s.leader) + stateSourceObject.Load(2, &s.id) + stateSourceObject.Load(3, &s.foreground) + stateSourceObject.Load(4, &s.processGroups) + stateSourceObject.Load(5, &s.sessionEntry) } -func (x *ProcessGroup) StateTypeName() string { +func (p *ProcessGroup) StateTypeName() string { return "pkg/sentry/kernel.ProcessGroup" } -func (x *ProcessGroup) StateFields() []string { +func (p *ProcessGroup) StateFields() []string { return []string{ "refs", "originator", @@ -965,158 +965,158 @@ func (x *ProcessGroup) StateFields() []string { } } -func (x *ProcessGroup) beforeSave() {} +func (p *ProcessGroup) beforeSave() {} -func (x *ProcessGroup) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refs) - m.Save(1, &x.originator) - m.Save(2, &x.id) - m.Save(3, &x.session) - m.Save(4, &x.ancestors) - m.Save(5, &x.processGroupEntry) +func (p *ProcessGroup) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.refs) + stateSinkObject.Save(1, &p.originator) + stateSinkObject.Save(2, &p.id) + stateSinkObject.Save(3, &p.session) + stateSinkObject.Save(4, &p.ancestors) + stateSinkObject.Save(5, &p.processGroupEntry) } -func (x *ProcessGroup) afterLoad() {} +func (p *ProcessGroup) afterLoad() {} -func (x *ProcessGroup) StateLoad(m state.Source) { - m.Load(0, &x.refs) - m.Load(1, &x.originator) - m.Load(2, &x.id) - m.Load(3, &x.session) - m.Load(4, &x.ancestors) - m.Load(5, &x.processGroupEntry) +func (p *ProcessGroup) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.refs) + stateSourceObject.Load(1, &p.originator) + stateSourceObject.Load(2, &p.id) + stateSourceObject.Load(3, &p.session) + stateSourceObject.Load(4, &p.ancestors) + stateSourceObject.Load(5, &p.processGroupEntry) } -func (x *SignalHandlers) StateTypeName() string { +func (s *SignalHandlers) StateTypeName() string { return "pkg/sentry/kernel.SignalHandlers" } -func (x *SignalHandlers) StateFields() []string { +func (s *SignalHandlers) StateFields() []string { return []string{ "actions", } } -func (x *SignalHandlers) beforeSave() {} +func (s *SignalHandlers) beforeSave() {} -func (x *SignalHandlers) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.actions) +func (s *SignalHandlers) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.actions) } -func (x *SignalHandlers) afterLoad() {} +func (s *SignalHandlers) afterLoad() {} -func (x *SignalHandlers) StateLoad(m state.Source) { - m.Load(0, &x.actions) +func (s *SignalHandlers) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.actions) } -func (x *socketList) StateTypeName() string { +func (s *socketList) StateTypeName() string { return "pkg/sentry/kernel.socketList" } -func (x *socketList) StateFields() []string { +func (s *socketList) StateFields() []string { return []string{ "head", "tail", } } -func (x *socketList) beforeSave() {} +func (s *socketList) beforeSave() {} -func (x *socketList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (s *socketList) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.head) + stateSinkObject.Save(1, &s.tail) } -func (x *socketList) afterLoad() {} +func (s *socketList) afterLoad() {} -func (x *socketList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (s *socketList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.head) + stateSourceObject.Load(1, &s.tail) } -func (x *socketEntry) StateTypeName() string { +func (s *socketEntry) StateTypeName() string { return "pkg/sentry/kernel.socketEntry" } -func (x *socketEntry) StateFields() []string { +func (s *socketEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *socketEntry) beforeSave() {} +func (s *socketEntry) beforeSave() {} -func (x *socketEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (s *socketEntry) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.next) + stateSinkObject.Save(1, &s.prev) } -func (x *socketEntry) afterLoad() {} +func (s *socketEntry) afterLoad() {} -func (x *socketEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (s *socketEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.next) + stateSourceObject.Load(1, &s.prev) } -func (x *syscallTableInfo) StateTypeName() string { +func (s *syscallTableInfo) StateTypeName() string { return "pkg/sentry/kernel.syscallTableInfo" } -func (x *syscallTableInfo) StateFields() []string { +func (s *syscallTableInfo) StateFields() []string { return []string{ "OS", "Arch", } } -func (x *syscallTableInfo) beforeSave() {} +func (s *syscallTableInfo) beforeSave() {} -func (x *syscallTableInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.OS) - m.Save(1, &x.Arch) +func (s *syscallTableInfo) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.OS) + stateSinkObject.Save(1, &s.Arch) } -func (x *syscallTableInfo) afterLoad() {} +func (s *syscallTableInfo) afterLoad() {} -func (x *syscallTableInfo) StateLoad(m state.Source) { - m.Load(0, &x.OS) - m.Load(1, &x.Arch) +func (s *syscallTableInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.OS) + stateSourceObject.Load(1, &s.Arch) } -func (x *syslog) StateTypeName() string { +func (s *syslog) StateTypeName() string { return "pkg/sentry/kernel.syslog" } -func (x *syslog) StateFields() []string { +func (s *syslog) StateFields() []string { return []string{ "msg", } } -func (x *syslog) beforeSave() {} +func (s *syslog) beforeSave() {} -func (x *syslog) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.msg) +func (s *syslog) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.msg) } -func (x *syslog) afterLoad() {} +func (s *syslog) afterLoad() {} -func (x *syslog) StateLoad(m state.Source) { - m.Load(0, &x.msg) +func (s *syslog) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.msg) } -func (x *Task) StateTypeName() string { +func (t *Task) StateTypeName() string { return "pkg/sentry/kernel.Task" } -func (x *Task) StateFields() []string { +func (t *Task) StateFields() []string { return []string{ "taskNode", "runState", @@ -1183,218 +1183,218 @@ func (x *Task) StateFields() []string { } } -func (x *Task) beforeSave() {} +func (t *Task) beforeSave() {} -func (x *Task) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.signalQueue) { - state.Failf("signalQueue is %#v, expected zero", &x.signalQueue) +func (t *Task) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + if !state.IsZeroValue(&t.signalQueue) { + state.Failf("signalQueue is %#v, expected zero", &t.signalQueue) } - var ptraceTracer *Task = x.savePtraceTracer() - m.SaveValue(31, ptraceTracer) - var syscallFilters []bpf.Program = x.saveSyscallFilters() - m.SaveValue(47, syscallFilters) - m.Save(0, &x.taskNode) - m.Save(1, &x.runState) - m.Save(2, &x.taskWorkCount) - m.Save(3, &x.taskWork) - m.Save(4, &x.haveSyscallReturn) - m.Save(5, &x.gosched) - m.Save(6, &x.yieldCount) - m.Save(7, &x.pendingSignals) - m.Save(8, &x.signalMask) - m.Save(9, &x.realSignalMask) - m.Save(10, &x.haveSavedSignalMask) - m.Save(11, &x.savedSignalMask) - m.Save(12, &x.signalStack) - m.Save(13, &x.groupStopPending) - m.Save(14, &x.groupStopAcknowledged) - m.Save(15, &x.trapStopPending) - m.Save(16, &x.trapNotifyPending) - m.Save(17, &x.stop) - m.Save(18, &x.exitStatus) - m.Save(19, &x.syscallRestartBlock) - m.Save(20, &x.k) - m.Save(21, &x.containerID) - m.Save(22, &x.tc) - m.Save(23, &x.fsContext) - m.Save(24, &x.fdTable) - m.Save(25, &x.vforkParent) - m.Save(26, &x.exitState) - m.Save(27, &x.exitTracerNotified) - m.Save(28, &x.exitTracerAcked) - m.Save(29, &x.exitParentNotified) - m.Save(30, &x.exitParentAcked) - m.Save(32, &x.ptraceTracees) - m.Save(33, &x.ptraceSeized) - m.Save(34, &x.ptraceOpts) - m.Save(35, &x.ptraceSyscallMode) - m.Save(36, &x.ptraceSinglestep) - m.Save(37, &x.ptraceCode) - m.Save(38, &x.ptraceSiginfo) - m.Save(39, &x.ptraceEventMsg) - m.Save(40, &x.ioUsage) - m.Save(41, &x.creds) - m.Save(42, &x.utsns) - m.Save(43, &x.ipcns) - m.Save(44, &x.abstractSockets) - m.Save(45, &x.mountNamespaceVFS2) - m.Save(46, &x.parentDeathSignal) - m.Save(48, &x.cleartid) - m.Save(49, &x.allowedCPUMask) - m.Save(50, &x.cpu) - m.Save(51, &x.niceness) - m.Save(52, &x.numaPolicy) - m.Save(53, &x.numaNodeMask) - m.Save(54, &x.netns) - m.Save(55, &x.rseqCPU) - m.Save(56, &x.oldRSeqCPUAddr) - m.Save(57, &x.rseqAddr) - m.Save(58, &x.rseqSignature) - m.Save(59, &x.robustList) - m.Save(60, &x.startTime) - m.Save(61, &x.kcov) -} - -func (x *Task) StateLoad(m state.Source) { - m.Load(0, &x.taskNode) - m.Load(1, &x.runState) - m.Load(2, &x.taskWorkCount) - m.Load(3, &x.taskWork) - m.Load(4, &x.haveSyscallReturn) - m.Load(5, &x.gosched) - m.Load(6, &x.yieldCount) - m.Load(7, &x.pendingSignals) - m.Load(8, &x.signalMask) - m.Load(9, &x.realSignalMask) - m.Load(10, &x.haveSavedSignalMask) - m.Load(11, &x.savedSignalMask) - m.Load(12, &x.signalStack) - m.Load(13, &x.groupStopPending) - m.Load(14, &x.groupStopAcknowledged) - m.Load(15, &x.trapStopPending) - m.Load(16, &x.trapNotifyPending) - m.Load(17, &x.stop) - m.Load(18, &x.exitStatus) - m.Load(19, &x.syscallRestartBlock) - m.Load(20, &x.k) - m.Load(21, &x.containerID) - m.Load(22, &x.tc) - m.Load(23, &x.fsContext) - m.Load(24, &x.fdTable) - m.Load(25, &x.vforkParent) - m.Load(26, &x.exitState) - m.Load(27, &x.exitTracerNotified) - m.Load(28, &x.exitTracerAcked) - m.Load(29, &x.exitParentNotified) - m.Load(30, &x.exitParentAcked) - m.Load(32, &x.ptraceTracees) - m.Load(33, &x.ptraceSeized) - m.Load(34, &x.ptraceOpts) - m.Load(35, &x.ptraceSyscallMode) - m.Load(36, &x.ptraceSinglestep) - m.Load(37, &x.ptraceCode) - m.Load(38, &x.ptraceSiginfo) - m.Load(39, &x.ptraceEventMsg) - m.Load(40, &x.ioUsage) - m.Load(41, &x.creds) - m.Load(42, &x.utsns) - m.Load(43, &x.ipcns) - m.Load(44, &x.abstractSockets) - m.Load(45, &x.mountNamespaceVFS2) - m.Load(46, &x.parentDeathSignal) - m.Load(48, &x.cleartid) - m.Load(49, &x.allowedCPUMask) - m.Load(50, &x.cpu) - m.Load(51, &x.niceness) - m.Load(52, &x.numaPolicy) - m.Load(53, &x.numaNodeMask) - m.Load(54, &x.netns) - m.Load(55, &x.rseqCPU) - m.Load(56, &x.oldRSeqCPUAddr) - m.Load(57, &x.rseqAddr) - m.Load(58, &x.rseqSignature) - m.Load(59, &x.robustList) - m.Load(60, &x.startTime) - m.Load(61, &x.kcov) - m.LoadValue(31, new(*Task), func(y interface{}) { x.loadPtraceTracer(y.(*Task)) }) - m.LoadValue(47, new([]bpf.Program), func(y interface{}) { x.loadSyscallFilters(y.([]bpf.Program)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *runSyscallAfterPtraceEventClone) StateTypeName() string { + var ptraceTracerValue *Task = t.savePtraceTracer() + stateSinkObject.SaveValue(31, ptraceTracerValue) + var syscallFiltersValue []bpf.Program = t.saveSyscallFilters() + stateSinkObject.SaveValue(47, syscallFiltersValue) + stateSinkObject.Save(0, &t.taskNode) + stateSinkObject.Save(1, &t.runState) + stateSinkObject.Save(2, &t.taskWorkCount) + stateSinkObject.Save(3, &t.taskWork) + stateSinkObject.Save(4, &t.haveSyscallReturn) + stateSinkObject.Save(5, &t.gosched) + stateSinkObject.Save(6, &t.yieldCount) + stateSinkObject.Save(7, &t.pendingSignals) + stateSinkObject.Save(8, &t.signalMask) + stateSinkObject.Save(9, &t.realSignalMask) + stateSinkObject.Save(10, &t.haveSavedSignalMask) + stateSinkObject.Save(11, &t.savedSignalMask) + stateSinkObject.Save(12, &t.signalStack) + stateSinkObject.Save(13, &t.groupStopPending) + stateSinkObject.Save(14, &t.groupStopAcknowledged) + stateSinkObject.Save(15, &t.trapStopPending) + stateSinkObject.Save(16, &t.trapNotifyPending) + stateSinkObject.Save(17, &t.stop) + stateSinkObject.Save(18, &t.exitStatus) + stateSinkObject.Save(19, &t.syscallRestartBlock) + stateSinkObject.Save(20, &t.k) + stateSinkObject.Save(21, &t.containerID) + stateSinkObject.Save(22, &t.tc) + stateSinkObject.Save(23, &t.fsContext) + stateSinkObject.Save(24, &t.fdTable) + stateSinkObject.Save(25, &t.vforkParent) + stateSinkObject.Save(26, &t.exitState) + stateSinkObject.Save(27, &t.exitTracerNotified) + stateSinkObject.Save(28, &t.exitTracerAcked) + stateSinkObject.Save(29, &t.exitParentNotified) + stateSinkObject.Save(30, &t.exitParentAcked) + stateSinkObject.Save(32, &t.ptraceTracees) + stateSinkObject.Save(33, &t.ptraceSeized) + stateSinkObject.Save(34, &t.ptraceOpts) + stateSinkObject.Save(35, &t.ptraceSyscallMode) + stateSinkObject.Save(36, &t.ptraceSinglestep) + stateSinkObject.Save(37, &t.ptraceCode) + stateSinkObject.Save(38, &t.ptraceSiginfo) + stateSinkObject.Save(39, &t.ptraceEventMsg) + stateSinkObject.Save(40, &t.ioUsage) + stateSinkObject.Save(41, &t.creds) + stateSinkObject.Save(42, &t.utsns) + stateSinkObject.Save(43, &t.ipcns) + stateSinkObject.Save(44, &t.abstractSockets) + stateSinkObject.Save(45, &t.mountNamespaceVFS2) + stateSinkObject.Save(46, &t.parentDeathSignal) + stateSinkObject.Save(48, &t.cleartid) + stateSinkObject.Save(49, &t.allowedCPUMask) + stateSinkObject.Save(50, &t.cpu) + stateSinkObject.Save(51, &t.niceness) + stateSinkObject.Save(52, &t.numaPolicy) + stateSinkObject.Save(53, &t.numaNodeMask) + stateSinkObject.Save(54, &t.netns) + stateSinkObject.Save(55, &t.rseqCPU) + stateSinkObject.Save(56, &t.oldRSeqCPUAddr) + stateSinkObject.Save(57, &t.rseqAddr) + stateSinkObject.Save(58, &t.rseqSignature) + stateSinkObject.Save(59, &t.robustList) + stateSinkObject.Save(60, &t.startTime) + stateSinkObject.Save(61, &t.kcov) +} + +func (t *Task) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.taskNode) + stateSourceObject.Load(1, &t.runState) + stateSourceObject.Load(2, &t.taskWorkCount) + stateSourceObject.Load(3, &t.taskWork) + stateSourceObject.Load(4, &t.haveSyscallReturn) + stateSourceObject.Load(5, &t.gosched) + stateSourceObject.Load(6, &t.yieldCount) + stateSourceObject.Load(7, &t.pendingSignals) + stateSourceObject.Load(8, &t.signalMask) + stateSourceObject.Load(9, &t.realSignalMask) + stateSourceObject.Load(10, &t.haveSavedSignalMask) + stateSourceObject.Load(11, &t.savedSignalMask) + stateSourceObject.Load(12, &t.signalStack) + stateSourceObject.Load(13, &t.groupStopPending) + stateSourceObject.Load(14, &t.groupStopAcknowledged) + stateSourceObject.Load(15, &t.trapStopPending) + stateSourceObject.Load(16, &t.trapNotifyPending) + stateSourceObject.Load(17, &t.stop) + stateSourceObject.Load(18, &t.exitStatus) + stateSourceObject.Load(19, &t.syscallRestartBlock) + stateSourceObject.Load(20, &t.k) + stateSourceObject.Load(21, &t.containerID) + stateSourceObject.Load(22, &t.tc) + stateSourceObject.Load(23, &t.fsContext) + stateSourceObject.Load(24, &t.fdTable) + stateSourceObject.Load(25, &t.vforkParent) + stateSourceObject.Load(26, &t.exitState) + stateSourceObject.Load(27, &t.exitTracerNotified) + stateSourceObject.Load(28, &t.exitTracerAcked) + stateSourceObject.Load(29, &t.exitParentNotified) + stateSourceObject.Load(30, &t.exitParentAcked) + stateSourceObject.Load(32, &t.ptraceTracees) + stateSourceObject.Load(33, &t.ptraceSeized) + stateSourceObject.Load(34, &t.ptraceOpts) + stateSourceObject.Load(35, &t.ptraceSyscallMode) + stateSourceObject.Load(36, &t.ptraceSinglestep) + stateSourceObject.Load(37, &t.ptraceCode) + stateSourceObject.Load(38, &t.ptraceSiginfo) + stateSourceObject.Load(39, &t.ptraceEventMsg) + stateSourceObject.Load(40, &t.ioUsage) + stateSourceObject.Load(41, &t.creds) + stateSourceObject.Load(42, &t.utsns) + stateSourceObject.Load(43, &t.ipcns) + stateSourceObject.Load(44, &t.abstractSockets) + stateSourceObject.Load(45, &t.mountNamespaceVFS2) + stateSourceObject.Load(46, &t.parentDeathSignal) + stateSourceObject.Load(48, &t.cleartid) + stateSourceObject.Load(49, &t.allowedCPUMask) + stateSourceObject.Load(50, &t.cpu) + stateSourceObject.Load(51, &t.niceness) + stateSourceObject.Load(52, &t.numaPolicy) + stateSourceObject.Load(53, &t.numaNodeMask) + stateSourceObject.Load(54, &t.netns) + stateSourceObject.Load(55, &t.rseqCPU) + stateSourceObject.Load(56, &t.oldRSeqCPUAddr) + stateSourceObject.Load(57, &t.rseqAddr) + stateSourceObject.Load(58, &t.rseqSignature) + stateSourceObject.Load(59, &t.robustList) + stateSourceObject.Load(60, &t.startTime) + stateSourceObject.Load(61, &t.kcov) + stateSourceObject.LoadValue(31, new(*Task), func(y interface{}) { t.loadPtraceTracer(y.(*Task)) }) + stateSourceObject.LoadValue(47, new([]bpf.Program), func(y interface{}) { t.loadSyscallFilters(y.([]bpf.Program)) }) + stateSourceObject.AfterLoad(t.afterLoad) +} + +func (r *runSyscallAfterPtraceEventClone) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterPtraceEventClone" } -func (x *runSyscallAfterPtraceEventClone) StateFields() []string { +func (r *runSyscallAfterPtraceEventClone) StateFields() []string { return []string{ "vforkChild", "vforkChildTID", } } -func (x *runSyscallAfterPtraceEventClone) beforeSave() {} +func (r *runSyscallAfterPtraceEventClone) beforeSave() {} -func (x *runSyscallAfterPtraceEventClone) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vforkChild) - m.Save(1, &x.vforkChildTID) +func (r *runSyscallAfterPtraceEventClone) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.vforkChild) + stateSinkObject.Save(1, &r.vforkChildTID) } -func (x *runSyscallAfterPtraceEventClone) afterLoad() {} +func (r *runSyscallAfterPtraceEventClone) afterLoad() {} -func (x *runSyscallAfterPtraceEventClone) StateLoad(m state.Source) { - m.Load(0, &x.vforkChild) - m.Load(1, &x.vforkChildTID) +func (r *runSyscallAfterPtraceEventClone) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.vforkChild) + stateSourceObject.Load(1, &r.vforkChildTID) } -func (x *runSyscallAfterVforkStop) StateTypeName() string { +func (r *runSyscallAfterVforkStop) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterVforkStop" } -func (x *runSyscallAfterVforkStop) StateFields() []string { +func (r *runSyscallAfterVforkStop) StateFields() []string { return []string{ "childTID", } } -func (x *runSyscallAfterVforkStop) beforeSave() {} +func (r *runSyscallAfterVforkStop) beforeSave() {} -func (x *runSyscallAfterVforkStop) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.childTID) +func (r *runSyscallAfterVforkStop) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.childTID) } -func (x *runSyscallAfterVforkStop) afterLoad() {} +func (r *runSyscallAfterVforkStop) afterLoad() {} -func (x *runSyscallAfterVforkStop) StateLoad(m state.Source) { - m.Load(0, &x.childTID) +func (r *runSyscallAfterVforkStop) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.childTID) } -func (x *vforkStop) StateTypeName() string { +func (v *vforkStop) StateTypeName() string { return "pkg/sentry/kernel.vforkStop" } -func (x *vforkStop) StateFields() []string { +func (v *vforkStop) StateFields() []string { return []string{} } -func (x *vforkStop) beforeSave() {} +func (v *vforkStop) beforeSave() {} -func (x *vforkStop) StateSave(m state.Sink) { - x.beforeSave() +func (v *vforkStop) StateSave(stateSinkObject state.Sink) { + v.beforeSave() } -func (x *vforkStop) afterLoad() {} +func (v *vforkStop) afterLoad() {} -func (x *vforkStop) StateLoad(m state.Source) { +func (v *vforkStop) StateLoad(stateSourceObject state.Source) { } -func (x *TaskContext) StateTypeName() string { +func (t *TaskContext) StateTypeName() string { return "pkg/sentry/kernel.TaskContext" } -func (x *TaskContext) StateFields() []string { +func (t *TaskContext) StateFields() []string { return []string{ "Name", "Arch", @@ -1404,229 +1404,229 @@ func (x *TaskContext) StateFields() []string { } } -func (x *TaskContext) beforeSave() {} +func (t *TaskContext) beforeSave() {} -func (x *TaskContext) StateSave(m state.Sink) { - x.beforeSave() - var st syscallTableInfo = x.saveSt() - m.SaveValue(4, st) - m.Save(0, &x.Name) - m.Save(1, &x.Arch) - m.Save(2, &x.MemoryManager) - m.Save(3, &x.fu) +func (t *TaskContext) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + var stValue syscallTableInfo = t.saveSt() + stateSinkObject.SaveValue(4, stValue) + stateSinkObject.Save(0, &t.Name) + stateSinkObject.Save(1, &t.Arch) + stateSinkObject.Save(2, &t.MemoryManager) + stateSinkObject.Save(3, &t.fu) } -func (x *TaskContext) afterLoad() {} +func (t *TaskContext) afterLoad() {} -func (x *TaskContext) StateLoad(m state.Source) { - m.Load(0, &x.Name) - m.Load(1, &x.Arch) - m.Load(2, &x.MemoryManager) - m.Load(3, &x.fu) - m.LoadValue(4, new(syscallTableInfo), func(y interface{}) { x.loadSt(y.(syscallTableInfo)) }) +func (t *TaskContext) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Name) + stateSourceObject.Load(1, &t.Arch) + stateSourceObject.Load(2, &t.MemoryManager) + stateSourceObject.Load(3, &t.fu) + stateSourceObject.LoadValue(4, new(syscallTableInfo), func(y interface{}) { t.loadSt(y.(syscallTableInfo)) }) } -func (x *execStop) StateTypeName() string { +func (e *execStop) StateTypeName() string { return "pkg/sentry/kernel.execStop" } -func (x *execStop) StateFields() []string { +func (e *execStop) StateFields() []string { return []string{} } -func (x *execStop) beforeSave() {} +func (e *execStop) beforeSave() {} -func (x *execStop) StateSave(m state.Sink) { - x.beforeSave() +func (e *execStop) StateSave(stateSinkObject state.Sink) { + e.beforeSave() } -func (x *execStop) afterLoad() {} +func (e *execStop) afterLoad() {} -func (x *execStop) StateLoad(m state.Source) { +func (e *execStop) StateLoad(stateSourceObject state.Source) { } -func (x *runSyscallAfterExecStop) StateTypeName() string { +func (r *runSyscallAfterExecStop) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterExecStop" } -func (x *runSyscallAfterExecStop) StateFields() []string { +func (r *runSyscallAfterExecStop) StateFields() []string { return []string{ "tc", } } -func (x *runSyscallAfterExecStop) beforeSave() {} +func (r *runSyscallAfterExecStop) beforeSave() {} -func (x *runSyscallAfterExecStop) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tc) +func (r *runSyscallAfterExecStop) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.tc) } -func (x *runSyscallAfterExecStop) afterLoad() {} +func (r *runSyscallAfterExecStop) afterLoad() {} -func (x *runSyscallAfterExecStop) StateLoad(m state.Source) { - m.Load(0, &x.tc) +func (r *runSyscallAfterExecStop) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.tc) } -func (x *ExitStatus) StateTypeName() string { +func (e *ExitStatus) StateTypeName() string { return "pkg/sentry/kernel.ExitStatus" } -func (x *ExitStatus) StateFields() []string { +func (e *ExitStatus) StateFields() []string { return []string{ "Code", "Signo", } } -func (x *ExitStatus) beforeSave() {} +func (e *ExitStatus) beforeSave() {} -func (x *ExitStatus) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Code) - m.Save(1, &x.Signo) +func (e *ExitStatus) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.Code) + stateSinkObject.Save(1, &e.Signo) } -func (x *ExitStatus) afterLoad() {} +func (e *ExitStatus) afterLoad() {} -func (x *ExitStatus) StateLoad(m state.Source) { - m.Load(0, &x.Code) - m.Load(1, &x.Signo) +func (e *ExitStatus) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.Code) + stateSourceObject.Load(1, &e.Signo) } -func (x *runExit) StateTypeName() string { +func (r *runExit) StateTypeName() string { return "pkg/sentry/kernel.runExit" } -func (x *runExit) StateFields() []string { +func (r *runExit) StateFields() []string { return []string{} } -func (x *runExit) beforeSave() {} +func (r *runExit) beforeSave() {} -func (x *runExit) StateSave(m state.Sink) { - x.beforeSave() +func (r *runExit) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runExit) afterLoad() {} +func (r *runExit) afterLoad() {} -func (x *runExit) StateLoad(m state.Source) { +func (r *runExit) StateLoad(stateSourceObject state.Source) { } -func (x *runExitMain) StateTypeName() string { +func (r *runExitMain) StateTypeName() string { return "pkg/sentry/kernel.runExitMain" } -func (x *runExitMain) StateFields() []string { +func (r *runExitMain) StateFields() []string { return []string{} } -func (x *runExitMain) beforeSave() {} +func (r *runExitMain) beforeSave() {} -func (x *runExitMain) StateSave(m state.Sink) { - x.beforeSave() +func (r *runExitMain) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runExitMain) afterLoad() {} +func (r *runExitMain) afterLoad() {} -func (x *runExitMain) StateLoad(m state.Source) { +func (r *runExitMain) StateLoad(stateSourceObject state.Source) { } -func (x *runExitNotify) StateTypeName() string { +func (r *runExitNotify) StateTypeName() string { return "pkg/sentry/kernel.runExitNotify" } -func (x *runExitNotify) StateFields() []string { +func (r *runExitNotify) StateFields() []string { return []string{} } -func (x *runExitNotify) beforeSave() {} +func (r *runExitNotify) beforeSave() {} -func (x *runExitNotify) StateSave(m state.Sink) { - x.beforeSave() +func (r *runExitNotify) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runExitNotify) afterLoad() {} +func (r *runExitNotify) afterLoad() {} -func (x *runExitNotify) StateLoad(m state.Source) { +func (r *runExitNotify) StateLoad(stateSourceObject state.Source) { } -func (x *taskList) StateTypeName() string { +func (t *taskList) StateTypeName() string { return "pkg/sentry/kernel.taskList" } -func (x *taskList) StateFields() []string { +func (t *taskList) StateFields() []string { return []string{ "head", "tail", } } -func (x *taskList) beforeSave() {} +func (t *taskList) beforeSave() {} -func (x *taskList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (t *taskList) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.head) + stateSinkObject.Save(1, &t.tail) } -func (x *taskList) afterLoad() {} +func (t *taskList) afterLoad() {} -func (x *taskList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (t *taskList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.head) + stateSourceObject.Load(1, &t.tail) } -func (x *taskEntry) StateTypeName() string { +func (t *taskEntry) StateTypeName() string { return "pkg/sentry/kernel.taskEntry" } -func (x *taskEntry) StateFields() []string { +func (t *taskEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *taskEntry) beforeSave() {} +func (t *taskEntry) beforeSave() {} -func (x *taskEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (t *taskEntry) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.next) + stateSinkObject.Save(1, &t.prev) } -func (x *taskEntry) afterLoad() {} +func (t *taskEntry) afterLoad() {} -func (x *taskEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (t *taskEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.next) + stateSourceObject.Load(1, &t.prev) } -func (x *runApp) StateTypeName() string { +func (r *runApp) StateTypeName() string { return "pkg/sentry/kernel.runApp" } -func (x *runApp) StateFields() []string { +func (r *runApp) StateFields() []string { return []string{} } -func (x *runApp) beforeSave() {} +func (r *runApp) beforeSave() {} -func (x *runApp) StateSave(m state.Sink) { - x.beforeSave() +func (r *runApp) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runApp) afterLoad() {} +func (r *runApp) afterLoad() {} -func (x *runApp) StateLoad(m state.Source) { +func (r *runApp) StateLoad(stateSourceObject state.Source) { } -func (x *TaskGoroutineSchedInfo) StateTypeName() string { +func (t *TaskGoroutineSchedInfo) StateTypeName() string { return "pkg/sentry/kernel.TaskGoroutineSchedInfo" } -func (x *TaskGoroutineSchedInfo) StateFields() []string { +func (t *TaskGoroutineSchedInfo) StateFields() []string { return []string{ "Timestamp", "State", @@ -1635,215 +1635,215 @@ func (x *TaskGoroutineSchedInfo) StateFields() []string { } } -func (x *TaskGoroutineSchedInfo) beforeSave() {} +func (t *TaskGoroutineSchedInfo) beforeSave() {} -func (x *TaskGoroutineSchedInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Timestamp) - m.Save(1, &x.State) - m.Save(2, &x.UserTicks) - m.Save(3, &x.SysTicks) +func (t *TaskGoroutineSchedInfo) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Timestamp) + stateSinkObject.Save(1, &t.State) + stateSinkObject.Save(2, &t.UserTicks) + stateSinkObject.Save(3, &t.SysTicks) } -func (x *TaskGoroutineSchedInfo) afterLoad() {} +func (t *TaskGoroutineSchedInfo) afterLoad() {} -func (x *TaskGoroutineSchedInfo) StateLoad(m state.Source) { - m.Load(0, &x.Timestamp) - m.Load(1, &x.State) - m.Load(2, &x.UserTicks) - m.Load(3, &x.SysTicks) +func (t *TaskGoroutineSchedInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Timestamp) + stateSourceObject.Load(1, &t.State) + stateSourceObject.Load(2, &t.UserTicks) + stateSourceObject.Load(3, &t.SysTicks) } -func (x *taskClock) StateTypeName() string { +func (t *taskClock) StateTypeName() string { return "pkg/sentry/kernel.taskClock" } -func (x *taskClock) StateFields() []string { +func (t *taskClock) StateFields() []string { return []string{ "t", "includeSys", } } -func (x *taskClock) beforeSave() {} +func (t *taskClock) beforeSave() {} -func (x *taskClock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) - m.Save(1, &x.includeSys) +func (t *taskClock) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.t) + stateSinkObject.Save(1, &t.includeSys) } -func (x *taskClock) afterLoad() {} +func (t *taskClock) afterLoad() {} -func (x *taskClock) StateLoad(m state.Source) { - m.Load(0, &x.t) - m.Load(1, &x.includeSys) +func (t *taskClock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.t) + stateSourceObject.Load(1, &t.includeSys) } -func (x *tgClock) StateTypeName() string { +func (t *tgClock) StateTypeName() string { return "pkg/sentry/kernel.tgClock" } -func (x *tgClock) StateFields() []string { +func (t *tgClock) StateFields() []string { return []string{ "tg", "includeSys", } } -func (x *tgClock) beforeSave() {} +func (t *tgClock) beforeSave() {} -func (x *tgClock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tg) - m.Save(1, &x.includeSys) +func (t *tgClock) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tg) + stateSinkObject.Save(1, &t.includeSys) } -func (x *tgClock) afterLoad() {} +func (t *tgClock) afterLoad() {} -func (x *tgClock) StateLoad(m state.Source) { - m.Load(0, &x.tg) - m.Load(1, &x.includeSys) +func (t *tgClock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tg) + stateSourceObject.Load(1, &t.includeSys) } -func (x *groupStop) StateTypeName() string { +func (g *groupStop) StateTypeName() string { return "pkg/sentry/kernel.groupStop" } -func (x *groupStop) StateFields() []string { +func (g *groupStop) StateFields() []string { return []string{} } -func (x *groupStop) beforeSave() {} +func (g *groupStop) beforeSave() {} -func (x *groupStop) StateSave(m state.Sink) { - x.beforeSave() +func (g *groupStop) StateSave(stateSinkObject state.Sink) { + g.beforeSave() } -func (x *groupStop) afterLoad() {} +func (g *groupStop) afterLoad() {} -func (x *groupStop) StateLoad(m state.Source) { +func (g *groupStop) StateLoad(stateSourceObject state.Source) { } -func (x *runInterrupt) StateTypeName() string { +func (r *runInterrupt) StateTypeName() string { return "pkg/sentry/kernel.runInterrupt" } -func (x *runInterrupt) StateFields() []string { +func (r *runInterrupt) StateFields() []string { return []string{} } -func (x *runInterrupt) beforeSave() {} +func (r *runInterrupt) beforeSave() {} -func (x *runInterrupt) StateSave(m state.Sink) { - x.beforeSave() +func (r *runInterrupt) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runInterrupt) afterLoad() {} +func (r *runInterrupt) afterLoad() {} -func (x *runInterrupt) StateLoad(m state.Source) { +func (r *runInterrupt) StateLoad(stateSourceObject state.Source) { } -func (x *runInterruptAfterSignalDeliveryStop) StateTypeName() string { +func (r *runInterruptAfterSignalDeliveryStop) StateTypeName() string { return "pkg/sentry/kernel.runInterruptAfterSignalDeliveryStop" } -func (x *runInterruptAfterSignalDeliveryStop) StateFields() []string { +func (r *runInterruptAfterSignalDeliveryStop) StateFields() []string { return []string{} } -func (x *runInterruptAfterSignalDeliveryStop) beforeSave() {} +func (r *runInterruptAfterSignalDeliveryStop) beforeSave() {} -func (x *runInterruptAfterSignalDeliveryStop) StateSave(m state.Sink) { - x.beforeSave() +func (r *runInterruptAfterSignalDeliveryStop) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runInterruptAfterSignalDeliveryStop) afterLoad() {} +func (r *runInterruptAfterSignalDeliveryStop) afterLoad() {} -func (x *runInterruptAfterSignalDeliveryStop) StateLoad(m state.Source) { +func (r *runInterruptAfterSignalDeliveryStop) StateLoad(stateSourceObject state.Source) { } -func (x *runSyscallAfterSyscallEnterStop) StateTypeName() string { +func (r *runSyscallAfterSyscallEnterStop) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterSyscallEnterStop" } -func (x *runSyscallAfterSyscallEnterStop) StateFields() []string { +func (r *runSyscallAfterSyscallEnterStop) StateFields() []string { return []string{} } -func (x *runSyscallAfterSyscallEnterStop) beforeSave() {} +func (r *runSyscallAfterSyscallEnterStop) beforeSave() {} -func (x *runSyscallAfterSyscallEnterStop) StateSave(m state.Sink) { - x.beforeSave() +func (r *runSyscallAfterSyscallEnterStop) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runSyscallAfterSyscallEnterStop) afterLoad() {} +func (r *runSyscallAfterSyscallEnterStop) afterLoad() {} -func (x *runSyscallAfterSyscallEnterStop) StateLoad(m state.Source) { +func (r *runSyscallAfterSyscallEnterStop) StateLoad(stateSourceObject state.Source) { } -func (x *runSyscallAfterSysemuStop) StateTypeName() string { +func (r *runSyscallAfterSysemuStop) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterSysemuStop" } -func (x *runSyscallAfterSysemuStop) StateFields() []string { +func (r *runSyscallAfterSysemuStop) StateFields() []string { return []string{} } -func (x *runSyscallAfterSysemuStop) beforeSave() {} +func (r *runSyscallAfterSysemuStop) beforeSave() {} -func (x *runSyscallAfterSysemuStop) StateSave(m state.Sink) { - x.beforeSave() +func (r *runSyscallAfterSysemuStop) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runSyscallAfterSysemuStop) afterLoad() {} +func (r *runSyscallAfterSysemuStop) afterLoad() {} -func (x *runSyscallAfterSysemuStop) StateLoad(m state.Source) { +func (r *runSyscallAfterSysemuStop) StateLoad(stateSourceObject state.Source) { } -func (x *runSyscallReinvoke) StateTypeName() string { +func (r *runSyscallReinvoke) StateTypeName() string { return "pkg/sentry/kernel.runSyscallReinvoke" } -func (x *runSyscallReinvoke) StateFields() []string { +func (r *runSyscallReinvoke) StateFields() []string { return []string{} } -func (x *runSyscallReinvoke) beforeSave() {} +func (r *runSyscallReinvoke) beforeSave() {} -func (x *runSyscallReinvoke) StateSave(m state.Sink) { - x.beforeSave() +func (r *runSyscallReinvoke) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runSyscallReinvoke) afterLoad() {} +func (r *runSyscallReinvoke) afterLoad() {} -func (x *runSyscallReinvoke) StateLoad(m state.Source) { +func (r *runSyscallReinvoke) StateLoad(stateSourceObject state.Source) { } -func (x *runSyscallExit) StateTypeName() string { +func (r *runSyscallExit) StateTypeName() string { return "pkg/sentry/kernel.runSyscallExit" } -func (x *runSyscallExit) StateFields() []string { +func (r *runSyscallExit) StateFields() []string { return []string{} } -func (x *runSyscallExit) beforeSave() {} +func (r *runSyscallExit) beforeSave() {} -func (x *runSyscallExit) StateSave(m state.Sink) { - x.beforeSave() +func (r *runSyscallExit) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *runSyscallExit) afterLoad() {} +func (r *runSyscallExit) afterLoad() {} -func (x *runSyscallExit) StateLoad(m state.Source) { +func (r *runSyscallExit) StateLoad(stateSourceObject state.Source) { } -func (x *ThreadGroup) StateTypeName() string { +func (t *ThreadGroup) StateTypeName() string { return "pkg/sentry/kernel.ThreadGroup" } -func (x *ThreadGroup) StateFields() []string { +func (t *ThreadGroup) StateFields() []string { return []string{ "threadGroupNode", "signalHandlers", @@ -1881,138 +1881,138 @@ func (x *ThreadGroup) StateFields() []string { } } -func (x *ThreadGroup) beforeSave() {} - -func (x *ThreadGroup) StateSave(m state.Sink) { - x.beforeSave() - var oldRSeqCritical *OldRSeqCriticalRegion = x.saveOldRSeqCritical() - m.SaveValue(29, oldRSeqCritical) - m.Save(0, &x.threadGroupNode) - m.Save(1, &x.signalHandlers) - m.Save(2, &x.pendingSignals) - m.Save(3, &x.groupStopDequeued) - m.Save(4, &x.groupStopSignal) - m.Save(5, &x.groupStopPendingCount) - m.Save(6, &x.groupStopComplete) - m.Save(7, &x.groupStopWaitable) - m.Save(8, &x.groupContNotify) - m.Save(9, &x.groupContInterrupted) - m.Save(10, &x.groupContWaitable) - m.Save(11, &x.exiting) - m.Save(12, &x.exitStatus) - m.Save(13, &x.terminationSignal) - m.Save(14, &x.itimerRealTimer) - m.Save(15, &x.itimerVirtSetting) - m.Save(16, &x.itimerProfSetting) - m.Save(17, &x.rlimitCPUSoftSetting) - m.Save(18, &x.cpuTimersEnabled) - m.Save(19, &x.timers) - m.Save(20, &x.nextTimerID) - m.Save(21, &x.exitedCPUStats) - m.Save(22, &x.childCPUStats) - m.Save(23, &x.ioUsage) - m.Save(24, &x.maxRSS) - m.Save(25, &x.childMaxRSS) - m.Save(26, &x.limits) - m.Save(27, &x.processGroup) - m.Save(28, &x.execed) - m.Save(30, &x.mounts) - m.Save(31, &x.tty) - m.Save(32, &x.oomScoreAdj) -} - -func (x *ThreadGroup) afterLoad() {} - -func (x *ThreadGroup) StateLoad(m state.Source) { - m.Load(0, &x.threadGroupNode) - m.Load(1, &x.signalHandlers) - m.Load(2, &x.pendingSignals) - m.Load(3, &x.groupStopDequeued) - m.Load(4, &x.groupStopSignal) - m.Load(5, &x.groupStopPendingCount) - m.Load(6, &x.groupStopComplete) - m.Load(7, &x.groupStopWaitable) - m.Load(8, &x.groupContNotify) - m.Load(9, &x.groupContInterrupted) - m.Load(10, &x.groupContWaitable) - m.Load(11, &x.exiting) - m.Load(12, &x.exitStatus) - m.Load(13, &x.terminationSignal) - m.Load(14, &x.itimerRealTimer) - m.Load(15, &x.itimerVirtSetting) - m.Load(16, &x.itimerProfSetting) - m.Load(17, &x.rlimitCPUSoftSetting) - m.Load(18, &x.cpuTimersEnabled) - m.Load(19, &x.timers) - m.Load(20, &x.nextTimerID) - m.Load(21, &x.exitedCPUStats) - m.Load(22, &x.childCPUStats) - m.Load(23, &x.ioUsage) - m.Load(24, &x.maxRSS) - m.Load(25, &x.childMaxRSS) - m.Load(26, &x.limits) - m.Load(27, &x.processGroup) - m.Load(28, &x.execed) - m.Load(30, &x.mounts) - m.Load(31, &x.tty) - m.Load(32, &x.oomScoreAdj) - m.LoadValue(29, new(*OldRSeqCriticalRegion), func(y interface{}) { x.loadOldRSeqCritical(y.(*OldRSeqCriticalRegion)) }) -} - -func (x *itimerRealListener) StateTypeName() string { +func (t *ThreadGroup) beforeSave() {} + +func (t *ThreadGroup) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + var oldRSeqCriticalValue *OldRSeqCriticalRegion = t.saveOldRSeqCritical() + stateSinkObject.SaveValue(29, oldRSeqCriticalValue) + stateSinkObject.Save(0, &t.threadGroupNode) + stateSinkObject.Save(1, &t.signalHandlers) + stateSinkObject.Save(2, &t.pendingSignals) + stateSinkObject.Save(3, &t.groupStopDequeued) + stateSinkObject.Save(4, &t.groupStopSignal) + stateSinkObject.Save(5, &t.groupStopPendingCount) + stateSinkObject.Save(6, &t.groupStopComplete) + stateSinkObject.Save(7, &t.groupStopWaitable) + stateSinkObject.Save(8, &t.groupContNotify) + stateSinkObject.Save(9, &t.groupContInterrupted) + stateSinkObject.Save(10, &t.groupContWaitable) + stateSinkObject.Save(11, &t.exiting) + stateSinkObject.Save(12, &t.exitStatus) + stateSinkObject.Save(13, &t.terminationSignal) + stateSinkObject.Save(14, &t.itimerRealTimer) + stateSinkObject.Save(15, &t.itimerVirtSetting) + stateSinkObject.Save(16, &t.itimerProfSetting) + stateSinkObject.Save(17, &t.rlimitCPUSoftSetting) + stateSinkObject.Save(18, &t.cpuTimersEnabled) + stateSinkObject.Save(19, &t.timers) + stateSinkObject.Save(20, &t.nextTimerID) + stateSinkObject.Save(21, &t.exitedCPUStats) + stateSinkObject.Save(22, &t.childCPUStats) + stateSinkObject.Save(23, &t.ioUsage) + stateSinkObject.Save(24, &t.maxRSS) + stateSinkObject.Save(25, &t.childMaxRSS) + stateSinkObject.Save(26, &t.limits) + stateSinkObject.Save(27, &t.processGroup) + stateSinkObject.Save(28, &t.execed) + stateSinkObject.Save(30, &t.mounts) + stateSinkObject.Save(31, &t.tty) + stateSinkObject.Save(32, &t.oomScoreAdj) +} + +func (t *ThreadGroup) afterLoad() {} + +func (t *ThreadGroup) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.threadGroupNode) + stateSourceObject.Load(1, &t.signalHandlers) + stateSourceObject.Load(2, &t.pendingSignals) + stateSourceObject.Load(3, &t.groupStopDequeued) + stateSourceObject.Load(4, &t.groupStopSignal) + stateSourceObject.Load(5, &t.groupStopPendingCount) + stateSourceObject.Load(6, &t.groupStopComplete) + stateSourceObject.Load(7, &t.groupStopWaitable) + stateSourceObject.Load(8, &t.groupContNotify) + stateSourceObject.Load(9, &t.groupContInterrupted) + stateSourceObject.Load(10, &t.groupContWaitable) + stateSourceObject.Load(11, &t.exiting) + stateSourceObject.Load(12, &t.exitStatus) + stateSourceObject.Load(13, &t.terminationSignal) + stateSourceObject.Load(14, &t.itimerRealTimer) + stateSourceObject.Load(15, &t.itimerVirtSetting) + stateSourceObject.Load(16, &t.itimerProfSetting) + stateSourceObject.Load(17, &t.rlimitCPUSoftSetting) + stateSourceObject.Load(18, &t.cpuTimersEnabled) + stateSourceObject.Load(19, &t.timers) + stateSourceObject.Load(20, &t.nextTimerID) + stateSourceObject.Load(21, &t.exitedCPUStats) + stateSourceObject.Load(22, &t.childCPUStats) + stateSourceObject.Load(23, &t.ioUsage) + stateSourceObject.Load(24, &t.maxRSS) + stateSourceObject.Load(25, &t.childMaxRSS) + stateSourceObject.Load(26, &t.limits) + stateSourceObject.Load(27, &t.processGroup) + stateSourceObject.Load(28, &t.execed) + stateSourceObject.Load(30, &t.mounts) + stateSourceObject.Load(31, &t.tty) + stateSourceObject.Load(32, &t.oomScoreAdj) + stateSourceObject.LoadValue(29, new(*OldRSeqCriticalRegion), func(y interface{}) { t.loadOldRSeqCritical(y.(*OldRSeqCriticalRegion)) }) +} + +func (i *itimerRealListener) StateTypeName() string { return "pkg/sentry/kernel.itimerRealListener" } -func (x *itimerRealListener) StateFields() []string { +func (i *itimerRealListener) StateFields() []string { return []string{ "tg", } } -func (x *itimerRealListener) beforeSave() {} +func (i *itimerRealListener) beforeSave() {} -func (x *itimerRealListener) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tg) +func (i *itimerRealListener) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.tg) } -func (x *itimerRealListener) afterLoad() {} +func (i *itimerRealListener) afterLoad() {} -func (x *itimerRealListener) StateLoad(m state.Source) { - m.Load(0, &x.tg) +func (i *itimerRealListener) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.tg) } -func (x *TaskSet) StateTypeName() string { +func (t *TaskSet) StateTypeName() string { return "pkg/sentry/kernel.TaskSet" } -func (x *TaskSet) StateFields() []string { +func (t *TaskSet) StateFields() []string { return []string{ "Root", "sessions", } } -func (x *TaskSet) beforeSave() {} +func (t *TaskSet) beforeSave() {} -func (x *TaskSet) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Root) - m.Save(1, &x.sessions) +func (t *TaskSet) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Root) + stateSinkObject.Save(1, &t.sessions) } -func (x *TaskSet) afterLoad() {} +func (t *TaskSet) afterLoad() {} -func (x *TaskSet) StateLoad(m state.Source) { - m.Load(0, &x.Root) - m.Load(1, &x.sessions) +func (t *TaskSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Root) + stateSourceObject.Load(1, &t.sessions) } -func (x *PIDNamespace) StateTypeName() string { +func (p *PIDNamespace) StateTypeName() string { return "pkg/sentry/kernel.PIDNamespace" } -func (x *PIDNamespace) StateFields() []string { +func (p *PIDNamespace) StateFields() []string { return []string{ "owner", "parent", @@ -2029,46 +2029,46 @@ func (x *PIDNamespace) StateFields() []string { } } -func (x *PIDNamespace) beforeSave() {} - -func (x *PIDNamespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.owner) - m.Save(1, &x.parent) - m.Save(2, &x.userns) - m.Save(3, &x.last) - m.Save(4, &x.tasks) - m.Save(5, &x.tids) - m.Save(6, &x.tgids) - m.Save(7, &x.sessions) - m.Save(8, &x.sids) - m.Save(9, &x.processGroups) - m.Save(10, &x.pgids) - m.Save(11, &x.exiting) -} - -func (x *PIDNamespace) afterLoad() {} - -func (x *PIDNamespace) StateLoad(m state.Source) { - m.Load(0, &x.owner) - m.Load(1, &x.parent) - m.Load(2, &x.userns) - m.Load(3, &x.last) - m.Load(4, &x.tasks) - m.Load(5, &x.tids) - m.Load(6, &x.tgids) - m.Load(7, &x.sessions) - m.Load(8, &x.sids) - m.Load(9, &x.processGroups) - m.Load(10, &x.pgids) - m.Load(11, &x.exiting) -} - -func (x *threadGroupNode) StateTypeName() string { +func (p *PIDNamespace) beforeSave() {} + +func (p *PIDNamespace) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.owner) + stateSinkObject.Save(1, &p.parent) + stateSinkObject.Save(2, &p.userns) + stateSinkObject.Save(3, &p.last) + stateSinkObject.Save(4, &p.tasks) + stateSinkObject.Save(5, &p.tids) + stateSinkObject.Save(6, &p.tgids) + stateSinkObject.Save(7, &p.sessions) + stateSinkObject.Save(8, &p.sids) + stateSinkObject.Save(9, &p.processGroups) + stateSinkObject.Save(10, &p.pgids) + stateSinkObject.Save(11, &p.exiting) +} + +func (p *PIDNamespace) afterLoad() {} + +func (p *PIDNamespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.owner) + stateSourceObject.Load(1, &p.parent) + stateSourceObject.Load(2, &p.userns) + stateSourceObject.Load(3, &p.last) + stateSourceObject.Load(4, &p.tasks) + stateSourceObject.Load(5, &p.tids) + stateSourceObject.Load(6, &p.tgids) + stateSourceObject.Load(7, &p.sessions) + stateSourceObject.Load(8, &p.sids) + stateSourceObject.Load(9, &p.processGroups) + stateSourceObject.Load(10, &p.pgids) + stateSourceObject.Load(11, &p.exiting) +} + +func (t *threadGroupNode) StateTypeName() string { return "pkg/sentry/kernel.threadGroupNode" } -func (x *threadGroupNode) StateFields() []string { +func (t *threadGroupNode) StateFields() []string { return []string{ "pidns", "leader", @@ -2080,36 +2080,36 @@ func (x *threadGroupNode) StateFields() []string { } } -func (x *threadGroupNode) beforeSave() {} +func (t *threadGroupNode) beforeSave() {} -func (x *threadGroupNode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.pidns) - m.Save(1, &x.leader) - m.Save(2, &x.execing) - m.Save(3, &x.tasks) - m.Save(4, &x.tasksCount) - m.Save(5, &x.liveTasks) - m.Save(6, &x.activeTasks) +func (t *threadGroupNode) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.pidns) + stateSinkObject.Save(1, &t.leader) + stateSinkObject.Save(2, &t.execing) + stateSinkObject.Save(3, &t.tasks) + stateSinkObject.Save(4, &t.tasksCount) + stateSinkObject.Save(5, &t.liveTasks) + stateSinkObject.Save(6, &t.activeTasks) } -func (x *threadGroupNode) afterLoad() {} +func (t *threadGroupNode) afterLoad() {} -func (x *threadGroupNode) StateLoad(m state.Source) { - m.Load(0, &x.pidns) - m.Load(1, &x.leader) - m.Load(2, &x.execing) - m.Load(3, &x.tasks) - m.Load(4, &x.tasksCount) - m.Load(5, &x.liveTasks) - m.Load(6, &x.activeTasks) +func (t *threadGroupNode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.pidns) + stateSourceObject.Load(1, &t.leader) + stateSourceObject.Load(2, &t.execing) + stateSourceObject.Load(3, &t.tasks) + stateSourceObject.Load(4, &t.tasksCount) + stateSourceObject.Load(5, &t.liveTasks) + stateSourceObject.Load(6, &t.activeTasks) } -func (x *taskNode) StateTypeName() string { +func (t *taskNode) StateTypeName() string { return "pkg/sentry/kernel.taskNode" } -func (x *taskNode) StateFields() []string { +func (t *taskNode) StateFields() []string { return []string{ "tg", "taskEntry", @@ -2119,32 +2119,32 @@ func (x *taskNode) StateFields() []string { } } -func (x *taskNode) beforeSave() {} +func (t *taskNode) beforeSave() {} -func (x *taskNode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tg) - m.Save(1, &x.taskEntry) - m.Save(2, &x.parent) - m.Save(3, &x.children) - m.Save(4, &x.childPIDNamespace) +func (t *taskNode) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tg) + stateSinkObject.Save(1, &t.taskEntry) + stateSinkObject.Save(2, &t.parent) + stateSinkObject.Save(3, &t.children) + stateSinkObject.Save(4, &t.childPIDNamespace) } -func (x *taskNode) afterLoad() {} +func (t *taskNode) afterLoad() {} -func (x *taskNode) StateLoad(m state.Source) { - m.LoadWait(0, &x.tg) - m.Load(1, &x.taskEntry) - m.Load(2, &x.parent) - m.Load(3, &x.children) - m.Load(4, &x.childPIDNamespace) +func (t *taskNode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &t.tg) + stateSourceObject.Load(1, &t.taskEntry) + stateSourceObject.Load(2, &t.parent) + stateSourceObject.Load(3, &t.children) + stateSourceObject.Load(4, &t.childPIDNamespace) } -func (x *Timekeeper) StateTypeName() string { +func (t *Timekeeper) StateTypeName() string { return "pkg/sentry/kernel.Timekeeper" } -func (x *Timekeeper) StateFields() []string { +func (t *Timekeeper) StateFields() []string { return []string{ "bootTime", "saveMonotonic", @@ -2153,79 +2153,79 @@ func (x *Timekeeper) StateFields() []string { } } -func (x *Timekeeper) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.bootTime) - m.Save(1, &x.saveMonotonic) - m.Save(2, &x.saveRealtime) - m.Save(3, &x.params) +func (t *Timekeeper) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.bootTime) + stateSinkObject.Save(1, &t.saveMonotonic) + stateSinkObject.Save(2, &t.saveRealtime) + stateSinkObject.Save(3, &t.params) } -func (x *Timekeeper) StateLoad(m state.Source) { - m.Load(0, &x.bootTime) - m.Load(1, &x.saveMonotonic) - m.Load(2, &x.saveRealtime) - m.Load(3, &x.params) - m.AfterLoad(x.afterLoad) +func (t *Timekeeper) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.bootTime) + stateSourceObject.Load(1, &t.saveMonotonic) + stateSourceObject.Load(2, &t.saveRealtime) + stateSourceObject.Load(3, &t.params) + stateSourceObject.AfterLoad(t.afterLoad) } -func (x *timekeeperClock) StateTypeName() string { +func (t *timekeeperClock) StateTypeName() string { return "pkg/sentry/kernel.timekeeperClock" } -func (x *timekeeperClock) StateFields() []string { +func (t *timekeeperClock) StateFields() []string { return []string{ "tk", "c", } } -func (x *timekeeperClock) beforeSave() {} +func (t *timekeeperClock) beforeSave() {} -func (x *timekeeperClock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tk) - m.Save(1, &x.c) +func (t *timekeeperClock) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tk) + stateSinkObject.Save(1, &t.c) } -func (x *timekeeperClock) afterLoad() {} +func (t *timekeeperClock) afterLoad() {} -func (x *timekeeperClock) StateLoad(m state.Source) { - m.Load(0, &x.tk) - m.Load(1, &x.c) +func (t *timekeeperClock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tk) + stateSourceObject.Load(1, &t.c) } -func (x *TTY) StateTypeName() string { +func (t *TTY) StateTypeName() string { return "pkg/sentry/kernel.TTY" } -func (x *TTY) StateFields() []string { +func (t *TTY) StateFields() []string { return []string{ "Index", "tg", } } -func (x *TTY) beforeSave() {} +func (t *TTY) beforeSave() {} -func (x *TTY) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Index) - m.Save(1, &x.tg) +func (t *TTY) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Index) + stateSinkObject.Save(1, &t.tg) } -func (x *TTY) afterLoad() {} +func (t *TTY) afterLoad() {} -func (x *TTY) StateLoad(m state.Source) { - m.Load(0, &x.Index) - m.Load(1, &x.tg) +func (t *TTY) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Index) + stateSourceObject.Load(1, &t.tg) } -func (x *UTSNamespace) StateTypeName() string { +func (u *UTSNamespace) StateTypeName() string { return "pkg/sentry/kernel.UTSNamespace" } -func (x *UTSNamespace) StateFields() []string { +func (u *UTSNamespace) StateFields() []string { return []string{ "hostName", "domainName", @@ -2233,28 +2233,28 @@ func (x *UTSNamespace) StateFields() []string { } } -func (x *UTSNamespace) beforeSave() {} +func (u *UTSNamespace) beforeSave() {} -func (x *UTSNamespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.hostName) - m.Save(1, &x.domainName) - m.Save(2, &x.userns) +func (u *UTSNamespace) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.hostName) + stateSinkObject.Save(1, &u.domainName) + stateSinkObject.Save(2, &u.userns) } -func (x *UTSNamespace) afterLoad() {} +func (u *UTSNamespace) afterLoad() {} -func (x *UTSNamespace) StateLoad(m state.Source) { - m.Load(0, &x.hostName) - m.Load(1, &x.domainName) - m.Load(2, &x.userns) +func (u *UTSNamespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.hostName) + stateSourceObject.Load(1, &u.domainName) + stateSourceObject.Load(2, &u.userns) } -func (x *VDSOParamPage) StateTypeName() string { +func (v *VDSOParamPage) StateTypeName() string { return "pkg/sentry/kernel.VDSOParamPage" } -func (x *VDSOParamPage) StateFields() []string { +func (v *VDSOParamPage) StateFields() []string { return []string{ "mfp", "fr", @@ -2263,23 +2263,23 @@ func (x *VDSOParamPage) StateFields() []string { } } -func (x *VDSOParamPage) beforeSave() {} +func (v *VDSOParamPage) beforeSave() {} -func (x *VDSOParamPage) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.mfp) - m.Save(1, &x.fr) - m.Save(2, &x.seq) - m.Save(3, &x.copyScratchBuffer) +func (v *VDSOParamPage) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.mfp) + stateSinkObject.Save(1, &v.fr) + stateSinkObject.Save(2, &v.seq) + stateSinkObject.Save(3, &v.copyScratchBuffer) } -func (x *VDSOParamPage) afterLoad() {} +func (v *VDSOParamPage) afterLoad() {} -func (x *VDSOParamPage) StateLoad(m state.Source) { - m.Load(0, &x.mfp) - m.Load(1, &x.fr) - m.Load(2, &x.seq) - m.Load(3, &x.copyScratchBuffer) +func (v *VDSOParamPage) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.mfp) + stateSourceObject.Load(1, &v.fr) + stateSourceObject.Load(2, &v.seq) + stateSourceObject.Load(3, &v.copyScratchBuffer) } func init() { diff --git a/pkg/sentry/kernel/pipe/pipe_state_autogen.go b/pkg/sentry/kernel/pipe/pipe_state_autogen.go index df55abce6..031ea2cc2 100644 --- a/pkg/sentry/kernel/pipe/pipe_state_autogen.go +++ b/pkg/sentry/kernel/pipe/pipe_state_autogen.go @@ -6,37 +6,37 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *inodeOperations) StateTypeName() string { +func (i *inodeOperations) StateTypeName() string { return "pkg/sentry/kernel/pipe.inodeOperations" } -func (x *inodeOperations) StateFields() []string { +func (i *inodeOperations) StateFields() []string { return []string{ "InodeSimpleAttributes", "p", } } -func (x *inodeOperations) beforeSave() {} +func (i *inodeOperations) beforeSave() {} -func (x *inodeOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.InodeSimpleAttributes) - m.Save(1, &x.p) +func (i *inodeOperations) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.InodeSimpleAttributes) + stateSinkObject.Save(1, &i.p) } -func (x *inodeOperations) afterLoad() {} +func (i *inodeOperations) afterLoad() {} -func (x *inodeOperations) StateLoad(m state.Source) { - m.Load(0, &x.InodeSimpleAttributes) - m.Load(1, &x.p) +func (i *inodeOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeSimpleAttributes) + stateSourceObject.Load(1, &i.p) } -func (x *Pipe) StateTypeName() string { +func (p *Pipe) StateTypeName() string { return "pkg/sentry/kernel/pipe.Pipe" } -func (x *Pipe) StateFields() []string { +func (p *Pipe) StateFields() []string { return []string{ "isNamed", "atomicIOBytes", @@ -48,98 +48,98 @@ func (x *Pipe) StateFields() []string { } } -func (x *Pipe) beforeSave() {} +func (p *Pipe) beforeSave() {} -func (x *Pipe) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.isNamed) - m.Save(1, &x.atomicIOBytes) - m.Save(2, &x.readers) - m.Save(3, &x.writers) - m.Save(4, &x.view) - m.Save(5, &x.max) - m.Save(6, &x.hadWriter) +func (p *Pipe) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.isNamed) + stateSinkObject.Save(1, &p.atomicIOBytes) + stateSinkObject.Save(2, &p.readers) + stateSinkObject.Save(3, &p.writers) + stateSinkObject.Save(4, &p.view) + stateSinkObject.Save(5, &p.max) + stateSinkObject.Save(6, &p.hadWriter) } -func (x *Pipe) afterLoad() {} +func (p *Pipe) afterLoad() {} -func (x *Pipe) StateLoad(m state.Source) { - m.Load(0, &x.isNamed) - m.Load(1, &x.atomicIOBytes) - m.Load(2, &x.readers) - m.Load(3, &x.writers) - m.Load(4, &x.view) - m.Load(5, &x.max) - m.Load(6, &x.hadWriter) +func (p *Pipe) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.isNamed) + stateSourceObject.Load(1, &p.atomicIOBytes) + stateSourceObject.Load(2, &p.readers) + stateSourceObject.Load(3, &p.writers) + stateSourceObject.Load(4, &p.view) + stateSourceObject.Load(5, &p.max) + stateSourceObject.Load(6, &p.hadWriter) } -func (x *Reader) StateTypeName() string { +func (r *Reader) StateTypeName() string { return "pkg/sentry/kernel/pipe.Reader" } -func (x *Reader) StateFields() []string { +func (r *Reader) StateFields() []string { return []string{ "ReaderWriter", } } -func (x *Reader) beforeSave() {} +func (r *Reader) beforeSave() {} -func (x *Reader) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ReaderWriter) +func (r *Reader) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.ReaderWriter) } -func (x *Reader) afterLoad() {} +func (r *Reader) afterLoad() {} -func (x *Reader) StateLoad(m state.Source) { - m.Load(0, &x.ReaderWriter) +func (r *Reader) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.ReaderWriter) } -func (x *ReaderWriter) StateTypeName() string { +func (r *ReaderWriter) StateTypeName() string { return "pkg/sentry/kernel/pipe.ReaderWriter" } -func (x *ReaderWriter) StateFields() []string { +func (r *ReaderWriter) StateFields() []string { return []string{ "Pipe", } } -func (x *ReaderWriter) beforeSave() {} +func (r *ReaderWriter) beforeSave() {} -func (x *ReaderWriter) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Pipe) +func (r *ReaderWriter) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.Pipe) } -func (x *ReaderWriter) afterLoad() {} +func (r *ReaderWriter) afterLoad() {} -func (x *ReaderWriter) StateLoad(m state.Source) { - m.Load(0, &x.Pipe) +func (r *ReaderWriter) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.Pipe) } -func (x *Writer) StateTypeName() string { +func (w *Writer) StateTypeName() string { return "pkg/sentry/kernel/pipe.Writer" } -func (x *Writer) StateFields() []string { +func (w *Writer) StateFields() []string { return []string{ "ReaderWriter", } } -func (x *Writer) beforeSave() {} +func (w *Writer) beforeSave() {} -func (x *Writer) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ReaderWriter) +func (w *Writer) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.ReaderWriter) } -func (x *Writer) afterLoad() {} +func (w *Writer) afterLoad() {} -func (x *Writer) StateLoad(m state.Source) { - m.Load(0, &x.ReaderWriter) +func (w *Writer) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.ReaderWriter) } func init() { diff --git a/pkg/sentry/kernel/semaphore/semaphore_state_autogen.go b/pkg/sentry/kernel/semaphore/semaphore_state_autogen.go index fe5adfbee..80358c6e3 100644 --- a/pkg/sentry/kernel/semaphore/semaphore_state_autogen.go +++ b/pkg/sentry/kernel/semaphore/semaphore_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Registry) StateTypeName() string { +func (r *Registry) StateTypeName() string { return "pkg/sentry/kernel/semaphore.Registry" } -func (x *Registry) StateFields() []string { +func (r *Registry) StateFields() []string { return []string{ "userNS", "semaphores", @@ -18,28 +18,28 @@ func (x *Registry) StateFields() []string { } } -func (x *Registry) beforeSave() {} +func (r *Registry) beforeSave() {} -func (x *Registry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.userNS) - m.Save(1, &x.semaphores) - m.Save(2, &x.lastIDUsed) +func (r *Registry) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.userNS) + stateSinkObject.Save(1, &r.semaphores) + stateSinkObject.Save(2, &r.lastIDUsed) } -func (x *Registry) afterLoad() {} +func (r *Registry) afterLoad() {} -func (x *Registry) StateLoad(m state.Source) { - m.Load(0, &x.userNS) - m.Load(1, &x.semaphores) - m.Load(2, &x.lastIDUsed) +func (r *Registry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.userNS) + stateSourceObject.Load(1, &r.semaphores) + stateSourceObject.Load(2, &r.lastIDUsed) } -func (x *Set) StateTypeName() string { +func (s *Set) StateTypeName() string { return "pkg/sentry/kernel/semaphore.Set" } -func (x *Set) StateFields() []string { +func (s *Set) StateFields() []string { return []string{ "registry", "ID", @@ -54,71 +54,71 @@ func (x *Set) StateFields() []string { } } -func (x *Set) beforeSave() {} +func (s *Set) beforeSave() {} -func (x *Set) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.registry) - m.Save(1, &x.ID) - m.Save(2, &x.key) - m.Save(3, &x.creator) - m.Save(4, &x.owner) - m.Save(5, &x.perms) - m.Save(6, &x.opTime) - m.Save(7, &x.changeTime) - m.Save(8, &x.sems) - m.Save(9, &x.dead) +func (s *Set) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.registry) + stateSinkObject.Save(1, &s.ID) + stateSinkObject.Save(2, &s.key) + stateSinkObject.Save(3, &s.creator) + stateSinkObject.Save(4, &s.owner) + stateSinkObject.Save(5, &s.perms) + stateSinkObject.Save(6, &s.opTime) + stateSinkObject.Save(7, &s.changeTime) + stateSinkObject.Save(8, &s.sems) + stateSinkObject.Save(9, &s.dead) } -func (x *Set) afterLoad() {} +func (s *Set) afterLoad() {} -func (x *Set) StateLoad(m state.Source) { - m.Load(0, &x.registry) - m.Load(1, &x.ID) - m.Load(2, &x.key) - m.Load(3, &x.creator) - m.Load(4, &x.owner) - m.Load(5, &x.perms) - m.Load(6, &x.opTime) - m.Load(7, &x.changeTime) - m.Load(8, &x.sems) - m.Load(9, &x.dead) +func (s *Set) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.registry) + stateSourceObject.Load(1, &s.ID) + stateSourceObject.Load(2, &s.key) + stateSourceObject.Load(3, &s.creator) + stateSourceObject.Load(4, &s.owner) + stateSourceObject.Load(5, &s.perms) + stateSourceObject.Load(6, &s.opTime) + stateSourceObject.Load(7, &s.changeTime) + stateSourceObject.Load(8, &s.sems) + stateSourceObject.Load(9, &s.dead) } -func (x *sem) StateTypeName() string { +func (s *sem) StateTypeName() string { return "pkg/sentry/kernel/semaphore.sem" } -func (x *sem) StateFields() []string { +func (s *sem) StateFields() []string { return []string{ "value", "pid", } } -func (x *sem) beforeSave() {} +func (s *sem) beforeSave() {} -func (x *sem) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.waiters) { - state.Failf("waiters is %#v, expected zero", &x.waiters) +func (s *sem) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + if !state.IsZeroValue(&s.waiters) { + state.Failf("waiters is %#v, expected zero", &s.waiters) } - m.Save(0, &x.value) - m.Save(1, &x.pid) + stateSinkObject.Save(0, &s.value) + stateSinkObject.Save(1, &s.pid) } -func (x *sem) afterLoad() {} +func (s *sem) afterLoad() {} -func (x *sem) StateLoad(m state.Source) { - m.Load(0, &x.value) - m.Load(1, &x.pid) +func (s *sem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.value) + stateSourceObject.Load(1, &s.pid) } -func (x *waiter) StateTypeName() string { +func (w *waiter) StateTypeName() string { return "pkg/sentry/kernel/semaphore.waiter" } -func (x *waiter) StateFields() []string { +func (w *waiter) StateFields() []string { return []string{ "waiterEntry", "value", @@ -126,73 +126,73 @@ func (x *waiter) StateFields() []string { } } -func (x *waiter) beforeSave() {} +func (w *waiter) beforeSave() {} -func (x *waiter) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.waiterEntry) - m.Save(1, &x.value) - m.Save(2, &x.ch) +func (w *waiter) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.waiterEntry) + stateSinkObject.Save(1, &w.value) + stateSinkObject.Save(2, &w.ch) } -func (x *waiter) afterLoad() {} +func (w *waiter) afterLoad() {} -func (x *waiter) StateLoad(m state.Source) { - m.Load(0, &x.waiterEntry) - m.Load(1, &x.value) - m.Load(2, &x.ch) +func (w *waiter) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.waiterEntry) + stateSourceObject.Load(1, &w.value) + stateSourceObject.Load(2, &w.ch) } -func (x *waiterList) StateTypeName() string { +func (w *waiterList) StateTypeName() string { return "pkg/sentry/kernel/semaphore.waiterList" } -func (x *waiterList) StateFields() []string { +func (w *waiterList) StateFields() []string { return []string{ "head", "tail", } } -func (x *waiterList) beforeSave() {} +func (w *waiterList) beforeSave() {} -func (x *waiterList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (w *waiterList) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.head) + stateSinkObject.Save(1, &w.tail) } -func (x *waiterList) afterLoad() {} +func (w *waiterList) afterLoad() {} -func (x *waiterList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (w *waiterList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.head) + stateSourceObject.Load(1, &w.tail) } -func (x *waiterEntry) StateTypeName() string { +func (w *waiterEntry) StateTypeName() string { return "pkg/sentry/kernel/semaphore.waiterEntry" } -func (x *waiterEntry) StateFields() []string { +func (w *waiterEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *waiterEntry) beforeSave() {} +func (w *waiterEntry) beforeSave() {} -func (x *waiterEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (w *waiterEntry) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.next) + stateSinkObject.Save(1, &w.prev) } -func (x *waiterEntry) afterLoad() {} +func (w *waiterEntry) afterLoad() {} -func (x *waiterEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (w *waiterEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.next) + stateSourceObject.Load(1, &w.prev) } func init() { diff --git a/pkg/sentry/kernel/shm/shm_state_autogen.go b/pkg/sentry/kernel/shm/shm_state_autogen.go index fa80353b6..846cbc2d5 100644 --- a/pkg/sentry/kernel/shm/shm_state_autogen.go +++ b/pkg/sentry/kernel/shm/shm_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Registry) StateTypeName() string { +func (r *Registry) StateTypeName() string { return "pkg/sentry/kernel/shm.Registry" } -func (x *Registry) StateFields() []string { +func (r *Registry) StateFields() []string { return []string{ "userNS", "shms", @@ -20,32 +20,32 @@ func (x *Registry) StateFields() []string { } } -func (x *Registry) beforeSave() {} +func (r *Registry) beforeSave() {} -func (x *Registry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.userNS) - m.Save(1, &x.shms) - m.Save(2, &x.keysToShms) - m.Save(3, &x.totalPages) - m.Save(4, &x.lastIDUsed) +func (r *Registry) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.userNS) + stateSinkObject.Save(1, &r.shms) + stateSinkObject.Save(2, &r.keysToShms) + stateSinkObject.Save(3, &r.totalPages) + stateSinkObject.Save(4, &r.lastIDUsed) } -func (x *Registry) afterLoad() {} +func (r *Registry) afterLoad() {} -func (x *Registry) StateLoad(m state.Source) { - m.Load(0, &x.userNS) - m.Load(1, &x.shms) - m.Load(2, &x.keysToShms) - m.Load(3, &x.totalPages) - m.Load(4, &x.lastIDUsed) +func (r *Registry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.userNS) + stateSourceObject.Load(1, &r.shms) + stateSourceObject.Load(2, &r.keysToShms) + stateSourceObject.Load(3, &r.totalPages) + stateSourceObject.Load(4, &r.lastIDUsed) } -func (x *Shm) StateTypeName() string { +func (s *Shm) StateTypeName() string { return "pkg/sentry/kernel/shm.Shm" } -func (x *Shm) StateFields() []string { +func (s *Shm) StateFields() []string { return []string{ "ShmRefs", "mfp", @@ -67,72 +67,72 @@ func (x *Shm) StateFields() []string { } } -func (x *Shm) beforeSave() {} - -func (x *Shm) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ShmRefs) - m.Save(1, &x.mfp) - m.Save(2, &x.registry) - m.Save(3, &x.ID) - m.Save(4, &x.creator) - m.Save(5, &x.size) - m.Save(6, &x.effectiveSize) - m.Save(7, &x.fr) - m.Save(8, &x.key) - m.Save(9, &x.perms) - m.Save(10, &x.owner) - m.Save(11, &x.attachTime) - m.Save(12, &x.detachTime) - m.Save(13, &x.changeTime) - m.Save(14, &x.creatorPID) - m.Save(15, &x.lastAttachDetachPID) - m.Save(16, &x.pendingDestruction) +func (s *Shm) beforeSave() {} + +func (s *Shm) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.ShmRefs) + stateSinkObject.Save(1, &s.mfp) + stateSinkObject.Save(2, &s.registry) + stateSinkObject.Save(3, &s.ID) + stateSinkObject.Save(4, &s.creator) + stateSinkObject.Save(5, &s.size) + stateSinkObject.Save(6, &s.effectiveSize) + stateSinkObject.Save(7, &s.fr) + stateSinkObject.Save(8, &s.key) + stateSinkObject.Save(9, &s.perms) + stateSinkObject.Save(10, &s.owner) + stateSinkObject.Save(11, &s.attachTime) + stateSinkObject.Save(12, &s.detachTime) + stateSinkObject.Save(13, &s.changeTime) + stateSinkObject.Save(14, &s.creatorPID) + stateSinkObject.Save(15, &s.lastAttachDetachPID) + stateSinkObject.Save(16, &s.pendingDestruction) } -func (x *Shm) afterLoad() {} - -func (x *Shm) StateLoad(m state.Source) { - m.Load(0, &x.ShmRefs) - m.Load(1, &x.mfp) - m.Load(2, &x.registry) - m.Load(3, &x.ID) - m.Load(4, &x.creator) - m.Load(5, &x.size) - m.Load(6, &x.effectiveSize) - m.Load(7, &x.fr) - m.Load(8, &x.key) - m.Load(9, &x.perms) - m.Load(10, &x.owner) - m.Load(11, &x.attachTime) - m.Load(12, &x.detachTime) - m.Load(13, &x.changeTime) - m.Load(14, &x.creatorPID) - m.Load(15, &x.lastAttachDetachPID) - m.Load(16, &x.pendingDestruction) +func (s *Shm) afterLoad() {} + +func (s *Shm) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.ShmRefs) + stateSourceObject.Load(1, &s.mfp) + stateSourceObject.Load(2, &s.registry) + stateSourceObject.Load(3, &s.ID) + stateSourceObject.Load(4, &s.creator) + stateSourceObject.Load(5, &s.size) + stateSourceObject.Load(6, &s.effectiveSize) + stateSourceObject.Load(7, &s.fr) + stateSourceObject.Load(8, &s.key) + stateSourceObject.Load(9, &s.perms) + stateSourceObject.Load(10, &s.owner) + stateSourceObject.Load(11, &s.attachTime) + stateSourceObject.Load(12, &s.detachTime) + stateSourceObject.Load(13, &s.changeTime) + stateSourceObject.Load(14, &s.creatorPID) + stateSourceObject.Load(15, &s.lastAttachDetachPID) + stateSourceObject.Load(16, &s.pendingDestruction) } -func (x *ShmRefs) StateTypeName() string { +func (s *ShmRefs) StateTypeName() string { return "pkg/sentry/kernel/shm.ShmRefs" } -func (x *ShmRefs) StateFields() []string { +func (s *ShmRefs) StateFields() []string { return []string{ "refCount", } } -func (x *ShmRefs) beforeSave() {} +func (s *ShmRefs) beforeSave() {} -func (x *ShmRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (s *ShmRefs) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.refCount) } -func (x *ShmRefs) afterLoad() {} +func (s *ShmRefs) afterLoad() {} -func (x *ShmRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (s *ShmRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.refCount) } func init() { diff --git a/pkg/sentry/kernel/signalfd/signalfd_state_autogen.go b/pkg/sentry/kernel/signalfd/signalfd_state_autogen.go index 089a35b60..6c608aaa4 100644 --- a/pkg/sentry/kernel/signalfd/signalfd_state_autogen.go +++ b/pkg/sentry/kernel/signalfd/signalfd_state_autogen.go @@ -6,30 +6,30 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SignalOperations) StateTypeName() string { +func (s *SignalOperations) StateTypeName() string { return "pkg/sentry/kernel/signalfd.SignalOperations" } -func (x *SignalOperations) StateFields() []string { +func (s *SignalOperations) StateFields() []string { return []string{ "target", "mask", } } -func (x *SignalOperations) beforeSave() {} +func (s *SignalOperations) beforeSave() {} -func (x *SignalOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.target) - m.Save(1, &x.mask) +func (s *SignalOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.target) + stateSinkObject.Save(1, &s.mask) } -func (x *SignalOperations) afterLoad() {} +func (s *SignalOperations) afterLoad() {} -func (x *SignalOperations) StateLoad(m state.Source) { - m.Load(0, &x.target) - m.Load(1, &x.mask) +func (s *SignalOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.target) + stateSourceObject.Load(1, &s.mask) } func init() { diff --git a/pkg/sentry/kernel/time/time_state_autogen.go b/pkg/sentry/kernel/time/time_state_autogen.go index 4fb37df9a..1a30539f0 100644 --- a/pkg/sentry/kernel/time/time_state_autogen.go +++ b/pkg/sentry/kernel/time/time_state_autogen.go @@ -6,34 +6,34 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Time) StateTypeName() string { +func (t *Time) StateTypeName() string { return "pkg/sentry/kernel/time.Time" } -func (x *Time) StateFields() []string { +func (t *Time) StateFields() []string { return []string{ "ns", } } -func (x *Time) beforeSave() {} +func (t *Time) beforeSave() {} -func (x *Time) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ns) +func (t *Time) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.ns) } -func (x *Time) afterLoad() {} +func (t *Time) afterLoad() {} -func (x *Time) StateLoad(m state.Source) { - m.Load(0, &x.ns) +func (t *Time) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.ns) } -func (x *Setting) StateTypeName() string { +func (s *Setting) StateTypeName() string { return "pkg/sentry/kernel/time.Setting" } -func (x *Setting) StateFields() []string { +func (s *Setting) StateFields() []string { return []string{ "Enabled", "Next", @@ -41,28 +41,28 @@ func (x *Setting) StateFields() []string { } } -func (x *Setting) beforeSave() {} +func (s *Setting) beforeSave() {} -func (x *Setting) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Enabled) - m.Save(1, &x.Next) - m.Save(2, &x.Period) +func (s *Setting) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Enabled) + stateSinkObject.Save(1, &s.Next) + stateSinkObject.Save(2, &s.Period) } -func (x *Setting) afterLoad() {} +func (s *Setting) afterLoad() {} -func (x *Setting) StateLoad(m state.Source) { - m.Load(0, &x.Enabled) - m.Load(1, &x.Next) - m.Load(2, &x.Period) +func (s *Setting) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Enabled) + stateSourceObject.Load(1, &s.Next) + stateSourceObject.Load(2, &s.Period) } -func (x *Timer) StateTypeName() string { +func (t *Timer) StateTypeName() string { return "pkg/sentry/kernel/time.Timer" } -func (x *Timer) StateFields() []string { +func (t *Timer) StateFields() []string { return []string{ "clock", "listener", @@ -71,23 +71,23 @@ func (x *Timer) StateFields() []string { } } -func (x *Timer) beforeSave() {} +func (t *Timer) beforeSave() {} -func (x *Timer) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.clock) - m.Save(1, &x.listener) - m.Save(2, &x.setting) - m.Save(3, &x.paused) +func (t *Timer) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.clock) + stateSinkObject.Save(1, &t.listener) + stateSinkObject.Save(2, &t.setting) + stateSinkObject.Save(3, &t.paused) } -func (x *Timer) afterLoad() {} +func (t *Timer) afterLoad() {} -func (x *Timer) StateLoad(m state.Source) { - m.Load(0, &x.clock) - m.Load(1, &x.listener) - m.Load(2, &x.setting) - m.Load(3, &x.paused) +func (t *Timer) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.clock) + stateSourceObject.Load(1, &t.listener) + stateSourceObject.Load(2, &t.setting) + stateSourceObject.Load(3, &t.paused) } func init() { diff --git a/pkg/sentry/limits/limits_state_autogen.go b/pkg/sentry/limits/limits_state_autogen.go index 72503d1d7..d619cabd4 100644 --- a/pkg/sentry/limits/limits_state_autogen.go +++ b/pkg/sentry/limits/limits_state_autogen.go @@ -6,53 +6,53 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Limit) StateTypeName() string { +func (l *Limit) StateTypeName() string { return "pkg/sentry/limits.Limit" } -func (x *Limit) StateFields() []string { +func (l *Limit) StateFields() []string { return []string{ "Cur", "Max", } } -func (x *Limit) beforeSave() {} +func (l *Limit) beforeSave() {} -func (x *Limit) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Cur) - m.Save(1, &x.Max) +func (l *Limit) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Cur) + stateSinkObject.Save(1, &l.Max) } -func (x *Limit) afterLoad() {} +func (l *Limit) afterLoad() {} -func (x *Limit) StateLoad(m state.Source) { - m.Load(0, &x.Cur) - m.Load(1, &x.Max) +func (l *Limit) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Cur) + stateSourceObject.Load(1, &l.Max) } -func (x *LimitSet) StateTypeName() string { +func (l *LimitSet) StateTypeName() string { return "pkg/sentry/limits.LimitSet" } -func (x *LimitSet) StateFields() []string { +func (l *LimitSet) StateFields() []string { return []string{ "data", } } -func (x *LimitSet) beforeSave() {} +func (l *LimitSet) beforeSave() {} -func (x *LimitSet) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.data) +func (l *LimitSet) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.data) } -func (x *LimitSet) afterLoad() {} +func (l *LimitSet) afterLoad() {} -func (x *LimitSet) StateLoad(m state.Source) { - m.Load(0, &x.data) +func (l *LimitSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.data) } func init() { diff --git a/pkg/sentry/loader/loader_state_autogen.go b/pkg/sentry/loader/loader_state_autogen.go index 1b306bc6a..1ae4683c4 100644 --- a/pkg/sentry/loader/loader_state_autogen.go +++ b/pkg/sentry/loader/loader_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *VDSO) StateTypeName() string { +func (v *VDSO) StateTypeName() string { return "pkg/sentry/loader.VDSO" } -func (x *VDSO) StateFields() []string { +func (v *VDSO) StateFields() []string { return []string{ "ParamPage", "vdso", @@ -20,33 +20,33 @@ func (x *VDSO) StateFields() []string { } } -func (x *VDSO) beforeSave() {} +func (v *VDSO) beforeSave() {} -func (x *VDSO) StateSave(m state.Sink) { - x.beforeSave() - var phdrs []elfProgHeader = x.savePhdrs() - m.SaveValue(4, phdrs) - m.Save(0, &x.ParamPage) - m.Save(1, &x.vdso) - m.Save(2, &x.os) - m.Save(3, &x.arch) +func (v *VDSO) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + var phdrsValue []elfProgHeader = v.savePhdrs() + stateSinkObject.SaveValue(4, phdrsValue) + stateSinkObject.Save(0, &v.ParamPage) + stateSinkObject.Save(1, &v.vdso) + stateSinkObject.Save(2, &v.os) + stateSinkObject.Save(3, &v.arch) } -func (x *VDSO) afterLoad() {} +func (v *VDSO) afterLoad() {} -func (x *VDSO) StateLoad(m state.Source) { - m.Load(0, &x.ParamPage) - m.Load(1, &x.vdso) - m.Load(2, &x.os) - m.Load(3, &x.arch) - m.LoadValue(4, new([]elfProgHeader), func(y interface{}) { x.loadPhdrs(y.([]elfProgHeader)) }) +func (v *VDSO) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.ParamPage) + stateSourceObject.Load(1, &v.vdso) + stateSourceObject.Load(2, &v.os) + stateSourceObject.Load(3, &v.arch) + stateSourceObject.LoadValue(4, new([]elfProgHeader), func(y interface{}) { v.loadPhdrs(y.([]elfProgHeader)) }) } -func (x *elfProgHeader) StateTypeName() string { +func (e *elfProgHeader) StateTypeName() string { return "pkg/sentry/loader.elfProgHeader" } -func (x *elfProgHeader) StateFields() []string { +func (e *elfProgHeader) StateFields() []string { return []string{ "Type", "Flags", @@ -59,31 +59,31 @@ func (x *elfProgHeader) StateFields() []string { } } -func (x *elfProgHeader) beforeSave() {} +func (e *elfProgHeader) beforeSave() {} -func (x *elfProgHeader) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Type) - m.Save(1, &x.Flags) - m.Save(2, &x.Off) - m.Save(3, &x.Vaddr) - m.Save(4, &x.Paddr) - m.Save(5, &x.Filesz) - m.Save(6, &x.Memsz) - m.Save(7, &x.Align) +func (e *elfProgHeader) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.Type) + stateSinkObject.Save(1, &e.Flags) + stateSinkObject.Save(2, &e.Off) + stateSinkObject.Save(3, &e.Vaddr) + stateSinkObject.Save(4, &e.Paddr) + stateSinkObject.Save(5, &e.Filesz) + stateSinkObject.Save(6, &e.Memsz) + stateSinkObject.Save(7, &e.Align) } -func (x *elfProgHeader) afterLoad() {} +func (e *elfProgHeader) afterLoad() {} -func (x *elfProgHeader) StateLoad(m state.Source) { - m.Load(0, &x.Type) - m.Load(1, &x.Flags) - m.Load(2, &x.Off) - m.Load(3, &x.Vaddr) - m.Load(4, &x.Paddr) - m.Load(5, &x.Filesz) - m.Load(6, &x.Memsz) - m.Load(7, &x.Align) +func (e *elfProgHeader) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.Type) + stateSourceObject.Load(1, &e.Flags) + stateSourceObject.Load(2, &e.Off) + stateSourceObject.Load(3, &e.Vaddr) + stateSourceObject.Load(4, &e.Paddr) + stateSourceObject.Load(5, &e.Filesz) + stateSourceObject.Load(6, &e.Memsz) + stateSourceObject.Load(7, &e.Align) } func init() { diff --git a/pkg/sentry/memmap/memmap.go b/pkg/sentry/memmap/memmap.go index a44fa2b95..7fd77925f 100644 --- a/pkg/sentry/memmap/memmap.go +++ b/pkg/sentry/memmap/memmap.go @@ -127,7 +127,7 @@ func (t Translation) FileRange() FileRange { // Preconditions: Same as Mappable.Translate. func CheckTranslateResult(required, optional MappableRange, at usermem.AccessType, ts []Translation, terr error) error { // Verify that the inputs to Mappable.Translate were valid. - if !required.WellFormed() || required.Length() <= 0 { + if !required.WellFormed() || required.Length() == 0 { panic(fmt.Sprintf("invalid required range: %v", required)) } if !usermem.Addr(required.Start).IsPageAligned() || !usermem.Addr(required.End).IsPageAligned() { @@ -145,7 +145,7 @@ func CheckTranslateResult(required, optional MappableRange, at usermem.AccessTyp return fmt.Errorf("first Translation %+v does not cover start of required range %v", ts[0], required) } for i, t := range ts { - if !t.Source.WellFormed() || t.Source.Length() <= 0 { + if !t.Source.WellFormed() || t.Source.Length() == 0 { return fmt.Errorf("Translation %+v has invalid Source", t) } if !usermem.Addr(t.Source.Start).IsPageAligned() || !usermem.Addr(t.Source.End).IsPageAligned() { diff --git a/pkg/sentry/memmap/memmap_impl_state_autogen.go b/pkg/sentry/memmap/memmap_impl_state_autogen.go index ed4ab58cb..e6fcd3582 100644 --- a/pkg/sentry/memmap/memmap_impl_state_autogen.go +++ b/pkg/sentry/memmap/memmap_impl_state_autogen.go @@ -6,35 +6,35 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *MappingSet) StateTypeName() string { +func (m *MappingSet) StateTypeName() string { return "pkg/sentry/memmap.MappingSet" } -func (x *MappingSet) StateFields() []string { +func (m *MappingSet) StateFields() []string { return []string{ "root", } } -func (x *MappingSet) beforeSave() {} +func (m *MappingSet) beforeSave() {} -func (x *MappingSet) StateSave(m state.Sink) { - x.beforeSave() - var root *MappingSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (m *MappingSet) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + var rootValue *MappingSegmentDataSlices = m.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *MappingSet) afterLoad() {} +func (m *MappingSet) afterLoad() {} -func (x *MappingSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*MappingSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*MappingSegmentDataSlices)) }) +func (m *MappingSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*MappingSegmentDataSlices), func(y interface{}) { m.loadRoot(y.(*MappingSegmentDataSlices)) }) } -func (x *Mappingnode) StateTypeName() string { +func (m *Mappingnode) StateTypeName() string { return "pkg/sentry/memmap.Mappingnode" } -func (x *Mappingnode) StateFields() []string { +func (m *Mappingnode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -47,38 +47,38 @@ func (x *Mappingnode) StateFields() []string { } } -func (x *Mappingnode) beforeSave() {} - -func (x *Mappingnode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (m *Mappingnode) beforeSave() {} + +func (m *Mappingnode) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.nrSegments) + stateSinkObject.Save(1, &m.parent) + stateSinkObject.Save(2, &m.parentIndex) + stateSinkObject.Save(3, &m.hasChildren) + stateSinkObject.Save(4, &m.maxGap) + stateSinkObject.Save(5, &m.keys) + stateSinkObject.Save(6, &m.values) + stateSinkObject.Save(7, &m.children) } -func (x *Mappingnode) afterLoad() {} - -func (x *Mappingnode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (m *Mappingnode) afterLoad() {} + +func (m *Mappingnode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.nrSegments) + stateSourceObject.Load(1, &m.parent) + stateSourceObject.Load(2, &m.parentIndex) + stateSourceObject.Load(3, &m.hasChildren) + stateSourceObject.Load(4, &m.maxGap) + stateSourceObject.Load(5, &m.keys) + stateSourceObject.Load(6, &m.values) + stateSourceObject.Load(7, &m.children) } -func (x *MappingSegmentDataSlices) StateTypeName() string { +func (m *MappingSegmentDataSlices) StateTypeName() string { return "pkg/sentry/memmap.MappingSegmentDataSlices" } -func (x *MappingSegmentDataSlices) StateFields() []string { +func (m *MappingSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -86,21 +86,21 @@ func (x *MappingSegmentDataSlices) StateFields() []string { } } -func (x *MappingSegmentDataSlices) beforeSave() {} +func (m *MappingSegmentDataSlices) beforeSave() {} -func (x *MappingSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (m *MappingSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.Start) + stateSinkObject.Save(1, &m.End) + stateSinkObject.Save(2, &m.Values) } -func (x *MappingSegmentDataSlices) afterLoad() {} +func (m *MappingSegmentDataSlices) afterLoad() {} -func (x *MappingSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (m *MappingSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.Start) + stateSourceObject.Load(1, &m.End) + stateSourceObject.Load(2, &m.Values) } func init() { diff --git a/pkg/sentry/memmap/memmap_state_autogen.go b/pkg/sentry/memmap/memmap_state_autogen.go index 4feb2eb66..55ccf8cfd 100644 --- a/pkg/sentry/memmap/memmap_state_autogen.go +++ b/pkg/sentry/memmap/memmap_state_autogen.go @@ -6,63 +6,63 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *FileRange) StateTypeName() string { +func (f *FileRange) StateTypeName() string { return "pkg/sentry/memmap.FileRange" } -func (x *FileRange) StateFields() []string { +func (f *FileRange) StateFields() []string { return []string{ "Start", "End", } } -func (x *FileRange) beforeSave() {} +func (f *FileRange) beforeSave() {} -func (x *FileRange) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) +func (f *FileRange) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Start) + stateSinkObject.Save(1, &f.End) } -func (x *FileRange) afterLoad() {} +func (f *FileRange) afterLoad() {} -func (x *FileRange) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) +func (f *FileRange) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Start) + stateSourceObject.Load(1, &f.End) } -func (x *MappableRange) StateTypeName() string { +func (m *MappableRange) StateTypeName() string { return "pkg/sentry/memmap.MappableRange" } -func (x *MappableRange) StateFields() []string { +func (m *MappableRange) StateFields() []string { return []string{ "Start", "End", } } -func (x *MappableRange) beforeSave() {} +func (m *MappableRange) beforeSave() {} -func (x *MappableRange) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) +func (m *MappableRange) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.Start) + stateSinkObject.Save(1, &m.End) } -func (x *MappableRange) afterLoad() {} +func (m *MappableRange) afterLoad() {} -func (x *MappableRange) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) +func (m *MappableRange) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.Start) + stateSourceObject.Load(1, &m.End) } -func (x *MappingOfRange) StateTypeName() string { +func (m *MappingOfRange) StateTypeName() string { return "pkg/sentry/memmap.MappingOfRange" } -func (x *MappingOfRange) StateFields() []string { +func (m *MappingOfRange) StateFields() []string { return []string{ "MappingSpace", "AddrRange", @@ -70,21 +70,21 @@ func (x *MappingOfRange) StateFields() []string { } } -func (x *MappingOfRange) beforeSave() {} +func (m *MappingOfRange) beforeSave() {} -func (x *MappingOfRange) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.MappingSpace) - m.Save(1, &x.AddrRange) - m.Save(2, &x.Writable) +func (m *MappingOfRange) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.MappingSpace) + stateSinkObject.Save(1, &m.AddrRange) + stateSinkObject.Save(2, &m.Writable) } -func (x *MappingOfRange) afterLoad() {} +func (m *MappingOfRange) afterLoad() {} -func (x *MappingOfRange) StateLoad(m state.Source) { - m.Load(0, &x.MappingSpace) - m.Load(1, &x.AddrRange) - m.Load(2, &x.Writable) +func (m *MappingOfRange) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.MappingSpace) + stateSourceObject.Load(1, &m.AddrRange) + stateSourceObject.Load(2, &m.Writable) } func init() { diff --git a/pkg/sentry/mm/mm_state_autogen.go b/pkg/sentry/mm/mm_state_autogen.go index a4e826a4f..1636e5235 100644 --- a/pkg/sentry/mm/mm_state_autogen.go +++ b/pkg/sentry/mm/mm_state_autogen.go @@ -6,60 +6,60 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *aioManager) StateTypeName() string { +func (a *aioManager) StateTypeName() string { return "pkg/sentry/mm.aioManager" } -func (x *aioManager) StateFields() []string { +func (a *aioManager) StateFields() []string { return []string{ "contexts", } } -func (x *aioManager) beforeSave() {} +func (a *aioManager) beforeSave() {} -func (x *aioManager) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.contexts) +func (a *aioManager) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.contexts) } -func (x *aioManager) afterLoad() {} +func (a *aioManager) afterLoad() {} -func (x *aioManager) StateLoad(m state.Source) { - m.Load(0, &x.contexts) +func (a *aioManager) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.contexts) } -func (x *ioResult) StateTypeName() string { +func (i *ioResult) StateTypeName() string { return "pkg/sentry/mm.ioResult" } -func (x *ioResult) StateFields() []string { +func (i *ioResult) StateFields() []string { return []string{ "data", "ioEntry", } } -func (x *ioResult) beforeSave() {} +func (i *ioResult) beforeSave() {} -func (x *ioResult) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.data) - m.Save(1, &x.ioEntry) +func (i *ioResult) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.data) + stateSinkObject.Save(1, &i.ioEntry) } -func (x *ioResult) afterLoad() {} +func (i *ioResult) afterLoad() {} -func (x *ioResult) StateLoad(m state.Source) { - m.Load(0, &x.data) - m.Load(1, &x.ioEntry) +func (i *ioResult) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.data) + stateSourceObject.Load(1, &i.ioEntry) } -func (x *AIOContext) StateTypeName() string { +func (a *AIOContext) StateTypeName() string { return "pkg/sentry/mm.AIOContext" } -func (x *AIOContext) StateFields() []string { +func (a *AIOContext) StateFields() []string { return []string{ "results", "maxOutstanding", @@ -67,30 +67,30 @@ func (x *AIOContext) StateFields() []string { } } -func (x *AIOContext) beforeSave() {} +func (a *AIOContext) beforeSave() {} -func (x *AIOContext) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.dead) { - state.Failf("dead is %#v, expected zero", &x.dead) +func (a *AIOContext) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + if !state.IsZeroValue(&a.dead) { + state.Failf("dead is %#v, expected zero", &a.dead) } - m.Save(0, &x.results) - m.Save(1, &x.maxOutstanding) - m.Save(2, &x.outstanding) + stateSinkObject.Save(0, &a.results) + stateSinkObject.Save(1, &a.maxOutstanding) + stateSinkObject.Save(2, &a.outstanding) } -func (x *AIOContext) StateLoad(m state.Source) { - m.Load(0, &x.results) - m.Load(1, &x.maxOutstanding) - m.Load(2, &x.outstanding) - m.AfterLoad(x.afterLoad) +func (a *AIOContext) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.results) + stateSourceObject.Load(1, &a.maxOutstanding) + stateSourceObject.Load(2, &a.outstanding) + stateSourceObject.AfterLoad(a.afterLoad) } -func (x *aioMappable) StateTypeName() string { +func (a *aioMappable) StateTypeName() string { return "pkg/sentry/mm.aioMappable" } -func (x *aioMappable) StateFields() []string { +func (a *aioMappable) StateFields() []string { return []string{ "aioMappableRefs", "mfp", @@ -98,75 +98,75 @@ func (x *aioMappable) StateFields() []string { } } -func (x *aioMappable) beforeSave() {} +func (a *aioMappable) beforeSave() {} -func (x *aioMappable) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.aioMappableRefs) - m.Save(1, &x.mfp) - m.Save(2, &x.fr) +func (a *aioMappable) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.aioMappableRefs) + stateSinkObject.Save(1, &a.mfp) + stateSinkObject.Save(2, &a.fr) } -func (x *aioMappable) afterLoad() {} +func (a *aioMappable) afterLoad() {} -func (x *aioMappable) StateLoad(m state.Source) { - m.Load(0, &x.aioMappableRefs) - m.Load(1, &x.mfp) - m.Load(2, &x.fr) +func (a *aioMappable) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.aioMappableRefs) + stateSourceObject.Load(1, &a.mfp) + stateSourceObject.Load(2, &a.fr) } -func (x *aioMappableRefs) StateTypeName() string { +func (a *aioMappableRefs) StateTypeName() string { return "pkg/sentry/mm.aioMappableRefs" } -func (x *aioMappableRefs) StateFields() []string { +func (a *aioMappableRefs) StateFields() []string { return []string{ "refCount", } } -func (x *aioMappableRefs) beforeSave() {} +func (a *aioMappableRefs) beforeSave() {} -func (x *aioMappableRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (a *aioMappableRefs) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.refCount) } -func (x *aioMappableRefs) afterLoad() {} +func (a *aioMappableRefs) afterLoad() {} -func (x *aioMappableRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (a *aioMappableRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.refCount) } -func (x *fileRefcountSet) StateTypeName() string { +func (f *fileRefcountSet) StateTypeName() string { return "pkg/sentry/mm.fileRefcountSet" } -func (x *fileRefcountSet) StateFields() []string { +func (f *fileRefcountSet) StateFields() []string { return []string{ "root", } } -func (x *fileRefcountSet) beforeSave() {} +func (f *fileRefcountSet) beforeSave() {} -func (x *fileRefcountSet) StateSave(m state.Sink) { - x.beforeSave() - var root *fileRefcountSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (f *fileRefcountSet) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + var rootValue *fileRefcountSegmentDataSlices = f.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *fileRefcountSet) afterLoad() {} +func (f *fileRefcountSet) afterLoad() {} -func (x *fileRefcountSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*fileRefcountSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*fileRefcountSegmentDataSlices)) }) +func (f *fileRefcountSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*fileRefcountSegmentDataSlices), func(y interface{}) { f.loadRoot(y.(*fileRefcountSegmentDataSlices)) }) } -func (x *fileRefcountnode) StateTypeName() string { +func (f *fileRefcountnode) StateTypeName() string { return "pkg/sentry/mm.fileRefcountnode" } -func (x *fileRefcountnode) StateFields() []string { +func (f *fileRefcountnode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -179,38 +179,38 @@ func (x *fileRefcountnode) StateFields() []string { } } -func (x *fileRefcountnode) beforeSave() {} +func (f *fileRefcountnode) beforeSave() {} -func (x *fileRefcountnode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (f *fileRefcountnode) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.nrSegments) + stateSinkObject.Save(1, &f.parent) + stateSinkObject.Save(2, &f.parentIndex) + stateSinkObject.Save(3, &f.hasChildren) + stateSinkObject.Save(4, &f.maxGap) + stateSinkObject.Save(5, &f.keys) + stateSinkObject.Save(6, &f.values) + stateSinkObject.Save(7, &f.children) } -func (x *fileRefcountnode) afterLoad() {} +func (f *fileRefcountnode) afterLoad() {} -func (x *fileRefcountnode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (f *fileRefcountnode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.nrSegments) + stateSourceObject.Load(1, &f.parent) + stateSourceObject.Load(2, &f.parentIndex) + stateSourceObject.Load(3, &f.hasChildren) + stateSourceObject.Load(4, &f.maxGap) + stateSourceObject.Load(5, &f.keys) + stateSourceObject.Load(6, &f.values) + stateSourceObject.Load(7, &f.children) } -func (x *fileRefcountSegmentDataSlices) StateTypeName() string { +func (f *fileRefcountSegmentDataSlices) StateTypeName() string { return "pkg/sentry/mm.fileRefcountSegmentDataSlices" } -func (x *fileRefcountSegmentDataSlices) StateFields() []string { +func (f *fileRefcountSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -218,80 +218,80 @@ func (x *fileRefcountSegmentDataSlices) StateFields() []string { } } -func (x *fileRefcountSegmentDataSlices) beforeSave() {} +func (f *fileRefcountSegmentDataSlices) beforeSave() {} -func (x *fileRefcountSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (f *fileRefcountSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.Start) + stateSinkObject.Save(1, &f.End) + stateSinkObject.Save(2, &f.Values) } -func (x *fileRefcountSegmentDataSlices) afterLoad() {} +func (f *fileRefcountSegmentDataSlices) afterLoad() {} -func (x *fileRefcountSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (f *fileRefcountSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.Start) + stateSourceObject.Load(1, &f.End) + stateSourceObject.Load(2, &f.Values) } -func (x *ioList) StateTypeName() string { +func (i *ioList) StateTypeName() string { return "pkg/sentry/mm.ioList" } -func (x *ioList) StateFields() []string { +func (i *ioList) StateFields() []string { return []string{ "head", "tail", } } -func (x *ioList) beforeSave() {} +func (i *ioList) beforeSave() {} -func (x *ioList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (i *ioList) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.head) + stateSinkObject.Save(1, &i.tail) } -func (x *ioList) afterLoad() {} +func (i *ioList) afterLoad() {} -func (x *ioList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (i *ioList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.head) + stateSourceObject.Load(1, &i.tail) } -func (x *ioEntry) StateTypeName() string { +func (i *ioEntry) StateTypeName() string { return "pkg/sentry/mm.ioEntry" } -func (x *ioEntry) StateFields() []string { +func (i *ioEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *ioEntry) beforeSave() {} +func (i *ioEntry) beforeSave() {} -func (x *ioEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (i *ioEntry) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.next) + stateSinkObject.Save(1, &i.prev) } -func (x *ioEntry) afterLoad() {} +func (i *ioEntry) afterLoad() {} -func (x *ioEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (i *ioEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.next) + stateSourceObject.Load(1, &i.prev) } -func (x *MemoryManager) StateTypeName() string { +func (m *MemoryManager) StateTypeName() string { return "pkg/sentry/mm.MemoryManager" } -func (x *MemoryManager) StateFields() []string { +func (m *MemoryManager) StateFields() []string { return []string{ "p", "mfp", @@ -319,71 +319,71 @@ func (x *MemoryManager) StateFields() []string { } } -func (x *MemoryManager) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.active) { - state.Failf("active is %#v, expected zero", &x.active) +func (m *MemoryManager) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + if !state.IsZeroValue(&m.active) { + state.Failf("active is %#v, expected zero", &m.active) } - if !state.IsZeroValue(&x.captureInvalidations) { - state.Failf("captureInvalidations is %#v, expected zero", &x.captureInvalidations) + if !state.IsZeroValue(&m.captureInvalidations) { + state.Failf("captureInvalidations is %#v, expected zero", &m.captureInvalidations) } - m.Save(0, &x.p) - m.Save(1, &x.mfp) - m.Save(2, &x.layout) - m.Save(3, &x.privateRefs) - m.Save(4, &x.users) - m.Save(5, &x.vmas) - m.Save(6, &x.brk) - m.Save(7, &x.usageAS) - m.Save(8, &x.lockedAS) - m.Save(9, &x.dataAS) - m.Save(10, &x.defMLockMode) - m.Save(11, &x.pmas) - m.Save(12, &x.curRSS) - m.Save(13, &x.maxRSS) - m.Save(14, &x.argv) - m.Save(15, &x.envv) - m.Save(16, &x.auxv) - m.Save(17, &x.executable) - m.Save(18, &x.dumpability) - m.Save(19, &x.aioManager) - m.Save(20, &x.sleepForActivation) - m.Save(21, &x.vdsoSigReturnAddr) - m.Save(22, &x.membarrierPrivateEnabled) -} - -func (x *MemoryManager) StateLoad(m state.Source) { - m.Load(0, &x.p) - m.Load(1, &x.mfp) - m.Load(2, &x.layout) - m.Load(3, &x.privateRefs) - m.Load(4, &x.users) - m.Load(5, &x.vmas) - m.Load(6, &x.brk) - m.Load(7, &x.usageAS) - m.Load(8, &x.lockedAS) - m.Load(9, &x.dataAS) - m.Load(10, &x.defMLockMode) - m.Load(11, &x.pmas) - m.Load(12, &x.curRSS) - m.Load(13, &x.maxRSS) - m.Load(14, &x.argv) - m.Load(15, &x.envv) - m.Load(16, &x.auxv) - m.Load(17, &x.executable) - m.Load(18, &x.dumpability) - m.Load(19, &x.aioManager) - m.Load(20, &x.sleepForActivation) - m.Load(21, &x.vdsoSigReturnAddr) - m.Load(22, &x.membarrierPrivateEnabled) - m.AfterLoad(x.afterLoad) -} - -func (x *vma) StateTypeName() string { + stateSinkObject.Save(0, &m.p) + stateSinkObject.Save(1, &m.mfp) + stateSinkObject.Save(2, &m.layout) + stateSinkObject.Save(3, &m.privateRefs) + stateSinkObject.Save(4, &m.users) + stateSinkObject.Save(5, &m.vmas) + stateSinkObject.Save(6, &m.brk) + stateSinkObject.Save(7, &m.usageAS) + stateSinkObject.Save(8, &m.lockedAS) + stateSinkObject.Save(9, &m.dataAS) + stateSinkObject.Save(10, &m.defMLockMode) + stateSinkObject.Save(11, &m.pmas) + stateSinkObject.Save(12, &m.curRSS) + stateSinkObject.Save(13, &m.maxRSS) + stateSinkObject.Save(14, &m.argv) + stateSinkObject.Save(15, &m.envv) + stateSinkObject.Save(16, &m.auxv) + stateSinkObject.Save(17, &m.executable) + stateSinkObject.Save(18, &m.dumpability) + stateSinkObject.Save(19, &m.aioManager) + stateSinkObject.Save(20, &m.sleepForActivation) + stateSinkObject.Save(21, &m.vdsoSigReturnAddr) + stateSinkObject.Save(22, &m.membarrierPrivateEnabled) +} + +func (m *MemoryManager) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.p) + stateSourceObject.Load(1, &m.mfp) + stateSourceObject.Load(2, &m.layout) + stateSourceObject.Load(3, &m.privateRefs) + stateSourceObject.Load(4, &m.users) + stateSourceObject.Load(5, &m.vmas) + stateSourceObject.Load(6, &m.brk) + stateSourceObject.Load(7, &m.usageAS) + stateSourceObject.Load(8, &m.lockedAS) + stateSourceObject.Load(9, &m.dataAS) + stateSourceObject.Load(10, &m.defMLockMode) + stateSourceObject.Load(11, &m.pmas) + stateSourceObject.Load(12, &m.curRSS) + stateSourceObject.Load(13, &m.maxRSS) + stateSourceObject.Load(14, &m.argv) + stateSourceObject.Load(15, &m.envv) + stateSourceObject.Load(16, &m.auxv) + stateSourceObject.Load(17, &m.executable) + stateSourceObject.Load(18, &m.dumpability) + stateSourceObject.Load(19, &m.aioManager) + stateSourceObject.Load(20, &m.sleepForActivation) + stateSourceObject.Load(21, &m.vdsoSigReturnAddr) + stateSourceObject.Load(22, &m.membarrierPrivateEnabled) + stateSourceObject.AfterLoad(m.afterLoad) +} + +func (v *vma) StateTypeName() string { return "pkg/sentry/mm.vma" } -func (x *vma) StateFields() []string { +func (v *vma) StateFields() []string { return []string{ "mappable", "off", @@ -397,41 +397,41 @@ func (x *vma) StateFields() []string { } } -func (x *vma) beforeSave() {} +func (v *vma) beforeSave() {} -func (x *vma) StateSave(m state.Sink) { - x.beforeSave() - var realPerms int = x.saveRealPerms() - m.SaveValue(2, realPerms) - m.Save(0, &x.mappable) - m.Save(1, &x.off) - m.Save(3, &x.dontfork) - m.Save(4, &x.mlockMode) - m.Save(5, &x.numaPolicy) - m.Save(6, &x.numaNodemask) - m.Save(7, &x.id) - m.Save(8, &x.hint) +func (v *vma) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + var realPermsValue int = v.saveRealPerms() + stateSinkObject.SaveValue(2, realPermsValue) + stateSinkObject.Save(0, &v.mappable) + stateSinkObject.Save(1, &v.off) + stateSinkObject.Save(3, &v.dontfork) + stateSinkObject.Save(4, &v.mlockMode) + stateSinkObject.Save(5, &v.numaPolicy) + stateSinkObject.Save(6, &v.numaNodemask) + stateSinkObject.Save(7, &v.id) + stateSinkObject.Save(8, &v.hint) } -func (x *vma) afterLoad() {} +func (v *vma) afterLoad() {} -func (x *vma) StateLoad(m state.Source) { - m.Load(0, &x.mappable) - m.Load(1, &x.off) - m.Load(3, &x.dontfork) - m.Load(4, &x.mlockMode) - m.Load(5, &x.numaPolicy) - m.Load(6, &x.numaNodemask) - m.Load(7, &x.id) - m.Load(8, &x.hint) - m.LoadValue(2, new(int), func(y interface{}) { x.loadRealPerms(y.(int)) }) +func (v *vma) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.mappable) + stateSourceObject.Load(1, &v.off) + stateSourceObject.Load(3, &v.dontfork) + stateSourceObject.Load(4, &v.mlockMode) + stateSourceObject.Load(5, &v.numaPolicy) + stateSourceObject.Load(6, &v.numaNodemask) + stateSourceObject.Load(7, &v.id) + stateSourceObject.Load(8, &v.hint) + stateSourceObject.LoadValue(2, new(int), func(y interface{}) { v.loadRealPerms(y.(int)) }) } -func (x *pma) StateTypeName() string { +func (p *pma) StateTypeName() string { return "pkg/sentry/mm.pma" } -func (x *pma) StateFields() []string { +func (p *pma) StateFields() []string { return []string{ "off", "translatePerms", @@ -442,81 +442,81 @@ func (x *pma) StateFields() []string { } } -func (x *pma) beforeSave() {} +func (p *pma) beforeSave() {} -func (x *pma) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.off) - m.Save(1, &x.translatePerms) - m.Save(2, &x.effectivePerms) - m.Save(3, &x.maxPerms) - m.Save(4, &x.needCOW) - m.Save(5, &x.private) +func (p *pma) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.off) + stateSinkObject.Save(1, &p.translatePerms) + stateSinkObject.Save(2, &p.effectivePerms) + stateSinkObject.Save(3, &p.maxPerms) + stateSinkObject.Save(4, &p.needCOW) + stateSinkObject.Save(5, &p.private) } -func (x *pma) afterLoad() {} +func (p *pma) afterLoad() {} -func (x *pma) StateLoad(m state.Source) { - m.Load(0, &x.off) - m.Load(1, &x.translatePerms) - m.Load(2, &x.effectivePerms) - m.Load(3, &x.maxPerms) - m.Load(4, &x.needCOW) - m.Load(5, &x.private) +func (p *pma) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.off) + stateSourceObject.Load(1, &p.translatePerms) + stateSourceObject.Load(2, &p.effectivePerms) + stateSourceObject.Load(3, &p.maxPerms) + stateSourceObject.Load(4, &p.needCOW) + stateSourceObject.Load(5, &p.private) } -func (x *privateRefs) StateTypeName() string { +func (p *privateRefs) StateTypeName() string { return "pkg/sentry/mm.privateRefs" } -func (x *privateRefs) StateFields() []string { +func (p *privateRefs) StateFields() []string { return []string{ "refs", } } -func (x *privateRefs) beforeSave() {} +func (p *privateRefs) beforeSave() {} -func (x *privateRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refs) +func (p *privateRefs) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.refs) } -func (x *privateRefs) afterLoad() {} +func (p *privateRefs) afterLoad() {} -func (x *privateRefs) StateLoad(m state.Source) { - m.Load(0, &x.refs) +func (p *privateRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.refs) } -func (x *pmaSet) StateTypeName() string { +func (p *pmaSet) StateTypeName() string { return "pkg/sentry/mm.pmaSet" } -func (x *pmaSet) StateFields() []string { +func (p *pmaSet) StateFields() []string { return []string{ "root", } } -func (x *pmaSet) beforeSave() {} +func (p *pmaSet) beforeSave() {} -func (x *pmaSet) StateSave(m state.Sink) { - x.beforeSave() - var root *pmaSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (p *pmaSet) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + var rootValue *pmaSegmentDataSlices = p.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *pmaSet) afterLoad() {} +func (p *pmaSet) afterLoad() {} -func (x *pmaSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*pmaSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*pmaSegmentDataSlices)) }) +func (p *pmaSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*pmaSegmentDataSlices), func(y interface{}) { p.loadRoot(y.(*pmaSegmentDataSlices)) }) } -func (x *pmanode) StateTypeName() string { +func (p *pmanode) StateTypeName() string { return "pkg/sentry/mm.pmanode" } -func (x *pmanode) StateFields() []string { +func (p *pmanode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -529,38 +529,38 @@ func (x *pmanode) StateFields() []string { } } -func (x *pmanode) beforeSave() {} +func (p *pmanode) beforeSave() {} -func (x *pmanode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (p *pmanode) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.nrSegments) + stateSinkObject.Save(1, &p.parent) + stateSinkObject.Save(2, &p.parentIndex) + stateSinkObject.Save(3, &p.hasChildren) + stateSinkObject.Save(4, &p.maxGap) + stateSinkObject.Save(5, &p.keys) + stateSinkObject.Save(6, &p.values) + stateSinkObject.Save(7, &p.children) } -func (x *pmanode) afterLoad() {} +func (p *pmanode) afterLoad() {} -func (x *pmanode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (p *pmanode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.nrSegments) + stateSourceObject.Load(1, &p.parent) + stateSourceObject.Load(2, &p.parentIndex) + stateSourceObject.Load(3, &p.hasChildren) + stateSourceObject.Load(4, &p.maxGap) + stateSourceObject.Load(5, &p.keys) + stateSourceObject.Load(6, &p.values) + stateSourceObject.Load(7, &p.children) } -func (x *pmaSegmentDataSlices) StateTypeName() string { +func (p *pmaSegmentDataSlices) StateTypeName() string { return "pkg/sentry/mm.pmaSegmentDataSlices" } -func (x *pmaSegmentDataSlices) StateFields() []string { +func (p *pmaSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -568,28 +568,28 @@ func (x *pmaSegmentDataSlices) StateFields() []string { } } -func (x *pmaSegmentDataSlices) beforeSave() {} +func (p *pmaSegmentDataSlices) beforeSave() {} -func (x *pmaSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (p *pmaSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.Start) + stateSinkObject.Save(1, &p.End) + stateSinkObject.Save(2, &p.Values) } -func (x *pmaSegmentDataSlices) afterLoad() {} +func (p *pmaSegmentDataSlices) afterLoad() {} -func (x *pmaSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (p *pmaSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.Start) + stateSourceObject.Load(1, &p.End) + stateSourceObject.Load(2, &p.Values) } -func (x *SpecialMappable) StateTypeName() string { +func (s *SpecialMappable) StateTypeName() string { return "pkg/sentry/mm.SpecialMappable" } -func (x *SpecialMappable) StateFields() []string { +func (s *SpecialMappable) StateFields() []string { return []string{ "SpecialMappableRefs", "mfp", @@ -598,77 +598,77 @@ func (x *SpecialMappable) StateFields() []string { } } -func (x *SpecialMappable) beforeSave() {} +func (s *SpecialMappable) beforeSave() {} -func (x *SpecialMappable) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SpecialMappableRefs) - m.Save(1, &x.mfp) - m.Save(2, &x.fr) - m.Save(3, &x.name) +func (s *SpecialMappable) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.SpecialMappableRefs) + stateSinkObject.Save(1, &s.mfp) + stateSinkObject.Save(2, &s.fr) + stateSinkObject.Save(3, &s.name) } -func (x *SpecialMappable) afterLoad() {} +func (s *SpecialMappable) afterLoad() {} -func (x *SpecialMappable) StateLoad(m state.Source) { - m.Load(0, &x.SpecialMappableRefs) - m.Load(1, &x.mfp) - m.Load(2, &x.fr) - m.Load(3, &x.name) +func (s *SpecialMappable) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.SpecialMappableRefs) + stateSourceObject.Load(1, &s.mfp) + stateSourceObject.Load(2, &s.fr) + stateSourceObject.Load(3, &s.name) } -func (x *SpecialMappableRefs) StateTypeName() string { +func (s *SpecialMappableRefs) StateTypeName() string { return "pkg/sentry/mm.SpecialMappableRefs" } -func (x *SpecialMappableRefs) StateFields() []string { +func (s *SpecialMappableRefs) StateFields() []string { return []string{ "refCount", } } -func (x *SpecialMappableRefs) beforeSave() {} +func (s *SpecialMappableRefs) beforeSave() {} -func (x *SpecialMappableRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (s *SpecialMappableRefs) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.refCount) } -func (x *SpecialMappableRefs) afterLoad() {} +func (s *SpecialMappableRefs) afterLoad() {} -func (x *SpecialMappableRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (s *SpecialMappableRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.refCount) } -func (x *vmaSet) StateTypeName() string { +func (v *vmaSet) StateTypeName() string { return "pkg/sentry/mm.vmaSet" } -func (x *vmaSet) StateFields() []string { +func (v *vmaSet) StateFields() []string { return []string{ "root", } } -func (x *vmaSet) beforeSave() {} +func (v *vmaSet) beforeSave() {} -func (x *vmaSet) StateSave(m state.Sink) { - x.beforeSave() - var root *vmaSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (v *vmaSet) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + var rootValue *vmaSegmentDataSlices = v.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *vmaSet) afterLoad() {} +func (v *vmaSet) afterLoad() {} -func (x *vmaSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*vmaSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*vmaSegmentDataSlices)) }) +func (v *vmaSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*vmaSegmentDataSlices), func(y interface{}) { v.loadRoot(y.(*vmaSegmentDataSlices)) }) } -func (x *vmanode) StateTypeName() string { +func (v *vmanode) StateTypeName() string { return "pkg/sentry/mm.vmanode" } -func (x *vmanode) StateFields() []string { +func (v *vmanode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -681,38 +681,38 @@ func (x *vmanode) StateFields() []string { } } -func (x *vmanode) beforeSave() {} +func (v *vmanode) beforeSave() {} -func (x *vmanode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (v *vmanode) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.nrSegments) + stateSinkObject.Save(1, &v.parent) + stateSinkObject.Save(2, &v.parentIndex) + stateSinkObject.Save(3, &v.hasChildren) + stateSinkObject.Save(4, &v.maxGap) + stateSinkObject.Save(5, &v.keys) + stateSinkObject.Save(6, &v.values) + stateSinkObject.Save(7, &v.children) } -func (x *vmanode) afterLoad() {} +func (v *vmanode) afterLoad() {} -func (x *vmanode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (v *vmanode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.nrSegments) + stateSourceObject.Load(1, &v.parent) + stateSourceObject.Load(2, &v.parentIndex) + stateSourceObject.Load(3, &v.hasChildren) + stateSourceObject.Load(4, &v.maxGap) + stateSourceObject.Load(5, &v.keys) + stateSourceObject.Load(6, &v.values) + stateSourceObject.Load(7, &v.children) } -func (x *vmaSegmentDataSlices) StateTypeName() string { +func (v *vmaSegmentDataSlices) StateTypeName() string { return "pkg/sentry/mm.vmaSegmentDataSlices" } -func (x *vmaSegmentDataSlices) StateFields() []string { +func (v *vmaSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -720,21 +720,21 @@ func (x *vmaSegmentDataSlices) StateFields() []string { } } -func (x *vmaSegmentDataSlices) beforeSave() {} +func (v *vmaSegmentDataSlices) beforeSave() {} -func (x *vmaSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (v *vmaSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.Start) + stateSinkObject.Save(1, &v.End) + stateSinkObject.Save(2, &v.Values) } -func (x *vmaSegmentDataSlices) afterLoad() {} +func (v *vmaSegmentDataSlices) afterLoad() {} -func (x *vmaSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (v *vmaSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.Start) + stateSourceObject.Load(1, &v.End) + stateSourceObject.Load(2, &v.Values) } func init() { diff --git a/pkg/sentry/mm/pma.go b/pkg/sentry/mm/pma.go index 30facebf7..7e5f7de64 100644 --- a/pkg/sentry/mm/pma.go +++ b/pkg/sentry/mm/pma.go @@ -36,7 +36,7 @@ import ( // * ar.Length() != 0. func (mm *MemoryManager) existingPMAsLocked(ar usermem.AddrRange, at usermem.AccessType, ignorePermissions bool, needInternalMappings bool) pmaIterator { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 { + if !ar.WellFormed() || ar.Length() == 0 { panic(fmt.Sprintf("invalid ar: %v", ar)) } } @@ -100,7 +100,7 @@ func (mm *MemoryManager) existingVecPMAsLocked(ars usermem.AddrRangeSeq, at user // (i.e. permission checks must have been performed against vmas). func (mm *MemoryManager) getPMAsLocked(ctx context.Context, vseg vmaIterator, ar usermem.AddrRange, at usermem.AccessType) (pmaIterator, pmaGapIterator, error) { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 { + if !ar.WellFormed() || ar.Length() == 0 { panic(fmt.Sprintf("invalid ar: %v", ar)) } if !vseg.Ok() { @@ -193,7 +193,7 @@ func (mm *MemoryManager) getVecPMAsLocked(ctx context.Context, ars usermem.AddrR // getVecPMAsLocked; other clients should call one of those instead. func (mm *MemoryManager) getPMAsInternalLocked(ctx context.Context, vseg vmaIterator, ar usermem.AddrRange, at usermem.AccessType) (pmaIterator, pmaGapIterator, error) { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 || !ar.IsPageAligned() { + if !ar.WellFormed() || ar.Length() == 0 || !ar.IsPageAligned() { panic(fmt.Sprintf("invalid ar: %v", ar)) } if !vseg.Ok() { @@ -223,7 +223,7 @@ func (mm *MemoryManager) getPMAsInternalLocked(ctx context.Context, vseg vmaIter // Need a pma here. optAR := vseg.Range().Intersect(pgap.Range()) if checkInvariants { - if optAR.Length() <= 0 { + if optAR.Length() == 0 { panic(fmt.Sprintf("vseg %v and pgap %v do not overlap", vseg, pgap)) } } @@ -560,7 +560,7 @@ func (mm *MemoryManager) isPMACopyOnWriteLocked(vseg vmaIterator, pseg pmaIterat // Invalidate implements memmap.MappingSpace.Invalidate. func (mm *MemoryManager) Invalidate(ar usermem.AddrRange, opts memmap.InvalidateOpts) { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 || !ar.IsPageAligned() { + if !ar.WellFormed() || ar.Length() == 0 || !ar.IsPageAligned() { panic(fmt.Sprintf("invalid ar: %v", ar)) } } @@ -583,7 +583,7 @@ func (mm *MemoryManager) Invalidate(ar usermem.AddrRange, opts memmap.Invalidate // * ar must be page-aligned. func (mm *MemoryManager) invalidateLocked(ar usermem.AddrRange, invalidatePrivate, invalidateShared bool) { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 || !ar.IsPageAligned() { + if !ar.WellFormed() || ar.Length() == 0 || !ar.IsPageAligned() { panic(fmt.Sprintf("invalid ar: %v", ar)) } } @@ -629,7 +629,7 @@ func (mm *MemoryManager) invalidateLocked(ar usermem.AddrRange, invalidatePrivat // * ar must be page-aligned. func (mm *MemoryManager) Pin(ctx context.Context, ar usermem.AddrRange, at usermem.AccessType, ignorePermissions bool) ([]PinnedRange, error) { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 || !ar.IsPageAligned() { + if !ar.WellFormed() || ar.Length() == 0 || !ar.IsPageAligned() { panic(fmt.Sprintf("invalid ar: %v", ar)) } } @@ -715,10 +715,10 @@ func Unpin(prs []PinnedRange) { // * oldAR and newAR must be page-aligned. func (mm *MemoryManager) movePMAsLocked(oldAR, newAR usermem.AddrRange) { if checkInvariants { - if !oldAR.WellFormed() || oldAR.Length() <= 0 || !oldAR.IsPageAligned() { + if !oldAR.WellFormed() || oldAR.Length() == 0 || !oldAR.IsPageAligned() { panic(fmt.Sprintf("invalid oldAR: %v", oldAR)) } - if !newAR.WellFormed() || newAR.Length() <= 0 || !newAR.IsPageAligned() { + if !newAR.WellFormed() || newAR.Length() == 0 || !newAR.IsPageAligned() { panic(fmt.Sprintf("invalid newAR: %v", newAR)) } if oldAR.Length() > newAR.Length() { @@ -778,7 +778,7 @@ func (mm *MemoryManager) movePMAsLocked(oldAR, newAR usermem.AddrRange) { // into mm.pmas. func (mm *MemoryManager) getPMAInternalMappingsLocked(pseg pmaIterator, ar usermem.AddrRange) (pmaGapIterator, error) { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 { + if !ar.WellFormed() || ar.Length() == 0 { panic(fmt.Sprintf("invalid ar: %v", ar)) } if !pseg.Range().Contains(ar.Start) { @@ -831,7 +831,7 @@ func (mm *MemoryManager) getVecPMAInternalMappingsLocked(ars usermem.AddrRangeSe // * pseg.Range().Contains(ar.Start). func (mm *MemoryManager) internalMappingsLocked(pseg pmaIterator, ar usermem.AddrRange) safemem.BlockSeq { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 { + if !ar.WellFormed() || ar.Length() == 0 { panic(fmt.Sprintf("invalid ar: %v", ar)) } if !pseg.Range().Contains(ar.Start) { @@ -1050,7 +1050,7 @@ func (pseg pmaIterator) fileRangeOf(ar usermem.AddrRange) memmap.FileRange { if !pseg.Ok() { panic("terminal pma iterator") } - if !ar.WellFormed() || ar.Length() <= 0 { + if !ar.WellFormed() || ar.Length() == 0 { panic(fmt.Sprintf("invalid ar: %v", ar)) } if !pseg.Range().IsSupersetOf(ar) { diff --git a/pkg/sentry/mm/vma.go b/pkg/sentry/mm/vma.go index f769d8294..b8df72813 100644 --- a/pkg/sentry/mm/vma.go +++ b/pkg/sentry/mm/vma.go @@ -266,7 +266,7 @@ func (mm *MemoryManager) mlockedBytesRangeLocked(ar usermem.AddrRange) uint64 { // * ar.Length() != 0. func (mm *MemoryManager) getVMAsLocked(ctx context.Context, ar usermem.AddrRange, at usermem.AccessType, ignorePermissions bool) (vmaIterator, vmaGapIterator, error) { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 { + if !ar.WellFormed() || ar.Length() == 0 { panic(fmt.Sprintf("invalid ar: %v", ar)) } } @@ -350,7 +350,7 @@ const guardBytes = 256 * usermem.PageSize // * ar must be page-aligned. func (mm *MemoryManager) unmapLocked(ctx context.Context, ar usermem.AddrRange) vmaGapIterator { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 || !ar.IsPageAligned() { + if !ar.WellFormed() || ar.Length() == 0 || !ar.IsPageAligned() { panic(fmt.Sprintf("invalid ar: %v", ar)) } } @@ -371,7 +371,7 @@ func (mm *MemoryManager) unmapLocked(ctx context.Context, ar usermem.AddrRange) // * ar must be page-aligned. func (mm *MemoryManager) removeVMAsLocked(ctx context.Context, ar usermem.AddrRange) vmaGapIterator { if checkInvariants { - if !ar.WellFormed() || ar.Length() <= 0 || !ar.IsPageAligned() { + if !ar.WellFormed() || ar.Length() == 0 || !ar.IsPageAligned() { panic(fmt.Sprintf("invalid ar: %v", ar)) } } @@ -511,7 +511,7 @@ func (vseg vmaIterator) mappableRangeOf(ar usermem.AddrRange) memmap.MappableRan if vseg.ValuePtr().mappable == nil { panic("MappableRange is meaningless for anonymous vma") } - if !ar.WellFormed() || ar.Length() <= 0 { + if !ar.WellFormed() || ar.Length() == 0 { panic(fmt.Sprintf("invalid ar: %v", ar)) } if !vseg.Range().IsSupersetOf(ar) { @@ -536,7 +536,7 @@ func (vseg vmaIterator) addrRangeOf(mr memmap.MappableRange) usermem.AddrRange { if vseg.ValuePtr().mappable == nil { panic("MappableRange is meaningless for anonymous vma") } - if !mr.WellFormed() || mr.Length() <= 0 { + if !mr.WellFormed() || mr.Length() == 0 { panic(fmt.Sprintf("invalid mr: %v", mr)) } if !vseg.mappableRange().IsSupersetOf(mr) { diff --git a/pkg/sentry/pgalloc/pgalloc_state_autogen.go b/pkg/sentry/pgalloc/pgalloc_state_autogen.go index 5d2590b33..d3ce10163 100644 --- a/pkg/sentry/pgalloc/pgalloc_state_autogen.go +++ b/pkg/sentry/pgalloc/pgalloc_state_autogen.go @@ -6,61 +6,61 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *EvictableRange) StateTypeName() string { +func (e *EvictableRange) StateTypeName() string { return "pkg/sentry/pgalloc.EvictableRange" } -func (x *EvictableRange) StateFields() []string { +func (e *EvictableRange) StateFields() []string { return []string{ "Start", "End", } } -func (x *EvictableRange) beforeSave() {} +func (e *EvictableRange) beforeSave() {} -func (x *EvictableRange) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) +func (e *EvictableRange) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.Start) + stateSinkObject.Save(1, &e.End) } -func (x *EvictableRange) afterLoad() {} +func (e *EvictableRange) afterLoad() {} -func (x *EvictableRange) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) +func (e *EvictableRange) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.Start) + stateSourceObject.Load(1, &e.End) } -func (x *evictableRangeSet) StateTypeName() string { +func (e *evictableRangeSet) StateTypeName() string { return "pkg/sentry/pgalloc.evictableRangeSet" } -func (x *evictableRangeSet) StateFields() []string { +func (e *evictableRangeSet) StateFields() []string { return []string{ "root", } } -func (x *evictableRangeSet) beforeSave() {} +func (e *evictableRangeSet) beforeSave() {} -func (x *evictableRangeSet) StateSave(m state.Sink) { - x.beforeSave() - var root *evictableRangeSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (e *evictableRangeSet) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + var rootValue *evictableRangeSegmentDataSlices = e.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *evictableRangeSet) afterLoad() {} +func (e *evictableRangeSet) afterLoad() {} -func (x *evictableRangeSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*evictableRangeSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*evictableRangeSegmentDataSlices)) }) +func (e *evictableRangeSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*evictableRangeSegmentDataSlices), func(y interface{}) { e.loadRoot(y.(*evictableRangeSegmentDataSlices)) }) } -func (x *evictableRangenode) StateTypeName() string { +func (e *evictableRangenode) StateTypeName() string { return "pkg/sentry/pgalloc.evictableRangenode" } -func (x *evictableRangenode) StateFields() []string { +func (e *evictableRangenode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -73,38 +73,38 @@ func (x *evictableRangenode) StateFields() []string { } } -func (x *evictableRangenode) beforeSave() {} +func (e *evictableRangenode) beforeSave() {} -func (x *evictableRangenode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (e *evictableRangenode) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.nrSegments) + stateSinkObject.Save(1, &e.parent) + stateSinkObject.Save(2, &e.parentIndex) + stateSinkObject.Save(3, &e.hasChildren) + stateSinkObject.Save(4, &e.maxGap) + stateSinkObject.Save(5, &e.keys) + stateSinkObject.Save(6, &e.values) + stateSinkObject.Save(7, &e.children) } -func (x *evictableRangenode) afterLoad() {} +func (e *evictableRangenode) afterLoad() {} -func (x *evictableRangenode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (e *evictableRangenode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.nrSegments) + stateSourceObject.Load(1, &e.parent) + stateSourceObject.Load(2, &e.parentIndex) + stateSourceObject.Load(3, &e.hasChildren) + stateSourceObject.Load(4, &e.maxGap) + stateSourceObject.Load(5, &e.keys) + stateSourceObject.Load(6, &e.values) + stateSourceObject.Load(7, &e.children) } -func (x *evictableRangeSegmentDataSlices) StateTypeName() string { +func (e *evictableRangeSegmentDataSlices) StateTypeName() string { return "pkg/sentry/pgalloc.evictableRangeSegmentDataSlices" } -func (x *evictableRangeSegmentDataSlices) StateFields() []string { +func (e *evictableRangeSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -112,28 +112,28 @@ func (x *evictableRangeSegmentDataSlices) StateFields() []string { } } -func (x *evictableRangeSegmentDataSlices) beforeSave() {} +func (e *evictableRangeSegmentDataSlices) beforeSave() {} -func (x *evictableRangeSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (e *evictableRangeSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.Start) + stateSinkObject.Save(1, &e.End) + stateSinkObject.Save(2, &e.Values) } -func (x *evictableRangeSegmentDataSlices) afterLoad() {} +func (e *evictableRangeSegmentDataSlices) afterLoad() {} -func (x *evictableRangeSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (e *evictableRangeSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.Start) + stateSourceObject.Load(1, &e.End) + stateSourceObject.Load(2, &e.Values) } -func (x *usageInfo) StateTypeName() string { +func (u *usageInfo) StateTypeName() string { return "pkg/sentry/pgalloc.usageInfo" } -func (x *usageInfo) StateFields() []string { +func (u *usageInfo) StateFields() []string { return []string{ "kind", "knownCommitted", @@ -141,52 +141,52 @@ func (x *usageInfo) StateFields() []string { } } -func (x *usageInfo) beforeSave() {} +func (u *usageInfo) beforeSave() {} -func (x *usageInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.kind) - m.Save(1, &x.knownCommitted) - m.Save(2, &x.refs) +func (u *usageInfo) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.kind) + stateSinkObject.Save(1, &u.knownCommitted) + stateSinkObject.Save(2, &u.refs) } -func (x *usageInfo) afterLoad() {} +func (u *usageInfo) afterLoad() {} -func (x *usageInfo) StateLoad(m state.Source) { - m.Load(0, &x.kind) - m.Load(1, &x.knownCommitted) - m.Load(2, &x.refs) +func (u *usageInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.kind) + stateSourceObject.Load(1, &u.knownCommitted) + stateSourceObject.Load(2, &u.refs) } -func (x *reclaimSet) StateTypeName() string { +func (r *reclaimSet) StateTypeName() string { return "pkg/sentry/pgalloc.reclaimSet" } -func (x *reclaimSet) StateFields() []string { +func (r *reclaimSet) StateFields() []string { return []string{ "root", } } -func (x *reclaimSet) beforeSave() {} +func (r *reclaimSet) beforeSave() {} -func (x *reclaimSet) StateSave(m state.Sink) { - x.beforeSave() - var root *reclaimSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (r *reclaimSet) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + var rootValue *reclaimSegmentDataSlices = r.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *reclaimSet) afterLoad() {} +func (r *reclaimSet) afterLoad() {} -func (x *reclaimSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*reclaimSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*reclaimSegmentDataSlices)) }) +func (r *reclaimSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*reclaimSegmentDataSlices), func(y interface{}) { r.loadRoot(y.(*reclaimSegmentDataSlices)) }) } -func (x *reclaimnode) StateTypeName() string { +func (r *reclaimnode) StateTypeName() string { return "pkg/sentry/pgalloc.reclaimnode" } -func (x *reclaimnode) StateFields() []string { +func (r *reclaimnode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -199,38 +199,38 @@ func (x *reclaimnode) StateFields() []string { } } -func (x *reclaimnode) beforeSave() {} +func (r *reclaimnode) beforeSave() {} -func (x *reclaimnode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (r *reclaimnode) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.nrSegments) + stateSinkObject.Save(1, &r.parent) + stateSinkObject.Save(2, &r.parentIndex) + stateSinkObject.Save(3, &r.hasChildren) + stateSinkObject.Save(4, &r.maxGap) + stateSinkObject.Save(5, &r.keys) + stateSinkObject.Save(6, &r.values) + stateSinkObject.Save(7, &r.children) } -func (x *reclaimnode) afterLoad() {} +func (r *reclaimnode) afterLoad() {} -func (x *reclaimnode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (r *reclaimnode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.nrSegments) + stateSourceObject.Load(1, &r.parent) + stateSourceObject.Load(2, &r.parentIndex) + stateSourceObject.Load(3, &r.hasChildren) + stateSourceObject.Load(4, &r.maxGap) + stateSourceObject.Load(5, &r.keys) + stateSourceObject.Load(6, &r.values) + stateSourceObject.Load(7, &r.children) } -func (x *reclaimSegmentDataSlices) StateTypeName() string { +func (r *reclaimSegmentDataSlices) StateTypeName() string { return "pkg/sentry/pgalloc.reclaimSegmentDataSlices" } -func (x *reclaimSegmentDataSlices) StateFields() []string { +func (r *reclaimSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -238,52 +238,52 @@ func (x *reclaimSegmentDataSlices) StateFields() []string { } } -func (x *reclaimSegmentDataSlices) beforeSave() {} +func (r *reclaimSegmentDataSlices) beforeSave() {} -func (x *reclaimSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (r *reclaimSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.Start) + stateSinkObject.Save(1, &r.End) + stateSinkObject.Save(2, &r.Values) } -func (x *reclaimSegmentDataSlices) afterLoad() {} +func (r *reclaimSegmentDataSlices) afterLoad() {} -func (x *reclaimSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (r *reclaimSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.Start) + stateSourceObject.Load(1, &r.End) + stateSourceObject.Load(2, &r.Values) } -func (x *usageSet) StateTypeName() string { +func (u *usageSet) StateTypeName() string { return "pkg/sentry/pgalloc.usageSet" } -func (x *usageSet) StateFields() []string { +func (u *usageSet) StateFields() []string { return []string{ "root", } } -func (x *usageSet) beforeSave() {} +func (u *usageSet) beforeSave() {} -func (x *usageSet) StateSave(m state.Sink) { - x.beforeSave() - var root *usageSegmentDataSlices = x.saveRoot() - m.SaveValue(0, root) +func (u *usageSet) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + var rootValue *usageSegmentDataSlices = u.saveRoot() + stateSinkObject.SaveValue(0, rootValue) } -func (x *usageSet) afterLoad() {} +func (u *usageSet) afterLoad() {} -func (x *usageSet) StateLoad(m state.Source) { - m.LoadValue(0, new(*usageSegmentDataSlices), func(y interface{}) { x.loadRoot(y.(*usageSegmentDataSlices)) }) +func (u *usageSet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadValue(0, new(*usageSegmentDataSlices), func(y interface{}) { u.loadRoot(y.(*usageSegmentDataSlices)) }) } -func (x *usagenode) StateTypeName() string { +func (u *usagenode) StateTypeName() string { return "pkg/sentry/pgalloc.usagenode" } -func (x *usagenode) StateFields() []string { +func (u *usagenode) StateFields() []string { return []string{ "nrSegments", "parent", @@ -296,38 +296,38 @@ func (x *usagenode) StateFields() []string { } } -func (x *usagenode) beforeSave() {} +func (u *usagenode) beforeSave() {} -func (x *usagenode) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nrSegments) - m.Save(1, &x.parent) - m.Save(2, &x.parentIndex) - m.Save(3, &x.hasChildren) - m.Save(4, &x.maxGap) - m.Save(5, &x.keys) - m.Save(6, &x.values) - m.Save(7, &x.children) +func (u *usagenode) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.nrSegments) + stateSinkObject.Save(1, &u.parent) + stateSinkObject.Save(2, &u.parentIndex) + stateSinkObject.Save(3, &u.hasChildren) + stateSinkObject.Save(4, &u.maxGap) + stateSinkObject.Save(5, &u.keys) + stateSinkObject.Save(6, &u.values) + stateSinkObject.Save(7, &u.children) } -func (x *usagenode) afterLoad() {} +func (u *usagenode) afterLoad() {} -func (x *usagenode) StateLoad(m state.Source) { - m.Load(0, &x.nrSegments) - m.Load(1, &x.parent) - m.Load(2, &x.parentIndex) - m.Load(3, &x.hasChildren) - m.Load(4, &x.maxGap) - m.Load(5, &x.keys) - m.Load(6, &x.values) - m.Load(7, &x.children) +func (u *usagenode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.nrSegments) + stateSourceObject.Load(1, &u.parent) + stateSourceObject.Load(2, &u.parentIndex) + stateSourceObject.Load(3, &u.hasChildren) + stateSourceObject.Load(4, &u.maxGap) + stateSourceObject.Load(5, &u.keys) + stateSourceObject.Load(6, &u.values) + stateSourceObject.Load(7, &u.children) } -func (x *usageSegmentDataSlices) StateTypeName() string { +func (u *usageSegmentDataSlices) StateTypeName() string { return "pkg/sentry/pgalloc.usageSegmentDataSlices" } -func (x *usageSegmentDataSlices) StateFields() []string { +func (u *usageSegmentDataSlices) StateFields() []string { return []string{ "Start", "End", @@ -335,21 +335,21 @@ func (x *usageSegmentDataSlices) StateFields() []string { } } -func (x *usageSegmentDataSlices) beforeSave() {} +func (u *usageSegmentDataSlices) beforeSave() {} -func (x *usageSegmentDataSlices) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) - m.Save(2, &x.Values) +func (u *usageSegmentDataSlices) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.Start) + stateSinkObject.Save(1, &u.End) + stateSinkObject.Save(2, &u.Values) } -func (x *usageSegmentDataSlices) afterLoad() {} +func (u *usageSegmentDataSlices) afterLoad() {} -func (x *usageSegmentDataSlices) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) - m.Load(2, &x.Values) +func (u *usageSegmentDataSlices) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.Start) + stateSourceObject.Load(1, &u.End) + stateSourceObject.Load(2, &u.Values) } func init() { diff --git a/pkg/sentry/socket/control/control_state_autogen.go b/pkg/sentry/socket/control/control_state_autogen.go index f3adf8927..98cd79747 100644 --- a/pkg/sentry/socket/control/control_state_autogen.go +++ b/pkg/sentry/socket/control/control_state_autogen.go @@ -6,19 +6,19 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *RightsFiles) StateTypeName() string { +func (r *RightsFiles) StateTypeName() string { return "pkg/sentry/socket/control.RightsFiles" } -func (x *RightsFiles) StateFields() []string { +func (r *RightsFiles) StateFields() []string { return nil } -func (x *scmCredentials) StateTypeName() string { +func (s *scmCredentials) StateTypeName() string { return "pkg/sentry/socket/control.scmCredentials" } -func (x *scmCredentials) StateFields() []string { +func (s *scmCredentials) StateFields() []string { return []string{ "t", "kuid", @@ -26,21 +26,21 @@ func (x *scmCredentials) StateFields() []string { } } -func (x *scmCredentials) beforeSave() {} +func (s *scmCredentials) beforeSave() {} -func (x *scmCredentials) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.t) - m.Save(1, &x.kuid) - m.Save(2, &x.kgid) +func (s *scmCredentials) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.t) + stateSinkObject.Save(1, &s.kuid) + stateSinkObject.Save(2, &s.kgid) } -func (x *scmCredentials) afterLoad() {} +func (s *scmCredentials) afterLoad() {} -func (x *scmCredentials) StateLoad(m state.Source) { - m.Load(0, &x.t) - m.Load(1, &x.kuid) - m.Load(2, &x.kgid) +func (s *scmCredentials) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.t) + stateSourceObject.Load(1, &s.kuid) + stateSourceObject.Load(2, &s.kgid) } func init() { diff --git a/pkg/sentry/socket/hostinet/hostinet_state_autogen.go b/pkg/sentry/socket/hostinet/hostinet_state_autogen.go index 4ee4df33b..6d427c0db 100644 --- a/pkg/sentry/socket/hostinet/hostinet_state_autogen.go +++ b/pkg/sentry/socket/hostinet/hostinet_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *socketOpsCommon) StateTypeName() string { +func (s *socketOpsCommon) StateTypeName() string { return "pkg/sentry/socket/hostinet.socketOpsCommon" } -func (x *socketOpsCommon) StateFields() []string { +func (s *socketOpsCommon) StateFields() []string { return []string{ "SendReceiveTimeout", "family", @@ -21,27 +21,27 @@ func (x *socketOpsCommon) StateFields() []string { } } -func (x *socketOpsCommon) beforeSave() {} +func (s *socketOpsCommon) beforeSave() {} -func (x *socketOpsCommon) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SendReceiveTimeout) - m.Save(1, &x.family) - m.Save(2, &x.stype) - m.Save(3, &x.protocol) - m.Save(4, &x.queue) - m.Save(5, &x.fd) +func (s *socketOpsCommon) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.SendReceiveTimeout) + stateSinkObject.Save(1, &s.family) + stateSinkObject.Save(2, &s.stype) + stateSinkObject.Save(3, &s.protocol) + stateSinkObject.Save(4, &s.queue) + stateSinkObject.Save(5, &s.fd) } -func (x *socketOpsCommon) afterLoad() {} +func (s *socketOpsCommon) afterLoad() {} -func (x *socketOpsCommon) StateLoad(m state.Source) { - m.Load(0, &x.SendReceiveTimeout) - m.Load(1, &x.family) - m.Load(2, &x.stype) - m.Load(3, &x.protocol) - m.Load(4, &x.queue) - m.Load(5, &x.fd) +func (s *socketOpsCommon) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.SendReceiveTimeout) + stateSourceObject.Load(1, &s.family) + stateSourceObject.Load(2, &s.stype) + stateSourceObject.Load(3, &s.protocol) + stateSourceObject.Load(4, &s.queue) + stateSourceObject.Load(5, &s.fd) } func init() { diff --git a/pkg/sentry/socket/netlink/netlink_state_autogen.go b/pkg/sentry/socket/netlink/netlink_state_autogen.go index 5a7a09b6d..f561d7f90 100644 --- a/pkg/sentry/socket/netlink/netlink_state_autogen.go +++ b/pkg/sentry/socket/netlink/netlink_state_autogen.go @@ -6,34 +6,34 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Socket) StateTypeName() string { +func (s *Socket) StateTypeName() string { return "pkg/sentry/socket/netlink.Socket" } -func (x *Socket) StateFields() []string { +func (s *Socket) StateFields() []string { return []string{ "socketOpsCommon", } } -func (x *Socket) beforeSave() {} +func (s *Socket) beforeSave() {} -func (x *Socket) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.socketOpsCommon) +func (s *Socket) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.socketOpsCommon) } -func (x *Socket) afterLoad() {} +func (s *Socket) afterLoad() {} -func (x *Socket) StateLoad(m state.Source) { - m.Load(0, &x.socketOpsCommon) +func (s *Socket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.socketOpsCommon) } -func (x *socketOpsCommon) StateTypeName() string { +func (s *socketOpsCommon) StateTypeName() string { return "pkg/sentry/socket/netlink.socketOpsCommon" } -func (x *socketOpsCommon) StateFields() []string { +func (s *socketOpsCommon) StateFields() []string { return []string{ "SendReceiveTimeout", "ports", @@ -49,56 +49,56 @@ func (x *socketOpsCommon) StateFields() []string { } } -func (x *socketOpsCommon) beforeSave() {} - -func (x *socketOpsCommon) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SendReceiveTimeout) - m.Save(1, &x.ports) - m.Save(2, &x.protocol) - m.Save(3, &x.skType) - m.Save(4, &x.ep) - m.Save(5, &x.connection) - m.Save(6, &x.bound) - m.Save(7, &x.portID) - m.Save(8, &x.sendBufferSize) - m.Save(9, &x.passcred) - m.Save(10, &x.filter) +func (s *socketOpsCommon) beforeSave() {} + +func (s *socketOpsCommon) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.SendReceiveTimeout) + stateSinkObject.Save(1, &s.ports) + stateSinkObject.Save(2, &s.protocol) + stateSinkObject.Save(3, &s.skType) + stateSinkObject.Save(4, &s.ep) + stateSinkObject.Save(5, &s.connection) + stateSinkObject.Save(6, &s.bound) + stateSinkObject.Save(7, &s.portID) + stateSinkObject.Save(8, &s.sendBufferSize) + stateSinkObject.Save(9, &s.passcred) + stateSinkObject.Save(10, &s.filter) } -func (x *socketOpsCommon) afterLoad() {} - -func (x *socketOpsCommon) StateLoad(m state.Source) { - m.Load(0, &x.SendReceiveTimeout) - m.Load(1, &x.ports) - m.Load(2, &x.protocol) - m.Load(3, &x.skType) - m.Load(4, &x.ep) - m.Load(5, &x.connection) - m.Load(6, &x.bound) - m.Load(7, &x.portID) - m.Load(8, &x.sendBufferSize) - m.Load(9, &x.passcred) - m.Load(10, &x.filter) +func (s *socketOpsCommon) afterLoad() {} + +func (s *socketOpsCommon) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.SendReceiveTimeout) + stateSourceObject.Load(1, &s.ports) + stateSourceObject.Load(2, &s.protocol) + stateSourceObject.Load(3, &s.skType) + stateSourceObject.Load(4, &s.ep) + stateSourceObject.Load(5, &s.connection) + stateSourceObject.Load(6, &s.bound) + stateSourceObject.Load(7, &s.portID) + stateSourceObject.Load(8, &s.sendBufferSize) + stateSourceObject.Load(9, &s.passcred) + stateSourceObject.Load(10, &s.filter) } -func (x *kernelSCM) StateTypeName() string { +func (k *kernelSCM) StateTypeName() string { return "pkg/sentry/socket/netlink.kernelSCM" } -func (x *kernelSCM) StateFields() []string { +func (k *kernelSCM) StateFields() []string { return []string{} } -func (x *kernelSCM) beforeSave() {} +func (k *kernelSCM) beforeSave() {} -func (x *kernelSCM) StateSave(m state.Sink) { - x.beforeSave() +func (k *kernelSCM) StateSave(stateSinkObject state.Sink) { + k.beforeSave() } -func (x *kernelSCM) afterLoad() {} +func (k *kernelSCM) afterLoad() {} -func (x *kernelSCM) StateLoad(m state.Source) { +func (k *kernelSCM) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/socket/netlink/port/port_state_autogen.go b/pkg/sentry/socket/netlink/port/port_state_autogen.go index 16c59e616..e0083fcad 100644 --- a/pkg/sentry/socket/netlink/port/port_state_autogen.go +++ b/pkg/sentry/socket/netlink/port/port_state_autogen.go @@ -6,27 +6,27 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Manager) StateTypeName() string { +func (m *Manager) StateTypeName() string { return "pkg/sentry/socket/netlink/port.Manager" } -func (x *Manager) StateFields() []string { +func (m *Manager) StateFields() []string { return []string{ "ports", } } -func (x *Manager) beforeSave() {} +func (m *Manager) beforeSave() {} -func (x *Manager) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ports) +func (m *Manager) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.ports) } -func (x *Manager) afterLoad() {} +func (m *Manager) afterLoad() {} -func (x *Manager) StateLoad(m state.Source) { - m.Load(0, &x.ports) +func (m *Manager) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.ports) } func init() { diff --git a/pkg/sentry/socket/netlink/route/route_state_autogen.go b/pkg/sentry/socket/netlink/route/route_state_autogen.go index bc0111017..0b263b5b1 100644 --- a/pkg/sentry/socket/netlink/route/route_state_autogen.go +++ b/pkg/sentry/socket/netlink/route/route_state_autogen.go @@ -6,23 +6,23 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Protocol) StateTypeName() string { +func (p *Protocol) StateTypeName() string { return "pkg/sentry/socket/netlink/route.Protocol" } -func (x *Protocol) StateFields() []string { +func (p *Protocol) StateFields() []string { return []string{} } -func (x *Protocol) beforeSave() {} +func (p *Protocol) beforeSave() {} -func (x *Protocol) StateSave(m state.Sink) { - x.beforeSave() +func (p *Protocol) StateSave(stateSinkObject state.Sink) { + p.beforeSave() } -func (x *Protocol) afterLoad() {} +func (p *Protocol) afterLoad() {} -func (x *Protocol) StateLoad(m state.Source) { +func (p *Protocol) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/socket/netlink/uevent/uevent_state_autogen.go b/pkg/sentry/socket/netlink/uevent/uevent_state_autogen.go index 4f2211ec2..63f488594 100644 --- a/pkg/sentry/socket/netlink/uevent/uevent_state_autogen.go +++ b/pkg/sentry/socket/netlink/uevent/uevent_state_autogen.go @@ -6,23 +6,23 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Protocol) StateTypeName() string { +func (p *Protocol) StateTypeName() string { return "pkg/sentry/socket/netlink/uevent.Protocol" } -func (x *Protocol) StateFields() []string { +func (p *Protocol) StateFields() []string { return []string{} } -func (x *Protocol) beforeSave() {} +func (p *Protocol) beforeSave() {} -func (x *Protocol) StateSave(m state.Sink) { - x.beforeSave() +func (p *Protocol) StateSave(stateSinkObject state.Sink) { + p.beforeSave() } -func (x *Protocol) afterLoad() {} +func (p *Protocol) afterLoad() {} -func (x *Protocol) StateLoad(m state.Source) { +func (p *Protocol) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/sentry/socket/netstack/netstack_state_autogen.go b/pkg/sentry/socket/netstack/netstack_state_autogen.go index 27e3ada76..983bed1b3 100644 --- a/pkg/sentry/socket/netstack/netstack_state_autogen.go +++ b/pkg/sentry/socket/netstack/netstack_state_autogen.go @@ -6,34 +6,34 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SocketOperations) StateTypeName() string { +func (s *SocketOperations) StateTypeName() string { return "pkg/sentry/socket/netstack.SocketOperations" } -func (x *SocketOperations) StateFields() []string { +func (s *SocketOperations) StateFields() []string { return []string{ "socketOpsCommon", } } -func (x *SocketOperations) beforeSave() {} +func (s *SocketOperations) beforeSave() {} -func (x *SocketOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.socketOpsCommon) +func (s *SocketOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.socketOpsCommon) } -func (x *SocketOperations) afterLoad() {} +func (s *SocketOperations) afterLoad() {} -func (x *SocketOperations) StateLoad(m state.Source) { - m.Load(0, &x.socketOpsCommon) +func (s *SocketOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.socketOpsCommon) } -func (x *socketOpsCommon) StateTypeName() string { +func (s *socketOpsCommon) StateTypeName() string { return "pkg/sentry/socket/netstack.socketOpsCommon" } -func (x *socketOpsCommon) StateFields() []string { +func (s *socketOpsCommon) StateFields() []string { return []string{ "SendReceiveTimeout", "Queue", @@ -53,63 +53,63 @@ func (x *socketOpsCommon) StateFields() []string { } } -func (x *socketOpsCommon) beforeSave() {} - -func (x *socketOpsCommon) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SendReceiveTimeout) - m.Save(1, &x.Queue) - m.Save(2, &x.family) - m.Save(3, &x.Endpoint) - m.Save(4, &x.skType) - m.Save(5, &x.protocol) - m.Save(6, &x.readViewHasData) - m.Save(7, &x.readView) - m.Save(8, &x.readCM) - m.Save(9, &x.sender) - m.Save(10, &x.linkPacketInfo) - m.Save(11, &x.sockOptTimestamp) - m.Save(12, &x.timestampValid) - m.Save(13, &x.timestampNS) - m.Save(14, &x.sockOptInq) +func (s *socketOpsCommon) beforeSave() {} + +func (s *socketOpsCommon) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.SendReceiveTimeout) + stateSinkObject.Save(1, &s.Queue) + stateSinkObject.Save(2, &s.family) + stateSinkObject.Save(3, &s.Endpoint) + stateSinkObject.Save(4, &s.skType) + stateSinkObject.Save(5, &s.protocol) + stateSinkObject.Save(6, &s.readViewHasData) + stateSinkObject.Save(7, &s.readView) + stateSinkObject.Save(8, &s.readCM) + stateSinkObject.Save(9, &s.sender) + stateSinkObject.Save(10, &s.linkPacketInfo) + stateSinkObject.Save(11, &s.sockOptTimestamp) + stateSinkObject.Save(12, &s.timestampValid) + stateSinkObject.Save(13, &s.timestampNS) + stateSinkObject.Save(14, &s.sockOptInq) } -func (x *socketOpsCommon) afterLoad() {} - -func (x *socketOpsCommon) StateLoad(m state.Source) { - m.Load(0, &x.SendReceiveTimeout) - m.Load(1, &x.Queue) - m.Load(2, &x.family) - m.Load(3, &x.Endpoint) - m.Load(4, &x.skType) - m.Load(5, &x.protocol) - m.Load(6, &x.readViewHasData) - m.Load(7, &x.readView) - m.Load(8, &x.readCM) - m.Load(9, &x.sender) - m.Load(10, &x.linkPacketInfo) - m.Load(11, &x.sockOptTimestamp) - m.Load(12, &x.timestampValid) - m.Load(13, &x.timestampNS) - m.Load(14, &x.sockOptInq) +func (s *socketOpsCommon) afterLoad() {} + +func (s *socketOpsCommon) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.SendReceiveTimeout) + stateSourceObject.Load(1, &s.Queue) + stateSourceObject.Load(2, &s.family) + stateSourceObject.Load(3, &s.Endpoint) + stateSourceObject.Load(4, &s.skType) + stateSourceObject.Load(5, &s.protocol) + stateSourceObject.Load(6, &s.readViewHasData) + stateSourceObject.Load(7, &s.readView) + stateSourceObject.Load(8, &s.readCM) + stateSourceObject.Load(9, &s.sender) + stateSourceObject.Load(10, &s.linkPacketInfo) + stateSourceObject.Load(11, &s.sockOptTimestamp) + stateSourceObject.Load(12, &s.timestampValid) + stateSourceObject.Load(13, &s.timestampNS) + stateSourceObject.Load(14, &s.sockOptInq) } -func (x *Stack) StateTypeName() string { +func (s *Stack) StateTypeName() string { return "pkg/sentry/socket/netstack.Stack" } -func (x *Stack) StateFields() []string { +func (s *Stack) StateFields() []string { return []string{} } -func (x *Stack) beforeSave() {} +func (s *Stack) beforeSave() {} -func (x *Stack) StateSave(m state.Sink) { - x.beforeSave() +func (s *Stack) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *Stack) StateLoad(m state.Source) { - m.AfterLoad(x.afterLoad) +func (s *Stack) StateLoad(stateSourceObject state.Source) { + stateSourceObject.AfterLoad(s.afterLoad) } func init() { diff --git a/pkg/sentry/socket/socket_state_autogen.go b/pkg/sentry/socket/socket_state_autogen.go index 2865933e9..e09c161ca 100644 --- a/pkg/sentry/socket/socket_state_autogen.go +++ b/pkg/sentry/socket/socket_state_autogen.go @@ -6,30 +6,30 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SendReceiveTimeout) StateTypeName() string { +func (s *SendReceiveTimeout) StateTypeName() string { return "pkg/sentry/socket.SendReceiveTimeout" } -func (x *SendReceiveTimeout) StateFields() []string { +func (s *SendReceiveTimeout) StateFields() []string { return []string{ "send", "recv", } } -func (x *SendReceiveTimeout) beforeSave() {} +func (s *SendReceiveTimeout) beforeSave() {} -func (x *SendReceiveTimeout) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.send) - m.Save(1, &x.recv) +func (s *SendReceiveTimeout) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.send) + stateSinkObject.Save(1, &s.recv) } -func (x *SendReceiveTimeout) afterLoad() {} +func (s *SendReceiveTimeout) afterLoad() {} -func (x *SendReceiveTimeout) StateLoad(m state.Source) { - m.Load(0, &x.send) - m.Load(1, &x.recv) +func (s *SendReceiveTimeout) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.send) + stateSourceObject.Load(1, &s.recv) } func init() { diff --git a/pkg/sentry/socket/unix/transport/transport_state_autogen.go b/pkg/sentry/socket/unix/transport/transport_state_autogen.go index 98f5bc2e5..0264e8fb5 100644 --- a/pkg/sentry/socket/unix/transport/transport_state_autogen.go +++ b/pkg/sentry/socket/unix/transport/transport_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *connectionedEndpoint) StateTypeName() string { +func (c *connectionedEndpoint) StateTypeName() string { return "pkg/sentry/socket/unix/transport.connectionedEndpoint" } -func (x *connectionedEndpoint) StateFields() []string { +func (c *connectionedEndpoint) StateFields() []string { return []string{ "baseEndpoint", "id", @@ -20,56 +20,56 @@ func (x *connectionedEndpoint) StateFields() []string { } } -func (x *connectionedEndpoint) beforeSave() {} +func (c *connectionedEndpoint) beforeSave() {} -func (x *connectionedEndpoint) StateSave(m state.Sink) { - x.beforeSave() - var acceptedChan []*connectionedEndpoint = x.saveAcceptedChan() - m.SaveValue(4, acceptedChan) - m.Save(0, &x.baseEndpoint) - m.Save(1, &x.id) - m.Save(2, &x.idGenerator) - m.Save(3, &x.stype) +func (c *connectionedEndpoint) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + var acceptedChanValue []*connectionedEndpoint = c.saveAcceptedChan() + stateSinkObject.SaveValue(4, acceptedChanValue) + stateSinkObject.Save(0, &c.baseEndpoint) + stateSinkObject.Save(1, &c.id) + stateSinkObject.Save(2, &c.idGenerator) + stateSinkObject.Save(3, &c.stype) } -func (x *connectionedEndpoint) afterLoad() {} +func (c *connectionedEndpoint) afterLoad() {} -func (x *connectionedEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.baseEndpoint) - m.Load(1, &x.id) - m.Load(2, &x.idGenerator) - m.Load(3, &x.stype) - m.LoadValue(4, new([]*connectionedEndpoint), func(y interface{}) { x.loadAcceptedChan(y.([]*connectionedEndpoint)) }) +func (c *connectionedEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.baseEndpoint) + stateSourceObject.Load(1, &c.id) + stateSourceObject.Load(2, &c.idGenerator) + stateSourceObject.Load(3, &c.stype) + stateSourceObject.LoadValue(4, new([]*connectionedEndpoint), func(y interface{}) { c.loadAcceptedChan(y.([]*connectionedEndpoint)) }) } -func (x *connectionlessEndpoint) StateTypeName() string { +func (c *connectionlessEndpoint) StateTypeName() string { return "pkg/sentry/socket/unix/transport.connectionlessEndpoint" } -func (x *connectionlessEndpoint) StateFields() []string { +func (c *connectionlessEndpoint) StateFields() []string { return []string{ "baseEndpoint", } } -func (x *connectionlessEndpoint) beforeSave() {} +func (c *connectionlessEndpoint) beforeSave() {} -func (x *connectionlessEndpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.baseEndpoint) +func (c *connectionlessEndpoint) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.baseEndpoint) } -func (x *connectionlessEndpoint) afterLoad() {} +func (c *connectionlessEndpoint) afterLoad() {} -func (x *connectionlessEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.baseEndpoint) +func (c *connectionlessEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.baseEndpoint) } -func (x *queue) StateTypeName() string { +func (q *queue) StateTypeName() string { return "pkg/sentry/socket/unix/transport.queue" } -func (x *queue) StateFields() []string { +func (q *queue) StateFields() []string { return []string{ "queueRefs", "ReaderQueue", @@ -82,139 +82,139 @@ func (x *queue) StateFields() []string { } } -func (x *queue) beforeSave() {} +func (q *queue) beforeSave() {} -func (x *queue) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.queueRefs) - m.Save(1, &x.ReaderQueue) - m.Save(2, &x.WriterQueue) - m.Save(3, &x.closed) - m.Save(4, &x.unread) - m.Save(5, &x.used) - m.Save(6, &x.limit) - m.Save(7, &x.dataList) +func (q *queue) StateSave(stateSinkObject state.Sink) { + q.beforeSave() + stateSinkObject.Save(0, &q.queueRefs) + stateSinkObject.Save(1, &q.ReaderQueue) + stateSinkObject.Save(2, &q.WriterQueue) + stateSinkObject.Save(3, &q.closed) + stateSinkObject.Save(4, &q.unread) + stateSinkObject.Save(5, &q.used) + stateSinkObject.Save(6, &q.limit) + stateSinkObject.Save(7, &q.dataList) } -func (x *queue) afterLoad() {} +func (q *queue) afterLoad() {} -func (x *queue) StateLoad(m state.Source) { - m.Load(0, &x.queueRefs) - m.Load(1, &x.ReaderQueue) - m.Load(2, &x.WriterQueue) - m.Load(3, &x.closed) - m.Load(4, &x.unread) - m.Load(5, &x.used) - m.Load(6, &x.limit) - m.Load(7, &x.dataList) +func (q *queue) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &q.queueRefs) + stateSourceObject.Load(1, &q.ReaderQueue) + stateSourceObject.Load(2, &q.WriterQueue) + stateSourceObject.Load(3, &q.closed) + stateSourceObject.Load(4, &q.unread) + stateSourceObject.Load(5, &q.used) + stateSourceObject.Load(6, &q.limit) + stateSourceObject.Load(7, &q.dataList) } -func (x *queueRefs) StateTypeName() string { +func (q *queueRefs) StateTypeName() string { return "pkg/sentry/socket/unix/transport.queueRefs" } -func (x *queueRefs) StateFields() []string { +func (q *queueRefs) StateFields() []string { return []string{ "refCount", } } -func (x *queueRefs) beforeSave() {} +func (q *queueRefs) beforeSave() {} -func (x *queueRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (q *queueRefs) StateSave(stateSinkObject state.Sink) { + q.beforeSave() + stateSinkObject.Save(0, &q.refCount) } -func (x *queueRefs) afterLoad() {} +func (q *queueRefs) afterLoad() {} -func (x *queueRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (q *queueRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &q.refCount) } -func (x *messageList) StateTypeName() string { +func (m *messageList) StateTypeName() string { return "pkg/sentry/socket/unix/transport.messageList" } -func (x *messageList) StateFields() []string { +func (m *messageList) StateFields() []string { return []string{ "head", "tail", } } -func (x *messageList) beforeSave() {} +func (m *messageList) beforeSave() {} -func (x *messageList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (m *messageList) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.head) + stateSinkObject.Save(1, &m.tail) } -func (x *messageList) afterLoad() {} +func (m *messageList) afterLoad() {} -func (x *messageList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (m *messageList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.head) + stateSourceObject.Load(1, &m.tail) } -func (x *messageEntry) StateTypeName() string { +func (m *messageEntry) StateTypeName() string { return "pkg/sentry/socket/unix/transport.messageEntry" } -func (x *messageEntry) StateFields() []string { +func (m *messageEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *messageEntry) beforeSave() {} +func (m *messageEntry) beforeSave() {} -func (x *messageEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (m *messageEntry) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.next) + stateSinkObject.Save(1, &m.prev) } -func (x *messageEntry) afterLoad() {} +func (m *messageEntry) afterLoad() {} -func (x *messageEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (m *messageEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.next) + stateSourceObject.Load(1, &m.prev) } -func (x *ControlMessages) StateTypeName() string { +func (c *ControlMessages) StateTypeName() string { return "pkg/sentry/socket/unix/transport.ControlMessages" } -func (x *ControlMessages) StateFields() []string { +func (c *ControlMessages) StateFields() []string { return []string{ "Rights", "Credentials", } } -func (x *ControlMessages) beforeSave() {} +func (c *ControlMessages) beforeSave() {} -func (x *ControlMessages) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Rights) - m.Save(1, &x.Credentials) +func (c *ControlMessages) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.Rights) + stateSinkObject.Save(1, &c.Credentials) } -func (x *ControlMessages) afterLoad() {} +func (c *ControlMessages) afterLoad() {} -func (x *ControlMessages) StateLoad(m state.Source) { - m.Load(0, &x.Rights) - m.Load(1, &x.Credentials) +func (c *ControlMessages) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.Rights) + stateSourceObject.Load(1, &c.Credentials) } -func (x *message) StateTypeName() string { +func (m *message) StateTypeName() string { return "pkg/sentry/socket/unix/transport.message" } -func (x *message) StateFields() []string { +func (m *message) StateFields() []string { return []string{ "messageEntry", "Data", @@ -223,53 +223,53 @@ func (x *message) StateFields() []string { } } -func (x *message) beforeSave() {} +func (m *message) beforeSave() {} -func (x *message) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.messageEntry) - m.Save(1, &x.Data) - m.Save(2, &x.Control) - m.Save(3, &x.Address) +func (m *message) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.messageEntry) + stateSinkObject.Save(1, &m.Data) + stateSinkObject.Save(2, &m.Control) + stateSinkObject.Save(3, &m.Address) } -func (x *message) afterLoad() {} +func (m *message) afterLoad() {} -func (x *message) StateLoad(m state.Source) { - m.Load(0, &x.messageEntry) - m.Load(1, &x.Data) - m.Load(2, &x.Control) - m.Load(3, &x.Address) +func (m *message) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.messageEntry) + stateSourceObject.Load(1, &m.Data) + stateSourceObject.Load(2, &m.Control) + stateSourceObject.Load(3, &m.Address) } -func (x *queueReceiver) StateTypeName() string { +func (q *queueReceiver) StateTypeName() string { return "pkg/sentry/socket/unix/transport.queueReceiver" } -func (x *queueReceiver) StateFields() []string { +func (q *queueReceiver) StateFields() []string { return []string{ "readQueue", } } -func (x *queueReceiver) beforeSave() {} +func (q *queueReceiver) beforeSave() {} -func (x *queueReceiver) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.readQueue) +func (q *queueReceiver) StateSave(stateSinkObject state.Sink) { + q.beforeSave() + stateSinkObject.Save(0, &q.readQueue) } -func (x *queueReceiver) afterLoad() {} +func (q *queueReceiver) afterLoad() {} -func (x *queueReceiver) StateLoad(m state.Source) { - m.Load(0, &x.readQueue) +func (q *queueReceiver) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &q.readQueue) } -func (x *streamQueueReceiver) StateTypeName() string { +func (s *streamQueueReceiver) StateTypeName() string { return "pkg/sentry/socket/unix/transport.streamQueueReceiver" } -func (x *streamQueueReceiver) StateFields() []string { +func (s *streamQueueReceiver) StateFields() []string { return []string{ "queueReceiver", "buffer", @@ -278,56 +278,56 @@ func (x *streamQueueReceiver) StateFields() []string { } } -func (x *streamQueueReceiver) beforeSave() {} +func (s *streamQueueReceiver) beforeSave() {} -func (x *streamQueueReceiver) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.queueReceiver) - m.Save(1, &x.buffer) - m.Save(2, &x.control) - m.Save(3, &x.addr) +func (s *streamQueueReceiver) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.queueReceiver) + stateSinkObject.Save(1, &s.buffer) + stateSinkObject.Save(2, &s.control) + stateSinkObject.Save(3, &s.addr) } -func (x *streamQueueReceiver) afterLoad() {} +func (s *streamQueueReceiver) afterLoad() {} -func (x *streamQueueReceiver) StateLoad(m state.Source) { - m.Load(0, &x.queueReceiver) - m.Load(1, &x.buffer) - m.Load(2, &x.control) - m.Load(3, &x.addr) +func (s *streamQueueReceiver) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.queueReceiver) + stateSourceObject.Load(1, &s.buffer) + stateSourceObject.Load(2, &s.control) + stateSourceObject.Load(3, &s.addr) } -func (x *connectedEndpoint) StateTypeName() string { +func (c *connectedEndpoint) StateTypeName() string { return "pkg/sentry/socket/unix/transport.connectedEndpoint" } -func (x *connectedEndpoint) StateFields() []string { +func (c *connectedEndpoint) StateFields() []string { return []string{ "endpoint", "writeQueue", } } -func (x *connectedEndpoint) beforeSave() {} +func (c *connectedEndpoint) beforeSave() {} -func (x *connectedEndpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.endpoint) - m.Save(1, &x.writeQueue) +func (c *connectedEndpoint) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.endpoint) + stateSinkObject.Save(1, &c.writeQueue) } -func (x *connectedEndpoint) afterLoad() {} +func (c *connectedEndpoint) afterLoad() {} -func (x *connectedEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.endpoint) - m.Load(1, &x.writeQueue) +func (c *connectedEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.endpoint) + stateSourceObject.Load(1, &c.writeQueue) } -func (x *baseEndpoint) StateTypeName() string { +func (b *baseEndpoint) StateTypeName() string { return "pkg/sentry/socket/unix/transport.baseEndpoint" } -func (x *baseEndpoint) StateFields() []string { +func (b *baseEndpoint) StateFields() []string { return []string{ "Queue", "passcred", @@ -338,27 +338,27 @@ func (x *baseEndpoint) StateFields() []string { } } -func (x *baseEndpoint) beforeSave() {} +func (b *baseEndpoint) beforeSave() {} -func (x *baseEndpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Queue) - m.Save(1, &x.passcred) - m.Save(2, &x.receiver) - m.Save(3, &x.connected) - m.Save(4, &x.path) - m.Save(5, &x.linger) +func (b *baseEndpoint) StateSave(stateSinkObject state.Sink) { + b.beforeSave() + stateSinkObject.Save(0, &b.Queue) + stateSinkObject.Save(1, &b.passcred) + stateSinkObject.Save(2, &b.receiver) + stateSinkObject.Save(3, &b.connected) + stateSinkObject.Save(4, &b.path) + stateSinkObject.Save(5, &b.linger) } -func (x *baseEndpoint) afterLoad() {} +func (b *baseEndpoint) afterLoad() {} -func (x *baseEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.Queue) - m.Load(1, &x.passcred) - m.Load(2, &x.receiver) - m.Load(3, &x.connected) - m.Load(4, &x.path) - m.Load(5, &x.linger) +func (b *baseEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &b.Queue) + stateSourceObject.Load(1, &b.passcred) + stateSourceObject.Load(2, &b.receiver) + stateSourceObject.Load(3, &b.connected) + stateSourceObject.Load(4, &b.path) + stateSourceObject.Load(5, &b.linger) } func init() { diff --git a/pkg/sentry/socket/unix/unix_state_autogen.go b/pkg/sentry/socket/unix/unix_state_autogen.go index 51fd66b78..4afe51e7c 100644 --- a/pkg/sentry/socket/unix/unix_state_autogen.go +++ b/pkg/sentry/socket/unix/unix_state_autogen.go @@ -6,83 +6,83 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *socketOperationsRefs) StateTypeName() string { +func (s *socketOperationsRefs) StateTypeName() string { return "pkg/sentry/socket/unix.socketOperationsRefs" } -func (x *socketOperationsRefs) StateFields() []string { +func (s *socketOperationsRefs) StateFields() []string { return []string{ "refCount", } } -func (x *socketOperationsRefs) beforeSave() {} +func (s *socketOperationsRefs) beforeSave() {} -func (x *socketOperationsRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (s *socketOperationsRefs) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.refCount) } -func (x *socketOperationsRefs) afterLoad() {} +func (s *socketOperationsRefs) afterLoad() {} -func (x *socketOperationsRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (s *socketOperationsRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.refCount) } -func (x *socketVFS2Refs) StateTypeName() string { +func (s *socketVFS2Refs) StateTypeName() string { return "pkg/sentry/socket/unix.socketVFS2Refs" } -func (x *socketVFS2Refs) StateFields() []string { +func (s *socketVFS2Refs) StateFields() []string { return []string{ "refCount", } } -func (x *socketVFS2Refs) beforeSave() {} +func (s *socketVFS2Refs) beforeSave() {} -func (x *socketVFS2Refs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (s *socketVFS2Refs) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.refCount) } -func (x *socketVFS2Refs) afterLoad() {} +func (s *socketVFS2Refs) afterLoad() {} -func (x *socketVFS2Refs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (s *socketVFS2Refs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.refCount) } -func (x *SocketOperations) StateTypeName() string { +func (s *SocketOperations) StateTypeName() string { return "pkg/sentry/socket/unix.SocketOperations" } -func (x *SocketOperations) StateFields() []string { +func (s *SocketOperations) StateFields() []string { return []string{ "socketOperationsRefs", "socketOpsCommon", } } -func (x *SocketOperations) beforeSave() {} +func (s *SocketOperations) beforeSave() {} -func (x *SocketOperations) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.socketOperationsRefs) - m.Save(1, &x.socketOpsCommon) +func (s *SocketOperations) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.socketOperationsRefs) + stateSinkObject.Save(1, &s.socketOpsCommon) } -func (x *SocketOperations) afterLoad() {} +func (s *SocketOperations) afterLoad() {} -func (x *SocketOperations) StateLoad(m state.Source) { - m.Load(0, &x.socketOperationsRefs) - m.Load(1, &x.socketOpsCommon) +func (s *SocketOperations) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.socketOperationsRefs) + stateSourceObject.Load(1, &s.socketOpsCommon) } -func (x *socketOpsCommon) StateTypeName() string { +func (s *socketOpsCommon) StateTypeName() string { return "pkg/sentry/socket/unix.socketOpsCommon" } -func (x *socketOpsCommon) StateFields() []string { +func (s *socketOpsCommon) StateFields() []string { return []string{ "SendReceiveTimeout", "ep", @@ -92,32 +92,32 @@ func (x *socketOpsCommon) StateFields() []string { } } -func (x *socketOpsCommon) beforeSave() {} +func (s *socketOpsCommon) beforeSave() {} -func (x *socketOpsCommon) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.SendReceiveTimeout) - m.Save(1, &x.ep) - m.Save(2, &x.stype) - m.Save(3, &x.abstractName) - m.Save(4, &x.abstractNamespace) +func (s *socketOpsCommon) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.SendReceiveTimeout) + stateSinkObject.Save(1, &s.ep) + stateSinkObject.Save(2, &s.stype) + stateSinkObject.Save(3, &s.abstractName) + stateSinkObject.Save(4, &s.abstractNamespace) } -func (x *socketOpsCommon) afterLoad() {} +func (s *socketOpsCommon) afterLoad() {} -func (x *socketOpsCommon) StateLoad(m state.Source) { - m.Load(0, &x.SendReceiveTimeout) - m.Load(1, &x.ep) - m.Load(2, &x.stype) - m.Load(3, &x.abstractName) - m.Load(4, &x.abstractNamespace) +func (s *socketOpsCommon) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.SendReceiveTimeout) + stateSourceObject.Load(1, &s.ep) + stateSourceObject.Load(2, &s.stype) + stateSourceObject.Load(3, &s.abstractName) + stateSourceObject.Load(4, &s.abstractNamespace) } -func (x *SocketVFS2) StateTypeName() string { +func (s *SocketVFS2) StateTypeName() string { return "pkg/sentry/socket/unix.SocketVFS2" } -func (x *SocketVFS2) StateFields() []string { +func (s *SocketVFS2) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -128,27 +128,27 @@ func (x *SocketVFS2) StateFields() []string { } } -func (x *SocketVFS2) beforeSave() {} +func (s *SocketVFS2) beforeSave() {} -func (x *SocketVFS2) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.LockFD) - m.Save(4, &x.socketVFS2Refs) - m.Save(5, &x.socketOpsCommon) +func (s *SocketVFS2) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.vfsfd) + stateSinkObject.Save(1, &s.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &s.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &s.LockFD) + stateSinkObject.Save(4, &s.socketVFS2Refs) + stateSinkObject.Save(5, &s.socketOpsCommon) } -func (x *SocketVFS2) afterLoad() {} +func (s *SocketVFS2) afterLoad() {} -func (x *SocketVFS2) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.LockFD) - m.Load(4, &x.socketVFS2Refs) - m.Load(5, &x.socketOpsCommon) +func (s *SocketVFS2) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.vfsfd) + stateSourceObject.Load(1, &s.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &s.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &s.LockFD) + stateSourceObject.Load(4, &s.socketVFS2Refs) + stateSourceObject.Load(5, &s.socketOpsCommon) } func init() { diff --git a/pkg/sentry/syscalls/linux/linux_state_autogen.go b/pkg/sentry/syscalls/linux/linux_state_autogen.go index 8d70a3ee6..0ad0d2177 100644 --- a/pkg/sentry/syscalls/linux/linux_state_autogen.go +++ b/pkg/sentry/syscalls/linux/linux_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *futexWaitRestartBlock) StateTypeName() string { +func (f *futexWaitRestartBlock) StateTypeName() string { return "pkg/sentry/syscalls/linux.futexWaitRestartBlock" } -func (x *futexWaitRestartBlock) StateFields() []string { +func (f *futexWaitRestartBlock) StateFields() []string { return []string{ "duration", "addr", @@ -20,32 +20,32 @@ func (x *futexWaitRestartBlock) StateFields() []string { } } -func (x *futexWaitRestartBlock) beforeSave() {} +func (f *futexWaitRestartBlock) beforeSave() {} -func (x *futexWaitRestartBlock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.duration) - m.Save(1, &x.addr) - m.Save(2, &x.private) - m.Save(3, &x.val) - m.Save(4, &x.mask) +func (f *futexWaitRestartBlock) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.duration) + stateSinkObject.Save(1, &f.addr) + stateSinkObject.Save(2, &f.private) + stateSinkObject.Save(3, &f.val) + stateSinkObject.Save(4, &f.mask) } -func (x *futexWaitRestartBlock) afterLoad() {} +func (f *futexWaitRestartBlock) afterLoad() {} -func (x *futexWaitRestartBlock) StateLoad(m state.Source) { - m.Load(0, &x.duration) - m.Load(1, &x.addr) - m.Load(2, &x.private) - m.Load(3, &x.val) - m.Load(4, &x.mask) +func (f *futexWaitRestartBlock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.duration) + stateSourceObject.Load(1, &f.addr) + stateSourceObject.Load(2, &f.private) + stateSourceObject.Load(3, &f.val) + stateSourceObject.Load(4, &f.mask) } -func (x *pollRestartBlock) StateTypeName() string { +func (p *pollRestartBlock) StateTypeName() string { return "pkg/sentry/syscalls/linux.pollRestartBlock" } -func (x *pollRestartBlock) StateFields() []string { +func (p *pollRestartBlock) StateFields() []string { return []string{ "pfdAddr", "nfds", @@ -53,28 +53,28 @@ func (x *pollRestartBlock) StateFields() []string { } } -func (x *pollRestartBlock) beforeSave() {} +func (p *pollRestartBlock) beforeSave() {} -func (x *pollRestartBlock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.pfdAddr) - m.Save(1, &x.nfds) - m.Save(2, &x.timeout) +func (p *pollRestartBlock) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.pfdAddr) + stateSinkObject.Save(1, &p.nfds) + stateSinkObject.Save(2, &p.timeout) } -func (x *pollRestartBlock) afterLoad() {} +func (p *pollRestartBlock) afterLoad() {} -func (x *pollRestartBlock) StateLoad(m state.Source) { - m.Load(0, &x.pfdAddr) - m.Load(1, &x.nfds) - m.Load(2, &x.timeout) +func (p *pollRestartBlock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.pfdAddr) + stateSourceObject.Load(1, &p.nfds) + stateSourceObject.Load(2, &p.timeout) } -func (x *clockNanosleepRestartBlock) StateTypeName() string { +func (c *clockNanosleepRestartBlock) StateTypeName() string { return "pkg/sentry/syscalls/linux.clockNanosleepRestartBlock" } -func (x *clockNanosleepRestartBlock) StateFields() []string { +func (c *clockNanosleepRestartBlock) StateFields() []string { return []string{ "c", "duration", @@ -82,21 +82,21 @@ func (x *clockNanosleepRestartBlock) StateFields() []string { } } -func (x *clockNanosleepRestartBlock) beforeSave() {} +func (c *clockNanosleepRestartBlock) beforeSave() {} -func (x *clockNanosleepRestartBlock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.c) - m.Save(1, &x.duration) - m.Save(2, &x.rem) +func (c *clockNanosleepRestartBlock) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.c) + stateSinkObject.Save(1, &c.duration) + stateSinkObject.Save(2, &c.rem) } -func (x *clockNanosleepRestartBlock) afterLoad() {} +func (c *clockNanosleepRestartBlock) afterLoad() {} -func (x *clockNanosleepRestartBlock) StateLoad(m state.Source) { - m.Load(0, &x.c) - m.Load(1, &x.duration) - m.Load(2, &x.rem) +func (c *clockNanosleepRestartBlock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.c) + stateSourceObject.Load(1, &c.duration) + stateSourceObject.Load(2, &c.rem) } func init() { diff --git a/pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go b/pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go index 031381834..11d1bcc43 100644 --- a/pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go +++ b/pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *pollRestartBlock) StateTypeName() string { +func (p *pollRestartBlock) StateTypeName() string { return "pkg/sentry/syscalls/linux/vfs2.pollRestartBlock" } -func (x *pollRestartBlock) StateFields() []string { +func (p *pollRestartBlock) StateFields() []string { return []string{ "pfdAddr", "nfds", @@ -18,21 +18,21 @@ func (x *pollRestartBlock) StateFields() []string { } } -func (x *pollRestartBlock) beforeSave() {} +func (p *pollRestartBlock) beforeSave() {} -func (x *pollRestartBlock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.pfdAddr) - m.Save(1, &x.nfds) - m.Save(2, &x.timeout) +func (p *pollRestartBlock) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.pfdAddr) + stateSinkObject.Save(1, &p.nfds) + stateSinkObject.Save(2, &p.timeout) } -func (x *pollRestartBlock) afterLoad() {} +func (p *pollRestartBlock) afterLoad() {} -func (x *pollRestartBlock) StateLoad(m state.Source) { - m.Load(0, &x.pfdAddr) - m.Load(1, &x.nfds) - m.Load(2, &x.timeout) +func (p *pollRestartBlock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.pfdAddr) + stateSourceObject.Load(1, &p.nfds) + stateSourceObject.Load(2, &p.timeout) } func init() { diff --git a/pkg/sentry/usage/usage_state_autogen.go b/pkg/sentry/usage/usage_state_autogen.go index a117ad216..0ef018bac 100644 --- a/pkg/sentry/usage/usage_state_autogen.go +++ b/pkg/sentry/usage/usage_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *CPUStats) StateTypeName() string { +func (c *CPUStats) StateTypeName() string { return "pkg/sentry/usage.CPUStats" } -func (x *CPUStats) StateFields() []string { +func (c *CPUStats) StateFields() []string { return []string{ "UserTime", "SysTime", @@ -18,28 +18,28 @@ func (x *CPUStats) StateFields() []string { } } -func (x *CPUStats) beforeSave() {} +func (c *CPUStats) beforeSave() {} -func (x *CPUStats) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.UserTime) - m.Save(1, &x.SysTime) - m.Save(2, &x.VoluntarySwitches) +func (c *CPUStats) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.UserTime) + stateSinkObject.Save(1, &c.SysTime) + stateSinkObject.Save(2, &c.VoluntarySwitches) } -func (x *CPUStats) afterLoad() {} +func (c *CPUStats) afterLoad() {} -func (x *CPUStats) StateLoad(m state.Source) { - m.Load(0, &x.UserTime) - m.Load(1, &x.SysTime) - m.Load(2, &x.VoluntarySwitches) +func (c *CPUStats) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.UserTime) + stateSourceObject.Load(1, &c.SysTime) + stateSourceObject.Load(2, &c.VoluntarySwitches) } -func (x *IO) StateTypeName() string { +func (i *IO) StateTypeName() string { return "pkg/sentry/usage.IO" } -func (x *IO) StateFields() []string { +func (i *IO) StateFields() []string { return []string{ "CharsRead", "CharsWritten", @@ -51,29 +51,29 @@ func (x *IO) StateFields() []string { } } -func (x *IO) beforeSave() {} +func (i *IO) beforeSave() {} -func (x *IO) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.CharsRead) - m.Save(1, &x.CharsWritten) - m.Save(2, &x.ReadSyscalls) - m.Save(3, &x.WriteSyscalls) - m.Save(4, &x.BytesRead) - m.Save(5, &x.BytesWritten) - m.Save(6, &x.BytesWriteCancelled) +func (i *IO) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.CharsRead) + stateSinkObject.Save(1, &i.CharsWritten) + stateSinkObject.Save(2, &i.ReadSyscalls) + stateSinkObject.Save(3, &i.WriteSyscalls) + stateSinkObject.Save(4, &i.BytesRead) + stateSinkObject.Save(5, &i.BytesWritten) + stateSinkObject.Save(6, &i.BytesWriteCancelled) } -func (x *IO) afterLoad() {} +func (i *IO) afterLoad() {} -func (x *IO) StateLoad(m state.Source) { - m.Load(0, &x.CharsRead) - m.Load(1, &x.CharsWritten) - m.Load(2, &x.ReadSyscalls) - m.Load(3, &x.WriteSyscalls) - m.Load(4, &x.BytesRead) - m.Load(5, &x.BytesWritten) - m.Load(6, &x.BytesWriteCancelled) +func (i *IO) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.CharsRead) + stateSourceObject.Load(1, &i.CharsWritten) + stateSourceObject.Load(2, &i.ReadSyscalls) + stateSourceObject.Load(3, &i.WriteSyscalls) + stateSourceObject.Load(4, &i.BytesRead) + stateSourceObject.Load(5, &i.BytesWritten) + stateSourceObject.Load(6, &i.BytesWriteCancelled) } func init() { diff --git a/pkg/sentry/vfs/memxattr/memxattr_state_autogen.go b/pkg/sentry/vfs/memxattr/memxattr_state_autogen.go index 105af5cb5..28a4ae569 100644 --- a/pkg/sentry/vfs/memxattr/memxattr_state_autogen.go +++ b/pkg/sentry/vfs/memxattr/memxattr_state_autogen.go @@ -6,27 +6,27 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SimpleExtendedAttributes) StateTypeName() string { +func (s *SimpleExtendedAttributes) StateTypeName() string { return "pkg/sentry/vfs/memxattr.SimpleExtendedAttributes" } -func (x *SimpleExtendedAttributes) StateFields() []string { +func (s *SimpleExtendedAttributes) StateFields() []string { return []string{ "xattrs", } } -func (x *SimpleExtendedAttributes) beforeSave() {} +func (s *SimpleExtendedAttributes) beforeSave() {} -func (x *SimpleExtendedAttributes) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.xattrs) +func (s *SimpleExtendedAttributes) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.xattrs) } -func (x *SimpleExtendedAttributes) afterLoad() {} +func (s *SimpleExtendedAttributes) afterLoad() {} -func (x *SimpleExtendedAttributes) StateLoad(m state.Source) { - m.Load(0, &x.xattrs) +func (s *SimpleExtendedAttributes) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.xattrs) } func init() { diff --git a/pkg/sentry/vfs/vfs_state_autogen.go b/pkg/sentry/vfs/vfs_state_autogen.go index 3c35d1577..2dff75293 100644 --- a/pkg/sentry/vfs/vfs_state_autogen.go +++ b/pkg/sentry/vfs/vfs_state_autogen.go @@ -6,82 +6,82 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *anonFilesystemType) StateTypeName() string { +func (a *anonFilesystemType) StateTypeName() string { return "pkg/sentry/vfs.anonFilesystemType" } -func (x *anonFilesystemType) StateFields() []string { +func (a *anonFilesystemType) StateFields() []string { return []string{} } -func (x *anonFilesystemType) beforeSave() {} +func (a *anonFilesystemType) beforeSave() {} -func (x *anonFilesystemType) StateSave(m state.Sink) { - x.beforeSave() +func (a *anonFilesystemType) StateSave(stateSinkObject state.Sink) { + a.beforeSave() } -func (x *anonFilesystemType) afterLoad() {} +func (a *anonFilesystemType) afterLoad() {} -func (x *anonFilesystemType) StateLoad(m state.Source) { +func (a *anonFilesystemType) StateLoad(stateSourceObject state.Source) { } -func (x *anonFilesystem) StateTypeName() string { +func (a *anonFilesystem) StateTypeName() string { return "pkg/sentry/vfs.anonFilesystem" } -func (x *anonFilesystem) StateFields() []string { +func (a *anonFilesystem) StateFields() []string { return []string{ "vfsfs", "devMinor", } } -func (x *anonFilesystem) beforeSave() {} +func (a *anonFilesystem) beforeSave() {} -func (x *anonFilesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfs) - m.Save(1, &x.devMinor) +func (a *anonFilesystem) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.vfsfs) + stateSinkObject.Save(1, &a.devMinor) } -func (x *anonFilesystem) afterLoad() {} +func (a *anonFilesystem) afterLoad() {} -func (x *anonFilesystem) StateLoad(m state.Source) { - m.Load(0, &x.vfsfs) - m.Load(1, &x.devMinor) +func (a *anonFilesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.vfsfs) + stateSourceObject.Load(1, &a.devMinor) } -func (x *anonDentry) StateTypeName() string { +func (a *anonDentry) StateTypeName() string { return "pkg/sentry/vfs.anonDentry" } -func (x *anonDentry) StateFields() []string { +func (a *anonDentry) StateFields() []string { return []string{ "vfsd", "name", } } -func (x *anonDentry) beforeSave() {} +func (a *anonDentry) beforeSave() {} -func (x *anonDentry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsd) - m.Save(1, &x.name) +func (a *anonDentry) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.vfsd) + stateSinkObject.Save(1, &a.name) } -func (x *anonDentry) afterLoad() {} +func (a *anonDentry) afterLoad() {} -func (x *anonDentry) StateLoad(m state.Source) { - m.Load(0, &x.vfsd) - m.Load(1, &x.name) +func (a *anonDentry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.vfsd) + stateSourceObject.Load(1, &a.name) } -func (x *Dentry) StateTypeName() string { +func (d *Dentry) StateTypeName() string { return "pkg/sentry/vfs.Dentry" } -func (x *Dentry) StateFields() []string { +func (d *Dentry) StateFields() []string { return []string{ "dead", "mounts", @@ -89,36 +89,36 @@ func (x *Dentry) StateFields() []string { } } -func (x *Dentry) beforeSave() {} +func (d *Dentry) beforeSave() {} -func (x *Dentry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dead) - m.Save(1, &x.mounts) - m.Save(2, &x.impl) +func (d *Dentry) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.dead) + stateSinkObject.Save(1, &d.mounts) + stateSinkObject.Save(2, &d.impl) } -func (x *Dentry) afterLoad() {} +func (d *Dentry) afterLoad() {} -func (x *Dentry) StateLoad(m state.Source) { - m.Load(0, &x.dead) - m.Load(1, &x.mounts) - m.Load(2, &x.impl) +func (d *Dentry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.dead) + stateSourceObject.Load(1, &d.mounts) + stateSourceObject.Load(2, &d.impl) } -func (x *DeviceKind) StateTypeName() string { +func (d *DeviceKind) StateTypeName() string { return "pkg/sentry/vfs.DeviceKind" } -func (x *DeviceKind) StateFields() []string { +func (d *DeviceKind) StateFields() []string { return nil } -func (x *devTuple) StateTypeName() string { +func (d *devTuple) StateTypeName() string { return "pkg/sentry/vfs.devTuple" } -func (x *devTuple) StateFields() []string { +func (d *devTuple) StateFields() []string { return []string{ "kind", "major", @@ -126,77 +126,77 @@ func (x *devTuple) StateFields() []string { } } -func (x *devTuple) beforeSave() {} +func (d *devTuple) beforeSave() {} -func (x *devTuple) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.kind) - m.Save(1, &x.major) - m.Save(2, &x.minor) +func (d *devTuple) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.kind) + stateSinkObject.Save(1, &d.major) + stateSinkObject.Save(2, &d.minor) } -func (x *devTuple) afterLoad() {} +func (d *devTuple) afterLoad() {} -func (x *devTuple) StateLoad(m state.Source) { - m.Load(0, &x.kind) - m.Load(1, &x.major) - m.Load(2, &x.minor) +func (d *devTuple) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.kind) + stateSourceObject.Load(1, &d.major) + stateSourceObject.Load(2, &d.minor) } -func (x *registeredDevice) StateTypeName() string { +func (r *registeredDevice) StateTypeName() string { return "pkg/sentry/vfs.registeredDevice" } -func (x *registeredDevice) StateFields() []string { +func (r *registeredDevice) StateFields() []string { return []string{ "dev", "opts", } } -func (x *registeredDevice) beforeSave() {} +func (r *registeredDevice) beforeSave() {} -func (x *registeredDevice) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.dev) - m.Save(1, &x.opts) +func (r *registeredDevice) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.dev) + stateSinkObject.Save(1, &r.opts) } -func (x *registeredDevice) afterLoad() {} +func (r *registeredDevice) afterLoad() {} -func (x *registeredDevice) StateLoad(m state.Source) { - m.Load(0, &x.dev) - m.Load(1, &x.opts) +func (r *registeredDevice) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.dev) + stateSourceObject.Load(1, &r.opts) } -func (x *RegisterDeviceOptions) StateTypeName() string { +func (r *RegisterDeviceOptions) StateTypeName() string { return "pkg/sentry/vfs.RegisterDeviceOptions" } -func (x *RegisterDeviceOptions) StateFields() []string { +func (r *RegisterDeviceOptions) StateFields() []string { return []string{ "GroupName", } } -func (x *RegisterDeviceOptions) beforeSave() {} +func (r *RegisterDeviceOptions) beforeSave() {} -func (x *RegisterDeviceOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.GroupName) +func (r *RegisterDeviceOptions) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.GroupName) } -func (x *RegisterDeviceOptions) afterLoad() {} +func (r *RegisterDeviceOptions) afterLoad() {} -func (x *RegisterDeviceOptions) StateLoad(m state.Source) { - m.Load(0, &x.GroupName) +func (r *RegisterDeviceOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.GroupName) } -func (x *EpollInstance) StateTypeName() string { +func (e *EpollInstance) StateTypeName() string { return "pkg/sentry/vfs.EpollInstance" } -func (x *EpollInstance) StateFields() []string { +func (e *EpollInstance) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -208,62 +208,62 @@ func (x *EpollInstance) StateFields() []string { } } -func (x *EpollInstance) beforeSave() {} +func (e *EpollInstance) beforeSave() {} -func (x *EpollInstance) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) - m.Save(4, &x.q) - m.Save(5, &x.interest) - m.Save(6, &x.ready) +func (e *EpollInstance) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.vfsfd) + stateSinkObject.Save(1, &e.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &e.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &e.NoLockFD) + stateSinkObject.Save(4, &e.q) + stateSinkObject.Save(5, &e.interest) + stateSinkObject.Save(6, &e.ready) } -func (x *EpollInstance) afterLoad() {} +func (e *EpollInstance) afterLoad() {} -func (x *EpollInstance) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) - m.Load(4, &x.q) - m.Load(5, &x.interest) - m.Load(6, &x.ready) +func (e *EpollInstance) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.vfsfd) + stateSourceObject.Load(1, &e.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &e.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &e.NoLockFD) + stateSourceObject.Load(4, &e.q) + stateSourceObject.Load(5, &e.interest) + stateSourceObject.Load(6, &e.ready) } -func (x *epollInterestKey) StateTypeName() string { +func (e *epollInterestKey) StateTypeName() string { return "pkg/sentry/vfs.epollInterestKey" } -func (x *epollInterestKey) StateFields() []string { +func (e *epollInterestKey) StateFields() []string { return []string{ "file", "num", } } -func (x *epollInterestKey) beforeSave() {} +func (e *epollInterestKey) beforeSave() {} -func (x *epollInterestKey) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.file) - m.Save(1, &x.num) +func (e *epollInterestKey) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.file) + stateSinkObject.Save(1, &e.num) } -func (x *epollInterestKey) afterLoad() {} +func (e *epollInterestKey) afterLoad() {} -func (x *epollInterestKey) StateLoad(m state.Source) { - m.Load(0, &x.file) - m.Load(1, &x.num) +func (e *epollInterestKey) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.file) + stateSourceObject.Load(1, &e.num) } -func (x *epollInterest) StateTypeName() string { +func (e *epollInterest) StateTypeName() string { return "pkg/sentry/vfs.epollInterest" } -func (x *epollInterest) StateFields() []string { +func (e *epollInterest) StateFields() []string { return []string{ "epoll", "key", @@ -275,140 +275,140 @@ func (x *epollInterest) StateFields() []string { } } -func (x *epollInterest) beforeSave() {} +func (e *epollInterest) beforeSave() {} -func (x *epollInterest) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.epoll) - m.Save(1, &x.key) - m.Save(2, &x.waiter) - m.Save(3, &x.mask) - m.Save(4, &x.ready) - m.Save(5, &x.epollInterestEntry) - m.Save(6, &x.userData) +func (e *epollInterest) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.epoll) + stateSinkObject.Save(1, &e.key) + stateSinkObject.Save(2, &e.waiter) + stateSinkObject.Save(3, &e.mask) + stateSinkObject.Save(4, &e.ready) + stateSinkObject.Save(5, &e.epollInterestEntry) + stateSinkObject.Save(6, &e.userData) } -func (x *epollInterest) afterLoad() {} +func (e *epollInterest) afterLoad() {} -func (x *epollInterest) StateLoad(m state.Source) { - m.Load(0, &x.epoll) - m.Load(1, &x.key) - m.Load(2, &x.waiter) - m.Load(3, &x.mask) - m.Load(4, &x.ready) - m.Load(5, &x.epollInterestEntry) - m.Load(6, &x.userData) +func (e *epollInterest) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.epoll) + stateSourceObject.Load(1, &e.key) + stateSourceObject.Load(2, &e.waiter) + stateSourceObject.Load(3, &e.mask) + stateSourceObject.Load(4, &e.ready) + stateSourceObject.Load(5, &e.epollInterestEntry) + stateSourceObject.Load(6, &e.userData) } -func (x *epollInterestList) StateTypeName() string { +func (e *epollInterestList) StateTypeName() string { return "pkg/sentry/vfs.epollInterestList" } -func (x *epollInterestList) StateFields() []string { +func (e *epollInterestList) StateFields() []string { return []string{ "head", "tail", } } -func (x *epollInterestList) beforeSave() {} +func (e *epollInterestList) beforeSave() {} -func (x *epollInterestList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (e *epollInterestList) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.head) + stateSinkObject.Save(1, &e.tail) } -func (x *epollInterestList) afterLoad() {} +func (e *epollInterestList) afterLoad() {} -func (x *epollInterestList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (e *epollInterestList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.head) + stateSourceObject.Load(1, &e.tail) } -func (x *epollInterestEntry) StateTypeName() string { +func (e *epollInterestEntry) StateTypeName() string { return "pkg/sentry/vfs.epollInterestEntry" } -func (x *epollInterestEntry) StateFields() []string { +func (e *epollInterestEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *epollInterestEntry) beforeSave() {} +func (e *epollInterestEntry) beforeSave() {} -func (x *epollInterestEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (e *epollInterestEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (x *epollInterestEntry) afterLoad() {} +func (e *epollInterestEntry) afterLoad() {} -func (x *epollInterestEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (e *epollInterestEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } -func (x *eventList) StateTypeName() string { +func (e *eventList) StateTypeName() string { return "pkg/sentry/vfs.eventList" } -func (x *eventList) StateFields() []string { +func (e *eventList) StateFields() []string { return []string{ "head", "tail", } } -func (x *eventList) beforeSave() {} +func (e *eventList) beforeSave() {} -func (x *eventList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (e *eventList) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.head) + stateSinkObject.Save(1, &e.tail) } -func (x *eventList) afterLoad() {} +func (e *eventList) afterLoad() {} -func (x *eventList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (e *eventList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.head) + stateSourceObject.Load(1, &e.tail) } -func (x *eventEntry) StateTypeName() string { +func (e *eventEntry) StateTypeName() string { return "pkg/sentry/vfs.eventEntry" } -func (x *eventEntry) StateFields() []string { +func (e *eventEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *eventEntry) beforeSave() {} +func (e *eventEntry) beforeSave() {} -func (x *eventEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (e *eventEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (x *eventEntry) afterLoad() {} +func (e *eventEntry) afterLoad() {} -func (x *eventEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (e *eventEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } -func (x *FileDescription) StateTypeName() string { +func (f *FileDescription) StateTypeName() string { return "pkg/sentry/vfs.FileDescription" } -func (x *FileDescription) StateFields() []string { +func (f *FileDescription) StateFields() []string { return []string{ "FileDescriptionRefs", "statusFlags", @@ -423,42 +423,42 @@ func (x *FileDescription) StateFields() []string { } } -func (x *FileDescription) beforeSave() {} +func (f *FileDescription) beforeSave() {} -func (x *FileDescription) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FileDescriptionRefs) - m.Save(1, &x.statusFlags) - m.Save(2, &x.asyncHandler) - m.Save(3, &x.epolls) - m.Save(4, &x.vd) - m.Save(5, &x.opts) - m.Save(6, &x.readable) - m.Save(7, &x.writable) - m.Save(8, &x.usedLockBSD) - m.Save(9, &x.impl) +func (f *FileDescription) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.FileDescriptionRefs) + stateSinkObject.Save(1, &f.statusFlags) + stateSinkObject.Save(2, &f.asyncHandler) + stateSinkObject.Save(3, &f.epolls) + stateSinkObject.Save(4, &f.vd) + stateSinkObject.Save(5, &f.opts) + stateSinkObject.Save(6, &f.readable) + stateSinkObject.Save(7, &f.writable) + stateSinkObject.Save(8, &f.usedLockBSD) + stateSinkObject.Save(9, &f.impl) } -func (x *FileDescription) afterLoad() {} +func (f *FileDescription) afterLoad() {} -func (x *FileDescription) StateLoad(m state.Source) { - m.Load(0, &x.FileDescriptionRefs) - m.Load(1, &x.statusFlags) - m.Load(2, &x.asyncHandler) - m.Load(3, &x.epolls) - m.Load(4, &x.vd) - m.Load(5, &x.opts) - m.Load(6, &x.readable) - m.Load(7, &x.writable) - m.Load(8, &x.usedLockBSD) - m.Load(9, &x.impl) +func (f *FileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.FileDescriptionRefs) + stateSourceObject.Load(1, &f.statusFlags) + stateSourceObject.Load(2, &f.asyncHandler) + stateSourceObject.Load(3, &f.epolls) + stateSourceObject.Load(4, &f.vd) + stateSourceObject.Load(5, &f.opts) + stateSourceObject.Load(6, &f.readable) + stateSourceObject.Load(7, &f.writable) + stateSourceObject.Load(8, &f.usedLockBSD) + stateSourceObject.Load(9, &f.impl) } -func (x *FileDescriptionOptions) StateTypeName() string { +func (f *FileDescriptionOptions) StateTypeName() string { return "pkg/sentry/vfs.FileDescriptionOptions" } -func (x *FileDescriptionOptions) StateFields() []string { +func (f *FileDescriptionOptions) StateFields() []string { return []string{ "AllowDirectIO", "DenyPRead", @@ -467,30 +467,30 @@ func (x *FileDescriptionOptions) StateFields() []string { } } -func (x *FileDescriptionOptions) beforeSave() {} +func (f *FileDescriptionOptions) beforeSave() {} -func (x *FileDescriptionOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AllowDirectIO) - m.Save(1, &x.DenyPRead) - m.Save(2, &x.DenyPWrite) - m.Save(3, &x.UseDentryMetadata) +func (f *FileDescriptionOptions) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.AllowDirectIO) + stateSinkObject.Save(1, &f.DenyPRead) + stateSinkObject.Save(2, &f.DenyPWrite) + stateSinkObject.Save(3, &f.UseDentryMetadata) } -func (x *FileDescriptionOptions) afterLoad() {} +func (f *FileDescriptionOptions) afterLoad() {} -func (x *FileDescriptionOptions) StateLoad(m state.Source) { - m.Load(0, &x.AllowDirectIO) - m.Load(1, &x.DenyPRead) - m.Load(2, &x.DenyPWrite) - m.Load(3, &x.UseDentryMetadata) +func (f *FileDescriptionOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.AllowDirectIO) + stateSourceObject.Load(1, &f.DenyPRead) + stateSourceObject.Load(2, &f.DenyPWrite) + stateSourceObject.Load(3, &f.UseDentryMetadata) } -func (x *Dirent) StateTypeName() string { +func (d *Dirent) StateTypeName() string { return "pkg/sentry/vfs.Dirent" } -func (x *Dirent) StateFields() []string { +func (d *Dirent) StateFields() []string { return []string{ "Name", "Type", @@ -499,110 +499,110 @@ func (x *Dirent) StateFields() []string { } } -func (x *Dirent) beforeSave() {} +func (d *Dirent) beforeSave() {} -func (x *Dirent) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Name) - m.Save(1, &x.Type) - m.Save(2, &x.Ino) - m.Save(3, &x.NextOff) +func (d *Dirent) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.Name) + stateSinkObject.Save(1, &d.Type) + stateSinkObject.Save(2, &d.Ino) + stateSinkObject.Save(3, &d.NextOff) } -func (x *Dirent) afterLoad() {} +func (d *Dirent) afterLoad() {} -func (x *Dirent) StateLoad(m state.Source) { - m.Load(0, &x.Name) - m.Load(1, &x.Type) - m.Load(2, &x.Ino) - m.Load(3, &x.NextOff) +func (d *Dirent) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.Name) + stateSourceObject.Load(1, &d.Type) + stateSourceObject.Load(2, &d.Ino) + stateSourceObject.Load(3, &d.NextOff) } -func (x *FileDescriptionDefaultImpl) StateTypeName() string { +func (f *FileDescriptionDefaultImpl) StateTypeName() string { return "pkg/sentry/vfs.FileDescriptionDefaultImpl" } -func (x *FileDescriptionDefaultImpl) StateFields() []string { +func (f *FileDescriptionDefaultImpl) StateFields() []string { return []string{} } -func (x *FileDescriptionDefaultImpl) beforeSave() {} +func (f *FileDescriptionDefaultImpl) beforeSave() {} -func (x *FileDescriptionDefaultImpl) StateSave(m state.Sink) { - x.beforeSave() +func (f *FileDescriptionDefaultImpl) StateSave(stateSinkObject state.Sink) { + f.beforeSave() } -func (x *FileDescriptionDefaultImpl) afterLoad() {} +func (f *FileDescriptionDefaultImpl) afterLoad() {} -func (x *FileDescriptionDefaultImpl) StateLoad(m state.Source) { +func (f *FileDescriptionDefaultImpl) StateLoad(stateSourceObject state.Source) { } -func (x *DirectoryFileDescriptionDefaultImpl) StateTypeName() string { +func (d *DirectoryFileDescriptionDefaultImpl) StateTypeName() string { return "pkg/sentry/vfs.DirectoryFileDescriptionDefaultImpl" } -func (x *DirectoryFileDescriptionDefaultImpl) StateFields() []string { +func (d *DirectoryFileDescriptionDefaultImpl) StateFields() []string { return []string{} } -func (x *DirectoryFileDescriptionDefaultImpl) beforeSave() {} +func (d *DirectoryFileDescriptionDefaultImpl) beforeSave() {} -func (x *DirectoryFileDescriptionDefaultImpl) StateSave(m state.Sink) { - x.beforeSave() +func (d *DirectoryFileDescriptionDefaultImpl) StateSave(stateSinkObject state.Sink) { + d.beforeSave() } -func (x *DirectoryFileDescriptionDefaultImpl) afterLoad() {} +func (d *DirectoryFileDescriptionDefaultImpl) afterLoad() {} -func (x *DirectoryFileDescriptionDefaultImpl) StateLoad(m state.Source) { +func (d *DirectoryFileDescriptionDefaultImpl) StateLoad(stateSourceObject state.Source) { } -func (x *DentryMetadataFileDescriptionImpl) StateTypeName() string { +func (d *DentryMetadataFileDescriptionImpl) StateTypeName() string { return "pkg/sentry/vfs.DentryMetadataFileDescriptionImpl" } -func (x *DentryMetadataFileDescriptionImpl) StateFields() []string { +func (d *DentryMetadataFileDescriptionImpl) StateFields() []string { return []string{} } -func (x *DentryMetadataFileDescriptionImpl) beforeSave() {} +func (d *DentryMetadataFileDescriptionImpl) beforeSave() {} -func (x *DentryMetadataFileDescriptionImpl) StateSave(m state.Sink) { - x.beforeSave() +func (d *DentryMetadataFileDescriptionImpl) StateSave(stateSinkObject state.Sink) { + d.beforeSave() } -func (x *DentryMetadataFileDescriptionImpl) afterLoad() {} +func (d *DentryMetadataFileDescriptionImpl) afterLoad() {} -func (x *DentryMetadataFileDescriptionImpl) StateLoad(m state.Source) { +func (d *DentryMetadataFileDescriptionImpl) StateLoad(stateSourceObject state.Source) { } -func (x *StaticData) StateTypeName() string { +func (s *StaticData) StateTypeName() string { return "pkg/sentry/vfs.StaticData" } -func (x *StaticData) StateFields() []string { +func (s *StaticData) StateFields() []string { return []string{ "Data", } } -func (x *StaticData) beforeSave() {} +func (s *StaticData) beforeSave() {} -func (x *StaticData) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Data) +func (s *StaticData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Data) } -func (x *StaticData) afterLoad() {} +func (s *StaticData) afterLoad() {} -func (x *StaticData) StateLoad(m state.Source) { - m.Load(0, &x.Data) +func (s *StaticData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Data) } -func (x *DynamicBytesFileDescriptionImpl) StateTypeName() string { +func (d *DynamicBytesFileDescriptionImpl) StateTypeName() string { return "pkg/sentry/vfs.DynamicBytesFileDescriptionImpl" } -func (x *DynamicBytesFileDescriptionImpl) StateFields() []string { +func (d *DynamicBytesFileDescriptionImpl) StateFields() []string { return []string{ "data", "buf", @@ -611,96 +611,96 @@ func (x *DynamicBytesFileDescriptionImpl) StateFields() []string { } } -func (x *DynamicBytesFileDescriptionImpl) beforeSave() {} +func (d *DynamicBytesFileDescriptionImpl) beforeSave() {} -func (x *DynamicBytesFileDescriptionImpl) StateSave(m state.Sink) { - x.beforeSave() - var buf []byte = x.saveBuf() - m.SaveValue(1, buf) - m.Save(0, &x.data) - m.Save(2, &x.off) - m.Save(3, &x.lastRead) +func (d *DynamicBytesFileDescriptionImpl) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + var bufValue []byte = d.saveBuf() + stateSinkObject.SaveValue(1, bufValue) + stateSinkObject.Save(0, &d.data) + stateSinkObject.Save(2, &d.off) + stateSinkObject.Save(3, &d.lastRead) } -func (x *DynamicBytesFileDescriptionImpl) afterLoad() {} +func (d *DynamicBytesFileDescriptionImpl) afterLoad() {} -func (x *DynamicBytesFileDescriptionImpl) StateLoad(m state.Source) { - m.Load(0, &x.data) - m.Load(2, &x.off) - m.Load(3, &x.lastRead) - m.LoadValue(1, new([]byte), func(y interface{}) { x.loadBuf(y.([]byte)) }) +func (d *DynamicBytesFileDescriptionImpl) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.data) + stateSourceObject.Load(2, &d.off) + stateSourceObject.Load(3, &d.lastRead) + stateSourceObject.LoadValue(1, new([]byte), func(y interface{}) { d.loadBuf(y.([]byte)) }) } -func (x *LockFD) StateTypeName() string { +func (l *LockFD) StateTypeName() string { return "pkg/sentry/vfs.LockFD" } -func (x *LockFD) StateFields() []string { +func (l *LockFD) StateFields() []string { return []string{ "locks", } } -func (x *LockFD) beforeSave() {} +func (l *LockFD) beforeSave() {} -func (x *LockFD) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.locks) +func (l *LockFD) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.locks) } -func (x *LockFD) afterLoad() {} +func (l *LockFD) afterLoad() {} -func (x *LockFD) StateLoad(m state.Source) { - m.Load(0, &x.locks) +func (l *LockFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.locks) } -func (x *NoLockFD) StateTypeName() string { +func (n *NoLockFD) StateTypeName() string { return "pkg/sentry/vfs.NoLockFD" } -func (x *NoLockFD) StateFields() []string { +func (n *NoLockFD) StateFields() []string { return []string{} } -func (x *NoLockFD) beforeSave() {} +func (n *NoLockFD) beforeSave() {} -func (x *NoLockFD) StateSave(m state.Sink) { - x.beforeSave() +func (n *NoLockFD) StateSave(stateSinkObject state.Sink) { + n.beforeSave() } -func (x *NoLockFD) afterLoad() {} +func (n *NoLockFD) afterLoad() {} -func (x *NoLockFD) StateLoad(m state.Source) { +func (n *NoLockFD) StateLoad(stateSourceObject state.Source) { } -func (x *FileDescriptionRefs) StateTypeName() string { +func (f *FileDescriptionRefs) StateTypeName() string { return "pkg/sentry/vfs.FileDescriptionRefs" } -func (x *FileDescriptionRefs) StateFields() []string { +func (f *FileDescriptionRefs) StateFields() []string { return []string{ "refCount", } } -func (x *FileDescriptionRefs) beforeSave() {} +func (f *FileDescriptionRefs) beforeSave() {} -func (x *FileDescriptionRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (f *FileDescriptionRefs) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.refCount) } -func (x *FileDescriptionRefs) afterLoad() {} +func (f *FileDescriptionRefs) afterLoad() {} -func (x *FileDescriptionRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (f *FileDescriptionRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.refCount) } -func (x *Filesystem) StateTypeName() string { +func (f *Filesystem) StateTypeName() string { return "pkg/sentry/vfs.Filesystem" } -func (x *Filesystem) StateFields() []string { +func (f *Filesystem) StateFields() []string { return []string{ "FilesystemRefs", "vfs", @@ -709,136 +709,136 @@ func (x *Filesystem) StateFields() []string { } } -func (x *Filesystem) beforeSave() {} +func (f *Filesystem) beforeSave() {} -func (x *Filesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.FilesystemRefs) - m.Save(1, &x.vfs) - m.Save(2, &x.fsType) - m.Save(3, &x.impl) +func (f *Filesystem) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.FilesystemRefs) + stateSinkObject.Save(1, &f.vfs) + stateSinkObject.Save(2, &f.fsType) + stateSinkObject.Save(3, &f.impl) } -func (x *Filesystem) afterLoad() {} +func (f *Filesystem) afterLoad() {} -func (x *Filesystem) StateLoad(m state.Source) { - m.Load(0, &x.FilesystemRefs) - m.Load(1, &x.vfs) - m.Load(2, &x.fsType) - m.Load(3, &x.impl) +func (f *Filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.FilesystemRefs) + stateSourceObject.Load(1, &f.vfs) + stateSourceObject.Load(2, &f.fsType) + stateSourceObject.Load(3, &f.impl) } -func (x *PrependPathAtVFSRootError) StateTypeName() string { +func (p *PrependPathAtVFSRootError) StateTypeName() string { return "pkg/sentry/vfs.PrependPathAtVFSRootError" } -func (x *PrependPathAtVFSRootError) StateFields() []string { +func (p *PrependPathAtVFSRootError) StateFields() []string { return []string{} } -func (x *PrependPathAtVFSRootError) beforeSave() {} +func (p *PrependPathAtVFSRootError) beforeSave() {} -func (x *PrependPathAtVFSRootError) StateSave(m state.Sink) { - x.beforeSave() +func (p *PrependPathAtVFSRootError) StateSave(stateSinkObject state.Sink) { + p.beforeSave() } -func (x *PrependPathAtVFSRootError) afterLoad() {} +func (p *PrependPathAtVFSRootError) afterLoad() {} -func (x *PrependPathAtVFSRootError) StateLoad(m state.Source) { +func (p *PrependPathAtVFSRootError) StateLoad(stateSourceObject state.Source) { } -func (x *PrependPathAtNonMountRootError) StateTypeName() string { +func (p *PrependPathAtNonMountRootError) StateTypeName() string { return "pkg/sentry/vfs.PrependPathAtNonMountRootError" } -func (x *PrependPathAtNonMountRootError) StateFields() []string { +func (p *PrependPathAtNonMountRootError) StateFields() []string { return []string{} } -func (x *PrependPathAtNonMountRootError) beforeSave() {} +func (p *PrependPathAtNonMountRootError) beforeSave() {} -func (x *PrependPathAtNonMountRootError) StateSave(m state.Sink) { - x.beforeSave() +func (p *PrependPathAtNonMountRootError) StateSave(stateSinkObject state.Sink) { + p.beforeSave() } -func (x *PrependPathAtNonMountRootError) afterLoad() {} +func (p *PrependPathAtNonMountRootError) afterLoad() {} -func (x *PrependPathAtNonMountRootError) StateLoad(m state.Source) { +func (p *PrependPathAtNonMountRootError) StateLoad(stateSourceObject state.Source) { } -func (x *PrependPathSyntheticError) StateTypeName() string { +func (p *PrependPathSyntheticError) StateTypeName() string { return "pkg/sentry/vfs.PrependPathSyntheticError" } -func (x *PrependPathSyntheticError) StateFields() []string { +func (p *PrependPathSyntheticError) StateFields() []string { return []string{} } -func (x *PrependPathSyntheticError) beforeSave() {} +func (p *PrependPathSyntheticError) beforeSave() {} -func (x *PrependPathSyntheticError) StateSave(m state.Sink) { - x.beforeSave() +func (p *PrependPathSyntheticError) StateSave(stateSinkObject state.Sink) { + p.beforeSave() } -func (x *PrependPathSyntheticError) afterLoad() {} +func (p *PrependPathSyntheticError) afterLoad() {} -func (x *PrependPathSyntheticError) StateLoad(m state.Source) { +func (p *PrependPathSyntheticError) StateLoad(stateSourceObject state.Source) { } -func (x *FilesystemRefs) StateTypeName() string { +func (f *FilesystemRefs) StateTypeName() string { return "pkg/sentry/vfs.FilesystemRefs" } -func (x *FilesystemRefs) StateFields() []string { +func (f *FilesystemRefs) StateFields() []string { return []string{ "refCount", } } -func (x *FilesystemRefs) beforeSave() {} +func (f *FilesystemRefs) beforeSave() {} -func (x *FilesystemRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (f *FilesystemRefs) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.refCount) } -func (x *FilesystemRefs) afterLoad() {} +func (f *FilesystemRefs) afterLoad() {} -func (x *FilesystemRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (f *FilesystemRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.refCount) } -func (x *registeredFilesystemType) StateTypeName() string { +func (r *registeredFilesystemType) StateTypeName() string { return "pkg/sentry/vfs.registeredFilesystemType" } -func (x *registeredFilesystemType) StateFields() []string { +func (r *registeredFilesystemType) StateFields() []string { return []string{ "fsType", "opts", } } -func (x *registeredFilesystemType) beforeSave() {} +func (r *registeredFilesystemType) beforeSave() {} -func (x *registeredFilesystemType) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.fsType) - m.Save(1, &x.opts) +func (r *registeredFilesystemType) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.fsType) + stateSinkObject.Save(1, &r.opts) } -func (x *registeredFilesystemType) afterLoad() {} +func (r *registeredFilesystemType) afterLoad() {} -func (x *registeredFilesystemType) StateLoad(m state.Source) { - m.Load(0, &x.fsType) - m.Load(1, &x.opts) +func (r *registeredFilesystemType) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.fsType) + stateSourceObject.Load(1, &r.opts) } -func (x *RegisterFilesystemTypeOptions) StateTypeName() string { +func (r *RegisterFilesystemTypeOptions) StateTypeName() string { return "pkg/sentry/vfs.RegisterFilesystemTypeOptions" } -func (x *RegisterFilesystemTypeOptions) StateFields() []string { +func (r *RegisterFilesystemTypeOptions) StateFields() []string { return []string{ "AllowUserMount", "AllowUserList", @@ -846,36 +846,36 @@ func (x *RegisterFilesystemTypeOptions) StateFields() []string { } } -func (x *RegisterFilesystemTypeOptions) beforeSave() {} +func (r *RegisterFilesystemTypeOptions) beforeSave() {} -func (x *RegisterFilesystemTypeOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.AllowUserMount) - m.Save(1, &x.AllowUserList) - m.Save(2, &x.RequiresDevice) +func (r *RegisterFilesystemTypeOptions) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.AllowUserMount) + stateSinkObject.Save(1, &r.AllowUserList) + stateSinkObject.Save(2, &r.RequiresDevice) } -func (x *RegisterFilesystemTypeOptions) afterLoad() {} +func (r *RegisterFilesystemTypeOptions) afterLoad() {} -func (x *RegisterFilesystemTypeOptions) StateLoad(m state.Source) { - m.Load(0, &x.AllowUserMount) - m.Load(1, &x.AllowUserList) - m.Load(2, &x.RequiresDevice) +func (r *RegisterFilesystemTypeOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.AllowUserMount) + stateSourceObject.Load(1, &r.AllowUserList) + stateSourceObject.Load(2, &r.RequiresDevice) } -func (x *EventType) StateTypeName() string { +func (e *EventType) StateTypeName() string { return "pkg/sentry/vfs.EventType" } -func (x *EventType) StateFields() []string { +func (e *EventType) StateFields() []string { return nil } -func (x *Inotify) StateTypeName() string { +func (i *Inotify) StateTypeName() string { return "pkg/sentry/vfs.Inotify" } -func (x *Inotify) StateFields() []string { +func (i *Inotify) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -889,63 +889,63 @@ func (x *Inotify) StateFields() []string { } } -func (x *Inotify) beforeSave() {} +func (i *Inotify) beforeSave() {} -func (x *Inotify) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfsfd) - m.Save(1, &x.FileDescriptionDefaultImpl) - m.Save(2, &x.DentryMetadataFileDescriptionImpl) - m.Save(3, &x.NoLockFD) - m.Save(4, &x.id) - m.Save(5, &x.events) - m.Save(6, &x.scratch) - m.Save(7, &x.nextWatchMinusOne) - m.Save(8, &x.watches) +func (i *Inotify) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.vfsfd) + stateSinkObject.Save(1, &i.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &i.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &i.NoLockFD) + stateSinkObject.Save(4, &i.id) + stateSinkObject.Save(5, &i.events) + stateSinkObject.Save(6, &i.scratch) + stateSinkObject.Save(7, &i.nextWatchMinusOne) + stateSinkObject.Save(8, &i.watches) } -func (x *Inotify) afterLoad() {} +func (i *Inotify) afterLoad() {} -func (x *Inotify) StateLoad(m state.Source) { - m.Load(0, &x.vfsfd) - m.Load(1, &x.FileDescriptionDefaultImpl) - m.Load(2, &x.DentryMetadataFileDescriptionImpl) - m.Load(3, &x.NoLockFD) - m.Load(4, &x.id) - m.Load(5, &x.events) - m.Load(6, &x.scratch) - m.Load(7, &x.nextWatchMinusOne) - m.Load(8, &x.watches) +func (i *Inotify) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.vfsfd) + stateSourceObject.Load(1, &i.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &i.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &i.NoLockFD) + stateSourceObject.Load(4, &i.id) + stateSourceObject.Load(5, &i.events) + stateSourceObject.Load(6, &i.scratch) + stateSourceObject.Load(7, &i.nextWatchMinusOne) + stateSourceObject.Load(8, &i.watches) } -func (x *Watches) StateTypeName() string { +func (w *Watches) StateTypeName() string { return "pkg/sentry/vfs.Watches" } -func (x *Watches) StateFields() []string { +func (w *Watches) StateFields() []string { return []string{ "ws", } } -func (x *Watches) beforeSave() {} +func (w *Watches) beforeSave() {} -func (x *Watches) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.ws) +func (w *Watches) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.ws) } -func (x *Watches) afterLoad() {} +func (w *Watches) afterLoad() {} -func (x *Watches) StateLoad(m state.Source) { - m.Load(0, &x.ws) +func (w *Watches) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.ws) } -func (x *Watch) StateTypeName() string { +func (w *Watch) StateTypeName() string { return "pkg/sentry/vfs.Watch" } -func (x *Watch) StateFields() []string { +func (w *Watch) StateFields() []string { return []string{ "owner", "wd", @@ -955,32 +955,32 @@ func (x *Watch) StateFields() []string { } } -func (x *Watch) beforeSave() {} +func (w *Watch) beforeSave() {} -func (x *Watch) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.owner) - m.Save(1, &x.wd) - m.Save(2, &x.target) - m.Save(3, &x.mask) - m.Save(4, &x.expired) +func (w *Watch) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.owner) + stateSinkObject.Save(1, &w.wd) + stateSinkObject.Save(2, &w.target) + stateSinkObject.Save(3, &w.mask) + stateSinkObject.Save(4, &w.expired) } -func (x *Watch) afterLoad() {} +func (w *Watch) afterLoad() {} -func (x *Watch) StateLoad(m state.Source) { - m.Load(0, &x.owner) - m.Load(1, &x.wd) - m.Load(2, &x.target) - m.Load(3, &x.mask) - m.Load(4, &x.expired) +func (w *Watch) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.owner) + stateSourceObject.Load(1, &w.wd) + stateSourceObject.Load(2, &w.target) + stateSourceObject.Load(3, &w.mask) + stateSourceObject.Load(4, &w.expired) } -func (x *Event) StateTypeName() string { +func (e *Event) StateTypeName() string { return "pkg/sentry/vfs.Event" } -func (x *Event) StateFields() []string { +func (e *Event) StateFields() []string { return []string{ "eventEntry", "wd", @@ -991,60 +991,60 @@ func (x *Event) StateFields() []string { } } -func (x *Event) beforeSave() {} +func (e *Event) beforeSave() {} -func (x *Event) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.eventEntry) - m.Save(1, &x.wd) - m.Save(2, &x.mask) - m.Save(3, &x.cookie) - m.Save(4, &x.len) - m.Save(5, &x.name) +func (e *Event) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.eventEntry) + stateSinkObject.Save(1, &e.wd) + stateSinkObject.Save(2, &e.mask) + stateSinkObject.Save(3, &e.cookie) + stateSinkObject.Save(4, &e.len) + stateSinkObject.Save(5, &e.name) } -func (x *Event) afterLoad() {} +func (e *Event) afterLoad() {} -func (x *Event) StateLoad(m state.Source) { - m.Load(0, &x.eventEntry) - m.Load(1, &x.wd) - m.Load(2, &x.mask) - m.Load(3, &x.cookie) - m.Load(4, &x.len) - m.Load(5, &x.name) +func (e *Event) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.eventEntry) + stateSourceObject.Load(1, &e.wd) + stateSourceObject.Load(2, &e.mask) + stateSourceObject.Load(3, &e.cookie) + stateSourceObject.Load(4, &e.len) + stateSourceObject.Load(5, &e.name) } -func (x *FileLocks) StateTypeName() string { +func (f *FileLocks) StateTypeName() string { return "pkg/sentry/vfs.FileLocks" } -func (x *FileLocks) StateFields() []string { +func (f *FileLocks) StateFields() []string { return []string{ "bsd", "posix", } } -func (x *FileLocks) beforeSave() {} +func (f *FileLocks) beforeSave() {} -func (x *FileLocks) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.bsd) - m.Save(1, &x.posix) +func (f *FileLocks) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.bsd) + stateSinkObject.Save(1, &f.posix) } -func (x *FileLocks) afterLoad() {} +func (f *FileLocks) afterLoad() {} -func (x *FileLocks) StateLoad(m state.Source) { - m.Load(0, &x.bsd) - m.Load(1, &x.posix) +func (f *FileLocks) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.bsd) + stateSourceObject.Load(1, &f.posix) } -func (x *Mount) StateTypeName() string { +func (m *Mount) StateTypeName() string { return "pkg/sentry/vfs.Mount" } -func (x *Mount) StateFields() []string { +func (m *Mount) StateFields() []string { return []string{ "vfs", "fs", @@ -1060,45 +1060,45 @@ func (x *Mount) StateFields() []string { } } -func (x *Mount) beforeSave() {} - -func (x *Mount) StateSave(m state.Sink) { - x.beforeSave() - var key VirtualDentry = x.saveKey() - m.SaveValue(5, key) - m.Save(0, &x.vfs) - m.Save(1, &x.fs) - m.Save(2, &x.root) - m.Save(3, &x.ID) - m.Save(4, &x.Flags) - m.Save(6, &x.ns) - m.Save(7, &x.refs) - m.Save(8, &x.children) - m.Save(9, &x.umounted) - m.Save(10, &x.writers) -} - -func (x *Mount) afterLoad() {} - -func (x *Mount) StateLoad(m state.Source) { - m.Load(0, &x.vfs) - m.Load(1, &x.fs) - m.Load(2, &x.root) - m.Load(3, &x.ID) - m.Load(4, &x.Flags) - m.Load(6, &x.ns) - m.Load(7, &x.refs) - m.Load(8, &x.children) - m.Load(9, &x.umounted) - m.Load(10, &x.writers) - m.LoadValue(5, new(VirtualDentry), func(y interface{}) { x.loadKey(y.(VirtualDentry)) }) -} - -func (x *MountNamespace) StateTypeName() string { +func (m *Mount) beforeSave() {} + +func (m *Mount) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + var keyValue VirtualDentry = m.saveKey() + stateSinkObject.SaveValue(5, keyValue) + stateSinkObject.Save(0, &m.vfs) + stateSinkObject.Save(1, &m.fs) + stateSinkObject.Save(2, &m.root) + stateSinkObject.Save(3, &m.ID) + stateSinkObject.Save(4, &m.Flags) + stateSinkObject.Save(6, &m.ns) + stateSinkObject.Save(7, &m.refs) + stateSinkObject.Save(8, &m.children) + stateSinkObject.Save(9, &m.umounted) + stateSinkObject.Save(10, &m.writers) +} + +func (m *Mount) afterLoad() {} + +func (m *Mount) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.vfs) + stateSourceObject.Load(1, &m.fs) + stateSourceObject.Load(2, &m.root) + stateSourceObject.Load(3, &m.ID) + stateSourceObject.Load(4, &m.Flags) + stateSourceObject.Load(6, &m.ns) + stateSourceObject.Load(7, &m.refs) + stateSourceObject.Load(8, &m.children) + stateSourceObject.Load(9, &m.umounted) + stateSourceObject.Load(10, &m.writers) + stateSourceObject.LoadValue(5, new(VirtualDentry), func(y interface{}) { m.loadKey(y.(VirtualDentry)) }) +} + +func (m *MountNamespace) StateTypeName() string { return "pkg/sentry/vfs.MountNamespace" } -func (x *MountNamespace) StateFields() []string { +func (m *MountNamespace) StateFields() []string { return []string{ "MountNamespaceRefs", "Owner", @@ -1107,128 +1107,128 @@ func (x *MountNamespace) StateFields() []string { } } -func (x *MountNamespace) beforeSave() {} +func (m *MountNamespace) beforeSave() {} -func (x *MountNamespace) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.MountNamespaceRefs) - m.Save(1, &x.Owner) - m.Save(2, &x.root) - m.Save(3, &x.mountpoints) +func (m *MountNamespace) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.MountNamespaceRefs) + stateSinkObject.Save(1, &m.Owner) + stateSinkObject.Save(2, &m.root) + stateSinkObject.Save(3, &m.mountpoints) } -func (x *MountNamespace) afterLoad() {} +func (m *MountNamespace) afterLoad() {} -func (x *MountNamespace) StateLoad(m state.Source) { - m.Load(0, &x.MountNamespaceRefs) - m.Load(1, &x.Owner) - m.Load(2, &x.root) - m.Load(3, &x.mountpoints) +func (m *MountNamespace) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.MountNamespaceRefs) + stateSourceObject.Load(1, &m.Owner) + stateSourceObject.Load(2, &m.root) + stateSourceObject.Load(3, &m.mountpoints) } -func (x *umountRecursiveOptions) StateTypeName() string { +func (u *umountRecursiveOptions) StateTypeName() string { return "pkg/sentry/vfs.umountRecursiveOptions" } -func (x *umountRecursiveOptions) StateFields() []string { +func (u *umountRecursiveOptions) StateFields() []string { return []string{ "eager", "disconnectHierarchy", } } -func (x *umountRecursiveOptions) beforeSave() {} +func (u *umountRecursiveOptions) beforeSave() {} -func (x *umountRecursiveOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.eager) - m.Save(1, &x.disconnectHierarchy) +func (u *umountRecursiveOptions) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.eager) + stateSinkObject.Save(1, &u.disconnectHierarchy) } -func (x *umountRecursiveOptions) afterLoad() {} +func (u *umountRecursiveOptions) afterLoad() {} -func (x *umountRecursiveOptions) StateLoad(m state.Source) { - m.Load(0, &x.eager) - m.Load(1, &x.disconnectHierarchy) +func (u *umountRecursiveOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.eager) + stateSourceObject.Load(1, &u.disconnectHierarchy) } -func (x *MountNamespaceRefs) StateTypeName() string { +func (m *MountNamespaceRefs) StateTypeName() string { return "pkg/sentry/vfs.MountNamespaceRefs" } -func (x *MountNamespaceRefs) StateFields() []string { +func (m *MountNamespaceRefs) StateFields() []string { return []string{ "refCount", } } -func (x *MountNamespaceRefs) beforeSave() {} +func (m *MountNamespaceRefs) beforeSave() {} -func (x *MountNamespaceRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (m *MountNamespaceRefs) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.refCount) } -func (x *MountNamespaceRefs) afterLoad() {} +func (m *MountNamespaceRefs) afterLoad() {} -func (x *MountNamespaceRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (m *MountNamespaceRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.refCount) } -func (x *GetDentryOptions) StateTypeName() string { +func (g *GetDentryOptions) StateTypeName() string { return "pkg/sentry/vfs.GetDentryOptions" } -func (x *GetDentryOptions) StateFields() []string { +func (g *GetDentryOptions) StateFields() []string { return []string{ "CheckSearchable", } } -func (x *GetDentryOptions) beforeSave() {} +func (g *GetDentryOptions) beforeSave() {} -func (x *GetDentryOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.CheckSearchable) +func (g *GetDentryOptions) StateSave(stateSinkObject state.Sink) { + g.beforeSave() + stateSinkObject.Save(0, &g.CheckSearchable) } -func (x *GetDentryOptions) afterLoad() {} +func (g *GetDentryOptions) afterLoad() {} -func (x *GetDentryOptions) StateLoad(m state.Source) { - m.Load(0, &x.CheckSearchable) +func (g *GetDentryOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &g.CheckSearchable) } -func (x *MkdirOptions) StateTypeName() string { +func (m *MkdirOptions) StateTypeName() string { return "pkg/sentry/vfs.MkdirOptions" } -func (x *MkdirOptions) StateFields() []string { +func (m *MkdirOptions) StateFields() []string { return []string{ "Mode", "ForSyntheticMountpoint", } } -func (x *MkdirOptions) beforeSave() {} +func (m *MkdirOptions) beforeSave() {} -func (x *MkdirOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Mode) - m.Save(1, &x.ForSyntheticMountpoint) +func (m *MkdirOptions) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.Mode) + stateSinkObject.Save(1, &m.ForSyntheticMountpoint) } -func (x *MkdirOptions) afterLoad() {} +func (m *MkdirOptions) afterLoad() {} -func (x *MkdirOptions) StateLoad(m state.Source) { - m.Load(0, &x.Mode) - m.Load(1, &x.ForSyntheticMountpoint) +func (m *MkdirOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.Mode) + stateSourceObject.Load(1, &m.ForSyntheticMountpoint) } -func (x *MknodOptions) StateTypeName() string { +func (m *MknodOptions) StateTypeName() string { return "pkg/sentry/vfs.MknodOptions" } -func (x *MknodOptions) StateFields() []string { +func (m *MknodOptions) StateFields() []string { return []string{ "Mode", "DevMajor", @@ -1237,30 +1237,30 @@ func (x *MknodOptions) StateFields() []string { } } -func (x *MknodOptions) beforeSave() {} +func (m *MknodOptions) beforeSave() {} -func (x *MknodOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Mode) - m.Save(1, &x.DevMajor) - m.Save(2, &x.DevMinor) - m.Save(3, &x.Endpoint) +func (m *MknodOptions) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.Mode) + stateSinkObject.Save(1, &m.DevMajor) + stateSinkObject.Save(2, &m.DevMinor) + stateSinkObject.Save(3, &m.Endpoint) } -func (x *MknodOptions) afterLoad() {} +func (m *MknodOptions) afterLoad() {} -func (x *MknodOptions) StateLoad(m state.Source) { - m.Load(0, &x.Mode) - m.Load(1, &x.DevMajor) - m.Load(2, &x.DevMinor) - m.Load(3, &x.Endpoint) +func (m *MknodOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.Mode) + stateSourceObject.Load(1, &m.DevMajor) + stateSourceObject.Load(2, &m.DevMinor) + stateSourceObject.Load(3, &m.Endpoint) } -func (x *MountFlags) StateTypeName() string { +func (m *MountFlags) StateTypeName() string { return "pkg/sentry/vfs.MountFlags" } -func (x *MountFlags) StateFields() []string { +func (m *MountFlags) StateFields() []string { return []string{ "NoExec", "NoATime", @@ -1269,30 +1269,30 @@ func (x *MountFlags) StateFields() []string { } } -func (x *MountFlags) beforeSave() {} +func (m *MountFlags) beforeSave() {} -func (x *MountFlags) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.NoExec) - m.Save(1, &x.NoATime) - m.Save(2, &x.NoDev) - m.Save(3, &x.NoSUID) +func (m *MountFlags) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.NoExec) + stateSinkObject.Save(1, &m.NoATime) + stateSinkObject.Save(2, &m.NoDev) + stateSinkObject.Save(3, &m.NoSUID) } -func (x *MountFlags) afterLoad() {} +func (m *MountFlags) afterLoad() {} -func (x *MountFlags) StateLoad(m state.Source) { - m.Load(0, &x.NoExec) - m.Load(1, &x.NoATime) - m.Load(2, &x.NoDev) - m.Load(3, &x.NoSUID) +func (m *MountFlags) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.NoExec) + stateSourceObject.Load(1, &m.NoATime) + stateSourceObject.Load(2, &m.NoDev) + stateSourceObject.Load(3, &m.NoSUID) } -func (x *MountOptions) StateTypeName() string { +func (m *MountOptions) StateTypeName() string { return "pkg/sentry/vfs.MountOptions" } -func (x *MountOptions) StateFields() []string { +func (m *MountOptions) StateFields() []string { return []string{ "Flags", "ReadOnly", @@ -1301,30 +1301,30 @@ func (x *MountOptions) StateFields() []string { } } -func (x *MountOptions) beforeSave() {} +func (m *MountOptions) beforeSave() {} -func (x *MountOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Flags) - m.Save(1, &x.ReadOnly) - m.Save(2, &x.GetFilesystemOptions) - m.Save(3, &x.InternalMount) +func (m *MountOptions) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.Flags) + stateSinkObject.Save(1, &m.ReadOnly) + stateSinkObject.Save(2, &m.GetFilesystemOptions) + stateSinkObject.Save(3, &m.InternalMount) } -func (x *MountOptions) afterLoad() {} +func (m *MountOptions) afterLoad() {} -func (x *MountOptions) StateLoad(m state.Source) { - m.Load(0, &x.Flags) - m.Load(1, &x.ReadOnly) - m.Load(2, &x.GetFilesystemOptions) - m.Load(3, &x.InternalMount) +func (m *MountOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.Flags) + stateSourceObject.Load(1, &m.ReadOnly) + stateSourceObject.Load(2, &m.GetFilesystemOptions) + stateSourceObject.Load(3, &m.InternalMount) } -func (x *OpenOptions) StateTypeName() string { +func (o *OpenOptions) StateTypeName() string { return "pkg/sentry/vfs.OpenOptions" } -func (x *OpenOptions) StateFields() []string { +func (o *OpenOptions) StateFields() []string { return []string{ "Flags", "Mode", @@ -1332,152 +1332,152 @@ func (x *OpenOptions) StateFields() []string { } } -func (x *OpenOptions) beforeSave() {} +func (o *OpenOptions) beforeSave() {} -func (x *OpenOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Flags) - m.Save(1, &x.Mode) - m.Save(2, &x.FileExec) +func (o *OpenOptions) StateSave(stateSinkObject state.Sink) { + o.beforeSave() + stateSinkObject.Save(0, &o.Flags) + stateSinkObject.Save(1, &o.Mode) + stateSinkObject.Save(2, &o.FileExec) } -func (x *OpenOptions) afterLoad() {} +func (o *OpenOptions) afterLoad() {} -func (x *OpenOptions) StateLoad(m state.Source) { - m.Load(0, &x.Flags) - m.Load(1, &x.Mode) - m.Load(2, &x.FileExec) +func (o *OpenOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &o.Flags) + stateSourceObject.Load(1, &o.Mode) + stateSourceObject.Load(2, &o.FileExec) } -func (x *ReadOptions) StateTypeName() string { +func (r *ReadOptions) StateTypeName() string { return "pkg/sentry/vfs.ReadOptions" } -func (x *ReadOptions) StateFields() []string { +func (r *ReadOptions) StateFields() []string { return []string{ "Flags", } } -func (x *ReadOptions) beforeSave() {} +func (r *ReadOptions) beforeSave() {} -func (x *ReadOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Flags) +func (r *ReadOptions) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.Flags) } -func (x *ReadOptions) afterLoad() {} +func (r *ReadOptions) afterLoad() {} -func (x *ReadOptions) StateLoad(m state.Source) { - m.Load(0, &x.Flags) +func (r *ReadOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.Flags) } -func (x *RenameOptions) StateTypeName() string { +func (r *RenameOptions) StateTypeName() string { return "pkg/sentry/vfs.RenameOptions" } -func (x *RenameOptions) StateFields() []string { +func (r *RenameOptions) StateFields() []string { return []string{ "Flags", "MustBeDir", } } -func (x *RenameOptions) beforeSave() {} +func (r *RenameOptions) beforeSave() {} -func (x *RenameOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Flags) - m.Save(1, &x.MustBeDir) +func (r *RenameOptions) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.Flags) + stateSinkObject.Save(1, &r.MustBeDir) } -func (x *RenameOptions) afterLoad() {} +func (r *RenameOptions) afterLoad() {} -func (x *RenameOptions) StateLoad(m state.Source) { - m.Load(0, &x.Flags) - m.Load(1, &x.MustBeDir) +func (r *RenameOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.Flags) + stateSourceObject.Load(1, &r.MustBeDir) } -func (x *SetStatOptions) StateTypeName() string { +func (s *SetStatOptions) StateTypeName() string { return "pkg/sentry/vfs.SetStatOptions" } -func (x *SetStatOptions) StateFields() []string { +func (s *SetStatOptions) StateFields() []string { return []string{ "Stat", "NeedWritePerm", } } -func (x *SetStatOptions) beforeSave() {} +func (s *SetStatOptions) beforeSave() {} -func (x *SetStatOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Stat) - m.Save(1, &x.NeedWritePerm) +func (s *SetStatOptions) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Stat) + stateSinkObject.Save(1, &s.NeedWritePerm) } -func (x *SetStatOptions) afterLoad() {} +func (s *SetStatOptions) afterLoad() {} -func (x *SetStatOptions) StateLoad(m state.Source) { - m.Load(0, &x.Stat) - m.Load(1, &x.NeedWritePerm) +func (s *SetStatOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Stat) + stateSourceObject.Load(1, &s.NeedWritePerm) } -func (x *BoundEndpointOptions) StateTypeName() string { +func (b *BoundEndpointOptions) StateTypeName() string { return "pkg/sentry/vfs.BoundEndpointOptions" } -func (x *BoundEndpointOptions) StateFields() []string { +func (b *BoundEndpointOptions) StateFields() []string { return []string{ "Addr", } } -func (x *BoundEndpointOptions) beforeSave() {} +func (b *BoundEndpointOptions) beforeSave() {} -func (x *BoundEndpointOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Addr) +func (b *BoundEndpointOptions) StateSave(stateSinkObject state.Sink) { + b.beforeSave() + stateSinkObject.Save(0, &b.Addr) } -func (x *BoundEndpointOptions) afterLoad() {} +func (b *BoundEndpointOptions) afterLoad() {} -func (x *BoundEndpointOptions) StateLoad(m state.Source) { - m.Load(0, &x.Addr) +func (b *BoundEndpointOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &b.Addr) } -func (x *GetXattrOptions) StateTypeName() string { +func (g *GetXattrOptions) StateTypeName() string { return "pkg/sentry/vfs.GetXattrOptions" } -func (x *GetXattrOptions) StateFields() []string { +func (g *GetXattrOptions) StateFields() []string { return []string{ "Name", "Size", } } -func (x *GetXattrOptions) beforeSave() {} +func (g *GetXattrOptions) beforeSave() {} -func (x *GetXattrOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Name) - m.Save(1, &x.Size) +func (g *GetXattrOptions) StateSave(stateSinkObject state.Sink) { + g.beforeSave() + stateSinkObject.Save(0, &g.Name) + stateSinkObject.Save(1, &g.Size) } -func (x *GetXattrOptions) afterLoad() {} +func (g *GetXattrOptions) afterLoad() {} -func (x *GetXattrOptions) StateLoad(m state.Source) { - m.Load(0, &x.Name) - m.Load(1, &x.Size) +func (g *GetXattrOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &g.Name) + stateSourceObject.Load(1, &g.Size) } -func (x *SetXattrOptions) StateTypeName() string { +func (s *SetXattrOptions) StateTypeName() string { return "pkg/sentry/vfs.SetXattrOptions" } -func (x *SetXattrOptions) StateFields() []string { +func (s *SetXattrOptions) StateFields() []string { return []string{ "Name", "Value", @@ -1485,108 +1485,108 @@ func (x *SetXattrOptions) StateFields() []string { } } -func (x *SetXattrOptions) beforeSave() {} +func (s *SetXattrOptions) beforeSave() {} -func (x *SetXattrOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Name) - m.Save(1, &x.Value) - m.Save(2, &x.Flags) +func (s *SetXattrOptions) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Name) + stateSinkObject.Save(1, &s.Value) + stateSinkObject.Save(2, &s.Flags) } -func (x *SetXattrOptions) afterLoad() {} +func (s *SetXattrOptions) afterLoad() {} -func (x *SetXattrOptions) StateLoad(m state.Source) { - m.Load(0, &x.Name) - m.Load(1, &x.Value) - m.Load(2, &x.Flags) +func (s *SetXattrOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Name) + stateSourceObject.Load(1, &s.Value) + stateSourceObject.Load(2, &s.Flags) } -func (x *StatOptions) StateTypeName() string { +func (s *StatOptions) StateTypeName() string { return "pkg/sentry/vfs.StatOptions" } -func (x *StatOptions) StateFields() []string { +func (s *StatOptions) StateFields() []string { return []string{ "Mask", "Sync", } } -func (x *StatOptions) beforeSave() {} +func (s *StatOptions) beforeSave() {} -func (x *StatOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Mask) - m.Save(1, &x.Sync) +func (s *StatOptions) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Mask) + stateSinkObject.Save(1, &s.Sync) } -func (x *StatOptions) afterLoad() {} +func (s *StatOptions) afterLoad() {} -func (x *StatOptions) StateLoad(m state.Source) { - m.Load(0, &x.Mask) - m.Load(1, &x.Sync) +func (s *StatOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Mask) + stateSourceObject.Load(1, &s.Sync) } -func (x *UmountOptions) StateTypeName() string { +func (u *UmountOptions) StateTypeName() string { return "pkg/sentry/vfs.UmountOptions" } -func (x *UmountOptions) StateFields() []string { +func (u *UmountOptions) StateFields() []string { return []string{ "Flags", } } -func (x *UmountOptions) beforeSave() {} +func (u *UmountOptions) beforeSave() {} -func (x *UmountOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Flags) +func (u *UmountOptions) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.Flags) } -func (x *UmountOptions) afterLoad() {} +func (u *UmountOptions) afterLoad() {} -func (x *UmountOptions) StateLoad(m state.Source) { - m.Load(0, &x.Flags) +func (u *UmountOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.Flags) } -func (x *WriteOptions) StateTypeName() string { +func (w *WriteOptions) StateTypeName() string { return "pkg/sentry/vfs.WriteOptions" } -func (x *WriteOptions) StateFields() []string { +func (w *WriteOptions) StateFields() []string { return []string{ "Flags", } } -func (x *WriteOptions) beforeSave() {} +func (w *WriteOptions) beforeSave() {} -func (x *WriteOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Flags) +func (w *WriteOptions) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.Flags) } -func (x *WriteOptions) afterLoad() {} +func (w *WriteOptions) afterLoad() {} -func (x *WriteOptions) StateLoad(m state.Source) { - m.Load(0, &x.Flags) +func (w *WriteOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.Flags) } -func (x *AccessTypes) StateTypeName() string { +func (a *AccessTypes) StateTypeName() string { return "pkg/sentry/vfs.AccessTypes" } -func (x *AccessTypes) StateFields() []string { +func (a *AccessTypes) StateFields() []string { return nil } -func (x *ResolvingPath) StateTypeName() string { +func (r *ResolvingPath) StateTypeName() string { return "pkg/sentry/vfs.ResolvingPath" } -func (x *ResolvingPath) StateFields() []string { +func (r *ResolvingPath) StateFields() []string { return []string{ "vfs", "root", @@ -1609,115 +1609,115 @@ func (x *ResolvingPath) StateFields() []string { } } -func (x *ResolvingPath) beforeSave() {} - -func (x *ResolvingPath) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.vfs) - m.Save(1, &x.root) - m.Save(2, &x.mount) - m.Save(3, &x.start) - m.Save(4, &x.pit) - m.Save(5, &x.flags) - m.Save(6, &x.mustBeDir) - m.Save(7, &x.mustBeDirOrig) - m.Save(8, &x.symlinks) - m.Save(9, &x.symlinksOrig) - m.Save(10, &x.curPart) - m.Save(11, &x.numOrigParts) - m.Save(12, &x.creds) - m.Save(13, &x.nextMount) - m.Save(14, &x.nextStart) - m.Save(15, &x.absSymlinkTarget) - m.Save(16, &x.parts) - m.Save(17, &x.origParts) -} - -func (x *ResolvingPath) afterLoad() {} - -func (x *ResolvingPath) StateLoad(m state.Source) { - m.Load(0, &x.vfs) - m.Load(1, &x.root) - m.Load(2, &x.mount) - m.Load(3, &x.start) - m.Load(4, &x.pit) - m.Load(5, &x.flags) - m.Load(6, &x.mustBeDir) - m.Load(7, &x.mustBeDirOrig) - m.Load(8, &x.symlinks) - m.Load(9, &x.symlinksOrig) - m.Load(10, &x.curPart) - m.Load(11, &x.numOrigParts) - m.Load(12, &x.creds) - m.Load(13, &x.nextMount) - m.Load(14, &x.nextStart) - m.Load(15, &x.absSymlinkTarget) - m.Load(16, &x.parts) - m.Load(17, &x.origParts) -} - -func (x *resolveMountRootOrJumpError) StateTypeName() string { +func (r *ResolvingPath) beforeSave() {} + +func (r *ResolvingPath) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.vfs) + stateSinkObject.Save(1, &r.root) + stateSinkObject.Save(2, &r.mount) + stateSinkObject.Save(3, &r.start) + stateSinkObject.Save(4, &r.pit) + stateSinkObject.Save(5, &r.flags) + stateSinkObject.Save(6, &r.mustBeDir) + stateSinkObject.Save(7, &r.mustBeDirOrig) + stateSinkObject.Save(8, &r.symlinks) + stateSinkObject.Save(9, &r.symlinksOrig) + stateSinkObject.Save(10, &r.curPart) + stateSinkObject.Save(11, &r.numOrigParts) + stateSinkObject.Save(12, &r.creds) + stateSinkObject.Save(13, &r.nextMount) + stateSinkObject.Save(14, &r.nextStart) + stateSinkObject.Save(15, &r.absSymlinkTarget) + stateSinkObject.Save(16, &r.parts) + stateSinkObject.Save(17, &r.origParts) +} + +func (r *ResolvingPath) afterLoad() {} + +func (r *ResolvingPath) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.vfs) + stateSourceObject.Load(1, &r.root) + stateSourceObject.Load(2, &r.mount) + stateSourceObject.Load(3, &r.start) + stateSourceObject.Load(4, &r.pit) + stateSourceObject.Load(5, &r.flags) + stateSourceObject.Load(6, &r.mustBeDir) + stateSourceObject.Load(7, &r.mustBeDirOrig) + stateSourceObject.Load(8, &r.symlinks) + stateSourceObject.Load(9, &r.symlinksOrig) + stateSourceObject.Load(10, &r.curPart) + stateSourceObject.Load(11, &r.numOrigParts) + stateSourceObject.Load(12, &r.creds) + stateSourceObject.Load(13, &r.nextMount) + stateSourceObject.Load(14, &r.nextStart) + stateSourceObject.Load(15, &r.absSymlinkTarget) + stateSourceObject.Load(16, &r.parts) + stateSourceObject.Load(17, &r.origParts) +} + +func (r *resolveMountRootOrJumpError) StateTypeName() string { return "pkg/sentry/vfs.resolveMountRootOrJumpError" } -func (x *resolveMountRootOrJumpError) StateFields() []string { +func (r *resolveMountRootOrJumpError) StateFields() []string { return []string{} } -func (x *resolveMountRootOrJumpError) beforeSave() {} +func (r *resolveMountRootOrJumpError) beforeSave() {} -func (x *resolveMountRootOrJumpError) StateSave(m state.Sink) { - x.beforeSave() +func (r *resolveMountRootOrJumpError) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *resolveMountRootOrJumpError) afterLoad() {} +func (r *resolveMountRootOrJumpError) afterLoad() {} -func (x *resolveMountRootOrJumpError) StateLoad(m state.Source) { +func (r *resolveMountRootOrJumpError) StateLoad(stateSourceObject state.Source) { } -func (x *resolveMountPointError) StateTypeName() string { +func (r *resolveMountPointError) StateTypeName() string { return "pkg/sentry/vfs.resolveMountPointError" } -func (x *resolveMountPointError) StateFields() []string { +func (r *resolveMountPointError) StateFields() []string { return []string{} } -func (x *resolveMountPointError) beforeSave() {} +func (r *resolveMountPointError) beforeSave() {} -func (x *resolveMountPointError) StateSave(m state.Sink) { - x.beforeSave() +func (r *resolveMountPointError) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *resolveMountPointError) afterLoad() {} +func (r *resolveMountPointError) afterLoad() {} -func (x *resolveMountPointError) StateLoad(m state.Source) { +func (r *resolveMountPointError) StateLoad(stateSourceObject state.Source) { } -func (x *resolveAbsSymlinkError) StateTypeName() string { +func (r *resolveAbsSymlinkError) StateTypeName() string { return "pkg/sentry/vfs.resolveAbsSymlinkError" } -func (x *resolveAbsSymlinkError) StateFields() []string { +func (r *resolveAbsSymlinkError) StateFields() []string { return []string{} } -func (x *resolveAbsSymlinkError) beforeSave() {} +func (r *resolveAbsSymlinkError) beforeSave() {} -func (x *resolveAbsSymlinkError) StateSave(m state.Sink) { - x.beforeSave() +func (r *resolveAbsSymlinkError) StateSave(stateSinkObject state.Sink) { + r.beforeSave() } -func (x *resolveAbsSymlinkError) afterLoad() {} +func (r *resolveAbsSymlinkError) afterLoad() {} -func (x *resolveAbsSymlinkError) StateLoad(m state.Source) { +func (r *resolveAbsSymlinkError) StateLoad(stateSourceObject state.Source) { } -func (x *VirtualFilesystem) StateTypeName() string { +func (v *VirtualFilesystem) StateTypeName() string { return "pkg/sentry/vfs.VirtualFilesystem" } -func (x *VirtualFilesystem) StateFields() []string { +func (v *VirtualFilesystem) StateFields() []string { return []string{ "mounts", "mountpoints", @@ -1731,40 +1731,40 @@ func (x *VirtualFilesystem) StateFields() []string { } } -func (x *VirtualFilesystem) beforeSave() {} +func (v *VirtualFilesystem) beforeSave() {} -func (x *VirtualFilesystem) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.mounts) - m.Save(1, &x.mountpoints) - m.Save(2, &x.lastMountID) - m.Save(3, &x.anonMount) - m.Save(4, &x.devices) - m.Save(5, &x.anonBlockDevMinorNext) - m.Save(6, &x.anonBlockDevMinor) - m.Save(7, &x.fsTypes) - m.Save(8, &x.filesystems) +func (v *VirtualFilesystem) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.mounts) + stateSinkObject.Save(1, &v.mountpoints) + stateSinkObject.Save(2, &v.lastMountID) + stateSinkObject.Save(3, &v.anonMount) + stateSinkObject.Save(4, &v.devices) + stateSinkObject.Save(5, &v.anonBlockDevMinorNext) + stateSinkObject.Save(6, &v.anonBlockDevMinor) + stateSinkObject.Save(7, &v.fsTypes) + stateSinkObject.Save(8, &v.filesystems) } -func (x *VirtualFilesystem) afterLoad() {} +func (v *VirtualFilesystem) afterLoad() {} -func (x *VirtualFilesystem) StateLoad(m state.Source) { - m.Load(0, &x.mounts) - m.Load(1, &x.mountpoints) - m.Load(2, &x.lastMountID) - m.Load(3, &x.anonMount) - m.Load(4, &x.devices) - m.Load(5, &x.anonBlockDevMinorNext) - m.Load(6, &x.anonBlockDevMinor) - m.Load(7, &x.fsTypes) - m.Load(8, &x.filesystems) +func (v *VirtualFilesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.mounts) + stateSourceObject.Load(1, &v.mountpoints) + stateSourceObject.Load(2, &v.lastMountID) + stateSourceObject.Load(3, &v.anonMount) + stateSourceObject.Load(4, &v.devices) + stateSourceObject.Load(5, &v.anonBlockDevMinorNext) + stateSourceObject.Load(6, &v.anonBlockDevMinor) + stateSourceObject.Load(7, &v.fsTypes) + stateSourceObject.Load(8, &v.filesystems) } -func (x *PathOperation) StateTypeName() string { +func (p *PathOperation) StateTypeName() string { return "pkg/sentry/vfs.PathOperation" } -func (x *PathOperation) StateFields() []string { +func (p *PathOperation) StateFields() []string { return []string{ "Root", "Start", @@ -1773,49 +1773,49 @@ func (x *PathOperation) StateFields() []string { } } -func (x *PathOperation) beforeSave() {} +func (p *PathOperation) beforeSave() {} -func (x *PathOperation) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Root) - m.Save(1, &x.Start) - m.Save(2, &x.Path) - m.Save(3, &x.FollowFinalSymlink) +func (p *PathOperation) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.Root) + stateSinkObject.Save(1, &p.Start) + stateSinkObject.Save(2, &p.Path) + stateSinkObject.Save(3, &p.FollowFinalSymlink) } -func (x *PathOperation) afterLoad() {} +func (p *PathOperation) afterLoad() {} -func (x *PathOperation) StateLoad(m state.Source) { - m.Load(0, &x.Root) - m.Load(1, &x.Start) - m.Load(2, &x.Path) - m.Load(3, &x.FollowFinalSymlink) +func (p *PathOperation) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.Root) + stateSourceObject.Load(1, &p.Start) + stateSourceObject.Load(2, &p.Path) + stateSourceObject.Load(3, &p.FollowFinalSymlink) } -func (x *VirtualDentry) StateTypeName() string { +func (v *VirtualDentry) StateTypeName() string { return "pkg/sentry/vfs.VirtualDentry" } -func (x *VirtualDentry) StateFields() []string { +func (v *VirtualDentry) StateFields() []string { return []string{ "mount", "dentry", } } -func (x *VirtualDentry) beforeSave() {} +func (v *VirtualDentry) beforeSave() {} -func (x *VirtualDentry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.mount) - m.Save(1, &x.dentry) +func (v *VirtualDentry) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.mount) + stateSinkObject.Save(1, &v.dentry) } -func (x *VirtualDentry) afterLoad() {} +func (v *VirtualDentry) afterLoad() {} -func (x *VirtualDentry) StateLoad(m state.Source) { - m.Load(0, &x.mount) - m.Load(1, &x.dentry) +func (v *VirtualDentry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.mount) + stateSourceObject.Load(1, &v.dentry) } func init() { diff --git a/pkg/sentry/vfs/vfs_unsafe_state_autogen.go b/pkg/sentry/vfs/vfs_unsafe_state_autogen.go index d34d60001..1dedacc1f 100644 --- a/pkg/sentry/vfs/vfs_unsafe_state_autogen.go +++ b/pkg/sentry/vfs/vfs_unsafe_state_autogen.go @@ -9,30 +9,30 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *mountTable) StateTypeName() string { +func (m *mountTable) StateTypeName() string { return "pkg/sentry/vfs.mountTable" } -func (x *mountTable) StateFields() []string { +func (m *mountTable) StateFields() []string { return []string{ "seed", "size", } } -func (x *mountTable) beforeSave() {} +func (m *mountTable) beforeSave() {} -func (x *mountTable) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.seed) - m.Save(1, &x.size) +func (m *mountTable) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.seed) + stateSinkObject.Save(1, &m.size) } -func (x *mountTable) afterLoad() {} +func (m *mountTable) afterLoad() {} -func (x *mountTable) StateLoad(m state.Source) { - m.Load(0, &x.seed) - m.Load(1, &x.size) +func (m *mountTable) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.seed) + stateSourceObject.Load(1, &m.size) } func init() { diff --git a/pkg/tcpip/buffer/buffer_state_autogen.go b/pkg/tcpip/buffer/buffer_state_autogen.go index 67db6f4d9..8ce4b4c2c 100644 --- a/pkg/tcpip/buffer/buffer_state_autogen.go +++ b/pkg/tcpip/buffer/buffer_state_autogen.go @@ -6,30 +6,30 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *VectorisedView) StateTypeName() string { +func (v *VectorisedView) StateTypeName() string { return "pkg/tcpip/buffer.VectorisedView" } -func (x *VectorisedView) StateFields() []string { +func (v *VectorisedView) StateFields() []string { return []string{ "views", "size", } } -func (x *VectorisedView) beforeSave() {} +func (v *VectorisedView) beforeSave() {} -func (x *VectorisedView) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.views) - m.Save(1, &x.size) +func (v *VectorisedView) StateSave(stateSinkObject state.Sink) { + v.beforeSave() + stateSinkObject.Save(0, &v.views) + stateSinkObject.Save(1, &v.size) } -func (x *VectorisedView) afterLoad() {} +func (v *VectorisedView) afterLoad() {} -func (x *VectorisedView) StateLoad(m state.Source) { - m.Load(0, &x.views) - m.Load(1, &x.size) +func (v *VectorisedView) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &v.views) + stateSourceObject.Load(1, &v.size) } func init() { diff --git a/pkg/tcpip/header/header_state_autogen.go b/pkg/tcpip/header/header_state_autogen.go index 7efd361fb..8e70640cd 100644 --- a/pkg/tcpip/header/header_state_autogen.go +++ b/pkg/tcpip/header/header_state_autogen.go @@ -6,37 +6,37 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *SACKBlock) StateTypeName() string { +func (s *SACKBlock) StateTypeName() string { return "pkg/tcpip/header.SACKBlock" } -func (x *SACKBlock) StateFields() []string { +func (s *SACKBlock) StateFields() []string { return []string{ "Start", "End", } } -func (x *SACKBlock) beforeSave() {} +func (s *SACKBlock) beforeSave() {} -func (x *SACKBlock) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) +func (s *SACKBlock) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Start) + stateSinkObject.Save(1, &s.End) } -func (x *SACKBlock) afterLoad() {} +func (s *SACKBlock) afterLoad() {} -func (x *SACKBlock) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) +func (s *SACKBlock) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Start) + stateSourceObject.Load(1, &s.End) } -func (x *TCPOptions) StateTypeName() string { +func (t *TCPOptions) StateTypeName() string { return "pkg/tcpip/header.TCPOptions" } -func (x *TCPOptions) StateFields() []string { +func (t *TCPOptions) StateFields() []string { return []string{ "TS", "TSVal", @@ -45,23 +45,23 @@ func (x *TCPOptions) StateFields() []string { } } -func (x *TCPOptions) beforeSave() {} +func (t *TCPOptions) beforeSave() {} -func (x *TCPOptions) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.TS) - m.Save(1, &x.TSVal) - m.Save(2, &x.TSEcr) - m.Save(3, &x.SACKBlocks) +func (t *TCPOptions) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.TS) + stateSinkObject.Save(1, &t.TSVal) + stateSinkObject.Save(2, &t.TSEcr) + stateSinkObject.Save(3, &t.SACKBlocks) } -func (x *TCPOptions) afterLoad() {} +func (t *TCPOptions) afterLoad() {} -func (x *TCPOptions) StateLoad(m state.Source) { - m.Load(0, &x.TS) - m.Load(1, &x.TSVal) - m.Load(2, &x.TSEcr) - m.Load(3, &x.SACKBlocks) +func (t *TCPOptions) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.TS) + stateSourceObject.Load(1, &t.TSVal) + stateSourceObject.Load(2, &t.TSEcr) + stateSourceObject.Load(3, &t.SACKBlocks) } func init() { diff --git a/pkg/tcpip/link/channel/channel_state_autogen.go b/pkg/tcpip/link/channel/channel_state_autogen.go index d00c11cb2..38c12a3bf 100644 --- a/pkg/tcpip/link/channel/channel_state_autogen.go +++ b/pkg/tcpip/link/channel/channel_state_autogen.go @@ -6,27 +6,27 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *NotificationHandle) StateTypeName() string { +func (n *NotificationHandle) StateTypeName() string { return "pkg/tcpip/link/channel.NotificationHandle" } -func (x *NotificationHandle) StateFields() []string { +func (n *NotificationHandle) StateFields() []string { return []string{ "n", } } -func (x *NotificationHandle) beforeSave() {} +func (n *NotificationHandle) beforeSave() {} -func (x *NotificationHandle) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.n) +func (n *NotificationHandle) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.n) } -func (x *NotificationHandle) afterLoad() {} +func (n *NotificationHandle) afterLoad() {} -func (x *NotificationHandle) StateLoad(m state.Source) { - m.Load(0, &x.n) +func (n *NotificationHandle) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.n) } func init() { diff --git a/pkg/tcpip/link/tun/tun_state_autogen.go b/pkg/tcpip/link/tun/tun_state_autogen.go index 0b3041e84..168171eb1 100644 --- a/pkg/tcpip/link/tun/tun_state_autogen.go +++ b/pkg/tcpip/link/tun/tun_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Device) StateTypeName() string { +func (d *Device) StateTypeName() string { return "pkg/tcpip/link/tun.Device" } -func (x *Device) StateFields() []string { +func (d *Device) StateFields() []string { return []string{ "Queue", "endpoint", @@ -19,44 +19,44 @@ func (x *Device) StateFields() []string { } } -func (x *Device) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Queue) - m.Save(1, &x.endpoint) - m.Save(2, &x.notifyHandle) - m.Save(3, &x.flags) +func (d *Device) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.Queue) + stateSinkObject.Save(1, &d.endpoint) + stateSinkObject.Save(2, &d.notifyHandle) + stateSinkObject.Save(3, &d.flags) } -func (x *Device) afterLoad() {} +func (d *Device) afterLoad() {} -func (x *Device) StateLoad(m state.Source) { - m.Load(0, &x.Queue) - m.Load(1, &x.endpoint) - m.Load(2, &x.notifyHandle) - m.Load(3, &x.flags) +func (d *Device) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.Queue) + stateSourceObject.Load(1, &d.endpoint) + stateSourceObject.Load(2, &d.notifyHandle) + stateSourceObject.Load(3, &d.flags) } -func (x *tunEndpointRefs) StateTypeName() string { +func (t *tunEndpointRefs) StateTypeName() string { return "pkg/tcpip/link/tun.tunEndpointRefs" } -func (x *tunEndpointRefs) StateFields() []string { +func (t *tunEndpointRefs) StateFields() []string { return []string{ "refCount", } } -func (x *tunEndpointRefs) beforeSave() {} +func (t *tunEndpointRefs) beforeSave() {} -func (x *tunEndpointRefs) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.refCount) +func (t *tunEndpointRefs) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.refCount) } -func (x *tunEndpointRefs) afterLoad() {} +func (t *tunEndpointRefs) afterLoad() {} -func (x *tunEndpointRefs) StateLoad(m state.Source) { - m.Load(0, &x.refCount) +func (t *tunEndpointRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.refCount) } func init() { diff --git a/pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go b/pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go index 780ddfdc3..22324ce1c 100644 --- a/pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go +++ b/pkg/tcpip/network/fragmentation/fragmentation_state_autogen.go @@ -6,56 +6,56 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *reassemblerList) StateTypeName() string { +func (r *reassemblerList) StateTypeName() string { return "pkg/tcpip/network/fragmentation.reassemblerList" } -func (x *reassemblerList) StateFields() []string { +func (r *reassemblerList) StateFields() []string { return []string{ "head", "tail", } } -func (x *reassemblerList) beforeSave() {} +func (r *reassemblerList) beforeSave() {} -func (x *reassemblerList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (r *reassemblerList) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.head) + stateSinkObject.Save(1, &r.tail) } -func (x *reassemblerList) afterLoad() {} +func (r *reassemblerList) afterLoad() {} -func (x *reassemblerList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (r *reassemblerList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.head) + stateSourceObject.Load(1, &r.tail) } -func (x *reassemblerEntry) StateTypeName() string { +func (r *reassemblerEntry) StateTypeName() string { return "pkg/tcpip/network/fragmentation.reassemblerEntry" } -func (x *reassemblerEntry) StateFields() []string { +func (r *reassemblerEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *reassemblerEntry) beforeSave() {} +func (r *reassemblerEntry) beforeSave() {} -func (x *reassemblerEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (r *reassemblerEntry) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.next) + stateSinkObject.Save(1, &r.prev) } -func (x *reassemblerEntry) afterLoad() {} +func (r *reassemblerEntry) afterLoad() {} -func (x *reassemblerEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (r *reassemblerEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.next) + stateSourceObject.Load(1, &r.prev) } func init() { diff --git a/pkg/tcpip/ports/ports_state_autogen.go b/pkg/tcpip/ports/ports_state_autogen.go index 54db0b8f9..1e1d9cd4c 100644 --- a/pkg/tcpip/ports/ports_state_autogen.go +++ b/pkg/tcpip/ports/ports_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Flags) StateTypeName() string { +func (f *Flags) StateTypeName() string { return "pkg/tcpip/ports.Flags" } -func (x *Flags) StateFields() []string { +func (f *Flags) StateFields() []string { return []string{ "MostRecent", "LoadBalanced", @@ -18,21 +18,21 @@ func (x *Flags) StateFields() []string { } } -func (x *Flags) beforeSave() {} +func (f *Flags) beforeSave() {} -func (x *Flags) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.MostRecent) - m.Save(1, &x.LoadBalanced) - m.Save(2, &x.TupleOnly) +func (f *Flags) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.MostRecent) + stateSinkObject.Save(1, &f.LoadBalanced) + stateSinkObject.Save(2, &f.TupleOnly) } -func (x *Flags) afterLoad() {} +func (f *Flags) afterLoad() {} -func (x *Flags) StateLoad(m state.Source) { - m.Load(0, &x.MostRecent) - m.Load(1, &x.LoadBalanced) - m.Load(2, &x.TupleOnly) +func (f *Flags) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.MostRecent) + stateSourceObject.Load(1, &f.LoadBalanced) + stateSourceObject.Load(2, &f.TupleOnly) } func init() { diff --git a/pkg/tcpip/stack/stack_state_autogen.go b/pkg/tcpip/stack/stack_state_autogen.go index 2917ce5c1..941e37504 100644 --- a/pkg/tcpip/stack/stack_state_autogen.go +++ b/pkg/tcpip/stack/stack_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *tuple) StateTypeName() string { +func (t *tuple) StateTypeName() string { return "pkg/tcpip/stack.tuple" } -func (x *tuple) StateFields() []string { +func (t *tuple) StateFields() []string { return []string{ "tupleEntry", "tupleID", @@ -19,30 +19,30 @@ func (x *tuple) StateFields() []string { } } -func (x *tuple) beforeSave() {} +func (t *tuple) beforeSave() {} -func (x *tuple) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tupleEntry) - m.Save(1, &x.tupleID) - m.Save(2, &x.conn) - m.Save(3, &x.direction) +func (t *tuple) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.tupleEntry) + stateSinkObject.Save(1, &t.tupleID) + stateSinkObject.Save(2, &t.conn) + stateSinkObject.Save(3, &t.direction) } -func (x *tuple) afterLoad() {} +func (t *tuple) afterLoad() {} -func (x *tuple) StateLoad(m state.Source) { - m.Load(0, &x.tupleEntry) - m.Load(1, &x.tupleID) - m.Load(2, &x.conn) - m.Load(3, &x.direction) +func (t *tuple) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.tupleEntry) + stateSourceObject.Load(1, &t.tupleID) + stateSourceObject.Load(2, &t.conn) + stateSourceObject.Load(3, &t.direction) } -func (x *tupleID) StateTypeName() string { +func (t *tupleID) StateTypeName() string { return "pkg/tcpip/stack.tupleID" } -func (x *tupleID) StateFields() []string { +func (t *tupleID) StateFields() []string { return []string{ "srcAddr", "srcPort", @@ -53,34 +53,34 @@ func (x *tupleID) StateFields() []string { } } -func (x *tupleID) beforeSave() {} +func (t *tupleID) beforeSave() {} -func (x *tupleID) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.srcAddr) - m.Save(1, &x.srcPort) - m.Save(2, &x.dstAddr) - m.Save(3, &x.dstPort) - m.Save(4, &x.transProto) - m.Save(5, &x.netProto) +func (t *tupleID) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.srcAddr) + stateSinkObject.Save(1, &t.srcPort) + stateSinkObject.Save(2, &t.dstAddr) + stateSinkObject.Save(3, &t.dstPort) + stateSinkObject.Save(4, &t.transProto) + stateSinkObject.Save(5, &t.netProto) } -func (x *tupleID) afterLoad() {} +func (t *tupleID) afterLoad() {} -func (x *tupleID) StateLoad(m state.Source) { - m.Load(0, &x.srcAddr) - m.Load(1, &x.srcPort) - m.Load(2, &x.dstAddr) - m.Load(3, &x.dstPort) - m.Load(4, &x.transProto) - m.Load(5, &x.netProto) +func (t *tupleID) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.srcAddr) + stateSourceObject.Load(1, &t.srcPort) + stateSourceObject.Load(2, &t.dstAddr) + stateSourceObject.Load(3, &t.dstPort) + stateSourceObject.Load(4, &t.transProto) + stateSourceObject.Load(5, &t.netProto) } -func (x *conn) StateTypeName() string { +func (c *conn) StateTypeName() string { return "pkg/tcpip/stack.conn" } -func (x *conn) StateFields() []string { +func (c *conn) StateFields() []string { return []string{ "original", "reply", @@ -91,108 +91,108 @@ func (x *conn) StateFields() []string { } } -func (x *conn) beforeSave() {} +func (c *conn) beforeSave() {} -func (x *conn) StateSave(m state.Sink) { - x.beforeSave() - var lastUsed unixTime = x.saveLastUsed() - m.SaveValue(5, lastUsed) - m.Save(0, &x.original) - m.Save(1, &x.reply) - m.Save(2, &x.manip) - m.Save(3, &x.tcbHook) - m.Save(4, &x.tcb) +func (c *conn) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + var lastUsedValue unixTime = c.saveLastUsed() + stateSinkObject.SaveValue(5, lastUsedValue) + stateSinkObject.Save(0, &c.original) + stateSinkObject.Save(1, &c.reply) + stateSinkObject.Save(2, &c.manip) + stateSinkObject.Save(3, &c.tcbHook) + stateSinkObject.Save(4, &c.tcb) } -func (x *conn) afterLoad() {} +func (c *conn) afterLoad() {} -func (x *conn) StateLoad(m state.Source) { - m.Load(0, &x.original) - m.Load(1, &x.reply) - m.Load(2, &x.manip) - m.Load(3, &x.tcbHook) - m.Load(4, &x.tcb) - m.LoadValue(5, new(unixTime), func(y interface{}) { x.loadLastUsed(y.(unixTime)) }) +func (c *conn) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.original) + stateSourceObject.Load(1, &c.reply) + stateSourceObject.Load(2, &c.manip) + stateSourceObject.Load(3, &c.tcbHook) + stateSourceObject.Load(4, &c.tcb) + stateSourceObject.LoadValue(5, new(unixTime), func(y interface{}) { c.loadLastUsed(y.(unixTime)) }) } -func (x *ConnTrack) StateTypeName() string { +func (c *ConnTrack) StateTypeName() string { return "pkg/tcpip/stack.ConnTrack" } -func (x *ConnTrack) StateFields() []string { +func (c *ConnTrack) StateFields() []string { return []string{ "seed", "buckets", } } -func (x *ConnTrack) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.seed) - m.Save(1, &x.buckets) +func (c *ConnTrack) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.seed) + stateSinkObject.Save(1, &c.buckets) } -func (x *ConnTrack) afterLoad() {} +func (c *ConnTrack) afterLoad() {} -func (x *ConnTrack) StateLoad(m state.Source) { - m.Load(0, &x.seed) - m.Load(1, &x.buckets) +func (c *ConnTrack) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.seed) + stateSourceObject.Load(1, &c.buckets) } -func (x *bucket) StateTypeName() string { +func (b *bucket) StateTypeName() string { return "pkg/tcpip/stack.bucket" } -func (x *bucket) StateFields() []string { +func (b *bucket) StateFields() []string { return []string{ "tuples", } } -func (x *bucket) beforeSave() {} +func (b *bucket) beforeSave() {} -func (x *bucket) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.tuples) +func (b *bucket) StateSave(stateSinkObject state.Sink) { + b.beforeSave() + stateSinkObject.Save(0, &b.tuples) } -func (x *bucket) afterLoad() {} +func (b *bucket) afterLoad() {} -func (x *bucket) StateLoad(m state.Source) { - m.Load(0, &x.tuples) +func (b *bucket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &b.tuples) } -func (x *unixTime) StateTypeName() string { +func (u *unixTime) StateTypeName() string { return "pkg/tcpip/stack.unixTime" } -func (x *unixTime) StateFields() []string { +func (u *unixTime) StateFields() []string { return []string{ "second", "nano", } } -func (x *unixTime) beforeSave() {} +func (u *unixTime) beforeSave() {} -func (x *unixTime) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.second) - m.Save(1, &x.nano) +func (u *unixTime) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.second) + stateSinkObject.Save(1, &u.nano) } -func (x *unixTime) afterLoad() {} +func (u *unixTime) afterLoad() {} -func (x *unixTime) StateLoad(m state.Source) { - m.Load(0, &x.second) - m.Load(1, &x.nano) +func (u *unixTime) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.second) + stateSourceObject.Load(1, &u.nano) } -func (x *IPTables) StateTypeName() string { +func (i *IPTables) StateTypeName() string { return "pkg/tcpip/stack.IPTables" } -func (x *IPTables) StateFields() []string { +func (i *IPTables) StateFields() []string { return []string{ "mu", "v4Tables", @@ -204,33 +204,33 @@ func (x *IPTables) StateFields() []string { } } -func (x *IPTables) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.mu) - m.Save(1, &x.v4Tables) - m.Save(2, &x.v6Tables) - m.Save(3, &x.modified) - m.Save(4, &x.priorities) - m.Save(5, &x.connections) - m.Save(6, &x.reaperDone) +func (i *IPTables) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.mu) + stateSinkObject.Save(1, &i.v4Tables) + stateSinkObject.Save(2, &i.v6Tables) + stateSinkObject.Save(3, &i.modified) + stateSinkObject.Save(4, &i.priorities) + stateSinkObject.Save(5, &i.connections) + stateSinkObject.Save(6, &i.reaperDone) } -func (x *IPTables) StateLoad(m state.Source) { - m.Load(0, &x.mu) - m.Load(1, &x.v4Tables) - m.Load(2, &x.v6Tables) - m.Load(3, &x.modified) - m.Load(4, &x.priorities) - m.Load(5, &x.connections) - m.Load(6, &x.reaperDone) - m.AfterLoad(x.afterLoad) +func (i *IPTables) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.mu) + stateSourceObject.Load(1, &i.v4Tables) + stateSourceObject.Load(2, &i.v6Tables) + stateSourceObject.Load(3, &i.modified) + stateSourceObject.Load(4, &i.priorities) + stateSourceObject.Load(5, &i.connections) + stateSourceObject.Load(6, &i.reaperDone) + stateSourceObject.AfterLoad(i.afterLoad) } -func (x *Table) StateTypeName() string { +func (t *Table) StateTypeName() string { return "pkg/tcpip/stack.Table" } -func (x *Table) StateFields() []string { +func (t *Table) StateFields() []string { return []string{ "Rules", "BuiltinChains", @@ -238,28 +238,28 @@ func (x *Table) StateFields() []string { } } -func (x *Table) beforeSave() {} +func (t *Table) beforeSave() {} -func (x *Table) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Rules) - m.Save(1, &x.BuiltinChains) - m.Save(2, &x.Underflows) +func (t *Table) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.Rules) + stateSinkObject.Save(1, &t.BuiltinChains) + stateSinkObject.Save(2, &t.Underflows) } -func (x *Table) afterLoad() {} +func (t *Table) afterLoad() {} -func (x *Table) StateLoad(m state.Source) { - m.Load(0, &x.Rules) - m.Load(1, &x.BuiltinChains) - m.Load(2, &x.Underflows) +func (t *Table) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.Rules) + stateSourceObject.Load(1, &t.BuiltinChains) + stateSourceObject.Load(2, &t.Underflows) } -func (x *Rule) StateTypeName() string { +func (r *Rule) StateTypeName() string { return "pkg/tcpip/stack.Rule" } -func (x *Rule) StateFields() []string { +func (r *Rule) StateFields() []string { return []string{ "Filter", "Matchers", @@ -267,28 +267,28 @@ func (x *Rule) StateFields() []string { } } -func (x *Rule) beforeSave() {} +func (r *Rule) beforeSave() {} -func (x *Rule) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Filter) - m.Save(1, &x.Matchers) - m.Save(2, &x.Target) +func (r *Rule) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.Filter) + stateSinkObject.Save(1, &r.Matchers) + stateSinkObject.Save(2, &r.Target) } -func (x *Rule) afterLoad() {} +func (r *Rule) afterLoad() {} -func (x *Rule) StateLoad(m state.Source) { - m.Load(0, &x.Filter) - m.Load(1, &x.Matchers) - m.Load(2, &x.Target) +func (r *Rule) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.Filter) + stateSourceObject.Load(1, &r.Matchers) + stateSourceObject.Load(2, &r.Target) } -func (x *IPHeaderFilter) StateTypeName() string { +func (i *IPHeaderFilter) StateTypeName() string { return "pkg/tcpip/stack.IPHeaderFilter" } -func (x *IPHeaderFilter) StateFields() []string { +func (i *IPHeaderFilter) StateFields() []string { return []string{ "Protocol", "CheckProtocol", @@ -304,200 +304,200 @@ func (x *IPHeaderFilter) StateFields() []string { } } -func (x *IPHeaderFilter) beforeSave() {} - -func (x *IPHeaderFilter) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Protocol) - m.Save(1, &x.CheckProtocol) - m.Save(2, &x.Dst) - m.Save(3, &x.DstMask) - m.Save(4, &x.DstInvert) - m.Save(5, &x.Src) - m.Save(6, &x.SrcMask) - m.Save(7, &x.SrcInvert) - m.Save(8, &x.OutputInterface) - m.Save(9, &x.OutputInterfaceMask) - m.Save(10, &x.OutputInterfaceInvert) -} - -func (x *IPHeaderFilter) afterLoad() {} - -func (x *IPHeaderFilter) StateLoad(m state.Source) { - m.Load(0, &x.Protocol) - m.Load(1, &x.CheckProtocol) - m.Load(2, &x.Dst) - m.Load(3, &x.DstMask) - m.Load(4, &x.DstInvert) - m.Load(5, &x.Src) - m.Load(6, &x.SrcMask) - m.Load(7, &x.SrcInvert) - m.Load(8, &x.OutputInterface) - m.Load(9, &x.OutputInterfaceMask) - m.Load(10, &x.OutputInterfaceInvert) -} - -func (x *linkAddrEntryList) StateTypeName() string { +func (i *IPHeaderFilter) beforeSave() {} + +func (i *IPHeaderFilter) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Protocol) + stateSinkObject.Save(1, &i.CheckProtocol) + stateSinkObject.Save(2, &i.Dst) + stateSinkObject.Save(3, &i.DstMask) + stateSinkObject.Save(4, &i.DstInvert) + stateSinkObject.Save(5, &i.Src) + stateSinkObject.Save(6, &i.SrcMask) + stateSinkObject.Save(7, &i.SrcInvert) + stateSinkObject.Save(8, &i.OutputInterface) + stateSinkObject.Save(9, &i.OutputInterfaceMask) + stateSinkObject.Save(10, &i.OutputInterfaceInvert) +} + +func (i *IPHeaderFilter) afterLoad() {} + +func (i *IPHeaderFilter) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Protocol) + stateSourceObject.Load(1, &i.CheckProtocol) + stateSourceObject.Load(2, &i.Dst) + stateSourceObject.Load(3, &i.DstMask) + stateSourceObject.Load(4, &i.DstInvert) + stateSourceObject.Load(5, &i.Src) + stateSourceObject.Load(6, &i.SrcMask) + stateSourceObject.Load(7, &i.SrcInvert) + stateSourceObject.Load(8, &i.OutputInterface) + stateSourceObject.Load(9, &i.OutputInterfaceMask) + stateSourceObject.Load(10, &i.OutputInterfaceInvert) +} + +func (l *linkAddrEntryList) StateTypeName() string { return "pkg/tcpip/stack.linkAddrEntryList" } -func (x *linkAddrEntryList) StateFields() []string { +func (l *linkAddrEntryList) StateFields() []string { return []string{ "head", "tail", } } -func (x *linkAddrEntryList) beforeSave() {} +func (l *linkAddrEntryList) beforeSave() {} -func (x *linkAddrEntryList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (l *linkAddrEntryList) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.head) + stateSinkObject.Save(1, &l.tail) } -func (x *linkAddrEntryList) afterLoad() {} +func (l *linkAddrEntryList) afterLoad() {} -func (x *linkAddrEntryList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (l *linkAddrEntryList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.head) + stateSourceObject.Load(1, &l.tail) } -func (x *linkAddrEntryEntry) StateTypeName() string { +func (l *linkAddrEntryEntry) StateTypeName() string { return "pkg/tcpip/stack.linkAddrEntryEntry" } -func (x *linkAddrEntryEntry) StateFields() []string { +func (l *linkAddrEntryEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *linkAddrEntryEntry) beforeSave() {} +func (l *linkAddrEntryEntry) beforeSave() {} -func (x *linkAddrEntryEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (l *linkAddrEntryEntry) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.next) + stateSinkObject.Save(1, &l.prev) } -func (x *linkAddrEntryEntry) afterLoad() {} +func (l *linkAddrEntryEntry) afterLoad() {} -func (x *linkAddrEntryEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (l *linkAddrEntryEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.next) + stateSourceObject.Load(1, &l.prev) } -func (x *neighborEntryList) StateTypeName() string { +func (n *neighborEntryList) StateTypeName() string { return "pkg/tcpip/stack.neighborEntryList" } -func (x *neighborEntryList) StateFields() []string { +func (n *neighborEntryList) StateFields() []string { return []string{ "head", "tail", } } -func (x *neighborEntryList) beforeSave() {} +func (n *neighborEntryList) beforeSave() {} -func (x *neighborEntryList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (n *neighborEntryList) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.head) + stateSinkObject.Save(1, &n.tail) } -func (x *neighborEntryList) afterLoad() {} +func (n *neighborEntryList) afterLoad() {} -func (x *neighborEntryList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (n *neighborEntryList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.head) + stateSourceObject.Load(1, &n.tail) } -func (x *neighborEntryEntry) StateTypeName() string { +func (n *neighborEntryEntry) StateTypeName() string { return "pkg/tcpip/stack.neighborEntryEntry" } -func (x *neighborEntryEntry) StateFields() []string { +func (n *neighborEntryEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *neighborEntryEntry) beforeSave() {} +func (n *neighborEntryEntry) beforeSave() {} -func (x *neighborEntryEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (n *neighborEntryEntry) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.next) + stateSinkObject.Save(1, &n.prev) } -func (x *neighborEntryEntry) afterLoad() {} +func (n *neighborEntryEntry) afterLoad() {} -func (x *neighborEntryEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (n *neighborEntryEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.next) + stateSourceObject.Load(1, &n.prev) } -func (x *PacketBufferList) StateTypeName() string { +func (p *PacketBufferList) StateTypeName() string { return "pkg/tcpip/stack.PacketBufferList" } -func (x *PacketBufferList) StateFields() []string { +func (p *PacketBufferList) StateFields() []string { return []string{ "head", "tail", } } -func (x *PacketBufferList) beforeSave() {} +func (p *PacketBufferList) beforeSave() {} -func (x *PacketBufferList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (p *PacketBufferList) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.head) + stateSinkObject.Save(1, &p.tail) } -func (x *PacketBufferList) afterLoad() {} +func (p *PacketBufferList) afterLoad() {} -func (x *PacketBufferList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (p *PacketBufferList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.head) + stateSourceObject.Load(1, &p.tail) } -func (x *PacketBufferEntry) StateTypeName() string { +func (p *PacketBufferEntry) StateTypeName() string { return "pkg/tcpip/stack.PacketBufferEntry" } -func (x *PacketBufferEntry) StateFields() []string { +func (p *PacketBufferEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *PacketBufferEntry) beforeSave() {} +func (p *PacketBufferEntry) beforeSave() {} -func (x *PacketBufferEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (p *PacketBufferEntry) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.next) + stateSinkObject.Save(1, &p.prev) } -func (x *PacketBufferEntry) afterLoad() {} +func (p *PacketBufferEntry) afterLoad() {} -func (x *PacketBufferEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (p *PacketBufferEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.next) + stateSourceObject.Load(1, &p.prev) } -func (x *TransportEndpointID) StateTypeName() string { +func (t *TransportEndpointID) StateTypeName() string { return "pkg/tcpip/stack.TransportEndpointID" } -func (x *TransportEndpointID) StateFields() []string { +func (t *TransportEndpointID) StateFields() []string { return []string{ "LocalPort", "LocalAddress", @@ -506,38 +506,38 @@ func (x *TransportEndpointID) StateFields() []string { } } -func (x *TransportEndpointID) beforeSave() {} +func (t *TransportEndpointID) beforeSave() {} -func (x *TransportEndpointID) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.LocalPort) - m.Save(1, &x.LocalAddress) - m.Save(2, &x.RemotePort) - m.Save(3, &x.RemoteAddress) +func (t *TransportEndpointID) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.LocalPort) + stateSinkObject.Save(1, &t.LocalAddress) + stateSinkObject.Save(2, &t.RemotePort) + stateSinkObject.Save(3, &t.RemoteAddress) } -func (x *TransportEndpointID) afterLoad() {} +func (t *TransportEndpointID) afterLoad() {} -func (x *TransportEndpointID) StateLoad(m state.Source) { - m.Load(0, &x.LocalPort) - m.Load(1, &x.LocalAddress) - m.Load(2, &x.RemotePort) - m.Load(3, &x.RemoteAddress) +func (t *TransportEndpointID) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.LocalPort) + stateSourceObject.Load(1, &t.LocalAddress) + stateSourceObject.Load(2, &t.RemotePort) + stateSourceObject.Load(3, &t.RemoteAddress) } -func (x *GSOType) StateTypeName() string { +func (g *GSOType) StateTypeName() string { return "pkg/tcpip/stack.GSOType" } -func (x *GSOType) StateFields() []string { +func (g *GSOType) StateFields() []string { return nil } -func (x *GSO) StateTypeName() string { +func (g *GSO) StateTypeName() string { return "pkg/tcpip/stack.GSO" } -func (x *GSO) StateFields() []string { +func (g *GSO) StateFields() []string { return []string{ "Type", "NeedsCsum", @@ -548,34 +548,34 @@ func (x *GSO) StateFields() []string { } } -func (x *GSO) beforeSave() {} +func (g *GSO) beforeSave() {} -func (x *GSO) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Type) - m.Save(1, &x.NeedsCsum) - m.Save(2, &x.CsumOffset) - m.Save(3, &x.MSS) - m.Save(4, &x.L3HdrLen) - m.Save(5, &x.MaxSize) +func (g *GSO) StateSave(stateSinkObject state.Sink) { + g.beforeSave() + stateSinkObject.Save(0, &g.Type) + stateSinkObject.Save(1, &g.NeedsCsum) + stateSinkObject.Save(2, &g.CsumOffset) + stateSinkObject.Save(3, &g.MSS) + stateSinkObject.Save(4, &g.L3HdrLen) + stateSinkObject.Save(5, &g.MaxSize) } -func (x *GSO) afterLoad() {} +func (g *GSO) afterLoad() {} -func (x *GSO) StateLoad(m state.Source) { - m.Load(0, &x.Type) - m.Load(1, &x.NeedsCsum) - m.Load(2, &x.CsumOffset) - m.Load(3, &x.MSS) - m.Load(4, &x.L3HdrLen) - m.Load(5, &x.MaxSize) +func (g *GSO) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &g.Type) + stateSourceObject.Load(1, &g.NeedsCsum) + stateSourceObject.Load(2, &g.CsumOffset) + stateSourceObject.Load(3, &g.MSS) + stateSourceObject.Load(4, &g.L3HdrLen) + stateSourceObject.Load(5, &g.MaxSize) } -func (x *TransportEndpointInfo) StateTypeName() string { +func (t *TransportEndpointInfo) StateTypeName() string { return "pkg/tcpip/stack.TransportEndpointInfo" } -func (x *TransportEndpointInfo) StateFields() []string { +func (t *TransportEndpointInfo) StateFields() []string { return []string{ "NetProto", "TransProto", @@ -586,34 +586,34 @@ func (x *TransportEndpointInfo) StateFields() []string { } } -func (x *TransportEndpointInfo) beforeSave() {} +func (t *TransportEndpointInfo) beforeSave() {} -func (x *TransportEndpointInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.NetProto) - m.Save(1, &x.TransProto) - m.Save(2, &x.ID) - m.Save(3, &x.BindNICID) - m.Save(4, &x.BindAddr) - m.Save(5, &x.RegisterNICID) +func (t *TransportEndpointInfo) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.NetProto) + stateSinkObject.Save(1, &t.TransProto) + stateSinkObject.Save(2, &t.ID) + stateSinkObject.Save(3, &t.BindNICID) + stateSinkObject.Save(4, &t.BindAddr) + stateSinkObject.Save(5, &t.RegisterNICID) } -func (x *TransportEndpointInfo) afterLoad() {} +func (t *TransportEndpointInfo) afterLoad() {} -func (x *TransportEndpointInfo) StateLoad(m state.Source) { - m.Load(0, &x.NetProto) - m.Load(1, &x.TransProto) - m.Load(2, &x.ID) - m.Load(3, &x.BindNICID) - m.Load(4, &x.BindAddr) - m.Load(5, &x.RegisterNICID) +func (t *TransportEndpointInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.NetProto) + stateSourceObject.Load(1, &t.TransProto) + stateSourceObject.Load(2, &t.ID) + stateSourceObject.Load(3, &t.BindNICID) + stateSourceObject.Load(4, &t.BindAddr) + stateSourceObject.Load(5, &t.RegisterNICID) } -func (x *multiPortEndpoint) StateTypeName() string { +func (m *multiPortEndpoint) StateTypeName() string { return "pkg/tcpip/stack.multiPortEndpoint" } -func (x *multiPortEndpoint) StateFields() []string { +func (m *multiPortEndpoint) StateFields() []string { return []string{ "demux", "netProto", @@ -623,77 +623,77 @@ func (x *multiPortEndpoint) StateFields() []string { } } -func (x *multiPortEndpoint) beforeSave() {} +func (m *multiPortEndpoint) beforeSave() {} -func (x *multiPortEndpoint) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.demux) - m.Save(1, &x.netProto) - m.Save(2, &x.transProto) - m.Save(3, &x.endpoints) - m.Save(4, &x.flags) +func (m *multiPortEndpoint) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.demux) + stateSinkObject.Save(1, &m.netProto) + stateSinkObject.Save(2, &m.transProto) + stateSinkObject.Save(3, &m.endpoints) + stateSinkObject.Save(4, &m.flags) } -func (x *multiPortEndpoint) afterLoad() {} +func (m *multiPortEndpoint) afterLoad() {} -func (x *multiPortEndpoint) StateLoad(m state.Source) { - m.Load(0, &x.demux) - m.Load(1, &x.netProto) - m.Load(2, &x.transProto) - m.Load(3, &x.endpoints) - m.Load(4, &x.flags) +func (m *multiPortEndpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.demux) + stateSourceObject.Load(1, &m.netProto) + stateSourceObject.Load(2, &m.transProto) + stateSourceObject.Load(3, &m.endpoints) + stateSourceObject.Load(4, &m.flags) } -func (x *tupleList) StateTypeName() string { +func (t *tupleList) StateTypeName() string { return "pkg/tcpip/stack.tupleList" } -func (x *tupleList) StateFields() []string { +func (t *tupleList) StateFields() []string { return []string{ "head", "tail", } } -func (x *tupleList) beforeSave() {} +func (t *tupleList) beforeSave() {} -func (x *tupleList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (t *tupleList) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.head) + stateSinkObject.Save(1, &t.tail) } -func (x *tupleList) afterLoad() {} +func (t *tupleList) afterLoad() {} -func (x *tupleList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (t *tupleList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.head) + stateSourceObject.Load(1, &t.tail) } -func (x *tupleEntry) StateTypeName() string { +func (t *tupleEntry) StateTypeName() string { return "pkg/tcpip/stack.tupleEntry" } -func (x *tupleEntry) StateFields() []string { +func (t *tupleEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *tupleEntry) beforeSave() {} +func (t *tupleEntry) beforeSave() {} -func (x *tupleEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (t *tupleEntry) StateSave(stateSinkObject state.Sink) { + t.beforeSave() + stateSinkObject.Save(0, &t.next) + stateSinkObject.Save(1, &t.prev) } -func (x *tupleEntry) afterLoad() {} +func (t *tupleEntry) afterLoad() {} -func (x *tupleEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (t *tupleEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &t.next) + stateSourceObject.Load(1, &t.prev) } func init() { diff --git a/pkg/tcpip/tcpip_state_autogen.go b/pkg/tcpip/tcpip_state_autogen.go index 034b39c1f..638637135 100644 --- a/pkg/tcpip/tcpip_state_autogen.go +++ b/pkg/tcpip/tcpip_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *FullAddress) StateTypeName() string { +func (f *FullAddress) StateTypeName() string { return "pkg/tcpip.FullAddress" } -func (x *FullAddress) StateFields() []string { +func (f *FullAddress) StateFields() []string { return []string{ "NIC", "Addr", @@ -18,28 +18,28 @@ func (x *FullAddress) StateFields() []string { } } -func (x *FullAddress) beforeSave() {} +func (f *FullAddress) beforeSave() {} -func (x *FullAddress) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.NIC) - m.Save(1, &x.Addr) - m.Save(2, &x.Port) +func (f *FullAddress) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.NIC) + stateSinkObject.Save(1, &f.Addr) + stateSinkObject.Save(2, &f.Port) } -func (x *FullAddress) afterLoad() {} +func (f *FullAddress) afterLoad() {} -func (x *FullAddress) StateLoad(m state.Source) { - m.Load(0, &x.NIC) - m.Load(1, &x.Addr) - m.Load(2, &x.Port) +func (f *FullAddress) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.NIC) + stateSourceObject.Load(1, &f.Addr) + stateSourceObject.Load(2, &f.Port) } -func (x *ControlMessages) StateTypeName() string { +func (c *ControlMessages) StateTypeName() string { return "pkg/tcpip.ControlMessages" } -func (x *ControlMessages) StateFields() []string { +func (c *ControlMessages) StateFields() []string { return []string{ "HasTimestamp", "Timestamp", @@ -54,94 +54,94 @@ func (x *ControlMessages) StateFields() []string { } } -func (x *ControlMessages) beforeSave() {} +func (c *ControlMessages) beforeSave() {} -func (x *ControlMessages) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.HasTimestamp) - m.Save(1, &x.Timestamp) - m.Save(2, &x.HasInq) - m.Save(3, &x.Inq) - m.Save(4, &x.HasTOS) - m.Save(5, &x.TOS) - m.Save(6, &x.HasTClass) - m.Save(7, &x.TClass) - m.Save(8, &x.HasIPPacketInfo) - m.Save(9, &x.PacketInfo) +func (c *ControlMessages) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + stateSinkObject.Save(0, &c.HasTimestamp) + stateSinkObject.Save(1, &c.Timestamp) + stateSinkObject.Save(2, &c.HasInq) + stateSinkObject.Save(3, &c.Inq) + stateSinkObject.Save(4, &c.HasTOS) + stateSinkObject.Save(5, &c.TOS) + stateSinkObject.Save(6, &c.HasTClass) + stateSinkObject.Save(7, &c.TClass) + stateSinkObject.Save(8, &c.HasIPPacketInfo) + stateSinkObject.Save(9, &c.PacketInfo) } -func (x *ControlMessages) afterLoad() {} +func (c *ControlMessages) afterLoad() {} -func (x *ControlMessages) StateLoad(m state.Source) { - m.Load(0, &x.HasTimestamp) - m.Load(1, &x.Timestamp) - m.Load(2, &x.HasInq) - m.Load(3, &x.Inq) - m.Load(4, &x.HasTOS) - m.Load(5, &x.TOS) - m.Load(6, &x.HasTClass) - m.Load(7, &x.TClass) - m.Load(8, &x.HasIPPacketInfo) - m.Load(9, &x.PacketInfo) +func (c *ControlMessages) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.HasTimestamp) + stateSourceObject.Load(1, &c.Timestamp) + stateSourceObject.Load(2, &c.HasInq) + stateSourceObject.Load(3, &c.Inq) + stateSourceObject.Load(4, &c.HasTOS) + stateSourceObject.Load(5, &c.TOS) + stateSourceObject.Load(6, &c.HasTClass) + stateSourceObject.Load(7, &c.TClass) + stateSourceObject.Load(8, &c.HasIPPacketInfo) + stateSourceObject.Load(9, &c.PacketInfo) } -func (x *LinkPacketInfo) StateTypeName() string { +func (l *LinkPacketInfo) StateTypeName() string { return "pkg/tcpip.LinkPacketInfo" } -func (x *LinkPacketInfo) StateFields() []string { +func (l *LinkPacketInfo) StateFields() []string { return []string{ "Protocol", "PktType", } } -func (x *LinkPacketInfo) beforeSave() {} +func (l *LinkPacketInfo) beforeSave() {} -func (x *LinkPacketInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Protocol) - m.Save(1, &x.PktType) +func (l *LinkPacketInfo) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Protocol) + stateSinkObject.Save(1, &l.PktType) } -func (x *LinkPacketInfo) afterLoad() {} +func (l *LinkPacketInfo) afterLoad() {} -func (x *LinkPacketInfo) StateLoad(m state.Source) { - m.Load(0, &x.Protocol) - m.Load(1, &x.PktType) +func (l *LinkPacketInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Protocol) + stateSourceObject.Load(1, &l.PktType) } -func (x *LingerOption) StateTypeName() string { +func (l *LingerOption) StateTypeName() string { return "pkg/tcpip.LingerOption" } -func (x *LingerOption) StateFields() []string { +func (l *LingerOption) StateFields() []string { return []string{ "Enabled", "Timeout", } } -func (x *LingerOption) beforeSave() {} +func (l *LingerOption) beforeSave() {} -func (x *LingerOption) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Enabled) - m.Save(1, &x.Timeout) +func (l *LingerOption) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.Enabled) + stateSinkObject.Save(1, &l.Timeout) } -func (x *LingerOption) afterLoad() {} +func (l *LingerOption) afterLoad() {} -func (x *LingerOption) StateLoad(m state.Source) { - m.Load(0, &x.Enabled) - m.Load(1, &x.Timeout) +func (l *LingerOption) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.Enabled) + stateSourceObject.Load(1, &l.Timeout) } -func (x *IPPacketInfo) StateTypeName() string { +func (i *IPPacketInfo) StateTypeName() string { return "pkg/tcpip.IPPacketInfo" } -func (x *IPPacketInfo) StateFields() []string { +func (i *IPPacketInfo) StateFields() []string { return []string{ "NIC", "LocalAddr", @@ -149,21 +149,21 @@ func (x *IPPacketInfo) StateFields() []string { } } -func (x *IPPacketInfo) beforeSave() {} +func (i *IPPacketInfo) beforeSave() {} -func (x *IPPacketInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.NIC) - m.Save(1, &x.LocalAddr) - m.Save(2, &x.DestinationAddr) +func (i *IPPacketInfo) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.NIC) + stateSinkObject.Save(1, &i.LocalAddr) + stateSinkObject.Save(2, &i.DestinationAddr) } -func (x *IPPacketInfo) afterLoad() {} +func (i *IPPacketInfo) afterLoad() {} -func (x *IPPacketInfo) StateLoad(m state.Source) { - m.Load(0, &x.NIC) - m.Load(1, &x.LocalAddr) - m.Load(2, &x.DestinationAddr) +func (i *IPPacketInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.NIC) + stateSourceObject.Load(1, &i.LocalAddr) + stateSourceObject.Load(2, &i.DestinationAddr) } func init() { diff --git a/pkg/tcpip/tcpip_unsafe_state_autogen.go b/pkg/tcpip/tcpip_unsafe_state_autogen.go index adefdcc37..8f6fc08cf 100644 --- a/pkg/tcpip/tcpip_unsafe_state_autogen.go +++ b/pkg/tcpip/tcpip_unsafe_state_autogen.go @@ -9,23 +9,23 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *StdClock) StateTypeName() string { +func (s *StdClock) StateTypeName() string { return "pkg/tcpip.StdClock" } -func (x *StdClock) StateFields() []string { +func (s *StdClock) StateFields() []string { return []string{} } -func (x *StdClock) beforeSave() {} +func (s *StdClock) beforeSave() {} -func (x *StdClock) StateSave(m state.Sink) { - x.beforeSave() +func (s *StdClock) StateSave(stateSinkObject state.Sink) { + s.beforeSave() } -func (x *StdClock) afterLoad() {} +func (s *StdClock) afterLoad() {} -func (x *StdClock) StateLoad(m state.Source) { +func (s *StdClock) StateLoad(stateSourceObject state.Source) { } func init() { diff --git a/pkg/tcpip/transport/icmp/icmp_state_autogen.go b/pkg/tcpip/transport/icmp/icmp_state_autogen.go index 776ef0850..d88c817e4 100644 --- a/pkg/tcpip/transport/icmp/icmp_state_autogen.go +++ b/pkg/tcpip/transport/icmp/icmp_state_autogen.go @@ -7,11 +7,11 @@ import ( "gvisor.dev/gvisor/pkg/tcpip/buffer" ) -func (x *icmpPacket) StateTypeName() string { +func (i *icmpPacket) StateTypeName() string { return "pkg/tcpip/transport/icmp.icmpPacket" } -func (x *icmpPacket) StateFields() []string { +func (i *icmpPacket) StateFields() []string { return []string{ "icmpPacketEntry", "senderAddress", @@ -20,31 +20,31 @@ func (x *icmpPacket) StateFields() []string { } } -func (x *icmpPacket) beforeSave() {} +func (i *icmpPacket) beforeSave() {} -func (x *icmpPacket) StateSave(m state.Sink) { - x.beforeSave() - var data buffer.VectorisedView = x.saveData() - m.SaveValue(2, data) - m.Save(0, &x.icmpPacketEntry) - m.Save(1, &x.senderAddress) - m.Save(3, &x.timestamp) +func (i *icmpPacket) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + var dataValue buffer.VectorisedView = i.saveData() + stateSinkObject.SaveValue(2, dataValue) + stateSinkObject.Save(0, &i.icmpPacketEntry) + stateSinkObject.Save(1, &i.senderAddress) + stateSinkObject.Save(3, &i.timestamp) } -func (x *icmpPacket) afterLoad() {} +func (i *icmpPacket) afterLoad() {} -func (x *icmpPacket) StateLoad(m state.Source) { - m.Load(0, &x.icmpPacketEntry) - m.Load(1, &x.senderAddress) - m.Load(3, &x.timestamp) - m.LoadValue(2, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) }) +func (i *icmpPacket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.icmpPacketEntry) + stateSourceObject.Load(1, &i.senderAddress) + stateSourceObject.Load(3, &i.timestamp) + stateSourceObject.LoadValue(2, new(buffer.VectorisedView), func(y interface{}) { i.loadData(y.(buffer.VectorisedView)) }) } -func (x *endpoint) StateTypeName() string { +func (e *endpoint) StateTypeName() string { return "pkg/tcpip/transport/icmp.endpoint" } -func (x *endpoint) StateFields() []string { +func (e *endpoint) StateFields() []string { return []string{ "TransportEndpointInfo", "waiterQueue", @@ -63,93 +63,93 @@ func (x *endpoint) StateFields() []string { } } -func (x *endpoint) StateSave(m state.Sink) { - x.beforeSave() - var rcvBufSizeMax int = x.saveRcvBufSizeMax() - m.SaveValue(5, rcvBufSizeMax) - m.Save(0, &x.TransportEndpointInfo) - m.Save(1, &x.waiterQueue) - m.Save(2, &x.uniqueID) - m.Save(3, &x.rcvReady) - m.Save(4, &x.rcvList) - m.Save(6, &x.rcvBufSize) - m.Save(7, &x.rcvClosed) - m.Save(8, &x.sndBufSize) - m.Save(9, &x.shutdownFlags) - m.Save(10, &x.state) - m.Save(11, &x.ttl) - m.Save(12, &x.linger) - m.Save(13, &x.owner) -} - -func (x *endpoint) StateLoad(m state.Source) { - m.Load(0, &x.TransportEndpointInfo) - m.Load(1, &x.waiterQueue) - m.Load(2, &x.uniqueID) - m.Load(3, &x.rcvReady) - m.Load(4, &x.rcvList) - m.Load(6, &x.rcvBufSize) - m.Load(7, &x.rcvClosed) - m.Load(8, &x.sndBufSize) - m.Load(9, &x.shutdownFlags) - m.Load(10, &x.state) - m.Load(11, &x.ttl) - m.Load(12, &x.linger) - m.Load(13, &x.owner) - m.LoadValue(5, new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *icmpPacketList) StateTypeName() string { +func (e *endpoint) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax() + stateSinkObject.SaveValue(5, rcvBufSizeMaxValue) + stateSinkObject.Save(0, &e.TransportEndpointInfo) + stateSinkObject.Save(1, &e.waiterQueue) + stateSinkObject.Save(2, &e.uniqueID) + stateSinkObject.Save(3, &e.rcvReady) + stateSinkObject.Save(4, &e.rcvList) + stateSinkObject.Save(6, &e.rcvBufSize) + stateSinkObject.Save(7, &e.rcvClosed) + stateSinkObject.Save(8, &e.sndBufSize) + stateSinkObject.Save(9, &e.shutdownFlags) + stateSinkObject.Save(10, &e.state) + stateSinkObject.Save(11, &e.ttl) + stateSinkObject.Save(12, &e.linger) + stateSinkObject.Save(13, &e.owner) +} + +func (e *endpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.TransportEndpointInfo) + stateSourceObject.Load(1, &e.waiterQueue) + stateSourceObject.Load(2, &e.uniqueID) + stateSourceObject.Load(3, &e.rcvReady) + stateSourceObject.Load(4, &e.rcvList) + stateSourceObject.Load(6, &e.rcvBufSize) + stateSourceObject.Load(7, &e.rcvClosed) + stateSourceObject.Load(8, &e.sndBufSize) + stateSourceObject.Load(9, &e.shutdownFlags) + stateSourceObject.Load(10, &e.state) + stateSourceObject.Load(11, &e.ttl) + stateSourceObject.Load(12, &e.linger) + stateSourceObject.Load(13, &e.owner) + stateSourceObject.LoadValue(5, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) }) + stateSourceObject.AfterLoad(e.afterLoad) +} + +func (i *icmpPacketList) StateTypeName() string { return "pkg/tcpip/transport/icmp.icmpPacketList" } -func (x *icmpPacketList) StateFields() []string { +func (i *icmpPacketList) StateFields() []string { return []string{ "head", "tail", } } -func (x *icmpPacketList) beforeSave() {} +func (i *icmpPacketList) beforeSave() {} -func (x *icmpPacketList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (i *icmpPacketList) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.head) + stateSinkObject.Save(1, &i.tail) } -func (x *icmpPacketList) afterLoad() {} +func (i *icmpPacketList) afterLoad() {} -func (x *icmpPacketList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (i *icmpPacketList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.head) + stateSourceObject.Load(1, &i.tail) } -func (x *icmpPacketEntry) StateTypeName() string { +func (i *icmpPacketEntry) StateTypeName() string { return "pkg/tcpip/transport/icmp.icmpPacketEntry" } -func (x *icmpPacketEntry) StateFields() []string { +func (i *icmpPacketEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *icmpPacketEntry) beforeSave() {} +func (i *icmpPacketEntry) beforeSave() {} -func (x *icmpPacketEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (i *icmpPacketEntry) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.next) + stateSinkObject.Save(1, &i.prev) } -func (x *icmpPacketEntry) afterLoad() {} +func (i *icmpPacketEntry) afterLoad() {} -func (x *icmpPacketEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (i *icmpPacketEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.next) + stateSourceObject.Load(1, &i.prev) } func init() { diff --git a/pkg/tcpip/transport/packet/packet_state_autogen.go b/pkg/tcpip/transport/packet/packet_state_autogen.go index 5edd9db89..261bf1448 100644 --- a/pkg/tcpip/transport/packet/packet_state_autogen.go +++ b/pkg/tcpip/transport/packet/packet_state_autogen.go @@ -7,11 +7,11 @@ import ( "gvisor.dev/gvisor/pkg/tcpip/buffer" ) -func (x *packet) StateTypeName() string { +func (p *packet) StateTypeName() string { return "pkg/tcpip/transport/packet.packet" } -func (x *packet) StateFields() []string { +func (p *packet) StateFields() []string { return []string{ "packetEntry", "data", @@ -21,33 +21,33 @@ func (x *packet) StateFields() []string { } } -func (x *packet) beforeSave() {} +func (p *packet) beforeSave() {} -func (x *packet) StateSave(m state.Sink) { - x.beforeSave() - var data buffer.VectorisedView = x.saveData() - m.SaveValue(1, data) - m.Save(0, &x.packetEntry) - m.Save(2, &x.timestampNS) - m.Save(3, &x.senderAddr) - m.Save(4, &x.packetInfo) +func (p *packet) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + var dataValue buffer.VectorisedView = p.saveData() + stateSinkObject.SaveValue(1, dataValue) + stateSinkObject.Save(0, &p.packetEntry) + stateSinkObject.Save(2, &p.timestampNS) + stateSinkObject.Save(3, &p.senderAddr) + stateSinkObject.Save(4, &p.packetInfo) } -func (x *packet) afterLoad() {} +func (p *packet) afterLoad() {} -func (x *packet) StateLoad(m state.Source) { - m.Load(0, &x.packetEntry) - m.Load(2, &x.timestampNS) - m.Load(3, &x.senderAddr) - m.Load(4, &x.packetInfo) - m.LoadValue(1, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) }) +func (p *packet) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.packetEntry) + stateSourceObject.Load(2, &p.timestampNS) + stateSourceObject.Load(3, &p.senderAddr) + stateSourceObject.Load(4, &p.packetInfo) + stateSourceObject.LoadValue(1, new(buffer.VectorisedView), func(y interface{}) { p.loadData(y.(buffer.VectorisedView)) }) } -func (x *endpoint) StateTypeName() string { +func (e *endpoint) StateTypeName() string { return "pkg/tcpip/transport/packet.endpoint" } -func (x *endpoint) StateFields() []string { +func (e *endpoint) StateFields() []string { return []string{ "TransportEndpointInfo", "netProto", @@ -67,96 +67,96 @@ func (x *endpoint) StateFields() []string { } } -func (x *endpoint) StateSave(m state.Sink) { - x.beforeSave() - var rcvBufSizeMax int = x.saveRcvBufSizeMax() - m.SaveValue(5, rcvBufSizeMax) - var lastError string = x.saveLastError() - m.SaveValue(14, lastError) - m.Save(0, &x.TransportEndpointInfo) - m.Save(1, &x.netProto) - m.Save(2, &x.waiterQueue) - m.Save(3, &x.cooked) - m.Save(4, &x.rcvList) - m.Save(6, &x.rcvBufSize) - m.Save(7, &x.rcvClosed) - m.Save(8, &x.sndBufSize) - m.Save(9, &x.sndBufSizeMax) - m.Save(10, &x.closed) - m.Save(11, &x.bound) - m.Save(12, &x.boundNIC) - m.Save(13, &x.linger) -} - -func (x *endpoint) StateLoad(m state.Source) { - m.Load(0, &x.TransportEndpointInfo) - m.Load(1, &x.netProto) - m.Load(2, &x.waiterQueue) - m.Load(3, &x.cooked) - m.Load(4, &x.rcvList) - m.Load(6, &x.rcvBufSize) - m.Load(7, &x.rcvClosed) - m.Load(8, &x.sndBufSize) - m.Load(9, &x.sndBufSizeMax) - m.Load(10, &x.closed) - m.Load(11, &x.bound) - m.Load(12, &x.boundNIC) - m.Load(13, &x.linger) - m.LoadValue(5, new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) }) - m.LoadValue(14, new(string), func(y interface{}) { x.loadLastError(y.(string)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *packetList) StateTypeName() string { +func (e *endpoint) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax() + stateSinkObject.SaveValue(5, rcvBufSizeMaxValue) + var lastErrorValue string = e.saveLastError() + stateSinkObject.SaveValue(14, lastErrorValue) + stateSinkObject.Save(0, &e.TransportEndpointInfo) + stateSinkObject.Save(1, &e.netProto) + stateSinkObject.Save(2, &e.waiterQueue) + stateSinkObject.Save(3, &e.cooked) + stateSinkObject.Save(4, &e.rcvList) + stateSinkObject.Save(6, &e.rcvBufSize) + stateSinkObject.Save(7, &e.rcvClosed) + stateSinkObject.Save(8, &e.sndBufSize) + stateSinkObject.Save(9, &e.sndBufSizeMax) + stateSinkObject.Save(10, &e.closed) + stateSinkObject.Save(11, &e.bound) + stateSinkObject.Save(12, &e.boundNIC) + stateSinkObject.Save(13, &e.linger) +} + +func (e *endpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.TransportEndpointInfo) + stateSourceObject.Load(1, &e.netProto) + stateSourceObject.Load(2, &e.waiterQueue) + stateSourceObject.Load(3, &e.cooked) + stateSourceObject.Load(4, &e.rcvList) + stateSourceObject.Load(6, &e.rcvBufSize) + stateSourceObject.Load(7, &e.rcvClosed) + stateSourceObject.Load(8, &e.sndBufSize) + stateSourceObject.Load(9, &e.sndBufSizeMax) + stateSourceObject.Load(10, &e.closed) + stateSourceObject.Load(11, &e.bound) + stateSourceObject.Load(12, &e.boundNIC) + stateSourceObject.Load(13, &e.linger) + stateSourceObject.LoadValue(5, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) }) + stateSourceObject.LoadValue(14, new(string), func(y interface{}) { e.loadLastError(y.(string)) }) + stateSourceObject.AfterLoad(e.afterLoad) +} + +func (p *packetList) StateTypeName() string { return "pkg/tcpip/transport/packet.packetList" } -func (x *packetList) StateFields() []string { +func (p *packetList) StateFields() []string { return []string{ "head", "tail", } } -func (x *packetList) beforeSave() {} +func (p *packetList) beforeSave() {} -func (x *packetList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (p *packetList) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.head) + stateSinkObject.Save(1, &p.tail) } -func (x *packetList) afterLoad() {} +func (p *packetList) afterLoad() {} -func (x *packetList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (p *packetList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.head) + stateSourceObject.Load(1, &p.tail) } -func (x *packetEntry) StateTypeName() string { +func (p *packetEntry) StateTypeName() string { return "pkg/tcpip/transport/packet.packetEntry" } -func (x *packetEntry) StateFields() []string { +func (p *packetEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *packetEntry) beforeSave() {} +func (p *packetEntry) beforeSave() {} -func (x *packetEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (p *packetEntry) StateSave(stateSinkObject state.Sink) { + p.beforeSave() + stateSinkObject.Save(0, &p.next) + stateSinkObject.Save(1, &p.prev) } -func (x *packetEntry) afterLoad() {} +func (p *packetEntry) afterLoad() {} -func (x *packetEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (p *packetEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &p.next) + stateSourceObject.Load(1, &p.prev) } func init() { diff --git a/pkg/tcpip/transport/raw/raw_state_autogen.go b/pkg/tcpip/transport/raw/raw_state_autogen.go index 4930b46f4..6efb1f07e 100644 --- a/pkg/tcpip/transport/raw/raw_state_autogen.go +++ b/pkg/tcpip/transport/raw/raw_state_autogen.go @@ -7,11 +7,11 @@ import ( "gvisor.dev/gvisor/pkg/tcpip/buffer" ) -func (x *rawPacket) StateTypeName() string { +func (r *rawPacket) StateTypeName() string { return "pkg/tcpip/transport/raw.rawPacket" } -func (x *rawPacket) StateFields() []string { +func (r *rawPacket) StateFields() []string { return []string{ "rawPacketEntry", "data", @@ -20,31 +20,31 @@ func (x *rawPacket) StateFields() []string { } } -func (x *rawPacket) beforeSave() {} +func (r *rawPacket) beforeSave() {} -func (x *rawPacket) StateSave(m state.Sink) { - x.beforeSave() - var data buffer.VectorisedView = x.saveData() - m.SaveValue(1, data) - m.Save(0, &x.rawPacketEntry) - m.Save(2, &x.timestampNS) - m.Save(3, &x.senderAddr) +func (r *rawPacket) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + var dataValue buffer.VectorisedView = r.saveData() + stateSinkObject.SaveValue(1, dataValue) + stateSinkObject.Save(0, &r.rawPacketEntry) + stateSinkObject.Save(2, &r.timestampNS) + stateSinkObject.Save(3, &r.senderAddr) } -func (x *rawPacket) afterLoad() {} +func (r *rawPacket) afterLoad() {} -func (x *rawPacket) StateLoad(m state.Source) { - m.Load(0, &x.rawPacketEntry) - m.Load(2, &x.timestampNS) - m.Load(3, &x.senderAddr) - m.LoadValue(1, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) }) +func (r *rawPacket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.rawPacketEntry) + stateSourceObject.Load(2, &r.timestampNS) + stateSourceObject.Load(3, &r.senderAddr) + stateSourceObject.LoadValue(1, new(buffer.VectorisedView), func(y interface{}) { r.loadData(y.(buffer.VectorisedView)) }) } -func (x *endpoint) StateTypeName() string { +func (e *endpoint) StateTypeName() string { return "pkg/tcpip/transport/raw.endpoint" } -func (x *endpoint) StateFields() []string { +func (e *endpoint) StateFields() []string { return []string{ "TransportEndpointInfo", "waiterQueue", @@ -64,95 +64,95 @@ func (x *endpoint) StateFields() []string { } } -func (x *endpoint) StateSave(m state.Sink) { - x.beforeSave() - var rcvBufSizeMax int = x.saveRcvBufSizeMax() - m.SaveValue(6, rcvBufSizeMax) - m.Save(0, &x.TransportEndpointInfo) - m.Save(1, &x.waiterQueue) - m.Save(2, &x.associated) - m.Save(3, &x.hdrIncluded) - m.Save(4, &x.rcvList) - m.Save(5, &x.rcvBufSize) - m.Save(7, &x.rcvClosed) - m.Save(8, &x.sndBufSize) - m.Save(9, &x.sndBufSizeMax) - m.Save(10, &x.closed) - m.Save(11, &x.connected) - m.Save(12, &x.bound) - m.Save(13, &x.linger) - m.Save(14, &x.owner) -} - -func (x *endpoint) StateLoad(m state.Source) { - m.Load(0, &x.TransportEndpointInfo) - m.Load(1, &x.waiterQueue) - m.Load(2, &x.associated) - m.Load(3, &x.hdrIncluded) - m.Load(4, &x.rcvList) - m.Load(5, &x.rcvBufSize) - m.Load(7, &x.rcvClosed) - m.Load(8, &x.sndBufSize) - m.Load(9, &x.sndBufSizeMax) - m.Load(10, &x.closed) - m.Load(11, &x.connected) - m.Load(12, &x.bound) - m.Load(13, &x.linger) - m.Load(14, &x.owner) - m.LoadValue(6, new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *rawPacketList) StateTypeName() string { +func (e *endpoint) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax() + stateSinkObject.SaveValue(6, rcvBufSizeMaxValue) + stateSinkObject.Save(0, &e.TransportEndpointInfo) + stateSinkObject.Save(1, &e.waiterQueue) + stateSinkObject.Save(2, &e.associated) + stateSinkObject.Save(3, &e.hdrIncluded) + stateSinkObject.Save(4, &e.rcvList) + stateSinkObject.Save(5, &e.rcvBufSize) + stateSinkObject.Save(7, &e.rcvClosed) + stateSinkObject.Save(8, &e.sndBufSize) + stateSinkObject.Save(9, &e.sndBufSizeMax) + stateSinkObject.Save(10, &e.closed) + stateSinkObject.Save(11, &e.connected) + stateSinkObject.Save(12, &e.bound) + stateSinkObject.Save(13, &e.linger) + stateSinkObject.Save(14, &e.owner) +} + +func (e *endpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.TransportEndpointInfo) + stateSourceObject.Load(1, &e.waiterQueue) + stateSourceObject.Load(2, &e.associated) + stateSourceObject.Load(3, &e.hdrIncluded) + stateSourceObject.Load(4, &e.rcvList) + stateSourceObject.Load(5, &e.rcvBufSize) + stateSourceObject.Load(7, &e.rcvClosed) + stateSourceObject.Load(8, &e.sndBufSize) + stateSourceObject.Load(9, &e.sndBufSizeMax) + stateSourceObject.Load(10, &e.closed) + stateSourceObject.Load(11, &e.connected) + stateSourceObject.Load(12, &e.bound) + stateSourceObject.Load(13, &e.linger) + stateSourceObject.Load(14, &e.owner) + stateSourceObject.LoadValue(6, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) }) + stateSourceObject.AfterLoad(e.afterLoad) +} + +func (r *rawPacketList) StateTypeName() string { return "pkg/tcpip/transport/raw.rawPacketList" } -func (x *rawPacketList) StateFields() []string { +func (r *rawPacketList) StateFields() []string { return []string{ "head", "tail", } } -func (x *rawPacketList) beforeSave() {} +func (r *rawPacketList) beforeSave() {} -func (x *rawPacketList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (r *rawPacketList) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.head) + stateSinkObject.Save(1, &r.tail) } -func (x *rawPacketList) afterLoad() {} +func (r *rawPacketList) afterLoad() {} -func (x *rawPacketList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (r *rawPacketList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.head) + stateSourceObject.Load(1, &r.tail) } -func (x *rawPacketEntry) StateTypeName() string { +func (r *rawPacketEntry) StateTypeName() string { return "pkg/tcpip/transport/raw.rawPacketEntry" } -func (x *rawPacketEntry) StateFields() []string { +func (r *rawPacketEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *rawPacketEntry) beforeSave() {} +func (r *rawPacketEntry) beforeSave() {} -func (x *rawPacketEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (r *rawPacketEntry) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.next) + stateSinkObject.Save(1, &r.prev) } -func (x *rawPacketEntry) afterLoad() {} +func (r *rawPacketEntry) afterLoad() {} -func (x *rawPacketEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (r *rawPacketEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.next) + stateSourceObject.Load(1, &r.prev) } func init() { diff --git a/pkg/tcpip/transport/tcp/tcp_state_autogen.go b/pkg/tcpip/transport/tcp/tcp_state_autogen.go index 08f185795..9893252ef 100644 --- a/pkg/tcpip/transport/tcp/tcp_state_autogen.go +++ b/pkg/tcpip/transport/tcp/tcp_state_autogen.go @@ -7,11 +7,11 @@ import ( "gvisor.dev/gvisor/pkg/tcpip/buffer" ) -func (x *cubicState) StateTypeName() string { +func (c *cubicState) StateTypeName() string { return "pkg/tcpip/transport/tcp.cubicState" } -func (x *cubicState) StateFields() []string { +func (c *cubicState) StateFields() []string { return []string{ "wLastMax", "wMax", @@ -26,69 +26,69 @@ func (x *cubicState) StateFields() []string { } } -func (x *cubicState) beforeSave() {} +func (c *cubicState) beforeSave() {} -func (x *cubicState) StateSave(m state.Sink) { - x.beforeSave() - var t unixTime = x.saveT() - m.SaveValue(2, t) - m.Save(0, &x.wLastMax) - m.Save(1, &x.wMax) - m.Save(3, &x.numCongestionEvents) - m.Save(4, &x.c) - m.Save(5, &x.k) - m.Save(6, &x.beta) - m.Save(7, &x.wC) - m.Save(8, &x.wEst) - m.Save(9, &x.s) +func (c *cubicState) StateSave(stateSinkObject state.Sink) { + c.beforeSave() + var tValue unixTime = c.saveT() + stateSinkObject.SaveValue(2, tValue) + stateSinkObject.Save(0, &c.wLastMax) + stateSinkObject.Save(1, &c.wMax) + stateSinkObject.Save(3, &c.numCongestionEvents) + stateSinkObject.Save(4, &c.c) + stateSinkObject.Save(5, &c.k) + stateSinkObject.Save(6, &c.beta) + stateSinkObject.Save(7, &c.wC) + stateSinkObject.Save(8, &c.wEst) + stateSinkObject.Save(9, &c.s) } -func (x *cubicState) afterLoad() {} +func (c *cubicState) afterLoad() {} -func (x *cubicState) StateLoad(m state.Source) { - m.Load(0, &x.wLastMax) - m.Load(1, &x.wMax) - m.Load(3, &x.numCongestionEvents) - m.Load(4, &x.c) - m.Load(5, &x.k) - m.Load(6, &x.beta) - m.Load(7, &x.wC) - m.Load(8, &x.wEst) - m.Load(9, &x.s) - m.LoadValue(2, new(unixTime), func(y interface{}) { x.loadT(y.(unixTime)) }) +func (c *cubicState) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &c.wLastMax) + stateSourceObject.Load(1, &c.wMax) + stateSourceObject.Load(3, &c.numCongestionEvents) + stateSourceObject.Load(4, &c.c) + stateSourceObject.Load(5, &c.k) + stateSourceObject.Load(6, &c.beta) + stateSourceObject.Load(7, &c.wC) + stateSourceObject.Load(8, &c.wEst) + stateSourceObject.Load(9, &c.s) + stateSourceObject.LoadValue(2, new(unixTime), func(y interface{}) { c.loadT(y.(unixTime)) }) } -func (x *SACKInfo) StateTypeName() string { +func (s *SACKInfo) StateTypeName() string { return "pkg/tcpip/transport/tcp.SACKInfo" } -func (x *SACKInfo) StateFields() []string { +func (s *SACKInfo) StateFields() []string { return []string{ "Blocks", "NumBlocks", } } -func (x *SACKInfo) beforeSave() {} +func (s *SACKInfo) beforeSave() {} -func (x *SACKInfo) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Blocks) - m.Save(1, &x.NumBlocks) +func (s *SACKInfo) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.Blocks) + stateSinkObject.Save(1, &s.NumBlocks) } -func (x *SACKInfo) afterLoad() {} +func (s *SACKInfo) afterLoad() {} -func (x *SACKInfo) StateLoad(m state.Source) { - m.Load(0, &x.Blocks) - m.Load(1, &x.NumBlocks) +func (s *SACKInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.Blocks) + stateSourceObject.Load(1, &s.NumBlocks) } -func (x *rcvBufAutoTuneParams) StateTypeName() string { +func (r *rcvBufAutoTuneParams) StateTypeName() string { return "pkg/tcpip/transport/tcp.rcvBufAutoTuneParams" } -func (x *rcvBufAutoTuneParams) StateFields() []string { +func (r *rcvBufAutoTuneParams) StateFields() []string { return []string{ "measureTime", "copied", @@ -100,65 +100,65 @@ func (x *rcvBufAutoTuneParams) StateFields() []string { } } -func (x *rcvBufAutoTuneParams) beforeSave() {} +func (r *rcvBufAutoTuneParams) beforeSave() {} -func (x *rcvBufAutoTuneParams) StateSave(m state.Sink) { - x.beforeSave() - var measureTime unixTime = x.saveMeasureTime() - m.SaveValue(0, measureTime) - var rttMeasureTime unixTime = x.saveRttMeasureTime() - m.SaveValue(5, rttMeasureTime) - m.Save(1, &x.copied) - m.Save(2, &x.prevCopied) - m.Save(3, &x.rtt) - m.Save(4, &x.rttMeasureSeqNumber) - m.Save(6, &x.disabled) +func (r *rcvBufAutoTuneParams) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + var measureTimeValue unixTime = r.saveMeasureTime() + stateSinkObject.SaveValue(0, measureTimeValue) + var rttMeasureTimeValue unixTime = r.saveRttMeasureTime() + stateSinkObject.SaveValue(5, rttMeasureTimeValue) + stateSinkObject.Save(1, &r.copied) + stateSinkObject.Save(2, &r.prevCopied) + stateSinkObject.Save(3, &r.rtt) + stateSinkObject.Save(4, &r.rttMeasureSeqNumber) + stateSinkObject.Save(6, &r.disabled) } -func (x *rcvBufAutoTuneParams) afterLoad() {} +func (r *rcvBufAutoTuneParams) afterLoad() {} -func (x *rcvBufAutoTuneParams) StateLoad(m state.Source) { - m.Load(1, &x.copied) - m.Load(2, &x.prevCopied) - m.Load(3, &x.rtt) - m.Load(4, &x.rttMeasureSeqNumber) - m.Load(6, &x.disabled) - m.LoadValue(0, new(unixTime), func(y interface{}) { x.loadMeasureTime(y.(unixTime)) }) - m.LoadValue(5, new(unixTime), func(y interface{}) { x.loadRttMeasureTime(y.(unixTime)) }) +func (r *rcvBufAutoTuneParams) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(1, &r.copied) + stateSourceObject.Load(2, &r.prevCopied) + stateSourceObject.Load(3, &r.rtt) + stateSourceObject.Load(4, &r.rttMeasureSeqNumber) + stateSourceObject.Load(6, &r.disabled) + stateSourceObject.LoadValue(0, new(unixTime), func(y interface{}) { r.loadMeasureTime(y.(unixTime)) }) + stateSourceObject.LoadValue(5, new(unixTime), func(y interface{}) { r.loadRttMeasureTime(y.(unixTime)) }) } -func (x *EndpointInfo) StateTypeName() string { +func (e *EndpointInfo) StateTypeName() string { return "pkg/tcpip/transport/tcp.EndpointInfo" } -func (x *EndpointInfo) StateFields() []string { +func (e *EndpointInfo) StateFields() []string { return []string{ "TransportEndpointInfo", "HardError", } } -func (x *EndpointInfo) beforeSave() {} +func (e *EndpointInfo) beforeSave() {} -func (x *EndpointInfo) StateSave(m state.Sink) { - x.beforeSave() - var HardError string = x.saveHardError() - m.SaveValue(1, HardError) - m.Save(0, &x.TransportEndpointInfo) +func (e *EndpointInfo) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + var HardErrorValue string = e.saveHardError() + stateSinkObject.SaveValue(1, HardErrorValue) + stateSinkObject.Save(0, &e.TransportEndpointInfo) } -func (x *EndpointInfo) afterLoad() {} +func (e *EndpointInfo) afterLoad() {} -func (x *EndpointInfo) StateLoad(m state.Source) { - m.Load(0, &x.TransportEndpointInfo) - m.LoadValue(1, new(string), func(y interface{}) { x.loadHardError(y.(string)) }) +func (e *EndpointInfo) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.TransportEndpointInfo) + stateSourceObject.LoadValue(1, new(string), func(y interface{}) { e.loadHardError(y.(string)) }) } -func (x *endpoint) StateTypeName() string { +func (e *endpoint) StateTypeName() string { return "pkg/tcpip/transport/tcp.endpoint" } -func (x *endpoint) StateFields() []string { +func (e *endpoint) StateFields() []string { return []string{ "EndpointInfo", "waiterQueue", @@ -227,151 +227,151 @@ func (x *endpoint) StateFields() []string { } } -func (x *endpoint) StateSave(m state.Sink) { - x.beforeSave() - var lastError string = x.saveLastError() - m.SaveValue(3, lastError) - var state EndpointState = x.saveState() - m.SaveValue(11, state) - var recentTSTime unixTime = x.saveRecentTSTime() - m.SaveValue(26, recentTSTime) - var acceptedChan []*endpoint = x.saveAcceptedChan() - m.SaveValue(52, acceptedChan) - m.Save(0, &x.EndpointInfo) - m.Save(1, &x.waiterQueue) - m.Save(2, &x.uniqueID) - m.Save(4, &x.rcvList) - m.Save(5, &x.rcvClosed) - m.Save(6, &x.rcvBufSize) - m.Save(7, &x.rcvBufUsed) - m.Save(8, &x.rcvAutoParams) - m.Save(9, &x.rcvMemUsed) - m.Save(10, &x.ownedByUser) - m.Save(12, &x.boundNICID) - m.Save(13, &x.ttl) - m.Save(14, &x.v6only) - m.Save(15, &x.isConnectNotified) - m.Save(16, &x.broadcast) - m.Save(17, &x.portFlags) - m.Save(18, &x.boundBindToDevice) - m.Save(19, &x.boundPortFlags) - m.Save(20, &x.boundDest) - m.Save(21, &x.effectiveNetProtos) - m.Save(22, &x.workerRunning) - m.Save(23, &x.workerCleanup) - m.Save(24, &x.sendTSOk) - m.Save(25, &x.recentTS) - m.Save(27, &x.tsOffset) - m.Save(28, &x.shutdownFlags) - m.Save(29, &x.sackPermitted) - m.Save(30, &x.sack) - m.Save(31, &x.bindToDevice) - m.Save(32, &x.delay) - m.Save(33, &x.cork) - m.Save(34, &x.scoreboard) - m.Save(35, &x.slowAck) - m.Save(36, &x.segmentQueue) - m.Save(37, &x.synRcvdCount) - m.Save(38, &x.userMSS) - m.Save(39, &x.maxSynRetries) - m.Save(40, &x.windowClamp) - m.Save(41, &x.sndBufSize) - m.Save(42, &x.sndBufUsed) - m.Save(43, &x.sndClosed) - m.Save(44, &x.sndBufInQueue) - m.Save(45, &x.sndQueue) - m.Save(46, &x.cc) - m.Save(47, &x.packetTooBigCount) - m.Save(48, &x.sndMTU) - m.Save(49, &x.keepalive) - m.Save(50, &x.userTimeout) - m.Save(51, &x.deferAccept) - m.Save(53, &x.rcv) - m.Save(54, &x.snd) - m.Save(55, &x.connectingAddress) - m.Save(56, &x.amss) - m.Save(57, &x.sendTOS) - m.Save(58, &x.gso) - m.Save(59, &x.tcpLingerTimeout) - m.Save(60, &x.closed) - m.Save(61, &x.txHash) - m.Save(62, &x.owner) - m.Save(63, &x.linger) -} - -func (x *endpoint) StateLoad(m state.Source) { - m.Load(0, &x.EndpointInfo) - m.LoadWait(1, &x.waiterQueue) - m.Load(2, &x.uniqueID) - m.LoadWait(4, &x.rcvList) - m.Load(5, &x.rcvClosed) - m.Load(6, &x.rcvBufSize) - m.Load(7, &x.rcvBufUsed) - m.Load(8, &x.rcvAutoParams) - m.Load(9, &x.rcvMemUsed) - m.Load(10, &x.ownedByUser) - m.Load(12, &x.boundNICID) - m.Load(13, &x.ttl) - m.Load(14, &x.v6only) - m.Load(15, &x.isConnectNotified) - m.Load(16, &x.broadcast) - m.Load(17, &x.portFlags) - m.Load(18, &x.boundBindToDevice) - m.Load(19, &x.boundPortFlags) - m.Load(20, &x.boundDest) - m.Load(21, &x.effectiveNetProtos) - m.Load(22, &x.workerRunning) - m.Load(23, &x.workerCleanup) - m.Load(24, &x.sendTSOk) - m.Load(25, &x.recentTS) - m.Load(27, &x.tsOffset) - m.Load(28, &x.shutdownFlags) - m.Load(29, &x.sackPermitted) - m.Load(30, &x.sack) - m.Load(31, &x.bindToDevice) - m.Load(32, &x.delay) - m.Load(33, &x.cork) - m.Load(34, &x.scoreboard) - m.Load(35, &x.slowAck) - m.LoadWait(36, &x.segmentQueue) - m.Load(37, &x.synRcvdCount) - m.Load(38, &x.userMSS) - m.Load(39, &x.maxSynRetries) - m.Load(40, &x.windowClamp) - m.Load(41, &x.sndBufSize) - m.Load(42, &x.sndBufUsed) - m.Load(43, &x.sndClosed) - m.Load(44, &x.sndBufInQueue) - m.LoadWait(45, &x.sndQueue) - m.Load(46, &x.cc) - m.Load(47, &x.packetTooBigCount) - m.Load(48, &x.sndMTU) - m.Load(49, &x.keepalive) - m.Load(50, &x.userTimeout) - m.Load(51, &x.deferAccept) - m.LoadWait(53, &x.rcv) - m.LoadWait(54, &x.snd) - m.Load(55, &x.connectingAddress) - m.Load(56, &x.amss) - m.Load(57, &x.sendTOS) - m.Load(58, &x.gso) - m.Load(59, &x.tcpLingerTimeout) - m.Load(60, &x.closed) - m.Load(61, &x.txHash) - m.Load(62, &x.owner) - m.Load(63, &x.linger) - m.LoadValue(3, new(string), func(y interface{}) { x.loadLastError(y.(string)) }) - m.LoadValue(11, new(EndpointState), func(y interface{}) { x.loadState(y.(EndpointState)) }) - m.LoadValue(26, new(unixTime), func(y interface{}) { x.loadRecentTSTime(y.(unixTime)) }) - m.LoadValue(52, new([]*endpoint), func(y interface{}) { x.loadAcceptedChan(y.([]*endpoint)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *keepalive) StateTypeName() string { +func (e *endpoint) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + var lastErrorValue string = e.saveLastError() + stateSinkObject.SaveValue(3, lastErrorValue) + var stateValue EndpointState = e.saveState() + stateSinkObject.SaveValue(11, stateValue) + var recentTSTimeValue unixTime = e.saveRecentTSTime() + stateSinkObject.SaveValue(26, recentTSTimeValue) + var acceptedChanValue []*endpoint = e.saveAcceptedChan() + stateSinkObject.SaveValue(52, acceptedChanValue) + stateSinkObject.Save(0, &e.EndpointInfo) + stateSinkObject.Save(1, &e.waiterQueue) + stateSinkObject.Save(2, &e.uniqueID) + stateSinkObject.Save(4, &e.rcvList) + stateSinkObject.Save(5, &e.rcvClosed) + stateSinkObject.Save(6, &e.rcvBufSize) + stateSinkObject.Save(7, &e.rcvBufUsed) + stateSinkObject.Save(8, &e.rcvAutoParams) + stateSinkObject.Save(9, &e.rcvMemUsed) + stateSinkObject.Save(10, &e.ownedByUser) + stateSinkObject.Save(12, &e.boundNICID) + stateSinkObject.Save(13, &e.ttl) + stateSinkObject.Save(14, &e.v6only) + stateSinkObject.Save(15, &e.isConnectNotified) + stateSinkObject.Save(16, &e.broadcast) + stateSinkObject.Save(17, &e.portFlags) + stateSinkObject.Save(18, &e.boundBindToDevice) + stateSinkObject.Save(19, &e.boundPortFlags) + stateSinkObject.Save(20, &e.boundDest) + stateSinkObject.Save(21, &e.effectiveNetProtos) + stateSinkObject.Save(22, &e.workerRunning) + stateSinkObject.Save(23, &e.workerCleanup) + stateSinkObject.Save(24, &e.sendTSOk) + stateSinkObject.Save(25, &e.recentTS) + stateSinkObject.Save(27, &e.tsOffset) + stateSinkObject.Save(28, &e.shutdownFlags) + stateSinkObject.Save(29, &e.sackPermitted) + stateSinkObject.Save(30, &e.sack) + stateSinkObject.Save(31, &e.bindToDevice) + stateSinkObject.Save(32, &e.delay) + stateSinkObject.Save(33, &e.cork) + stateSinkObject.Save(34, &e.scoreboard) + stateSinkObject.Save(35, &e.slowAck) + stateSinkObject.Save(36, &e.segmentQueue) + stateSinkObject.Save(37, &e.synRcvdCount) + stateSinkObject.Save(38, &e.userMSS) + stateSinkObject.Save(39, &e.maxSynRetries) + stateSinkObject.Save(40, &e.windowClamp) + stateSinkObject.Save(41, &e.sndBufSize) + stateSinkObject.Save(42, &e.sndBufUsed) + stateSinkObject.Save(43, &e.sndClosed) + stateSinkObject.Save(44, &e.sndBufInQueue) + stateSinkObject.Save(45, &e.sndQueue) + stateSinkObject.Save(46, &e.cc) + stateSinkObject.Save(47, &e.packetTooBigCount) + stateSinkObject.Save(48, &e.sndMTU) + stateSinkObject.Save(49, &e.keepalive) + stateSinkObject.Save(50, &e.userTimeout) + stateSinkObject.Save(51, &e.deferAccept) + stateSinkObject.Save(53, &e.rcv) + stateSinkObject.Save(54, &e.snd) + stateSinkObject.Save(55, &e.connectingAddress) + stateSinkObject.Save(56, &e.amss) + stateSinkObject.Save(57, &e.sendTOS) + stateSinkObject.Save(58, &e.gso) + stateSinkObject.Save(59, &e.tcpLingerTimeout) + stateSinkObject.Save(60, &e.closed) + stateSinkObject.Save(61, &e.txHash) + stateSinkObject.Save(62, &e.owner) + stateSinkObject.Save(63, &e.linger) +} + +func (e *endpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.EndpointInfo) + stateSourceObject.LoadWait(1, &e.waiterQueue) + stateSourceObject.Load(2, &e.uniqueID) + stateSourceObject.LoadWait(4, &e.rcvList) + stateSourceObject.Load(5, &e.rcvClosed) + stateSourceObject.Load(6, &e.rcvBufSize) + stateSourceObject.Load(7, &e.rcvBufUsed) + stateSourceObject.Load(8, &e.rcvAutoParams) + stateSourceObject.Load(9, &e.rcvMemUsed) + stateSourceObject.Load(10, &e.ownedByUser) + stateSourceObject.Load(12, &e.boundNICID) + stateSourceObject.Load(13, &e.ttl) + stateSourceObject.Load(14, &e.v6only) + stateSourceObject.Load(15, &e.isConnectNotified) + stateSourceObject.Load(16, &e.broadcast) + stateSourceObject.Load(17, &e.portFlags) + stateSourceObject.Load(18, &e.boundBindToDevice) + stateSourceObject.Load(19, &e.boundPortFlags) + stateSourceObject.Load(20, &e.boundDest) + stateSourceObject.Load(21, &e.effectiveNetProtos) + stateSourceObject.Load(22, &e.workerRunning) + stateSourceObject.Load(23, &e.workerCleanup) + stateSourceObject.Load(24, &e.sendTSOk) + stateSourceObject.Load(25, &e.recentTS) + stateSourceObject.Load(27, &e.tsOffset) + stateSourceObject.Load(28, &e.shutdownFlags) + stateSourceObject.Load(29, &e.sackPermitted) + stateSourceObject.Load(30, &e.sack) + stateSourceObject.Load(31, &e.bindToDevice) + stateSourceObject.Load(32, &e.delay) + stateSourceObject.Load(33, &e.cork) + stateSourceObject.Load(34, &e.scoreboard) + stateSourceObject.Load(35, &e.slowAck) + stateSourceObject.LoadWait(36, &e.segmentQueue) + stateSourceObject.Load(37, &e.synRcvdCount) + stateSourceObject.Load(38, &e.userMSS) + stateSourceObject.Load(39, &e.maxSynRetries) + stateSourceObject.Load(40, &e.windowClamp) + stateSourceObject.Load(41, &e.sndBufSize) + stateSourceObject.Load(42, &e.sndBufUsed) + stateSourceObject.Load(43, &e.sndClosed) + stateSourceObject.Load(44, &e.sndBufInQueue) + stateSourceObject.LoadWait(45, &e.sndQueue) + stateSourceObject.Load(46, &e.cc) + stateSourceObject.Load(47, &e.packetTooBigCount) + stateSourceObject.Load(48, &e.sndMTU) + stateSourceObject.Load(49, &e.keepalive) + stateSourceObject.Load(50, &e.userTimeout) + stateSourceObject.Load(51, &e.deferAccept) + stateSourceObject.LoadWait(53, &e.rcv) + stateSourceObject.LoadWait(54, &e.snd) + stateSourceObject.Load(55, &e.connectingAddress) + stateSourceObject.Load(56, &e.amss) + stateSourceObject.Load(57, &e.sendTOS) + stateSourceObject.Load(58, &e.gso) + stateSourceObject.Load(59, &e.tcpLingerTimeout) + stateSourceObject.Load(60, &e.closed) + stateSourceObject.Load(61, &e.txHash) + stateSourceObject.Load(62, &e.owner) + stateSourceObject.Load(63, &e.linger) + stateSourceObject.LoadValue(3, new(string), func(y interface{}) { e.loadLastError(y.(string)) }) + stateSourceObject.LoadValue(11, new(EndpointState), func(y interface{}) { e.loadState(y.(EndpointState)) }) + stateSourceObject.LoadValue(26, new(unixTime), func(y interface{}) { e.loadRecentTSTime(y.(unixTime)) }) + stateSourceObject.LoadValue(52, new([]*endpoint), func(y interface{}) { e.loadAcceptedChan(y.([]*endpoint)) }) + stateSourceObject.AfterLoad(e.afterLoad) +} + +func (k *keepalive) StateTypeName() string { return "pkg/tcpip/transport/tcp.keepalive" } -func (x *keepalive) StateFields() []string { +func (k *keepalive) StateFields() []string { return []string{ "enabled", "idle", @@ -381,32 +381,32 @@ func (x *keepalive) StateFields() []string { } } -func (x *keepalive) beforeSave() {} +func (k *keepalive) beforeSave() {} -func (x *keepalive) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.enabled) - m.Save(1, &x.idle) - m.Save(2, &x.interval) - m.Save(3, &x.count) - m.Save(4, &x.unacked) +func (k *keepalive) StateSave(stateSinkObject state.Sink) { + k.beforeSave() + stateSinkObject.Save(0, &k.enabled) + stateSinkObject.Save(1, &k.idle) + stateSinkObject.Save(2, &k.interval) + stateSinkObject.Save(3, &k.count) + stateSinkObject.Save(4, &k.unacked) } -func (x *keepalive) afterLoad() {} +func (k *keepalive) afterLoad() {} -func (x *keepalive) StateLoad(m state.Source) { - m.Load(0, &x.enabled) - m.Load(1, &x.idle) - m.Load(2, &x.interval) - m.Load(3, &x.count) - m.Load(4, &x.unacked) +func (k *keepalive) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &k.enabled) + stateSourceObject.Load(1, &k.idle) + stateSourceObject.Load(2, &k.interval) + stateSourceObject.Load(3, &k.count) + stateSourceObject.Load(4, &k.unacked) } -func (x *rackControl) StateTypeName() string { +func (r *rackControl) StateTypeName() string { return "pkg/tcpip/transport/tcp.rackControl" } -func (x *rackControl) StateFields() []string { +func (r *rackControl) StateFields() []string { return []string{ "xmitTime", "endSequence", @@ -416,33 +416,33 @@ func (x *rackControl) StateFields() []string { } } -func (x *rackControl) beforeSave() {} +func (r *rackControl) beforeSave() {} -func (x *rackControl) StateSave(m state.Sink) { - x.beforeSave() - var xmitTime unixTime = x.saveXmitTime() - m.SaveValue(0, xmitTime) - m.Save(1, &x.endSequence) - m.Save(2, &x.fack) - m.Save(3, &x.minRTT) - m.Save(4, &x.rtt) +func (r *rackControl) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + var xmitTimeValue unixTime = r.saveXmitTime() + stateSinkObject.SaveValue(0, xmitTimeValue) + stateSinkObject.Save(1, &r.endSequence) + stateSinkObject.Save(2, &r.fack) + stateSinkObject.Save(3, &r.minRTT) + stateSinkObject.Save(4, &r.rtt) } -func (x *rackControl) afterLoad() {} +func (r *rackControl) afterLoad() {} -func (x *rackControl) StateLoad(m state.Source) { - m.Load(1, &x.endSequence) - m.Load(2, &x.fack) - m.Load(3, &x.minRTT) - m.Load(4, &x.rtt) - m.LoadValue(0, new(unixTime), func(y interface{}) { x.loadXmitTime(y.(unixTime)) }) +func (r *rackControl) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(1, &r.endSequence) + stateSourceObject.Load(2, &r.fack) + stateSourceObject.Load(3, &r.minRTT) + stateSourceObject.Load(4, &r.rtt) + stateSourceObject.LoadValue(0, new(unixTime), func(y interface{}) { r.loadXmitTime(y.(unixTime)) }) } -func (x *receiver) StateTypeName() string { +func (r *receiver) StateTypeName() string { return "pkg/tcpip/transport/tcp.receiver" } -func (x *receiver) StateFields() []string { +func (r *receiver) StateFields() []string { return []string{ "ep", "rcvNxt", @@ -456,90 +456,90 @@ func (x *receiver) StateFields() []string { } } -func (x *receiver) beforeSave() {} +func (r *receiver) beforeSave() {} -func (x *receiver) StateSave(m state.Sink) { - x.beforeSave() - var lastRcvdAckTime unixTime = x.saveLastRcvdAckTime() - m.SaveValue(8, lastRcvdAckTime) - m.Save(0, &x.ep) - m.Save(1, &x.rcvNxt) - m.Save(2, &x.rcvAcc) - m.Save(3, &x.rcvWnd) - m.Save(4, &x.rcvWndScale) - m.Save(5, &x.closed) - m.Save(6, &x.pendingRcvdSegments) - m.Save(7, &x.pendingBufUsed) +func (r *receiver) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + var lastRcvdAckTimeValue unixTime = r.saveLastRcvdAckTime() + stateSinkObject.SaveValue(8, lastRcvdAckTimeValue) + stateSinkObject.Save(0, &r.ep) + stateSinkObject.Save(1, &r.rcvNxt) + stateSinkObject.Save(2, &r.rcvAcc) + stateSinkObject.Save(3, &r.rcvWnd) + stateSinkObject.Save(4, &r.rcvWndScale) + stateSinkObject.Save(5, &r.closed) + stateSinkObject.Save(6, &r.pendingRcvdSegments) + stateSinkObject.Save(7, &r.pendingBufUsed) } -func (x *receiver) afterLoad() {} +func (r *receiver) afterLoad() {} -func (x *receiver) StateLoad(m state.Source) { - m.Load(0, &x.ep) - m.Load(1, &x.rcvNxt) - m.Load(2, &x.rcvAcc) - m.Load(3, &x.rcvWnd) - m.Load(4, &x.rcvWndScale) - m.Load(5, &x.closed) - m.Load(6, &x.pendingRcvdSegments) - m.Load(7, &x.pendingBufUsed) - m.LoadValue(8, new(unixTime), func(y interface{}) { x.loadLastRcvdAckTime(y.(unixTime)) }) +func (r *receiver) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.ep) + stateSourceObject.Load(1, &r.rcvNxt) + stateSourceObject.Load(2, &r.rcvAcc) + stateSourceObject.Load(3, &r.rcvWnd) + stateSourceObject.Load(4, &r.rcvWndScale) + stateSourceObject.Load(5, &r.closed) + stateSourceObject.Load(6, &r.pendingRcvdSegments) + stateSourceObject.Load(7, &r.pendingBufUsed) + stateSourceObject.LoadValue(8, new(unixTime), func(y interface{}) { r.loadLastRcvdAckTime(y.(unixTime)) }) } -func (x *renoState) StateTypeName() string { +func (r *renoState) StateTypeName() string { return "pkg/tcpip/transport/tcp.renoState" } -func (x *renoState) StateFields() []string { +func (r *renoState) StateFields() []string { return []string{ "s", } } -func (x *renoState) beforeSave() {} +func (r *renoState) beforeSave() {} -func (x *renoState) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.s) +func (r *renoState) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.s) } -func (x *renoState) afterLoad() {} +func (r *renoState) afterLoad() {} -func (x *renoState) StateLoad(m state.Source) { - m.Load(0, &x.s) +func (r *renoState) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.s) } -func (x *SACKScoreboard) StateTypeName() string { +func (s *SACKScoreboard) StateTypeName() string { return "pkg/tcpip/transport/tcp.SACKScoreboard" } -func (x *SACKScoreboard) StateFields() []string { +func (s *SACKScoreboard) StateFields() []string { return []string{ "smss", "maxSACKED", } } -func (x *SACKScoreboard) beforeSave() {} +func (s *SACKScoreboard) beforeSave() {} -func (x *SACKScoreboard) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.smss) - m.Save(1, &x.maxSACKED) +func (s *SACKScoreboard) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.smss) + stateSinkObject.Save(1, &s.maxSACKED) } -func (x *SACKScoreboard) afterLoad() {} +func (s *SACKScoreboard) afterLoad() {} -func (x *SACKScoreboard) StateLoad(m state.Source) { - m.Load(0, &x.smss) - m.Load(1, &x.maxSACKED) +func (s *SACKScoreboard) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.smss) + stateSourceObject.Load(1, &s.maxSACKED) } -func (x *segment) StateTypeName() string { +func (s *segment) StateTypeName() string { return "pkg/tcpip/transport/tcp.segment" } -func (x *segment) StateFields() []string { +func (s *segment) StateFields() []string { return []string{ "segmentEntry", "refCnt", @@ -563,64 +563,64 @@ func (x *segment) StateFields() []string { } } -func (x *segment) beforeSave() {} - -func (x *segment) StateSave(m state.Sink) { - x.beforeSave() - var data buffer.VectorisedView = x.saveData() - m.SaveValue(4, data) - var options []byte = x.saveOptions() - m.SaveValue(14, options) - var rcvdTime unixTime = x.saveRcvdTime() - m.SaveValue(16, rcvdTime) - var xmitTime unixTime = x.saveXmitTime() - m.SaveValue(17, xmitTime) - m.Save(0, &x.segmentEntry) - m.Save(1, &x.refCnt) - m.Save(2, &x.ep) - m.Save(3, &x.qFlags) - m.Save(5, &x.hdr) - m.Save(6, &x.viewToDeliver) - m.Save(7, &x.sequenceNumber) - m.Save(8, &x.ackNumber) - m.Save(9, &x.flags) - m.Save(10, &x.window) - m.Save(11, &x.csum) - m.Save(12, &x.csumValid) - m.Save(13, &x.parsedOptions) - m.Save(15, &x.hasNewSACKInfo) - m.Save(18, &x.xmitCount) -} - -func (x *segment) afterLoad() {} - -func (x *segment) StateLoad(m state.Source) { - m.Load(0, &x.segmentEntry) - m.Load(1, &x.refCnt) - m.Load(2, &x.ep) - m.Load(3, &x.qFlags) - m.Load(5, &x.hdr) - m.Load(6, &x.viewToDeliver) - m.Load(7, &x.sequenceNumber) - m.Load(8, &x.ackNumber) - m.Load(9, &x.flags) - m.Load(10, &x.window) - m.Load(11, &x.csum) - m.Load(12, &x.csumValid) - m.Load(13, &x.parsedOptions) - m.Load(15, &x.hasNewSACKInfo) - m.Load(18, &x.xmitCount) - m.LoadValue(4, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) }) - m.LoadValue(14, new([]byte), func(y interface{}) { x.loadOptions(y.([]byte)) }) - m.LoadValue(16, new(unixTime), func(y interface{}) { x.loadRcvdTime(y.(unixTime)) }) - m.LoadValue(17, new(unixTime), func(y interface{}) { x.loadXmitTime(y.(unixTime)) }) -} - -func (x *segmentQueue) StateTypeName() string { +func (s *segment) beforeSave() {} + +func (s *segment) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + var dataValue buffer.VectorisedView = s.saveData() + stateSinkObject.SaveValue(4, dataValue) + var optionsValue []byte = s.saveOptions() + stateSinkObject.SaveValue(14, optionsValue) + var rcvdTimeValue unixTime = s.saveRcvdTime() + stateSinkObject.SaveValue(16, rcvdTimeValue) + var xmitTimeValue unixTime = s.saveXmitTime() + stateSinkObject.SaveValue(17, xmitTimeValue) + stateSinkObject.Save(0, &s.segmentEntry) + stateSinkObject.Save(1, &s.refCnt) + stateSinkObject.Save(2, &s.ep) + stateSinkObject.Save(3, &s.qFlags) + stateSinkObject.Save(5, &s.hdr) + stateSinkObject.Save(6, &s.viewToDeliver) + stateSinkObject.Save(7, &s.sequenceNumber) + stateSinkObject.Save(8, &s.ackNumber) + stateSinkObject.Save(9, &s.flags) + stateSinkObject.Save(10, &s.window) + stateSinkObject.Save(11, &s.csum) + stateSinkObject.Save(12, &s.csumValid) + stateSinkObject.Save(13, &s.parsedOptions) + stateSinkObject.Save(15, &s.hasNewSACKInfo) + stateSinkObject.Save(18, &s.xmitCount) +} + +func (s *segment) afterLoad() {} + +func (s *segment) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.segmentEntry) + stateSourceObject.Load(1, &s.refCnt) + stateSourceObject.Load(2, &s.ep) + stateSourceObject.Load(3, &s.qFlags) + stateSourceObject.Load(5, &s.hdr) + stateSourceObject.Load(6, &s.viewToDeliver) + stateSourceObject.Load(7, &s.sequenceNumber) + stateSourceObject.Load(8, &s.ackNumber) + stateSourceObject.Load(9, &s.flags) + stateSourceObject.Load(10, &s.window) + stateSourceObject.Load(11, &s.csum) + stateSourceObject.Load(12, &s.csumValid) + stateSourceObject.Load(13, &s.parsedOptions) + stateSourceObject.Load(15, &s.hasNewSACKInfo) + stateSourceObject.Load(18, &s.xmitCount) + stateSourceObject.LoadValue(4, new(buffer.VectorisedView), func(y interface{}) { s.loadData(y.(buffer.VectorisedView)) }) + stateSourceObject.LoadValue(14, new([]byte), func(y interface{}) { s.loadOptions(y.([]byte)) }) + stateSourceObject.LoadValue(16, new(unixTime), func(y interface{}) { s.loadRcvdTime(y.(unixTime)) }) + stateSourceObject.LoadValue(17, new(unixTime), func(y interface{}) { s.loadXmitTime(y.(unixTime)) }) +} + +func (s *segmentQueue) StateTypeName() string { return "pkg/tcpip/transport/tcp.segmentQueue" } -func (x *segmentQueue) StateFields() []string { +func (s *segmentQueue) StateFields() []string { return []string{ "list", "ep", @@ -628,28 +628,28 @@ func (x *segmentQueue) StateFields() []string { } } -func (x *segmentQueue) beforeSave() {} +func (s *segmentQueue) beforeSave() {} -func (x *segmentQueue) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.list) - m.Save(1, &x.ep) - m.Save(2, &x.frozen) +func (s *segmentQueue) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.list) + stateSinkObject.Save(1, &s.ep) + stateSinkObject.Save(2, &s.frozen) } -func (x *segmentQueue) afterLoad() {} +func (s *segmentQueue) afterLoad() {} -func (x *segmentQueue) StateLoad(m state.Source) { - m.LoadWait(0, &x.list) - m.Load(1, &x.ep) - m.Load(2, &x.frozen) +func (s *segmentQueue) StateLoad(stateSourceObject state.Source) { + stateSourceObject.LoadWait(0, &s.list) + stateSourceObject.Load(1, &s.ep) + stateSourceObject.Load(2, &s.frozen) } -func (x *sender) StateTypeName() string { +func (s *sender) StateTypeName() string { return "pkg/tcpip/transport/tcp.sender" } -func (x *sender) StateFields() []string { +func (s *sender) StateFields() []string { return []string{ "ep", "lastSendTime", @@ -683,82 +683,82 @@ func (x *sender) StateFields() []string { } } -func (x *sender) beforeSave() {} - -func (x *sender) StateSave(m state.Sink) { - x.beforeSave() - var lastSendTime unixTime = x.saveLastSendTime() - m.SaveValue(1, lastSendTime) - var rttMeasureTime unixTime = x.saveRttMeasureTime() - m.SaveValue(12, rttMeasureTime) - var firstRetransmittedSegXmitTime unixTime = x.saveFirstRetransmittedSegXmitTime() - m.SaveValue(13, firstRetransmittedSegXmitTime) - m.Save(0, &x.ep) - m.Save(2, &x.dupAckCount) - m.Save(3, &x.fr) - m.Save(4, &x.sndCwnd) - m.Save(5, &x.sndSsthresh) - m.Save(6, &x.sndCAAckCount) - m.Save(7, &x.outstanding) - m.Save(8, &x.sndWnd) - m.Save(9, &x.sndUna) - m.Save(10, &x.sndNxt) - m.Save(11, &x.rttMeasureSeqNum) - m.Save(14, &x.closed) - m.Save(15, &x.writeNext) - m.Save(16, &x.writeList) - m.Save(17, &x.rtt) - m.Save(18, &x.rto) - m.Save(19, &x.minRTO) - m.Save(20, &x.maxRTO) - m.Save(21, &x.maxRetries) - m.Save(22, &x.maxPayloadSize) - m.Save(23, &x.gso) - m.Save(24, &x.sndWndScale) - m.Save(25, &x.maxSentAck) - m.Save(26, &x.state) - m.Save(27, &x.cc) - m.Save(28, &x.rc) -} - -func (x *sender) StateLoad(m state.Source) { - m.Load(0, &x.ep) - m.Load(2, &x.dupAckCount) - m.Load(3, &x.fr) - m.Load(4, &x.sndCwnd) - m.Load(5, &x.sndSsthresh) - m.Load(6, &x.sndCAAckCount) - m.Load(7, &x.outstanding) - m.Load(8, &x.sndWnd) - m.Load(9, &x.sndUna) - m.Load(10, &x.sndNxt) - m.Load(11, &x.rttMeasureSeqNum) - m.Load(14, &x.closed) - m.Load(15, &x.writeNext) - m.Load(16, &x.writeList) - m.Load(17, &x.rtt) - m.Load(18, &x.rto) - m.Load(19, &x.minRTO) - m.Load(20, &x.maxRTO) - m.Load(21, &x.maxRetries) - m.Load(22, &x.maxPayloadSize) - m.Load(23, &x.gso) - m.Load(24, &x.sndWndScale) - m.Load(25, &x.maxSentAck) - m.Load(26, &x.state) - m.Load(27, &x.cc) - m.Load(28, &x.rc) - m.LoadValue(1, new(unixTime), func(y interface{}) { x.loadLastSendTime(y.(unixTime)) }) - m.LoadValue(12, new(unixTime), func(y interface{}) { x.loadRttMeasureTime(y.(unixTime)) }) - m.LoadValue(13, new(unixTime), func(y interface{}) { x.loadFirstRetransmittedSegXmitTime(y.(unixTime)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *rtt) StateTypeName() string { +func (s *sender) beforeSave() {} + +func (s *sender) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + var lastSendTimeValue unixTime = s.saveLastSendTime() + stateSinkObject.SaveValue(1, lastSendTimeValue) + var rttMeasureTimeValue unixTime = s.saveRttMeasureTime() + stateSinkObject.SaveValue(12, rttMeasureTimeValue) + var firstRetransmittedSegXmitTimeValue unixTime = s.saveFirstRetransmittedSegXmitTime() + stateSinkObject.SaveValue(13, firstRetransmittedSegXmitTimeValue) + stateSinkObject.Save(0, &s.ep) + stateSinkObject.Save(2, &s.dupAckCount) + stateSinkObject.Save(3, &s.fr) + stateSinkObject.Save(4, &s.sndCwnd) + stateSinkObject.Save(5, &s.sndSsthresh) + stateSinkObject.Save(6, &s.sndCAAckCount) + stateSinkObject.Save(7, &s.outstanding) + stateSinkObject.Save(8, &s.sndWnd) + stateSinkObject.Save(9, &s.sndUna) + stateSinkObject.Save(10, &s.sndNxt) + stateSinkObject.Save(11, &s.rttMeasureSeqNum) + stateSinkObject.Save(14, &s.closed) + stateSinkObject.Save(15, &s.writeNext) + stateSinkObject.Save(16, &s.writeList) + stateSinkObject.Save(17, &s.rtt) + stateSinkObject.Save(18, &s.rto) + stateSinkObject.Save(19, &s.minRTO) + stateSinkObject.Save(20, &s.maxRTO) + stateSinkObject.Save(21, &s.maxRetries) + stateSinkObject.Save(22, &s.maxPayloadSize) + stateSinkObject.Save(23, &s.gso) + stateSinkObject.Save(24, &s.sndWndScale) + stateSinkObject.Save(25, &s.maxSentAck) + stateSinkObject.Save(26, &s.state) + stateSinkObject.Save(27, &s.cc) + stateSinkObject.Save(28, &s.rc) +} + +func (s *sender) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.ep) + stateSourceObject.Load(2, &s.dupAckCount) + stateSourceObject.Load(3, &s.fr) + stateSourceObject.Load(4, &s.sndCwnd) + stateSourceObject.Load(5, &s.sndSsthresh) + stateSourceObject.Load(6, &s.sndCAAckCount) + stateSourceObject.Load(7, &s.outstanding) + stateSourceObject.Load(8, &s.sndWnd) + stateSourceObject.Load(9, &s.sndUna) + stateSourceObject.Load(10, &s.sndNxt) + stateSourceObject.Load(11, &s.rttMeasureSeqNum) + stateSourceObject.Load(14, &s.closed) + stateSourceObject.Load(15, &s.writeNext) + stateSourceObject.Load(16, &s.writeList) + stateSourceObject.Load(17, &s.rtt) + stateSourceObject.Load(18, &s.rto) + stateSourceObject.Load(19, &s.minRTO) + stateSourceObject.Load(20, &s.maxRTO) + stateSourceObject.Load(21, &s.maxRetries) + stateSourceObject.Load(22, &s.maxPayloadSize) + stateSourceObject.Load(23, &s.gso) + stateSourceObject.Load(24, &s.sndWndScale) + stateSourceObject.Load(25, &s.maxSentAck) + stateSourceObject.Load(26, &s.state) + stateSourceObject.Load(27, &s.cc) + stateSourceObject.Load(28, &s.rc) + stateSourceObject.LoadValue(1, new(unixTime), func(y interface{}) { s.loadLastSendTime(y.(unixTime)) }) + stateSourceObject.LoadValue(12, new(unixTime), func(y interface{}) { s.loadRttMeasureTime(y.(unixTime)) }) + stateSourceObject.LoadValue(13, new(unixTime), func(y interface{}) { s.loadFirstRetransmittedSegXmitTime(y.(unixTime)) }) + stateSourceObject.AfterLoad(s.afterLoad) +} + +func (r *rtt) StateTypeName() string { return "pkg/tcpip/transport/tcp.rtt" } -func (x *rtt) StateFields() []string { +func (r *rtt) StateFields() []string { return []string{ "srtt", "rttvar", @@ -766,28 +766,28 @@ func (x *rtt) StateFields() []string { } } -func (x *rtt) beforeSave() {} +func (r *rtt) beforeSave() {} -func (x *rtt) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.srtt) - m.Save(1, &x.rttvar) - m.Save(2, &x.srttInited) +func (r *rtt) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.srtt) + stateSinkObject.Save(1, &r.rttvar) + stateSinkObject.Save(2, &r.srttInited) } -func (x *rtt) afterLoad() {} +func (r *rtt) afterLoad() {} -func (x *rtt) StateLoad(m state.Source) { - m.Load(0, &x.srtt) - m.Load(1, &x.rttvar) - m.Load(2, &x.srttInited) +func (r *rtt) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.srtt) + stateSourceObject.Load(1, &r.rttvar) + stateSourceObject.Load(2, &r.srttInited) } -func (x *fastRecovery) StateTypeName() string { +func (f *fastRecovery) StateTypeName() string { return "pkg/tcpip/transport/tcp.fastRecovery" } -func (x *fastRecovery) StateFields() []string { +func (f *fastRecovery) StateFields() []string { return []string{ "active", "first", @@ -798,157 +798,157 @@ func (x *fastRecovery) StateFields() []string { } } -func (x *fastRecovery) beforeSave() {} +func (f *fastRecovery) beforeSave() {} -func (x *fastRecovery) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.active) - m.Save(1, &x.first) - m.Save(2, &x.last) - m.Save(3, &x.maxCwnd) - m.Save(4, &x.highRxt) - m.Save(5, &x.rescueRxt) +func (f *fastRecovery) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.active) + stateSinkObject.Save(1, &f.first) + stateSinkObject.Save(2, &f.last) + stateSinkObject.Save(3, &f.maxCwnd) + stateSinkObject.Save(4, &f.highRxt) + stateSinkObject.Save(5, &f.rescueRxt) } -func (x *fastRecovery) afterLoad() {} +func (f *fastRecovery) afterLoad() {} -func (x *fastRecovery) StateLoad(m state.Source) { - m.Load(0, &x.active) - m.Load(1, &x.first) - m.Load(2, &x.last) - m.Load(3, &x.maxCwnd) - m.Load(4, &x.highRxt) - m.Load(5, &x.rescueRxt) +func (f *fastRecovery) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.active) + stateSourceObject.Load(1, &f.first) + stateSourceObject.Load(2, &f.last) + stateSourceObject.Load(3, &f.maxCwnd) + stateSourceObject.Load(4, &f.highRxt) + stateSourceObject.Load(5, &f.rescueRxt) } -func (x *unixTime) StateTypeName() string { +func (u *unixTime) StateTypeName() string { return "pkg/tcpip/transport/tcp.unixTime" } -func (x *unixTime) StateFields() []string { +func (u *unixTime) StateFields() []string { return []string{ "second", "nano", } } -func (x *unixTime) beforeSave() {} +func (u *unixTime) beforeSave() {} -func (x *unixTime) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.second) - m.Save(1, &x.nano) +func (u *unixTime) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.second) + stateSinkObject.Save(1, &u.nano) } -func (x *unixTime) afterLoad() {} +func (u *unixTime) afterLoad() {} -func (x *unixTime) StateLoad(m state.Source) { - m.Load(0, &x.second) - m.Load(1, &x.nano) +func (u *unixTime) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.second) + stateSourceObject.Load(1, &u.nano) } -func (x *endpointList) StateTypeName() string { +func (e *endpointList) StateTypeName() string { return "pkg/tcpip/transport/tcp.endpointList" } -func (x *endpointList) StateFields() []string { +func (e *endpointList) StateFields() []string { return []string{ "head", "tail", } } -func (x *endpointList) beforeSave() {} +func (e *endpointList) beforeSave() {} -func (x *endpointList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (e *endpointList) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.head) + stateSinkObject.Save(1, &e.tail) } -func (x *endpointList) afterLoad() {} +func (e *endpointList) afterLoad() {} -func (x *endpointList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (e *endpointList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.head) + stateSourceObject.Load(1, &e.tail) } -func (x *endpointEntry) StateTypeName() string { +func (e *endpointEntry) StateTypeName() string { return "pkg/tcpip/transport/tcp.endpointEntry" } -func (x *endpointEntry) StateFields() []string { +func (e *endpointEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *endpointEntry) beforeSave() {} +func (e *endpointEntry) beforeSave() {} -func (x *endpointEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (e *endpointEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (x *endpointEntry) afterLoad() {} +func (e *endpointEntry) afterLoad() {} -func (x *endpointEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (e *endpointEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } -func (x *segmentList) StateTypeName() string { +func (s *segmentList) StateTypeName() string { return "pkg/tcpip/transport/tcp.segmentList" } -func (x *segmentList) StateFields() []string { +func (s *segmentList) StateFields() []string { return []string{ "head", "tail", } } -func (x *segmentList) beforeSave() {} +func (s *segmentList) beforeSave() {} -func (x *segmentList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (s *segmentList) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.head) + stateSinkObject.Save(1, &s.tail) } -func (x *segmentList) afterLoad() {} +func (s *segmentList) afterLoad() {} -func (x *segmentList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (s *segmentList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.head) + stateSourceObject.Load(1, &s.tail) } -func (x *segmentEntry) StateTypeName() string { +func (s *segmentEntry) StateTypeName() string { return "pkg/tcpip/transport/tcp.segmentEntry" } -func (x *segmentEntry) StateFields() []string { +func (s *segmentEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *segmentEntry) beforeSave() {} +func (s *segmentEntry) beforeSave() {} -func (x *segmentEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (s *segmentEntry) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.next) + stateSinkObject.Save(1, &s.prev) } -func (x *segmentEntry) afterLoad() {} +func (s *segmentEntry) afterLoad() {} -func (x *segmentEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (s *segmentEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.next) + stateSourceObject.Load(1, &s.prev) } func init() { diff --git a/pkg/tcpip/transport/udp/udp_state_autogen.go b/pkg/tcpip/transport/udp/udp_state_autogen.go index ce3b1df48..74cec739f 100644 --- a/pkg/tcpip/transport/udp/udp_state_autogen.go +++ b/pkg/tcpip/transport/udp/udp_state_autogen.go @@ -7,11 +7,11 @@ import ( "gvisor.dev/gvisor/pkg/tcpip/buffer" ) -func (x *udpPacket) StateTypeName() string { +func (u *udpPacket) StateTypeName() string { return "pkg/tcpip/transport/udp.udpPacket" } -func (x *udpPacket) StateFields() []string { +func (u *udpPacket) StateFields() []string { return []string{ "udpPacketEntry", "senderAddress", @@ -22,35 +22,35 @@ func (x *udpPacket) StateFields() []string { } } -func (x *udpPacket) beforeSave() {} +func (u *udpPacket) beforeSave() {} -func (x *udpPacket) StateSave(m state.Sink) { - x.beforeSave() - var data buffer.VectorisedView = x.saveData() - m.SaveValue(3, data) - m.Save(0, &x.udpPacketEntry) - m.Save(1, &x.senderAddress) - m.Save(2, &x.packetInfo) - m.Save(4, &x.timestamp) - m.Save(5, &x.tos) +func (u *udpPacket) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + var dataValue buffer.VectorisedView = u.saveData() + stateSinkObject.SaveValue(3, dataValue) + stateSinkObject.Save(0, &u.udpPacketEntry) + stateSinkObject.Save(1, &u.senderAddress) + stateSinkObject.Save(2, &u.packetInfo) + stateSinkObject.Save(4, &u.timestamp) + stateSinkObject.Save(5, &u.tos) } -func (x *udpPacket) afterLoad() {} +func (u *udpPacket) afterLoad() {} -func (x *udpPacket) StateLoad(m state.Source) { - m.Load(0, &x.udpPacketEntry) - m.Load(1, &x.senderAddress) - m.Load(2, &x.packetInfo) - m.Load(4, &x.timestamp) - m.Load(5, &x.tos) - m.LoadValue(3, new(buffer.VectorisedView), func(y interface{}) { x.loadData(y.(buffer.VectorisedView)) }) +func (u *udpPacket) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.udpPacketEntry) + stateSourceObject.Load(1, &u.senderAddress) + stateSourceObject.Load(2, &u.packetInfo) + stateSourceObject.Load(4, &u.timestamp) + stateSourceObject.Load(5, &u.tos) + stateSourceObject.LoadValue(3, new(buffer.VectorisedView), func(y interface{}) { u.loadData(y.(buffer.VectorisedView)) }) } -func (x *endpoint) StateTypeName() string { +func (e *endpoint) StateTypeName() string { return "pkg/tcpip/transport/udp.endpoint" } -func (x *endpoint) StateFields() []string { +func (e *endpoint) StateFields() []string { return []string{ "TransportEndpointInfo", "waiterQueue", @@ -89,160 +89,160 @@ func (x *endpoint) StateFields() []string { } } -func (x *endpoint) StateSave(m state.Sink) { - x.beforeSave() - var rcvBufSizeMax int = x.saveRcvBufSizeMax() - m.SaveValue(5, rcvBufSizeMax) - var lastError string = x.saveLastError() - m.SaveValue(22, lastError) - m.Save(0, &x.TransportEndpointInfo) - m.Save(1, &x.waiterQueue) - m.Save(2, &x.uniqueID) - m.Save(3, &x.rcvReady) - m.Save(4, &x.rcvList) - m.Save(6, &x.rcvBufSize) - m.Save(7, &x.rcvClosed) - m.Save(8, &x.sndBufSize) - m.Save(9, &x.sndBufSizeMax) - m.Save(10, &x.state) - m.Save(11, &x.dstPort) - m.Save(12, &x.v6only) - m.Save(13, &x.ttl) - m.Save(14, &x.multicastTTL) - m.Save(15, &x.multicastAddr) - m.Save(16, &x.multicastNICID) - m.Save(17, &x.multicastLoop) - m.Save(18, &x.portFlags) - m.Save(19, &x.bindToDevice) - m.Save(20, &x.broadcast) - m.Save(21, &x.noChecksum) - m.Save(23, &x.boundBindToDevice) - m.Save(24, &x.boundPortFlags) - m.Save(25, &x.sendTOS) - m.Save(26, &x.receiveTOS) - m.Save(27, &x.receiveTClass) - m.Save(28, &x.receiveIPPacketInfo) - m.Save(29, &x.shutdownFlags) - m.Save(30, &x.multicastMemberships) - m.Save(31, &x.effectiveNetProtos) - m.Save(32, &x.owner) - m.Save(33, &x.linger) -} - -func (x *endpoint) StateLoad(m state.Source) { - m.Load(0, &x.TransportEndpointInfo) - m.Load(1, &x.waiterQueue) - m.Load(2, &x.uniqueID) - m.Load(3, &x.rcvReady) - m.Load(4, &x.rcvList) - m.Load(6, &x.rcvBufSize) - m.Load(7, &x.rcvClosed) - m.Load(8, &x.sndBufSize) - m.Load(9, &x.sndBufSizeMax) - m.Load(10, &x.state) - m.Load(11, &x.dstPort) - m.Load(12, &x.v6only) - m.Load(13, &x.ttl) - m.Load(14, &x.multicastTTL) - m.Load(15, &x.multicastAddr) - m.Load(16, &x.multicastNICID) - m.Load(17, &x.multicastLoop) - m.Load(18, &x.portFlags) - m.Load(19, &x.bindToDevice) - m.Load(20, &x.broadcast) - m.Load(21, &x.noChecksum) - m.Load(23, &x.boundBindToDevice) - m.Load(24, &x.boundPortFlags) - m.Load(25, &x.sendTOS) - m.Load(26, &x.receiveTOS) - m.Load(27, &x.receiveTClass) - m.Load(28, &x.receiveIPPacketInfo) - m.Load(29, &x.shutdownFlags) - m.Load(30, &x.multicastMemberships) - m.Load(31, &x.effectiveNetProtos) - m.Load(32, &x.owner) - m.Load(33, &x.linger) - m.LoadValue(5, new(int), func(y interface{}) { x.loadRcvBufSizeMax(y.(int)) }) - m.LoadValue(22, new(string), func(y interface{}) { x.loadLastError(y.(string)) }) - m.AfterLoad(x.afterLoad) -} - -func (x *multicastMembership) StateTypeName() string { +func (e *endpoint) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + var rcvBufSizeMaxValue int = e.saveRcvBufSizeMax() + stateSinkObject.SaveValue(5, rcvBufSizeMaxValue) + var lastErrorValue string = e.saveLastError() + stateSinkObject.SaveValue(22, lastErrorValue) + stateSinkObject.Save(0, &e.TransportEndpointInfo) + stateSinkObject.Save(1, &e.waiterQueue) + stateSinkObject.Save(2, &e.uniqueID) + stateSinkObject.Save(3, &e.rcvReady) + stateSinkObject.Save(4, &e.rcvList) + stateSinkObject.Save(6, &e.rcvBufSize) + stateSinkObject.Save(7, &e.rcvClosed) + stateSinkObject.Save(8, &e.sndBufSize) + stateSinkObject.Save(9, &e.sndBufSizeMax) + stateSinkObject.Save(10, &e.state) + stateSinkObject.Save(11, &e.dstPort) + stateSinkObject.Save(12, &e.v6only) + stateSinkObject.Save(13, &e.ttl) + stateSinkObject.Save(14, &e.multicastTTL) + stateSinkObject.Save(15, &e.multicastAddr) + stateSinkObject.Save(16, &e.multicastNICID) + stateSinkObject.Save(17, &e.multicastLoop) + stateSinkObject.Save(18, &e.portFlags) + stateSinkObject.Save(19, &e.bindToDevice) + stateSinkObject.Save(20, &e.broadcast) + stateSinkObject.Save(21, &e.noChecksum) + stateSinkObject.Save(23, &e.boundBindToDevice) + stateSinkObject.Save(24, &e.boundPortFlags) + stateSinkObject.Save(25, &e.sendTOS) + stateSinkObject.Save(26, &e.receiveTOS) + stateSinkObject.Save(27, &e.receiveTClass) + stateSinkObject.Save(28, &e.receiveIPPacketInfo) + stateSinkObject.Save(29, &e.shutdownFlags) + stateSinkObject.Save(30, &e.multicastMemberships) + stateSinkObject.Save(31, &e.effectiveNetProtos) + stateSinkObject.Save(32, &e.owner) + stateSinkObject.Save(33, &e.linger) +} + +func (e *endpoint) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.TransportEndpointInfo) + stateSourceObject.Load(1, &e.waiterQueue) + stateSourceObject.Load(2, &e.uniqueID) + stateSourceObject.Load(3, &e.rcvReady) + stateSourceObject.Load(4, &e.rcvList) + stateSourceObject.Load(6, &e.rcvBufSize) + stateSourceObject.Load(7, &e.rcvClosed) + stateSourceObject.Load(8, &e.sndBufSize) + stateSourceObject.Load(9, &e.sndBufSizeMax) + stateSourceObject.Load(10, &e.state) + stateSourceObject.Load(11, &e.dstPort) + stateSourceObject.Load(12, &e.v6only) + stateSourceObject.Load(13, &e.ttl) + stateSourceObject.Load(14, &e.multicastTTL) + stateSourceObject.Load(15, &e.multicastAddr) + stateSourceObject.Load(16, &e.multicastNICID) + stateSourceObject.Load(17, &e.multicastLoop) + stateSourceObject.Load(18, &e.portFlags) + stateSourceObject.Load(19, &e.bindToDevice) + stateSourceObject.Load(20, &e.broadcast) + stateSourceObject.Load(21, &e.noChecksum) + stateSourceObject.Load(23, &e.boundBindToDevice) + stateSourceObject.Load(24, &e.boundPortFlags) + stateSourceObject.Load(25, &e.sendTOS) + stateSourceObject.Load(26, &e.receiveTOS) + stateSourceObject.Load(27, &e.receiveTClass) + stateSourceObject.Load(28, &e.receiveIPPacketInfo) + stateSourceObject.Load(29, &e.shutdownFlags) + stateSourceObject.Load(30, &e.multicastMemberships) + stateSourceObject.Load(31, &e.effectiveNetProtos) + stateSourceObject.Load(32, &e.owner) + stateSourceObject.Load(33, &e.linger) + stateSourceObject.LoadValue(5, new(int), func(y interface{}) { e.loadRcvBufSizeMax(y.(int)) }) + stateSourceObject.LoadValue(22, new(string), func(y interface{}) { e.loadLastError(y.(string)) }) + stateSourceObject.AfterLoad(e.afterLoad) +} + +func (m *multicastMembership) StateTypeName() string { return "pkg/tcpip/transport/udp.multicastMembership" } -func (x *multicastMembership) StateFields() []string { +func (m *multicastMembership) StateFields() []string { return []string{ "nicID", "multicastAddr", } } -func (x *multicastMembership) beforeSave() {} +func (m *multicastMembership) beforeSave() {} -func (x *multicastMembership) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.nicID) - m.Save(1, &x.multicastAddr) +func (m *multicastMembership) StateSave(stateSinkObject state.Sink) { + m.beforeSave() + stateSinkObject.Save(0, &m.nicID) + stateSinkObject.Save(1, &m.multicastAddr) } -func (x *multicastMembership) afterLoad() {} +func (m *multicastMembership) afterLoad() {} -func (x *multicastMembership) StateLoad(m state.Source) { - m.Load(0, &x.nicID) - m.Load(1, &x.multicastAddr) +func (m *multicastMembership) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &m.nicID) + stateSourceObject.Load(1, &m.multicastAddr) } -func (x *udpPacketList) StateTypeName() string { +func (u *udpPacketList) StateTypeName() string { return "pkg/tcpip/transport/udp.udpPacketList" } -func (x *udpPacketList) StateFields() []string { +func (u *udpPacketList) StateFields() []string { return []string{ "head", "tail", } } -func (x *udpPacketList) beforeSave() {} +func (u *udpPacketList) beforeSave() {} -func (x *udpPacketList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (u *udpPacketList) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.head) + stateSinkObject.Save(1, &u.tail) } -func (x *udpPacketList) afterLoad() {} +func (u *udpPacketList) afterLoad() {} -func (x *udpPacketList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (u *udpPacketList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.head) + stateSourceObject.Load(1, &u.tail) } -func (x *udpPacketEntry) StateTypeName() string { +func (u *udpPacketEntry) StateTypeName() string { return "pkg/tcpip/transport/udp.udpPacketEntry" } -func (x *udpPacketEntry) StateFields() []string { +func (u *udpPacketEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *udpPacketEntry) beforeSave() {} +func (u *udpPacketEntry) beforeSave() {} -func (x *udpPacketEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (u *udpPacketEntry) StateSave(stateSinkObject state.Sink) { + u.beforeSave() + stateSinkObject.Save(0, &u.next) + stateSinkObject.Save(1, &u.prev) } -func (x *udpPacketEntry) afterLoad() {} +func (u *udpPacketEntry) afterLoad() {} -func (x *udpPacketEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (u *udpPacketEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &u.next) + stateSourceObject.Load(1, &u.prev) } func init() { diff --git a/pkg/usermem/usermem_state_autogen.go b/pkg/usermem/usermem_state_autogen.go index d0c854254..9ea1da43e 100644 --- a/pkg/usermem/usermem_state_autogen.go +++ b/pkg/usermem/usermem_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *AccessType) StateTypeName() string { +func (a *AccessType) StateTypeName() string { return "pkg/usermem.AccessType" } -func (x *AccessType) StateFields() []string { +func (a *AccessType) StateFields() []string { return []string{ "Read", "Write", @@ -18,55 +18,55 @@ func (x *AccessType) StateFields() []string { } } -func (x *AccessType) beforeSave() {} +func (a *AccessType) beforeSave() {} -func (x *AccessType) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Read) - m.Save(1, &x.Write) - m.Save(2, &x.Execute) +func (a *AccessType) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.Read) + stateSinkObject.Save(1, &a.Write) + stateSinkObject.Save(2, &a.Execute) } -func (x *AccessType) afterLoad() {} +func (a *AccessType) afterLoad() {} -func (x *AccessType) StateLoad(m state.Source) { - m.Load(0, &x.Read) - m.Load(1, &x.Write) - m.Load(2, &x.Execute) +func (a *AccessType) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.Read) + stateSourceObject.Load(1, &a.Write) + stateSourceObject.Load(2, &a.Execute) } -func (x *Addr) StateTypeName() string { +func (a *Addr) StateTypeName() string { return "pkg/usermem.Addr" } -func (x *Addr) StateFields() []string { +func (a *Addr) StateFields() []string { return nil } -func (x *AddrRange) StateTypeName() string { +func (a *AddrRange) StateTypeName() string { return "pkg/usermem.AddrRange" } -func (x *AddrRange) StateFields() []string { +func (a *AddrRange) StateFields() []string { return []string{ "Start", "End", } } -func (x *AddrRange) beforeSave() {} +func (a *AddrRange) beforeSave() {} -func (x *AddrRange) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Start) - m.Save(1, &x.End) +func (a *AddrRange) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.Start) + stateSinkObject.Save(1, &a.End) } -func (x *AddrRange) afterLoad() {} +func (a *AddrRange) afterLoad() {} -func (x *AddrRange) StateLoad(m state.Source) { - m.Load(0, &x.Start) - m.Load(1, &x.End) +func (a *AddrRange) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.Start) + stateSourceObject.Load(1, &a.End) } func init() { diff --git a/pkg/waiter/waiter_state_autogen.go b/pkg/waiter/waiter_state_autogen.go index 2a2321a67..8110a621c 100644 --- a/pkg/waiter/waiter_state_autogen.go +++ b/pkg/waiter/waiter_state_autogen.go @@ -6,11 +6,11 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (x *Entry) StateTypeName() string { +func (e *Entry) StateTypeName() string { return "pkg/waiter.Entry" } -func (x *Entry) StateFields() []string { +func (e *Entry) StateFields() []string { return []string{ "Callback", "mask", @@ -18,95 +18,95 @@ func (x *Entry) StateFields() []string { } } -func (x *Entry) beforeSave() {} +func (e *Entry) beforeSave() {} -func (x *Entry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.Callback) - m.Save(1, &x.mask) - m.Save(2, &x.waiterEntry) +func (e *Entry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.Callback) + stateSinkObject.Save(1, &e.mask) + stateSinkObject.Save(2, &e.waiterEntry) } -func (x *Entry) afterLoad() {} +func (e *Entry) afterLoad() {} -func (x *Entry) StateLoad(m state.Source) { - m.Load(0, &x.Callback) - m.Load(1, &x.mask) - m.Load(2, &x.waiterEntry) +func (e *Entry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.Callback) + stateSourceObject.Load(1, &e.mask) + stateSourceObject.Load(2, &e.waiterEntry) } -func (x *Queue) StateTypeName() string { +func (q *Queue) StateTypeName() string { return "pkg/waiter.Queue" } -func (x *Queue) StateFields() []string { +func (q *Queue) StateFields() []string { return []string{} } -func (x *Queue) beforeSave() {} +func (q *Queue) beforeSave() {} -func (x *Queue) StateSave(m state.Sink) { - x.beforeSave() - if !state.IsZeroValue(&x.list) { - state.Failf("list is %#v, expected zero", &x.list) +func (q *Queue) StateSave(stateSinkObject state.Sink) { + q.beforeSave() + if !state.IsZeroValue(&q.list) { + state.Failf("list is %#v, expected zero", &q.list) } } -func (x *Queue) afterLoad() {} +func (q *Queue) afterLoad() {} -func (x *Queue) StateLoad(m state.Source) { +func (q *Queue) StateLoad(stateSourceObject state.Source) { } -func (x *waiterList) StateTypeName() string { +func (w *waiterList) StateTypeName() string { return "pkg/waiter.waiterList" } -func (x *waiterList) StateFields() []string { +func (w *waiterList) StateFields() []string { return []string{ "head", "tail", } } -func (x *waiterList) beforeSave() {} +func (w *waiterList) beforeSave() {} -func (x *waiterList) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.head) - m.Save(1, &x.tail) +func (w *waiterList) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.head) + stateSinkObject.Save(1, &w.tail) } -func (x *waiterList) afterLoad() {} +func (w *waiterList) afterLoad() {} -func (x *waiterList) StateLoad(m state.Source) { - m.Load(0, &x.head) - m.Load(1, &x.tail) +func (w *waiterList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.head) + stateSourceObject.Load(1, &w.tail) } -func (x *waiterEntry) StateTypeName() string { +func (w *waiterEntry) StateTypeName() string { return "pkg/waiter.waiterEntry" } -func (x *waiterEntry) StateFields() []string { +func (w *waiterEntry) StateFields() []string { return []string{ "next", "prev", } } -func (x *waiterEntry) beforeSave() {} +func (w *waiterEntry) beforeSave() {} -func (x *waiterEntry) StateSave(m state.Sink) { - x.beforeSave() - m.Save(0, &x.next) - m.Save(1, &x.prev) +func (w *waiterEntry) StateSave(stateSinkObject state.Sink) { + w.beforeSave() + stateSinkObject.Save(0, &w.next) + stateSinkObject.Save(1, &w.prev) } -func (x *waiterEntry) afterLoad() {} +func (w *waiterEntry) afterLoad() {} -func (x *waiterEntry) StateLoad(m state.Source) { - m.Load(0, &x.next) - m.Load(1, &x.prev) +func (w *waiterEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &w.next) + stateSourceObject.Load(1, &w.prev) } func init() { |