diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-10-09 19:26:05 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-10-09 19:26:05 +0000 |
commit | 69aa120d401c6d6028aebe4c050cefb4794a60f1 (patch) | |
tree | 9b57d56a75d3900b35c7814bf1417057f8fac933 /pkg/sentry/fsimpl | |
parent | 578aece760dd47a06a686f82efab5b650807d4c5 (diff) | |
parent | 743327817faa1aa46ff3b31f74a0c5c2d047d65a (diff) |
Merge release-20200928.0-78-g743327817 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl')
-rw-r--r-- | pkg/sentry/fsimpl/devpts/devpts_state_autogen.go | 308 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/devtmpfs/devtmpfs_state_autogen.go | 26 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/eventfd/eventfd_state_autogen.go | 46 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/fuse/fuse_state_autogen.go | 298 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/gofer/gofer_state_autogen.go | 238 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/host/host_state_autogen.go | 58 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go | 308 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/overlay/overlay_state_autogen.go | 142 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go | 22 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/proc/proc_state_autogen.go | 1304 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/signalfd/signalfd_state_autogen.go | 38 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go | 36 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/sys/sys_state_autogen.go | 122 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go | 44 | ||||
-rw-r--r-- | pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go | 278 |
15 files changed, 1634 insertions, 1634 deletions
diff --git a/pkg/sentry/fsimpl/devpts/devpts_state_autogen.go b/pkg/sentry/fsimpl/devpts/devpts_state_autogen.go index d02c88a3b..d2c9ffa7d 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 (f *FilesystemType) StateTypeName() string { +func (fstype *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.FilesystemType" } -func (f *FilesystemType) StateFields() []string { +func (fstype *FilesystemType) StateFields() []string { return []string{} } -func (f *FilesystemType) beforeSave() {} +func (fstype *FilesystemType) beforeSave() {} -func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { - f.beforeSave() +func (fstype *FilesystemType) StateSave(stateSinkObject state.Sink) { + fstype.beforeSave() } -func (f *FilesystemType) afterLoad() {} +func (fstype *FilesystemType) afterLoad() {} -func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { +func (fstype *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -func (f *filesystem) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.Filesystem) - stateSinkObject.Save(1, &f.devMinor) +func (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.Filesystem) + stateSinkObject.Save(1, &fs.devMinor) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -func (f *filesystem) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.Filesystem) - stateSourceObject.Load(1, &f.devMinor) +func (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.Filesystem) + stateSourceObject.Load(1, &fs.devMinor) } -func (r *rootInode) StateTypeName() string { +func (i *rootInode) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.rootInode" } -func (r *rootInode) StateFields() []string { +func (i *rootInode) StateFields() []string { return []string{ "implStatFS", "AlwaysValid", @@ -73,41 +73,41 @@ func (r *rootInode) StateFields() []string { } } -func (r *rootInode) beforeSave() {} +func (i *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 *rootInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.implStatFS) + stateSinkObject.Save(1, &i.AlwaysValid) + stateSinkObject.Save(2, &i.InodeAttrs) + stateSinkObject.Save(3, &i.InodeDirectoryNoNewChildren) + stateSinkObject.Save(4, &i.InodeNotSymlink) + stateSinkObject.Save(5, &i.OrderedChildren) + stateSinkObject.Save(6, &i.rootInodeRefs) + stateSinkObject.Save(7, &i.locks) + stateSinkObject.Save(8, &i.dentry) + stateSinkObject.Save(9, &i.master) + stateSinkObject.Save(10, &i.root) + stateSinkObject.Save(11, &i.replicas) + stateSinkObject.Save(12, &i.nextIdx) +} + +func (i *rootInode) afterLoad() {} + +func (i *rootInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.implStatFS) + stateSourceObject.Load(1, &i.AlwaysValid) + stateSourceObject.Load(2, &i.InodeAttrs) + stateSourceObject.Load(3, &i.InodeDirectoryNoNewChildren) + stateSourceObject.Load(4, &i.InodeNotSymlink) + stateSourceObject.Load(5, &i.OrderedChildren) + stateSourceObject.Load(6, &i.rootInodeRefs) + stateSourceObject.Load(7, &i.locks) + stateSourceObject.Load(8, &i.dentry) + stateSourceObject.Load(9, &i.master) + stateSourceObject.Load(10, &i.root) + stateSourceObject.Load(11, &i.replicas) + stateSourceObject.Load(12, &i.nextIdx) } func (i *implStatFS) StateTypeName() string { @@ -208,11 +208,11 @@ func (i *inputQueueTransformer) afterLoad() {} func (i *inputQueueTransformer) StateLoad(stateSourceObject state.Source) { } -func (m *masterInode) StateTypeName() string { +func (mi *masterInode) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.masterInode" } -func (m *masterInode) StateFields() []string { +func (mi *masterInode) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -225,38 +225,38 @@ func (m *masterInode) StateFields() []string { } } -func (m *masterInode) beforeSave() {} +func (mi *masterInode) beforeSave() {} -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 (mi *masterInode) StateSave(stateSinkObject state.Sink) { + mi.beforeSave() + stateSinkObject.Save(0, &mi.implStatFS) + stateSinkObject.Save(1, &mi.InodeAttrs) + stateSinkObject.Save(2, &mi.InodeNoopRefCount) + stateSinkObject.Save(3, &mi.InodeNotDirectory) + stateSinkObject.Save(4, &mi.InodeNotSymlink) + stateSinkObject.Save(5, &mi.locks) + stateSinkObject.Save(6, &mi.dentry) + stateSinkObject.Save(7, &mi.root) } -func (m *masterInode) afterLoad() {} +func (mi *masterInode) afterLoad() {} -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 (mi *masterInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &mi.implStatFS) + stateSourceObject.Load(1, &mi.InodeAttrs) + stateSourceObject.Load(2, &mi.InodeNoopRefCount) + stateSourceObject.Load(3, &mi.InodeNotDirectory) + stateSourceObject.Load(4, &mi.InodeNotSymlink) + stateSourceObject.Load(5, &mi.locks) + stateSourceObject.Load(6, &mi.dentry) + stateSourceObject.Load(7, &mi.root) } -func (m *masterFileDescription) StateTypeName() string { +func (mfd *masterFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.masterFileDescription" } -func (m *masterFileDescription) StateFields() []string { +func (mfd *masterFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -266,25 +266,25 @@ func (m *masterFileDescription) StateFields() []string { } } -func (m *masterFileDescription) beforeSave() {} +func (mfd *masterFileDescription) beforeSave() {} -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 (mfd *masterFileDescription) StateSave(stateSinkObject state.Sink) { + mfd.beforeSave() + stateSinkObject.Save(0, &mfd.vfsfd) + stateSinkObject.Save(1, &mfd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &mfd.LockFD) + stateSinkObject.Save(3, &mfd.inode) + stateSinkObject.Save(4, &mfd.t) } -func (m *masterFileDescription) afterLoad() {} +func (mfd *masterFileDescription) afterLoad() {} -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 (mfd *masterFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &mfd.vfsfd) + stateSourceObject.Load(1, &mfd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &mfd.LockFD) + stateSourceObject.Load(3, &mfd.inode) + stateSourceObject.Load(4, &mfd.t) } func (q *queue) StateTypeName() string { @@ -322,11 +322,11 @@ func (q *queue) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(4, &q.transformer) } -func (r *replicaInode) StateTypeName() string { +func (ri *replicaInode) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.replicaInode" } -func (r *replicaInode) StateFields() []string { +func (ri *replicaInode) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -340,40 +340,40 @@ func (r *replicaInode) StateFields() []string { } } -func (r *replicaInode) beforeSave() {} +func (ri *replicaInode) beforeSave() {} -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 (r *replicaInode) afterLoad() {} - -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 (r *replicaFileDescription) StateTypeName() string { +func (ri *replicaInode) StateSave(stateSinkObject state.Sink) { + ri.beforeSave() + stateSinkObject.Save(0, &ri.implStatFS) + stateSinkObject.Save(1, &ri.InodeAttrs) + stateSinkObject.Save(2, &ri.InodeNoopRefCount) + stateSinkObject.Save(3, &ri.InodeNotDirectory) + stateSinkObject.Save(4, &ri.InodeNotSymlink) + stateSinkObject.Save(5, &ri.locks) + stateSinkObject.Save(6, &ri.dentry) + stateSinkObject.Save(7, &ri.root) + stateSinkObject.Save(8, &ri.t) +} + +func (ri *replicaInode) afterLoad() {} + +func (ri *replicaInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &ri.implStatFS) + stateSourceObject.Load(1, &ri.InodeAttrs) + stateSourceObject.Load(2, &ri.InodeNoopRefCount) + stateSourceObject.Load(3, &ri.InodeNotDirectory) + stateSourceObject.Load(4, &ri.InodeNotSymlink) + stateSourceObject.Load(5, &ri.locks) + stateSourceObject.Load(6, &ri.dentry) + stateSourceObject.Load(7, &ri.root) + stateSourceObject.Load(8, &ri.t) +} + +func (rfd *replicaFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.replicaFileDescription" } -func (r *replicaFileDescription) StateFields() []string { +func (rfd *replicaFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -382,23 +382,23 @@ func (r *replicaFileDescription) StateFields() []string { } } -func (r *replicaFileDescription) beforeSave() {} +func (rfd *replicaFileDescription) beforeSave() {} -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 (rfd *replicaFileDescription) StateSave(stateSinkObject state.Sink) { + rfd.beforeSave() + stateSinkObject.Save(0, &rfd.vfsfd) + stateSinkObject.Save(1, &rfd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &rfd.LockFD) + stateSinkObject.Save(3, &rfd.inode) } -func (r *replicaFileDescription) afterLoad() {} +func (rfd *replicaFileDescription) afterLoad() {} -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 (rfd *replicaFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &rfd.vfsfd) + stateSourceObject.Load(1, &rfd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &rfd.LockFD) + stateSourceObject.Load(3, &rfd.inode) } func (r *rootInodeRefs) StateTypeName() string { @@ -424,11 +424,11 @@ func (r *rootInodeRefs) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.refCount) } -func (t *Terminal) StateTypeName() string { +func (tm *Terminal) StateTypeName() string { return "pkg/sentry/fsimpl/devpts.Terminal" } -func (t *Terminal) StateFields() []string { +func (tm *Terminal) StateFields() []string { return []string{ "n", "ld", @@ -437,23 +437,23 @@ func (t *Terminal) StateFields() []string { } } -func (t *Terminal) beforeSave() {} +func (tm *Terminal) beforeSave() {} -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 (tm *Terminal) StateSave(stateSinkObject state.Sink) { + tm.beforeSave() + stateSinkObject.Save(0, &tm.n) + stateSinkObject.Save(1, &tm.ld) + stateSinkObject.Save(2, &tm.masterKTTY) + stateSinkObject.Save(3, &tm.replicaKTTY) } -func (t *Terminal) afterLoad() {} +func (tm *Terminal) afterLoad() {} -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 (tm *Terminal) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &tm.n) + stateSourceObject.Load(1, &tm.ld) + stateSourceObject.Load(2, &tm.masterKTTY) + stateSourceObject.Load(3, &tm.replicaKTTY) } func init() { diff --git a/pkg/sentry/fsimpl/devtmpfs/devtmpfs_state_autogen.go b/pkg/sentry/fsimpl/devtmpfs/devtmpfs_state_autogen.go index b9885df45..86033019a 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 (f *FilesystemType) StateTypeName() string { +func (fst *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/devtmpfs.FilesystemType" } -func (f *FilesystemType) StateFields() []string { +func (fst *FilesystemType) StateFields() []string { return []string{ "initErr", "fs", @@ -18,21 +18,21 @@ func (f *FilesystemType) StateFields() []string { } } -func (f *FilesystemType) beforeSave() {} +func (fst *FilesystemType) beforeSave() {} -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 (fst *FilesystemType) StateSave(stateSinkObject state.Sink) { + fst.beforeSave() + stateSinkObject.Save(0, &fst.initErr) + stateSinkObject.Save(1, &fst.fs) + stateSinkObject.Save(2, &fst.root) } -func (f *FilesystemType) afterLoad() {} +func (fst *FilesystemType) afterLoad() {} -func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.initErr) - stateSourceObject.Load(1, &f.fs) - stateSourceObject.Load(2, &f.root) +func (fst *FilesystemType) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fst.initErr) + stateSourceObject.Load(1, &fst.fs) + stateSourceObject.Load(2, &fst.root) } func init() { diff --git a/pkg/sentry/fsimpl/eventfd/eventfd_state_autogen.go b/pkg/sentry/fsimpl/eventfd/eventfd_state_autogen.go index 3de6bc3bb..1c19f900a 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 (e *EventFileDescription) StateTypeName() string { +func (efd *EventFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/eventfd.EventFileDescription" } -func (e *EventFileDescription) StateFields() []string { +func (efd *EventFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -22,32 +22,32 @@ func (e *EventFileDescription) StateFields() []string { } } -func (e *EventFileDescription) beforeSave() {} +func (efd *EventFileDescription) beforeSave() {} -func (e *EventFileDescription) StateSave(stateSinkObject state.Sink) { - e.beforeSave() - if !state.IsZeroValue(&e.queue) { - state.Failf("queue is %#v, expected zero", &e.queue) +func (efd *EventFileDescription) StateSave(stateSinkObject state.Sink) { + efd.beforeSave() + if !state.IsZeroValue(&efd.queue) { + state.Failf("queue is %#v, expected zero", &efd.queue) } - 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) + stateSinkObject.Save(0, &efd.vfsfd) + stateSinkObject.Save(1, &efd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &efd.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &efd.NoLockFD) + stateSinkObject.Save(4, &efd.val) + stateSinkObject.Save(5, &efd.semMode) + stateSinkObject.Save(6, &efd.hostfd) } -func (e *EventFileDescription) afterLoad() {} +func (efd *EventFileDescription) afterLoad() {} -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 (efd *EventFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &efd.vfsfd) + stateSourceObject.Load(1, &efd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &efd.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &efd.NoLockFD) + stateSourceObject.Load(4, &efd.val) + stateSourceObject.Load(5, &efd.semMode) + stateSourceObject.Load(6, &efd.hostfd) } func init() { diff --git a/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go b/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go index fc0da410c..3c189317f 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 (c *connection) StateTypeName() string { +func (conn *connection) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.connection" } -func (c *connection) StateFields() []string { +func (conn *connection) StateFields() []string { return []string{ "fd", "attributeVersion", @@ -37,60 +37,60 @@ func (c *connection) StateFields() []string { } } -func (c *connection) beforeSave() {} +func (conn *connection) beforeSave() {} -func (c *connection) StateSave(stateSinkObject state.Sink) { - c.beforeSave() - var initializedChanValue bool = c.saveInitializedChan() +func (conn *connection) StateSave(stateSinkObject state.Sink) { + conn.beforeSave() + var initializedChanValue bool = conn.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)) }) + stateSinkObject.Save(0, &conn.fd) + stateSinkObject.Save(1, &conn.attributeVersion) + stateSinkObject.Save(2, &conn.initialized) + stateSinkObject.Save(4, &conn.connected) + stateSinkObject.Save(5, &conn.connInitError) + stateSinkObject.Save(6, &conn.connInitSuccess) + stateSinkObject.Save(7, &conn.aborted) + stateSinkObject.Save(8, &conn.numWaiting) + stateSinkObject.Save(9, &conn.asyncNum) + stateSinkObject.Save(10, &conn.asyncCongestionThreshold) + stateSinkObject.Save(11, &conn.asyncNumMax) + stateSinkObject.Save(12, &conn.maxRead) + stateSinkObject.Save(13, &conn.maxWrite) + stateSinkObject.Save(14, &conn.maxPages) + stateSinkObject.Save(15, &conn.minor) + stateSinkObject.Save(16, &conn.atomicOTrunc) + stateSinkObject.Save(17, &conn.asyncRead) + stateSinkObject.Save(18, &conn.writebackCache) + stateSinkObject.Save(19, &conn.bigWrites) + stateSinkObject.Save(20, &conn.dontMask) + stateSinkObject.Save(21, &conn.noOpen) +} + +func (conn *connection) afterLoad() {} + +func (conn *connection) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &conn.fd) + stateSourceObject.Load(1, &conn.attributeVersion) + stateSourceObject.Load(2, &conn.initialized) + stateSourceObject.Load(4, &conn.connected) + stateSourceObject.Load(5, &conn.connInitError) + stateSourceObject.Load(6, &conn.connInitSuccess) + stateSourceObject.Load(7, &conn.aborted) + stateSourceObject.Load(8, &conn.numWaiting) + stateSourceObject.Load(9, &conn.asyncNum) + stateSourceObject.Load(10, &conn.asyncCongestionThreshold) + stateSourceObject.Load(11, &conn.asyncNumMax) + stateSourceObject.Load(12, &conn.maxRead) + stateSourceObject.Load(13, &conn.maxWrite) + stateSourceObject.Load(14, &conn.maxPages) + stateSourceObject.Load(15, &conn.minor) + stateSourceObject.Load(16, &conn.atomicOTrunc) + stateSourceObject.Load(17, &conn.asyncRead) + stateSourceObject.Load(18, &conn.writebackCache) + stateSourceObject.Load(19, &conn.bigWrites) + stateSourceObject.Load(20, &conn.dontMask) + stateSourceObject.Load(21, &conn.noOpen) + stateSourceObject.LoadValue(3, new(bool), func(y interface{}) { conn.loadInitializedChan(y.(bool)) }) } func (f *fuseDevice) StateTypeName() string { @@ -112,11 +112,11 @@ func (f *fuseDevice) afterLoad() {} func (f *fuseDevice) StateLoad(stateSourceObject state.Source) { } -func (d *DeviceFD) StateTypeName() string { +func (fd *DeviceFD) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.DeviceFD" } -func (d *DeviceFD) StateFields() []string { +func (fd *DeviceFD) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -135,63 +135,63 @@ func (d *DeviceFD) StateFields() []string { } } -func (d *DeviceFD) beforeSave() {} +func (fd *DeviceFD) beforeSave() {} -func (d *DeviceFD) StateSave(stateSinkObject state.Sink) { - d.beforeSave() - var fullQueueChValue int = d.saveFullQueueCh() +func (fd *DeviceFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + var fullQueueChValue int = fd.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 { + stateSinkObject.Save(0, &fd.vfsfd) + stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &fd.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &fd.NoLockFD) + stateSinkObject.Save(4, &fd.nextOpID) + stateSinkObject.Save(5, &fd.queue) + stateSinkObject.Save(6, &fd.numActiveRequests) + stateSinkObject.Save(7, &fd.completions) + stateSinkObject.Save(8, &fd.writeCursor) + stateSinkObject.Save(9, &fd.writeBuf) + stateSinkObject.Save(10, &fd.writeCursorFR) + stateSinkObject.Save(11, &fd.waitQueue) + stateSinkObject.Save(13, &fd.fs) +} + +func (fd *DeviceFD) afterLoad() {} + +func (fd *DeviceFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.vfsfd) + stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &fd.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &fd.NoLockFD) + stateSourceObject.Load(4, &fd.nextOpID) + stateSourceObject.Load(5, &fd.queue) + stateSourceObject.Load(6, &fd.numActiveRequests) + stateSourceObject.Load(7, &fd.completions) + stateSourceObject.Load(8, &fd.writeCursor) + stateSourceObject.Load(9, &fd.writeBuf) + stateSourceObject.Load(10, &fd.writeCursorFR) + stateSourceObject.Load(11, &fd.waitQueue) + stateSourceObject.Load(13, &fd.fs) + stateSourceObject.LoadValue(12, new(int), func(y interface{}) { fd.loadFullQueueCh(y.(int)) }) +} + +func (fsType *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.FilesystemType" } -func (f *FilesystemType) StateFields() []string { +func (fsType *FilesystemType) StateFields() []string { return []string{} } -func (f *FilesystemType) beforeSave() {} +func (fsType *FilesystemType) beforeSave() {} -func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { - f.beforeSave() +func (fsType *FilesystemType) StateSave(stateSinkObject state.Sink) { + fsType.beforeSave() } -func (f *FilesystemType) afterLoad() {} +func (fsType *FilesystemType) afterLoad() {} -func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { +func (fsType *FilesystemType) StateLoad(stateSourceObject state.Source) { } func (f *filesystemOptions) StateTypeName() string { @@ -229,11 +229,11 @@ func (f *filesystemOptions) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(4, &f.maxRead) } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", @@ -243,25 +243,25 @@ func (f *filesystem) StateFields() []string { } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -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 (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.Filesystem) + stateSinkObject.Save(1, &fs.devMinor) + stateSinkObject.Save(2, &fs.conn) + stateSinkObject.Save(3, &fs.opts) + stateSinkObject.Save(4, &fs.umounted) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -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 (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.Filesystem) + stateSourceObject.Load(1, &fs.devMinor) + stateSourceObject.Load(2, &fs.conn) + stateSourceObject.Load(3, &fs.opts) + stateSourceObject.Load(4, &fs.umounted) } func (i *inode) StateTypeName() string { @@ -332,79 +332,79 @@ func (i *inode) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(15, &i.link) } -func (i *inodeRefs) StateTypeName() string { +func (r *inodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.inodeRefs" } -func (i *inodeRefs) StateFields() []string { +func (r *inodeRefs) StateFields() []string { return []string{ "refCount", } } -func (i *inodeRefs) beforeSave() {} +func (r *inodeRefs) beforeSave() {} -func (i *inodeRefs) StateSave(stateSinkObject state.Sink) { - i.beforeSave() - stateSinkObject.Save(0, &i.refCount) +func (r *inodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (i *inodeRefs) afterLoad() {} +func (r *inodeRefs) afterLoad() {} -func (i *inodeRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &i.refCount) +func (r *inodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } -func (r *requestList) StateTypeName() string { +func (l *requestList) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.requestList" } -func (r *requestList) StateFields() []string { +func (l *requestList) StateFields() []string { return []string{ "head", "tail", } } -func (r *requestList) beforeSave() {} +func (l *requestList) beforeSave() {} -func (r *requestList) StateSave(stateSinkObject state.Sink) { - r.beforeSave() - stateSinkObject.Save(0, &r.head) - stateSinkObject.Save(1, &r.tail) +func (l *requestList) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.head) + stateSinkObject.Save(1, &l.tail) } -func (r *requestList) afterLoad() {} +func (l *requestList) afterLoad() {} -func (r *requestList) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &r.head) - stateSourceObject.Load(1, &r.tail) +func (l *requestList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.head) + stateSourceObject.Load(1, &l.tail) } -func (r *requestEntry) StateTypeName() string { +func (e *requestEntry) StateTypeName() string { return "pkg/sentry/fsimpl/fuse.requestEntry" } -func (r *requestEntry) StateFields() []string { +func (e *requestEntry) StateFields() []string { return []string{ "next", "prev", } } -func (r *requestEntry) beforeSave() {} +func (e *requestEntry) beforeSave() {} -func (r *requestEntry) StateSave(stateSinkObject state.Sink) { - r.beforeSave() - stateSinkObject.Save(0, &r.next) - stateSinkObject.Save(1, &r.prev) +func (e *requestEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (r *requestEntry) afterLoad() {} +func (e *requestEntry) afterLoad() {} -func (r *requestEntry) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &r.next) - stateSourceObject.Load(1, &r.prev) +func (e *requestEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } func (r *Request) StateTypeName() string { diff --git a/pkg/sentry/fsimpl/gofer/gofer_state_autogen.go b/pkg/sentry/fsimpl/gofer/gofer_state_autogen.go index 1316e29e5..4d8560b53 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 (d *dentryList) StateTypeName() string { +func (l *dentryList) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.dentryList" } -func (d *dentryList) StateFields() []string { +func (l *dentryList) StateFields() []string { return []string{ "head", "tail", } } -func (d *dentryList) beforeSave() {} +func (l *dentryList) beforeSave() {} -func (d *dentryList) StateSave(stateSinkObject state.Sink) { - d.beforeSave() - stateSinkObject.Save(0, &d.head) - stateSinkObject.Save(1, &d.tail) +func (l *dentryList) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.head) + stateSinkObject.Save(1, &l.tail) } -func (d *dentryList) afterLoad() {} +func (l *dentryList) afterLoad() {} -func (d *dentryList) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &d.head) - stateSourceObject.Load(1, &d.tail) +func (l *dentryList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.head) + stateSourceObject.Load(1, &l.tail) } -func (d *dentryEntry) StateTypeName() string { +func (e *dentryEntry) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.dentryEntry" } -func (d *dentryEntry) StateFields() []string { +func (e *dentryEntry) StateFields() []string { return []string{ "next", "prev", } } -func (d *dentryEntry) beforeSave() {} +func (e *dentryEntry) beforeSave() {} -func (d *dentryEntry) StateSave(stateSinkObject state.Sink) { - d.beforeSave() - stateSinkObject.Save(0, &d.next) - stateSinkObject.Save(1, &d.prev) +func (e *dentryEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (d *dentryEntry) afterLoad() {} +func (e *dentryEntry) afterLoad() {} -func (d *dentryEntry) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &d.next) - stateSourceObject.Load(1, &d.prev) +func (e *dentryEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } -func (d *directoryFD) StateTypeName() string { +func (fd *directoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.directoryFD" } -func (d *directoryFD) StateFields() []string { +func (fd *directoryFD) StateFields() []string { return []string{ "fileDescription", "DirectoryFileDescriptionDefaultImpl", @@ -71,49 +71,49 @@ func (d *directoryFD) StateFields() []string { } } -func (d *directoryFD) beforeSave() {} +func (fd *directoryFD) beforeSave() {} -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 (fd *directoryFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.fileDescription) + stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl) + stateSinkObject.Save(2, &fd.off) + stateSinkObject.Save(3, &fd.dirents) } -func (d *directoryFD) afterLoad() {} +func (fd *directoryFD) afterLoad() {} -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 (fd *directoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.fileDescription) + stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl) + stateSourceObject.Load(2, &fd.off) + stateSourceObject.Load(3, &fd.dirents) } -func (f *FilesystemType) StateTypeName() string { +func (fstype *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.FilesystemType" } -func (f *FilesystemType) StateFields() []string { +func (fstype *FilesystemType) StateFields() []string { return []string{} } -func (f *FilesystemType) beforeSave() {} +func (fstype *FilesystemType) beforeSave() {} -func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { - f.beforeSave() +func (fstype *FilesystemType) StateSave(stateSinkObject state.Sink) { + fstype.beforeSave() } -func (f *FilesystemType) afterLoad() {} +func (fstype *FilesystemType) afterLoad() {} -func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { +func (fstype *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "vfsfs", "mfp", @@ -129,37 +129,37 @@ func (f *filesystem) StateFields() []string { } } -func (f *filesystem) beforeSave() {} +func (fs *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 (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.vfsfs) + stateSinkObject.Save(1, &fs.mfp) + stateSinkObject.Save(2, &fs.opts) + stateSinkObject.Save(3, &fs.iopts) + stateSinkObject.Save(4, &fs.clock) + stateSinkObject.Save(5, &fs.devMinor) + stateSinkObject.Save(6, &fs.cachedDentries) + stateSinkObject.Save(7, &fs.cachedDentriesLen) + stateSinkObject.Save(8, &fs.syncableDentries) + stateSinkObject.Save(9, &fs.specialFileFDs) + stateSinkObject.Save(10, &fs.syntheticSeq) +} + +func (fs *filesystem) afterLoad() {} + +func (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.vfsfs) + stateSourceObject.Load(1, &fs.mfp) + stateSourceObject.Load(2, &fs.opts) + stateSourceObject.Load(3, &fs.iopts) + stateSourceObject.Load(4, &fs.clock) + stateSourceObject.Load(5, &fs.devMinor) + stateSourceObject.Load(6, &fs.cachedDentries) + stateSourceObject.Load(7, &fs.cachedDentriesLen) + stateSourceObject.Load(8, &fs.syncableDentries) + stateSourceObject.Load(9, &fs.specialFileFDs) + stateSourceObject.Load(10, &fs.syntheticSeq) } func (i *inodeNumber) StateTypeName() string { @@ -385,11 +385,11 @@ func (d *dentry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(34, &d.watches) } -func (f *fileDescription) StateTypeName() string { +func (fd *fileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.fileDescription" } -func (f *fileDescription) StateFields() []string { +func (fd *fileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -397,47 +397,47 @@ func (f *fileDescription) StateFields() []string { } } -func (f *fileDescription) beforeSave() {} +func (fd *fileDescription) beforeSave() {} -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 (fd *fileDescription) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.vfsfd) + stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &fd.LockFD) } -func (f *fileDescription) afterLoad() {} +func (fd *fileDescription) afterLoad() {} -func (f *fileDescription) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.vfsfd) - stateSourceObject.Load(1, &f.FileDescriptionDefaultImpl) - stateSourceObject.Load(2, &f.LockFD) +func (fd *fileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.vfsfd) + stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &fd.LockFD) } -func (r *regularFileFD) StateTypeName() string { +func (fd *regularFileFD) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.regularFileFD" } -func (r *regularFileFD) StateFields() []string { +func (fd *regularFileFD) StateFields() []string { return []string{ "fileDescription", "off", } } -func (r *regularFileFD) beforeSave() {} +func (fd *regularFileFD) beforeSave() {} -func (r *regularFileFD) StateSave(stateSinkObject state.Sink) { - r.beforeSave() - stateSinkObject.Save(0, &r.fileDescription) - stateSinkObject.Save(1, &r.off) +func (fd *regularFileFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.fileDescription) + stateSinkObject.Save(1, &fd.off) } -func (r *regularFileFD) afterLoad() {} +func (fd *regularFileFD) afterLoad() {} -func (r *regularFileFD) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &r.fileDescription) - stateSourceObject.Load(1, &r.off) +func (fd *regularFileFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.fileDescription) + stateSourceObject.Load(1, &fd.off) } func (d *dentryPlatformFile) StateTypeName() string { @@ -495,11 +495,11 @@ func (e *endpoint) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(1, &e.path) } -func (s *specialFileFD) StateTypeName() string { +func (fd *specialFileFD) StateTypeName() string { return "pkg/sentry/fsimpl/gofer.specialFileFD" } -func (s *specialFileFD) StateFields() []string { +func (fd *specialFileFD) StateFields() []string { return []string{ "fileDescription", "isRegularFile", @@ -510,27 +510,27 @@ func (s *specialFileFD) StateFields() []string { } } -func (s *specialFileFD) beforeSave() {} +func (fd *specialFileFD) beforeSave() {} -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 (fd *specialFileFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.fileDescription) + stateSinkObject.Save(1, &fd.isRegularFile) + stateSinkObject.Save(2, &fd.seekable) + stateSinkObject.Save(3, &fd.haveQueue) + stateSinkObject.Save(4, &fd.queue) + stateSinkObject.Save(5, &fd.off) } -func (s *specialFileFD) afterLoad() {} +func (fd *specialFileFD) afterLoad() {} -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 (fd *specialFileFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.fileDescription) + stateSourceObject.Load(1, &fd.isRegularFile) + stateSourceObject.Load(2, &fd.seekable) + stateSourceObject.Load(3, &fd.haveQueue) + stateSourceObject.Load(4, &fd.queue) + stateSourceObject.Load(5, &fd.off) } func init() { diff --git a/pkg/sentry/fsimpl/host/host_state_autogen.go b/pkg/sentry/fsimpl/host/host_state_autogen.go index 76a2fdbdd..c18cef145 100644 --- a/pkg/sentry/fsimpl/host/host_state_autogen.go +++ b/pkg/sentry/fsimpl/host/host_state_autogen.go @@ -6,27 +6,27 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (c *ConnectedEndpointRefs) StateTypeName() string { +func (r *ConnectedEndpointRefs) StateTypeName() string { return "pkg/sentry/fsimpl/host.ConnectedEndpointRefs" } -func (c *ConnectedEndpointRefs) StateFields() []string { +func (r *ConnectedEndpointRefs) StateFields() []string { return []string{ "refCount", } } -func (c *ConnectedEndpointRefs) beforeSave() {} +func (r *ConnectedEndpointRefs) beforeSave() {} -func (c *ConnectedEndpointRefs) StateSave(stateSinkObject state.Sink) { - c.beforeSave() - stateSinkObject.Save(0, &c.refCount) +func (r *ConnectedEndpointRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (c *ConnectedEndpointRefs) afterLoad() {} +func (r *ConnectedEndpointRefs) afterLoad() {} -func (c *ConnectedEndpointRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &c.refCount) +func (r *ConnectedEndpointRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } func (f *filesystemType) StateTypeName() string { @@ -48,30 +48,30 @@ func (f *filesystemType) afterLoad() {} func (f *filesystemType) StateLoad(stateSourceObject state.Source) { } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/host.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -func (f *filesystem) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.Filesystem) - stateSinkObject.Save(1, &f.devMinor) +func (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.Filesystem) + stateSinkObject.Save(1, &fs.devMinor) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -func (f *filesystem) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.Filesystem) - stateSourceObject.Load(1, &f.devMinor) +func (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.Filesystem) + stateSourceObject.Load(1, &fs.devMinor) } func (i *inode) StateTypeName() string { @@ -171,27 +171,27 @@ func (f *fileDescription) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(4, &f.offset) } -func (i *inodeRefs) StateTypeName() string { +func (r *inodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/host.inodeRefs" } -func (i *inodeRefs) StateFields() []string { +func (r *inodeRefs) StateFields() []string { return []string{ "refCount", } } -func (i *inodeRefs) beforeSave() {} +func (r *inodeRefs) beforeSave() {} -func (i *inodeRefs) StateSave(stateSinkObject state.Sink) { - i.beforeSave() - stateSinkObject.Save(0, &i.refCount) +func (r *inodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (i *inodeRefs) afterLoad() {} +func (r *inodeRefs) afterLoad() {} -func (i *inodeRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &i.refCount) +func (r *inodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } func (i *inodePlatformFile) StateTypeName() string { diff --git a/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go b/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go index dc7a033ab..7d9420725 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 (d *DentryRefs) StateTypeName() string { +func (r *DentryRefs) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.DentryRefs" } -func (d *DentryRefs) StateFields() []string { +func (r *DentryRefs) StateFields() []string { return []string{ "refCount", } } -func (d *DentryRefs) beforeSave() {} +func (r *DentryRefs) beforeSave() {} -func (d *DentryRefs) StateSave(stateSinkObject state.Sink) { - d.beforeSave() - stateSinkObject.Save(0, &d.refCount) +func (r *DentryRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (d *DentryRefs) afterLoad() {} +func (r *DentryRefs) afterLoad() {} -func (d *DentryRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &d.refCount) +func (r *DentryRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } -func (d *DynamicBytesFile) StateTypeName() string { +func (f *DynamicBytesFile) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.DynamicBytesFile" } -func (d *DynamicBytesFile) StateFields() []string { +func (f *DynamicBytesFile) StateFields() []string { return []string{ "InodeAttrs", "InodeNoStatFS", @@ -45,36 +45,36 @@ func (d *DynamicBytesFile) StateFields() []string { } } -func (d *DynamicBytesFile) beforeSave() {} +func (f *DynamicBytesFile) beforeSave() {} -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 (f *DynamicBytesFile) StateSave(stateSinkObject state.Sink) { + f.beforeSave() + stateSinkObject.Save(0, &f.InodeAttrs) + stateSinkObject.Save(1, &f.InodeNoStatFS) + stateSinkObject.Save(2, &f.InodeNoopRefCount) + stateSinkObject.Save(3, &f.InodeNotDirectory) + stateSinkObject.Save(4, &f.InodeNotSymlink) + stateSinkObject.Save(5, &f.locks) + stateSinkObject.Save(6, &f.data) } -func (d *DynamicBytesFile) afterLoad() {} +func (f *DynamicBytesFile) afterLoad() {} -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 (f *DynamicBytesFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &f.InodeAttrs) + stateSourceObject.Load(1, &f.InodeNoStatFS) + stateSourceObject.Load(2, &f.InodeNoopRefCount) + stateSourceObject.Load(3, &f.InodeNotDirectory) + stateSourceObject.Load(4, &f.InodeNotSymlink) + stateSourceObject.Load(5, &f.locks) + stateSourceObject.Load(6, &f.data) } -func (d *DynamicBytesFD) StateTypeName() string { +func (fd *DynamicBytesFD) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.DynamicBytesFD" } -func (d *DynamicBytesFD) StateFields() []string { +func (fd *DynamicBytesFD) StateFields() []string { return []string{ "FileDescriptionDefaultImpl", "DynamicBytesFileDescriptionImpl", @@ -84,25 +84,25 @@ func (d *DynamicBytesFD) StateFields() []string { } } -func (d *DynamicBytesFD) beforeSave() {} +func (fd *DynamicBytesFD) beforeSave() {} -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 (fd *DynamicBytesFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl) + stateSinkObject.Save(1, &fd.DynamicBytesFileDescriptionImpl) + stateSinkObject.Save(2, &fd.LockFD) + stateSinkObject.Save(3, &fd.vfsfd) + stateSinkObject.Save(4, &fd.inode) } -func (d *DynamicBytesFD) afterLoad() {} +func (fd *DynamicBytesFD) afterLoad() {} -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 (fd *DynamicBytesFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl) + stateSourceObject.Load(1, &fd.DynamicBytesFileDescriptionImpl) + stateSourceObject.Load(2, &fd.LockFD) + stateSourceObject.Load(3, &fd.vfsfd) + stateSourceObject.Load(4, &fd.inode) } func (s *SeekEndConfig) StateTypeName() string { @@ -136,11 +136,11 @@ func (g *GenericDirectoryFDOptions) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &g.SeekEnd) } -func (g *GenericDirectoryFD) StateTypeName() string { +func (fd *GenericDirectoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.GenericDirectoryFD" } -func (g *GenericDirectoryFD) StateFields() []string { +func (fd *GenericDirectoryFD) StateFields() []string { return []string{ "FileDescriptionDefaultImpl", "DirectoryFileDescriptionDefaultImpl", @@ -152,29 +152,29 @@ func (g *GenericDirectoryFD) StateFields() []string { } } -func (g *GenericDirectoryFD) beforeSave() {} +func (fd *GenericDirectoryFD) beforeSave() {} -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 (fd *GenericDirectoryFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl) + stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl) + stateSinkObject.Save(2, &fd.LockFD) + stateSinkObject.Save(3, &fd.seekEnd) + stateSinkObject.Save(4, &fd.vfsfd) + stateSinkObject.Save(5, &fd.children) + stateSinkObject.Save(6, &fd.off) } -func (g *GenericDirectoryFD) afterLoad() {} +func (fd *GenericDirectoryFD) afterLoad() {} -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 (fd *GenericDirectoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl) + stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl) + stateSourceObject.Load(2, &fd.LockFD) + stateSourceObject.Load(3, &fd.seekEnd) + stateSourceObject.Load(4, &fd.vfsfd) + stateSourceObject.Load(5, &fd.children) + stateSourceObject.Load(6, &fd.off) } func (i *InodeNoopRefCount) StateTypeName() string { @@ -272,11 +272,11 @@ func (i *InodeNotSymlink) afterLoad() {} func (i *InodeNotSymlink) StateLoad(stateSourceObject state.Source) { } -func (i *InodeAttrs) StateTypeName() string { +func (a *InodeAttrs) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.InodeAttrs" } -func (i *InodeAttrs) StateFields() []string { +func (a *InodeAttrs) StateFields() []string { return []string{ "devMajor", "devMinor", @@ -288,29 +288,29 @@ func (i *InodeAttrs) StateFields() []string { } } -func (i *InodeAttrs) beforeSave() {} +func (a *InodeAttrs) beforeSave() {} -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 (a *InodeAttrs) StateSave(stateSinkObject state.Sink) { + a.beforeSave() + stateSinkObject.Save(0, &a.devMajor) + stateSinkObject.Save(1, &a.devMinor) + stateSinkObject.Save(2, &a.ino) + stateSinkObject.Save(3, &a.mode) + stateSinkObject.Save(4, &a.uid) + stateSinkObject.Save(5, &a.gid) + stateSinkObject.Save(6, &a.nlink) } -func (i *InodeAttrs) afterLoad() {} +func (a *InodeAttrs) afterLoad() {} -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 (a *InodeAttrs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &a.devMajor) + stateSourceObject.Load(1, &a.devMinor) + stateSourceObject.Load(2, &a.ino) + stateSourceObject.Load(3, &a.mode) + stateSourceObject.Load(4, &a.uid) + stateSourceObject.Load(5, &a.gid) + stateSourceObject.Load(6, &a.nlink) } func (s *slot) StateTypeName() string { @@ -521,11 +521,11 @@ func (i *InodeNoStatFS) afterLoad() {} func (i *InodeNoStatFS) StateLoad(stateSourceObject state.Source) { } -func (f *Filesystem) StateTypeName() string { +func (fs *Filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.Filesystem" } -func (f *Filesystem) StateFields() []string { +func (fs *Filesystem) StateFields() []string { return []string{ "vfsfs", "droppedDentries", @@ -533,21 +533,21 @@ func (f *Filesystem) StateFields() []string { } } -func (f *Filesystem) beforeSave() {} +func (fs *Filesystem) beforeSave() {} -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 (fs *Filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.vfsfs) + stateSinkObject.Save(1, &fs.droppedDentries) + stateSinkObject.Save(2, &fs.nextInoMinusOne) } -func (f *Filesystem) afterLoad() {} +func (fs *Filesystem) afterLoad() {} -func (f *Filesystem) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.vfsfs) - stateSourceObject.Load(1, &f.droppedDentries) - stateSourceObject.Load(2, &f.nextInoMinusOne) +func (fs *Filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.vfsfs) + stateSourceObject.Load(1, &fs.droppedDentries) + stateSourceObject.Load(2, &fs.nextInoMinusOne) } func (d *Dentry) StateTypeName() string { @@ -591,79 +591,79 @@ func (d *Dentry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(6, &d.inode) } -func (s *slotList) StateTypeName() string { +func (l *slotList) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.slotList" } -func (s *slotList) StateFields() []string { +func (l *slotList) StateFields() []string { return []string{ "head", "tail", } } -func (s *slotList) beforeSave() {} +func (l *slotList) beforeSave() {} -func (s *slotList) StateSave(stateSinkObject state.Sink) { - s.beforeSave() - stateSinkObject.Save(0, &s.head) - stateSinkObject.Save(1, &s.tail) +func (l *slotList) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.head) + stateSinkObject.Save(1, &l.tail) } -func (s *slotList) afterLoad() {} +func (l *slotList) afterLoad() {} -func (s *slotList) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &s.head) - stateSourceObject.Load(1, &s.tail) +func (l *slotList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.head) + stateSourceObject.Load(1, &l.tail) } -func (s *slotEntry) StateTypeName() string { +func (e *slotEntry) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.slotEntry" } -func (s *slotEntry) StateFields() []string { +func (e *slotEntry) StateFields() []string { return []string{ "next", "prev", } } -func (s *slotEntry) beforeSave() {} +func (e *slotEntry) beforeSave() {} -func (s *slotEntry) StateSave(stateSinkObject state.Sink) { - s.beforeSave() - stateSinkObject.Save(0, &s.next) - stateSinkObject.Save(1, &s.prev) +func (e *slotEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (s *slotEntry) afterLoad() {} +func (e *slotEntry) afterLoad() {} -func (s *slotEntry) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &s.next) - stateSourceObject.Load(1, &s.prev) +func (e *slotEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } -func (s *StaticDirectoryRefs) StateTypeName() string { +func (r *StaticDirectoryRefs) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.StaticDirectoryRefs" } -func (s *StaticDirectoryRefs) StateFields() []string { +func (r *StaticDirectoryRefs) StateFields() []string { return []string{ "refCount", } } -func (s *StaticDirectoryRefs) beforeSave() {} +func (r *StaticDirectoryRefs) beforeSave() {} -func (s *StaticDirectoryRefs) StateSave(stateSinkObject state.Sink) { - s.beforeSave() - stateSinkObject.Save(0, &s.refCount) +func (r *StaticDirectoryRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (s *StaticDirectoryRefs) afterLoad() {} +func (r *StaticDirectoryRefs) afterLoad() {} -func (s *StaticDirectoryRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &s.refCount) +func (r *StaticDirectoryRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } func (s *StaticSymlink) StateTypeName() string { @@ -701,11 +701,11 @@ func (s *StaticSymlink) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(4, &s.target) } -func (s *syntheticDirectory) StateTypeName() string { +func (dir *syntheticDirectory) StateTypeName() string { return "pkg/sentry/fsimpl/kernfs.syntheticDirectory" } -func (s *syntheticDirectory) StateFields() []string { +func (dir *syntheticDirectory) StateFields() []string { return []string{ "InodeAttrs", "InodeNoStatFS", @@ -717,29 +717,29 @@ func (s *syntheticDirectory) StateFields() []string { } } -func (s *syntheticDirectory) beforeSave() {} +func (dir *syntheticDirectory) beforeSave() {} -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 (dir *syntheticDirectory) StateSave(stateSinkObject state.Sink) { + dir.beforeSave() + stateSinkObject.Save(0, &dir.InodeAttrs) + stateSinkObject.Save(1, &dir.InodeNoStatFS) + stateSinkObject.Save(2, &dir.InodeNoopRefCount) + stateSinkObject.Save(3, &dir.InodeNoDynamicLookup) + stateSinkObject.Save(4, &dir.InodeNotSymlink) + stateSinkObject.Save(5, &dir.OrderedChildren) + stateSinkObject.Save(6, &dir.locks) } -func (s *syntheticDirectory) afterLoad() {} +func (dir *syntheticDirectory) afterLoad() {} -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 (dir *syntheticDirectory) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &dir.InodeAttrs) + stateSourceObject.Load(1, &dir.InodeNoStatFS) + stateSourceObject.Load(2, &dir.InodeNoopRefCount) + stateSourceObject.Load(3, &dir.InodeNoDynamicLookup) + stateSourceObject.Load(4, &dir.InodeNotSymlink) + stateSourceObject.Load(5, &dir.OrderedChildren) + stateSourceObject.Load(6, &dir.locks) } func init() { diff --git a/pkg/sentry/fsimpl/overlay/overlay_state_autogen.go b/pkg/sentry/fsimpl/overlay/overlay_state_autogen.go index bf2f3fb30..dde862ba3 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 (d *directoryFD) StateTypeName() string { +func (fd *directoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.directoryFD" } -func (d *directoryFD) StateFields() []string { +func (fd *directoryFD) StateFields() []string { return []string{ "fileDescription", "DirectoryFileDescriptionDefaultImpl", @@ -20,32 +20,32 @@ func (d *directoryFD) StateFields() []string { } } -func (d *directoryFD) beforeSave() {} +func (fd *directoryFD) beforeSave() {} -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 (fd *directoryFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.fileDescription) + stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl) + stateSinkObject.Save(2, &fd.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &fd.off) + stateSinkObject.Save(4, &fd.dirents) } -func (d *directoryFD) afterLoad() {} +func (fd *directoryFD) afterLoad() {} -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 (fd *directoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.fileDescription) + stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl) + stateSourceObject.Load(2, &fd.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &fd.off) + stateSourceObject.Load(4, &fd.dirents) } -func (n *nonDirectoryFD) StateTypeName() string { +func (fd *nonDirectoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.nonDirectoryFD" } -func (n *nonDirectoryFD) StateFields() []string { +func (fd *nonDirectoryFD) StateFields() []string { return []string{ "fileDescription", "copiedUp", @@ -54,42 +54,42 @@ func (n *nonDirectoryFD) StateFields() []string { } } -func (n *nonDirectoryFD) beforeSave() {} +func (fd *nonDirectoryFD) beforeSave() {} -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 (fd *nonDirectoryFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.fileDescription) + stateSinkObject.Save(1, &fd.copiedUp) + stateSinkObject.Save(2, &fd.cachedFD) + stateSinkObject.Save(3, &fd.cachedFlags) } -func (n *nonDirectoryFD) afterLoad() {} +func (fd *nonDirectoryFD) afterLoad() {} -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 (fd *nonDirectoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.fileDescription) + stateSourceObject.Load(1, &fd.copiedUp) + stateSourceObject.Load(2, &fd.cachedFD) + stateSourceObject.Load(3, &fd.cachedFlags) } -func (f *FilesystemType) StateTypeName() string { +func (fstype *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.FilesystemType" } -func (f *FilesystemType) StateFields() []string { +func (fstype *FilesystemType) StateFields() []string { return []string{} } -func (f *FilesystemType) beforeSave() {} +func (fstype *FilesystemType) beforeSave() {} -func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { - f.beforeSave() +func (fstype *FilesystemType) StateSave(stateSinkObject state.Sink) { + fstype.beforeSave() } -func (f *FilesystemType) afterLoad() {} +func (fstype *FilesystemType) afterLoad() {} -func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { +func (fstype *FilesystemType) StateLoad(stateSourceObject state.Source) { } func (f *FilesystemOptions) StateTypeName() string { @@ -118,11 +118,11 @@ func (f *FilesystemOptions) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(1, &f.LowerRoots) } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "vfsfs", "opts", @@ -133,27 +133,27 @@ func (f *filesystem) StateFields() []string { } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -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 (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.vfsfs) + stateSinkObject.Save(1, &fs.opts) + stateSinkObject.Save(2, &fs.creds) + stateSinkObject.Save(3, &fs.dirDevMinor) + stateSinkObject.Save(4, &fs.lowerDevMinors) + stateSinkObject.Save(5, &fs.lastDirIno) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -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 (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.vfsfs) + stateSourceObject.Load(1, &fs.opts) + stateSourceObject.Load(2, &fs.creds) + stateSourceObject.Load(3, &fs.dirDevMinor) + stateSourceObject.Load(4, &fs.lowerDevMinors) + stateSourceObject.Load(5, &fs.lastDirIno) } func (d *dentry) StateTypeName() string { @@ -248,11 +248,11 @@ func (d *dentry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(23, &d.watches) } -func (f *fileDescription) StateTypeName() string { +func (fd *fileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/overlay.fileDescription" } -func (f *fileDescription) StateFields() []string { +func (fd *fileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -260,21 +260,21 @@ func (f *fileDescription) StateFields() []string { } } -func (f *fileDescription) beforeSave() {} +func (fd *fileDescription) beforeSave() {} -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 (fd *fileDescription) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.vfsfd) + stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &fd.LockFD) } -func (f *fileDescription) afterLoad() {} +func (fd *fileDescription) afterLoad() {} -func (f *fileDescription) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.vfsfd) - stateSourceObject.Load(1, &f.FileDescriptionDefaultImpl) - stateSourceObject.Load(2, &f.LockFD) +func (fd *fileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.vfsfd) + stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &fd.LockFD) } func init() { diff --git a/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go b/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go index 384af5bf0..474f83cdf 100644 --- a/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go +++ b/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go @@ -25,30 +25,30 @@ func (f *filesystemType) afterLoad() {} func (f *filesystemType) StateLoad(stateSourceObject state.Source) { } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/pipefs.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -func (f *filesystem) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.Filesystem) - stateSinkObject.Save(1, &f.devMinor) +func (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.Filesystem) + stateSinkObject.Save(1, &fs.devMinor) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -func (f *filesystem) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.Filesystem) - stateSourceObject.Load(1, &f.devMinor) +func (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.Filesystem) + stateSourceObject.Load(1, &fs.devMinor) } func (i *inode) StateTypeName() string { diff --git a/pkg/sentry/fsimpl/proc/proc_state_autogen.go b/pkg/sentry/fsimpl/proc/proc_state_autogen.go index 72fc112e2..0bbbd5761 100644 --- a/pkg/sentry/fsimpl/proc/proc_state_autogen.go +++ b/pkg/sentry/fsimpl/proc/proc_state_autogen.go @@ -6,95 +6,95 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (f *fdDirInodeRefs) StateTypeName() string { +func (r *fdDirInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdDirInodeRefs" } -func (f *fdDirInodeRefs) StateFields() []string { +func (r *fdDirInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (f *fdDirInodeRefs) beforeSave() {} +func (r *fdDirInodeRefs) beforeSave() {} -func (f *fdDirInodeRefs) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.refCount) +func (r *fdDirInodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (f *fdDirInodeRefs) afterLoad() {} +func (r *fdDirInodeRefs) afterLoad() {} -func (f *fdDirInodeRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.refCount) +func (r *fdDirInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } -func (f *fdInfoDirInodeRefs) StateTypeName() string { +func (r *fdInfoDirInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdInfoDirInodeRefs" } -func (f *fdInfoDirInodeRefs) StateFields() []string { +func (r *fdInfoDirInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (f *fdInfoDirInodeRefs) beforeSave() {} +func (r *fdInfoDirInodeRefs) beforeSave() {} -func (f *fdInfoDirInodeRefs) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.refCount) +func (r *fdInfoDirInodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (f *fdInfoDirInodeRefs) afterLoad() {} +func (r *fdInfoDirInodeRefs) afterLoad() {} -func (f *fdInfoDirInodeRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.refCount) +func (r *fdInfoDirInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } -func (f *FilesystemType) StateTypeName() string { +func (ft *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/proc.FilesystemType" } -func (f *FilesystemType) StateFields() []string { +func (ft *FilesystemType) StateFields() []string { return []string{} } -func (f *FilesystemType) beforeSave() {} +func (ft *FilesystemType) beforeSave() {} -func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { - f.beforeSave() +func (ft *FilesystemType) StateSave(stateSinkObject state.Sink) { + ft.beforeSave() } -func (f *FilesystemType) afterLoad() {} +func (ft *FilesystemType) afterLoad() {} -func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { +func (ft *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/proc.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -func (f *filesystem) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.Filesystem) - stateSinkObject.Save(1, &f.devMinor) +func (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.Filesystem) + stateSinkObject.Save(1, &fs.devMinor) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -func (f *filesystem) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.Filesystem) - stateSourceObject.Load(1, &f.devMinor) +func (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.Filesystem) + stateSourceObject.Load(1, &fs.devMinor) } func (s *staticFile) StateTypeName() string { @@ -165,11 +165,11 @@ func (i *implStatFS) afterLoad() {} func (i *implStatFS) StateLoad(stateSourceObject state.Source) { } -func (s *subtasksInode) StateTypeName() string { +func (i *subtasksInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.subtasksInode" } -func (s *subtasksInode) StateFields() []string { +func (i *subtasksInode) StateFields() []string { return []string{ "implStatFS", "AlwaysValid", @@ -186,95 +186,95 @@ func (s *subtasksInode) StateFields() []string { } } -func (s *subtasksInode) beforeSave() {} +func (i *subtasksInode) beforeSave() {} -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 (s *subtasksInode) afterLoad() {} - -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 (s *subtasksFD) StateTypeName() string { +func (i *subtasksInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.implStatFS) + stateSinkObject.Save(1, &i.AlwaysValid) + stateSinkObject.Save(2, &i.InodeAttrs) + stateSinkObject.Save(3, &i.InodeDirectoryNoNewChildren) + stateSinkObject.Save(4, &i.InodeNotSymlink) + stateSinkObject.Save(5, &i.OrderedChildren) + stateSinkObject.Save(6, &i.subtasksInodeRefs) + stateSinkObject.Save(7, &i.locks) + stateSinkObject.Save(8, &i.fs) + stateSinkObject.Save(9, &i.task) + stateSinkObject.Save(10, &i.pidns) + stateSinkObject.Save(11, &i.cgroupControllers) +} + +func (i *subtasksInode) afterLoad() {} + +func (i *subtasksInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.implStatFS) + stateSourceObject.Load(1, &i.AlwaysValid) + stateSourceObject.Load(2, &i.InodeAttrs) + stateSourceObject.Load(3, &i.InodeDirectoryNoNewChildren) + stateSourceObject.Load(4, &i.InodeNotSymlink) + stateSourceObject.Load(5, &i.OrderedChildren) + stateSourceObject.Load(6, &i.subtasksInodeRefs) + stateSourceObject.Load(7, &i.locks) + stateSourceObject.Load(8, &i.fs) + stateSourceObject.Load(9, &i.task) + stateSourceObject.Load(10, &i.pidns) + stateSourceObject.Load(11, &i.cgroupControllers) +} + +func (fd *subtasksFD) StateTypeName() string { return "pkg/sentry/fsimpl/proc.subtasksFD" } -func (s *subtasksFD) StateFields() []string { +func (fd *subtasksFD) StateFields() []string { return []string{ "GenericDirectoryFD", "task", } } -func (s *subtasksFD) beforeSave() {} +func (fd *subtasksFD) beforeSave() {} -func (s *subtasksFD) StateSave(stateSinkObject state.Sink) { - s.beforeSave() - stateSinkObject.Save(0, &s.GenericDirectoryFD) - stateSinkObject.Save(1, &s.task) +func (fd *subtasksFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.GenericDirectoryFD) + stateSinkObject.Save(1, &fd.task) } -func (s *subtasksFD) afterLoad() {} +func (fd *subtasksFD) afterLoad() {} -func (s *subtasksFD) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &s.GenericDirectoryFD) - stateSourceObject.Load(1, &s.task) +func (fd *subtasksFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.GenericDirectoryFD) + stateSourceObject.Load(1, &fd.task) } -func (s *subtasksInodeRefs) StateTypeName() string { +func (r *subtasksInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.subtasksInodeRefs" } -func (s *subtasksInodeRefs) StateFields() []string { +func (r *subtasksInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (s *subtasksInodeRefs) beforeSave() {} +func (r *subtasksInodeRefs) beforeSave() {} -func (s *subtasksInodeRefs) StateSave(stateSinkObject state.Sink) { - s.beforeSave() - stateSinkObject.Save(0, &s.refCount) +func (r *subtasksInodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (s *subtasksInodeRefs) afterLoad() {} +func (r *subtasksInodeRefs) afterLoad() {} -func (s *subtasksInodeRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &s.refCount) +func (r *subtasksInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } -func (t *taskInode) StateTypeName() string { +func (i *taskInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.taskInode" } -func (t *taskInode) StateFields() []string { +func (i *taskInode) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -288,66 +288,66 @@ func (t *taskInode) StateFields() []string { } } -func (t *taskInode) beforeSave() {} - -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 (t *taskInode) afterLoad() {} - -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 (i *taskInode) beforeSave() {} -func (t *taskOwnedInode) StateTypeName() string { +func (i *taskInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.implStatFS) + 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.taskInodeRefs) + stateSinkObject.Save(7, &i.locks) + stateSinkObject.Save(8, &i.task) +} + +func (i *taskInode) afterLoad() {} + +func (i *taskInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.implStatFS) + 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.taskInodeRefs) + stateSourceObject.Load(7, &i.locks) + stateSourceObject.Load(8, &i.task) +} + +func (i *taskOwnedInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.taskOwnedInode" } -func (t *taskOwnedInode) StateFields() []string { +func (i *taskOwnedInode) StateFields() []string { return []string{ "Inode", "owner", } } -func (t *taskOwnedInode) beforeSave() {} +func (i *taskOwnedInode) beforeSave() {} -func (t *taskOwnedInode) StateSave(stateSinkObject state.Sink) { - t.beforeSave() - stateSinkObject.Save(0, &t.Inode) - stateSinkObject.Save(1, &t.owner) +func (i *taskOwnedInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.Inode) + stateSinkObject.Save(1, &i.owner) } -func (t *taskOwnedInode) afterLoad() {} +func (i *taskOwnedInode) afterLoad() {} -func (t *taskOwnedInode) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &t.Inode) - stateSourceObject.Load(1, &t.owner) +func (i *taskOwnedInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.Inode) + stateSourceObject.Load(1, &i.owner) } -func (f *fdDir) StateTypeName() string { +func (i *fdDir) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdDir" } -func (f *fdDir) StateFields() []string { +func (i *fdDir) StateFields() []string { return []string{ "locks", "fs", @@ -356,30 +356,30 @@ func (f *fdDir) StateFields() []string { } } -func (f *fdDir) beforeSave() {} +func (i *fdDir) beforeSave() {} -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 (i *fdDir) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.locks) + stateSinkObject.Save(1, &i.fs) + stateSinkObject.Save(2, &i.task) + stateSinkObject.Save(3, &i.produceSymlink) } -func (f *fdDir) afterLoad() {} +func (i *fdDir) afterLoad() {} -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 (i *fdDir) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.locks) + stateSourceObject.Load(1, &i.fs) + stateSourceObject.Load(2, &i.task) + stateSourceObject.Load(3, &i.produceSymlink) } -func (f *fdDirInode) StateTypeName() string { +func (i *fdDirInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdDirInode" } -func (f *fdDirInode) StateFields() []string { +func (i *fdDirInode) StateFields() []string { return []string{ "fdDir", "fdDirInodeRefs", @@ -392,38 +392,38 @@ func (f *fdDirInode) StateFields() []string { } } -func (f *fdDirInode) beforeSave() {} +func (i *fdDirInode) beforeSave() {} -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 (f *fdDirInode) afterLoad() {} - -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 (f *fdSymlink) StateTypeName() string { +func (i *fdDirInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fdDir) + stateSinkObject.Save(1, &i.fdDirInodeRefs) + stateSinkObject.Save(2, &i.implStatFS) + stateSinkObject.Save(3, &i.AlwaysValid) + stateSinkObject.Save(4, &i.InodeAttrs) + stateSinkObject.Save(5, &i.InodeDirectoryNoNewChildren) + stateSinkObject.Save(6, &i.InodeNotSymlink) + stateSinkObject.Save(7, &i.OrderedChildren) +} + +func (i *fdDirInode) afterLoad() {} + +func (i *fdDirInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.fdDir) + stateSourceObject.Load(1, &i.fdDirInodeRefs) + stateSourceObject.Load(2, &i.implStatFS) + stateSourceObject.Load(3, &i.AlwaysValid) + stateSourceObject.Load(4, &i.InodeAttrs) + stateSourceObject.Load(5, &i.InodeDirectoryNoNewChildren) + stateSourceObject.Load(6, &i.InodeNotSymlink) + stateSourceObject.Load(7, &i.OrderedChildren) +} + +func (s *fdSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdSymlink" } -func (f *fdSymlink) StateFields() []string { +func (s *fdSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -434,34 +434,34 @@ func (f *fdSymlink) StateFields() []string { } } -func (f *fdSymlink) beforeSave() {} +func (s *fdSymlink) beforeSave() {} -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 (s *fdSymlink) 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.task) + stateSinkObject.Save(5, &s.fd) } -func (f *fdSymlink) afterLoad() {} +func (s *fdSymlink) afterLoad() {} -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 (s *fdSymlink) 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.task) + stateSourceObject.Load(5, &s.fd) } -func (f *fdInfoDirInode) StateTypeName() string { +func (i *fdInfoDirInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdInfoDirInode" } -func (f *fdInfoDirInode) StateFields() []string { +func (i *fdInfoDirInode) StateFields() []string { return []string{ "fdDir", "fdInfoDirInodeRefs", @@ -474,38 +474,38 @@ func (f *fdInfoDirInode) StateFields() []string { } } -func (f *fdInfoDirInode) beforeSave() {} - -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 (i *fdInfoDirInode) beforeSave() {} -func (f *fdInfoDirInode) afterLoad() {} - -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 (f *fdInfoData) StateTypeName() string { +func (i *fdInfoDirInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.fdDir) + stateSinkObject.Save(1, &i.fdInfoDirInodeRefs) + stateSinkObject.Save(2, &i.implStatFS) + stateSinkObject.Save(3, &i.AlwaysValid) + stateSinkObject.Save(4, &i.InodeAttrs) + stateSinkObject.Save(5, &i.InodeDirectoryNoNewChildren) + stateSinkObject.Save(6, &i.InodeNotSymlink) + stateSinkObject.Save(7, &i.OrderedChildren) +} + +func (i *fdInfoDirInode) afterLoad() {} + +func (i *fdInfoDirInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.fdDir) + stateSourceObject.Load(1, &i.fdInfoDirInodeRefs) + stateSourceObject.Load(2, &i.implStatFS) + stateSourceObject.Load(3, &i.AlwaysValid) + stateSourceObject.Load(4, &i.InodeAttrs) + stateSourceObject.Load(5, &i.InodeDirectoryNoNewChildren) + stateSourceObject.Load(6, &i.InodeNotSymlink) + stateSourceObject.Load(7, &i.OrderedChildren) +} + +func (d *fdInfoData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.fdInfoData" } -func (f *fdInfoData) StateFields() []string { +func (d *fdInfoData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -513,54 +513,54 @@ func (f *fdInfoData) StateFields() []string { } } -func (f *fdInfoData) beforeSave() {} +func (d *fdInfoData) beforeSave() {} -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 (d *fdInfoData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.task) + stateSinkObject.Save(2, &d.fd) } -func (f *fdInfoData) afterLoad() {} +func (d *fdInfoData) afterLoad() {} -func (f *fdInfoData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.DynamicBytesFile) - stateSourceObject.Load(1, &f.task) - stateSourceObject.Load(2, &f.fd) +func (d *fdInfoData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.task) + stateSourceObject.Load(2, &d.fd) } -func (a *auxvData) StateTypeName() string { +func (d *auxvData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.auxvData" } -func (a *auxvData) StateFields() []string { +func (d *auxvData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (a *auxvData) beforeSave() {} +func (d *auxvData) beforeSave() {} -func (a *auxvData) StateSave(stateSinkObject state.Sink) { - a.beforeSave() - stateSinkObject.Save(0, &a.DynamicBytesFile) - stateSinkObject.Save(1, &a.task) +func (d *auxvData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.task) } -func (a *auxvData) afterLoad() {} +func (d *auxvData) afterLoad() {} -func (a *auxvData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &a.DynamicBytesFile) - stateSourceObject.Load(1, &a.task) +func (d *auxvData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.task) } -func (c *cmdlineData) StateTypeName() string { +func (d *cmdlineData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.cmdlineData" } -func (c *cmdlineData) StateFields() []string { +func (d *cmdlineData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -568,80 +568,80 @@ func (c *cmdlineData) StateFields() []string { } } -func (c *cmdlineData) beforeSave() {} +func (d *cmdlineData) beforeSave() {} -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 (d *cmdlineData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.task) + stateSinkObject.Save(2, &d.arg) } -func (c *cmdlineData) afterLoad() {} +func (d *cmdlineData) afterLoad() {} -func (c *cmdlineData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &c.DynamicBytesFile) - stateSourceObject.Load(1, &c.task) - stateSourceObject.Load(2, &c.arg) +func (d *cmdlineData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.task) + stateSourceObject.Load(2, &d.arg) } -func (c *commInode) StateTypeName() string { +func (i *commInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.commInode" } -func (c *commInode) StateFields() []string { +func (i *commInode) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (c *commInode) beforeSave() {} +func (i *commInode) beforeSave() {} -func (c *commInode) StateSave(stateSinkObject state.Sink) { - c.beforeSave() - stateSinkObject.Save(0, &c.DynamicBytesFile) - stateSinkObject.Save(1, &c.task) +func (i *commInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.DynamicBytesFile) + stateSinkObject.Save(1, &i.task) } -func (c *commInode) afterLoad() {} +func (i *commInode) afterLoad() {} -func (c *commInode) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &c.DynamicBytesFile) - stateSourceObject.Load(1, &c.task) +func (i *commInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.DynamicBytesFile) + stateSourceObject.Load(1, &i.task) } -func (c *commData) StateTypeName() string { +func (d *commData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.commData" } -func (c *commData) StateFields() []string { +func (d *commData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (c *commData) beforeSave() {} +func (d *commData) beforeSave() {} -func (c *commData) StateSave(stateSinkObject state.Sink) { - c.beforeSave() - stateSinkObject.Save(0, &c.DynamicBytesFile) - stateSinkObject.Save(1, &c.task) +func (d *commData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.task) } -func (c *commData) afterLoad() {} +func (d *commData) afterLoad() {} -func (c *commData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &c.DynamicBytesFile) - stateSourceObject.Load(1, &c.task) +func (d *commData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.task) } -func (i *idMapData) StateTypeName() string { +func (d *idMapData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.idMapData" } -func (i *idMapData) StateFields() []string { +func (d *idMapData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -649,80 +649,80 @@ func (i *idMapData) StateFields() []string { } } -func (i *idMapData) beforeSave() {} +func (d *idMapData) beforeSave() {} -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 (d *idMapData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.task) + stateSinkObject.Save(2, &d.gids) } -func (i *idMapData) afterLoad() {} +func (d *idMapData) afterLoad() {} -func (i *idMapData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &i.DynamicBytesFile) - stateSourceObject.Load(1, &i.task) - stateSourceObject.Load(2, &i.gids) +func (d *idMapData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.task) + stateSourceObject.Load(2, &d.gids) } -func (m *mapsData) StateTypeName() string { +func (d *mapsData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.mapsData" } -func (m *mapsData) StateFields() []string { +func (d *mapsData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (m *mapsData) beforeSave() {} +func (d *mapsData) beforeSave() {} -func (m *mapsData) StateSave(stateSinkObject state.Sink) { - m.beforeSave() - stateSinkObject.Save(0, &m.DynamicBytesFile) - stateSinkObject.Save(1, &m.task) +func (d *mapsData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.task) } -func (m *mapsData) afterLoad() {} +func (d *mapsData) afterLoad() {} -func (m *mapsData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &m.DynamicBytesFile) - stateSourceObject.Load(1, &m.task) +func (d *mapsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.task) } -func (s *smapsData) StateTypeName() string { +func (d *smapsData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.smapsData" } -func (s *smapsData) StateFields() []string { +func (d *smapsData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (s *smapsData) beforeSave() {} +func (d *smapsData) beforeSave() {} -func (s *smapsData) StateSave(stateSinkObject state.Sink) { - s.beforeSave() - stateSinkObject.Save(0, &s.DynamicBytesFile) - stateSinkObject.Save(1, &s.task) +func (d *smapsData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.task) } -func (s *smapsData) afterLoad() {} +func (d *smapsData) afterLoad() {} -func (s *smapsData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &s.DynamicBytesFile) - stateSourceObject.Load(1, &s.task) +func (d *smapsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.task) } -func (t *taskStatData) StateTypeName() string { +func (s *taskStatData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.taskStatData" } -func (t *taskStatData) StateFields() []string { +func (s *taskStatData) StateFields() []string { return []string{ "DynamicBytesFile", "task", @@ -731,23 +731,23 @@ func (t *taskStatData) StateFields() []string { } } -func (t *taskStatData) beforeSave() {} +func (s *taskStatData) beforeSave() {} -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 (s *taskStatData) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.DynamicBytesFile) + stateSinkObject.Save(1, &s.task) + stateSinkObject.Save(2, &s.tgstats) + stateSinkObject.Save(3, &s.pidns) } -func (t *taskStatData) afterLoad() {} +func (s *taskStatData) afterLoad() {} -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 (s *taskStatData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.DynamicBytesFile) + stateSourceObject.Load(1, &s.task) + stateSourceObject.Load(2, &s.tgstats) + stateSourceObject.Load(3, &s.pidns) } func (s *statmData) StateTypeName() string { @@ -857,11 +857,11 @@ func (o *oomScoreAdj) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(1, &o.task) } -func (e *exeSymlink) StateTypeName() string { +func (s *exeSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.exeSymlink" } -func (e *exeSymlink) StateFields() []string { +func (s *exeSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -871,32 +871,32 @@ func (e *exeSymlink) StateFields() []string { } } -func (e *exeSymlink) beforeSave() {} +func (s *exeSymlink) beforeSave() {} -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 (s *exeSymlink) 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.task) } -func (e *exeSymlink) afterLoad() {} +func (s *exeSymlink) afterLoad() {} -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 (s *exeSymlink) 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.task) } -func (c *cwdSymlink) StateTypeName() string { +func (s *cwdSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.cwdSymlink" } -func (c *cwdSymlink) StateFields() []string { +func (s *cwdSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -906,110 +906,110 @@ func (c *cwdSymlink) StateFields() []string { } } -func (c *cwdSymlink) beforeSave() {} +func (s *cwdSymlink) beforeSave() {} -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 (s *cwdSymlink) 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.task) } -func (c *cwdSymlink) afterLoad() {} +func (s *cwdSymlink) afterLoad() {} -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 (s *cwdSymlink) 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.task) } -func (m *mountInfoData) StateTypeName() string { +func (i *mountInfoData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.mountInfoData" } -func (m *mountInfoData) StateFields() []string { +func (i *mountInfoData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (m *mountInfoData) beforeSave() {} +func (i *mountInfoData) beforeSave() {} -func (m *mountInfoData) StateSave(stateSinkObject state.Sink) { - m.beforeSave() - stateSinkObject.Save(0, &m.DynamicBytesFile) - stateSinkObject.Save(1, &m.task) +func (i *mountInfoData) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.DynamicBytesFile) + stateSinkObject.Save(1, &i.task) } -func (m *mountInfoData) afterLoad() {} +func (i *mountInfoData) afterLoad() {} -func (m *mountInfoData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &m.DynamicBytesFile) - stateSourceObject.Load(1, &m.task) +func (i *mountInfoData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.DynamicBytesFile) + stateSourceObject.Load(1, &i.task) } -func (m *mountsData) StateTypeName() string { +func (i *mountsData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.mountsData" } -func (m *mountsData) StateFields() []string { +func (i *mountsData) StateFields() []string { return []string{ "DynamicBytesFile", "task", } } -func (m *mountsData) beforeSave() {} +func (i *mountsData) beforeSave() {} -func (m *mountsData) StateSave(stateSinkObject state.Sink) { - m.beforeSave() - stateSinkObject.Save(0, &m.DynamicBytesFile) - stateSinkObject.Save(1, &m.task) +func (i *mountsData) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.DynamicBytesFile) + stateSinkObject.Save(1, &i.task) } -func (m *mountsData) afterLoad() {} +func (i *mountsData) afterLoad() {} -func (m *mountsData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &m.DynamicBytesFile) - stateSourceObject.Load(1, &m.task) +func (i *mountsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.DynamicBytesFile) + stateSourceObject.Load(1, &i.task) } -func (n *namespaceSymlink) StateTypeName() string { +func (s *namespaceSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.namespaceSymlink" } -func (n *namespaceSymlink) StateFields() []string { +func (s *namespaceSymlink) StateFields() []string { return []string{ "StaticSymlink", "task", } } -func (n *namespaceSymlink) beforeSave() {} +func (s *namespaceSymlink) beforeSave() {} -func (n *namespaceSymlink) StateSave(stateSinkObject state.Sink) { - n.beforeSave() - stateSinkObject.Save(0, &n.StaticSymlink) - stateSinkObject.Save(1, &n.task) +func (s *namespaceSymlink) StateSave(stateSinkObject state.Sink) { + s.beforeSave() + stateSinkObject.Save(0, &s.StaticSymlink) + stateSinkObject.Save(1, &s.task) } -func (n *namespaceSymlink) afterLoad() {} +func (s *namespaceSymlink) afterLoad() {} -func (n *namespaceSymlink) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &n.StaticSymlink) - stateSourceObject.Load(1, &n.task) +func (s *namespaceSymlink) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &s.StaticSymlink) + stateSourceObject.Load(1, &s.task) } -func (n *namespaceInode) StateTypeName() string { +func (i *namespaceInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.namespaceInode" } -func (n *namespaceInode) StateFields() []string { +func (i *namespaceInode) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -1020,34 +1020,34 @@ func (n *namespaceInode) StateFields() []string { } } -func (n *namespaceInode) beforeSave() {} +func (i *namespaceInode) beforeSave() {} -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 (i *namespaceInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.implStatFS) + stateSinkObject.Save(1, &i.InodeAttrs) + stateSinkObject.Save(2, &i.InodeNoopRefCount) + stateSinkObject.Save(3, &i.InodeNotDirectory) + stateSinkObject.Save(4, &i.InodeNotSymlink) + stateSinkObject.Save(5, &i.locks) } -func (n *namespaceInode) afterLoad() {} +func (i *namespaceInode) afterLoad() {} -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 (i *namespaceInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.implStatFS) + stateSourceObject.Load(1, &i.InodeAttrs) + stateSourceObject.Load(2, &i.InodeNoopRefCount) + stateSourceObject.Load(3, &i.InodeNotDirectory) + stateSourceObject.Load(4, &i.InodeNotSymlink) + stateSourceObject.Load(5, &i.locks) } -func (n *namespaceFD) StateTypeName() string { +func (fd *namespaceFD) StateTypeName() string { return "pkg/sentry/fsimpl/proc.namespaceFD" } -func (n *namespaceFD) StateFields() []string { +func (fd *namespaceFD) StateFields() []string { return []string{ "FileDescriptionDefaultImpl", "LockFD", @@ -1056,72 +1056,72 @@ func (n *namespaceFD) StateFields() []string { } } -func (n *namespaceFD) beforeSave() {} +func (fd *namespaceFD) beforeSave() {} -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 (fd *namespaceFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl) + stateSinkObject.Save(1, &fd.LockFD) + stateSinkObject.Save(2, &fd.vfsfd) + stateSinkObject.Save(3, &fd.inode) } -func (n *namespaceFD) afterLoad() {} +func (fd *namespaceFD) afterLoad() {} -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 (fd *namespaceFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl) + stateSourceObject.Load(1, &fd.LockFD) + stateSourceObject.Load(2, &fd.vfsfd) + stateSourceObject.Load(3, &fd.inode) } -func (t *taskInodeRefs) StateTypeName() string { +func (r *taskInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.taskInodeRefs" } -func (t *taskInodeRefs) StateFields() []string { +func (r *taskInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (t *taskInodeRefs) beforeSave() {} +func (r *taskInodeRefs) beforeSave() {} -func (t *taskInodeRefs) StateSave(stateSinkObject state.Sink) { - t.beforeSave() - stateSinkObject.Save(0, &t.refCount) +func (r *taskInodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (t *taskInodeRefs) afterLoad() {} +func (r *taskInodeRefs) afterLoad() {} -func (t *taskInodeRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &t.refCount) +func (r *taskInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } -func (i *ifinet6) StateTypeName() string { +func (n *ifinet6) StateTypeName() string { return "pkg/sentry/fsimpl/proc.ifinet6" } -func (i *ifinet6) StateFields() []string { +func (n *ifinet6) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (i *ifinet6) beforeSave() {} +func (n *ifinet6) beforeSave() {} -func (i *ifinet6) StateSave(stateSinkObject state.Sink) { - i.beforeSave() - stateSinkObject.Save(0, &i.DynamicBytesFile) - stateSinkObject.Save(1, &i.stack) +func (n *ifinet6) StateSave(stateSinkObject state.Sink) { + n.beforeSave() + stateSinkObject.Save(0, &n.DynamicBytesFile) + stateSinkObject.Save(1, &n.stack) } -func (i *ifinet6) afterLoad() {} +func (n *ifinet6) afterLoad() {} -func (i *ifinet6) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &i.DynamicBytesFile) - stateSourceObject.Load(1, &i.stack) +func (n *ifinet6) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &n.DynamicBytesFile) + stateSourceObject.Load(1, &n.stack) } func (n *netDevData) StateTypeName() string { @@ -1176,108 +1176,108 @@ func (n *netUnixData) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(1, &n.kernel) } -func (n *netTCPData) StateTypeName() string { +func (d *netTCPData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netTCPData" } -func (n *netTCPData) StateFields() []string { +func (d *netTCPData) StateFields() []string { return []string{ "DynamicBytesFile", "kernel", } } -func (n *netTCPData) beforeSave() {} +func (d *netTCPData) beforeSave() {} -func (n *netTCPData) StateSave(stateSinkObject state.Sink) { - n.beforeSave() - stateSinkObject.Save(0, &n.DynamicBytesFile) - stateSinkObject.Save(1, &n.kernel) +func (d *netTCPData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.kernel) } -func (n *netTCPData) afterLoad() {} +func (d *netTCPData) afterLoad() {} -func (n *netTCPData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &n.DynamicBytesFile) - stateSourceObject.Load(1, &n.kernel) +func (d *netTCPData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.kernel) } -func (n *netTCP6Data) StateTypeName() string { +func (d *netTCP6Data) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netTCP6Data" } -func (n *netTCP6Data) StateFields() []string { +func (d *netTCP6Data) StateFields() []string { return []string{ "DynamicBytesFile", "kernel", } } -func (n *netTCP6Data) beforeSave() {} +func (d *netTCP6Data) beforeSave() {} -func (n *netTCP6Data) StateSave(stateSinkObject state.Sink) { - n.beforeSave() - stateSinkObject.Save(0, &n.DynamicBytesFile) - stateSinkObject.Save(1, &n.kernel) +func (d *netTCP6Data) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.kernel) } -func (n *netTCP6Data) afterLoad() {} +func (d *netTCP6Data) afterLoad() {} -func (n *netTCP6Data) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &n.DynamicBytesFile) - stateSourceObject.Load(1, &n.kernel) +func (d *netTCP6Data) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.kernel) } -func (n *netUDPData) StateTypeName() string { +func (d *netUDPData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netUDPData" } -func (n *netUDPData) StateFields() []string { +func (d *netUDPData) StateFields() []string { return []string{ "DynamicBytesFile", "kernel", } } -func (n *netUDPData) beforeSave() {} +func (d *netUDPData) beforeSave() {} -func (n *netUDPData) StateSave(stateSinkObject state.Sink) { - n.beforeSave() - stateSinkObject.Save(0, &n.DynamicBytesFile) - stateSinkObject.Save(1, &n.kernel) +func (d *netUDPData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.kernel) } -func (n *netUDPData) afterLoad() {} +func (d *netUDPData) afterLoad() {} -func (n *netUDPData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &n.DynamicBytesFile) - stateSourceObject.Load(1, &n.kernel) +func (d *netUDPData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.kernel) } -func (n *netSnmpData) StateTypeName() string { +func (d *netSnmpData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netSnmpData" } -func (n *netSnmpData) StateFields() []string { +func (d *netSnmpData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (n *netSnmpData) beforeSave() {} +func (d *netSnmpData) beforeSave() {} -func (n *netSnmpData) StateSave(stateSinkObject state.Sink) { - n.beforeSave() - stateSinkObject.Save(0, &n.DynamicBytesFile) - stateSinkObject.Save(1, &n.stack) +func (d *netSnmpData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.stack) } -func (n *netSnmpData) afterLoad() {} +func (d *netSnmpData) afterLoad() {} -func (n *netSnmpData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &n.DynamicBytesFile) - stateSourceObject.Load(1, &n.stack) +func (d *netSnmpData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.stack) } func (s *snmpLine) StateTypeName() string { @@ -1306,63 +1306,63 @@ func (s *snmpLine) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(1, &s.header) } -func (n *netRouteData) StateTypeName() string { +func (d *netRouteData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netRouteData" } -func (n *netRouteData) StateFields() []string { +func (d *netRouteData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (n *netRouteData) beforeSave() {} +func (d *netRouteData) beforeSave() {} -func (n *netRouteData) StateSave(stateSinkObject state.Sink) { - n.beforeSave() - stateSinkObject.Save(0, &n.DynamicBytesFile) - stateSinkObject.Save(1, &n.stack) +func (d *netRouteData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.stack) } -func (n *netRouteData) afterLoad() {} +func (d *netRouteData) afterLoad() {} -func (n *netRouteData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &n.DynamicBytesFile) - stateSourceObject.Load(1, &n.stack) +func (d *netRouteData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.stack) } -func (n *netStatData) StateTypeName() string { +func (d *netStatData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.netStatData" } -func (n *netStatData) StateFields() []string { +func (d *netStatData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (n *netStatData) beforeSave() {} +func (d *netStatData) beforeSave() {} -func (n *netStatData) StateSave(stateSinkObject state.Sink) { - n.beforeSave() - stateSinkObject.Save(0, &n.DynamicBytesFile) - stateSinkObject.Save(1, &n.stack) +func (d *netStatData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.stack) } -func (n *netStatData) afterLoad() {} +func (d *netStatData) afterLoad() {} -func (n *netStatData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &n.DynamicBytesFile) - stateSourceObject.Load(1, &n.stack) +func (d *netStatData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.stack) } -func (t *tasksInode) StateTypeName() string { +func (i *tasksInode) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tasksInode" } -func (t *tasksInode) StateFields() []string { +func (i *tasksInode) StateFields() []string { return []string{ "implStatFS", "AlwaysValid", @@ -1380,41 +1380,41 @@ func (t *tasksInode) StateFields() []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 (i *tasksInode) beforeSave() {} + +func (i *tasksInode) StateSave(stateSinkObject state.Sink) { + i.beforeSave() + stateSinkObject.Save(0, &i.implStatFS) + stateSinkObject.Save(1, &i.AlwaysValid) + stateSinkObject.Save(2, &i.InodeAttrs) + stateSinkObject.Save(3, &i.InodeDirectoryNoNewChildren) + stateSinkObject.Save(4, &i.InodeNotSymlink) + stateSinkObject.Save(5, &i.OrderedChildren) + stateSinkObject.Save(6, &i.tasksInodeRefs) + stateSinkObject.Save(7, &i.locks) + stateSinkObject.Save(8, &i.fs) + stateSinkObject.Save(9, &i.pidns) + stateSinkObject.Save(10, &i.selfSymlink) + stateSinkObject.Save(11, &i.threadSelfSymlink) + stateSinkObject.Save(12, &i.cgroupControllers) +} + +func (i *tasksInode) afterLoad() {} + +func (i *tasksInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.implStatFS) + stateSourceObject.Load(1, &i.AlwaysValid) + stateSourceObject.Load(2, &i.InodeAttrs) + stateSourceObject.Load(3, &i.InodeDirectoryNoNewChildren) + stateSourceObject.Load(4, &i.InodeNotSymlink) + stateSourceObject.Load(5, &i.OrderedChildren) + stateSourceObject.Load(6, &i.tasksInodeRefs) + stateSourceObject.Load(7, &i.locks) + stateSourceObject.Load(8, &i.fs) + stateSourceObject.Load(9, &i.pidns) + stateSourceObject.Load(10, &i.selfSymlink) + stateSourceObject.Load(11, &i.threadSelfSymlink) + stateSourceObject.Load(12, &i.cgroupControllers) } func (s *staticFileSetStat) StateTypeName() string { @@ -1478,11 +1478,11 @@ func (s *selfSymlink) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(4, &s.pidns) } -func (t *threadSelfSymlink) StateTypeName() string { +func (s *threadSelfSymlink) StateTypeName() string { return "pkg/sentry/fsimpl/proc.threadSelfSymlink" } -func (t *threadSelfSymlink) StateFields() []string { +func (s *threadSelfSymlink) StateFields() []string { return []string{ "implStatFS", "InodeAttrs", @@ -1492,25 +1492,25 @@ func (t *threadSelfSymlink) StateFields() []string { } } -func (t *threadSelfSymlink) beforeSave() {} +func (s *threadSelfSymlink) beforeSave() {} -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 (s *threadSelfSymlink) 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 (t *threadSelfSymlink) afterLoad() {} +func (s *threadSelfSymlink) afterLoad() {} -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 (s *threadSelfSymlink) 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 (d *dynamicBytesFileSetAttr) StateTypeName() string { @@ -1701,50 +1701,50 @@ func (v *versionData) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &v.dynamicBytesFileSetAttr) } -func (f *filesystemsData) StateTypeName() string { +func (d *filesystemsData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.filesystemsData" } -func (f *filesystemsData) StateFields() []string { +func (d *filesystemsData) StateFields() []string { return []string{ "DynamicBytesFile", } } -func (f *filesystemsData) beforeSave() {} +func (d *filesystemsData) beforeSave() {} -func (f *filesystemsData) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.DynamicBytesFile) +func (d *filesystemsData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) } -func (f *filesystemsData) afterLoad() {} +func (d *filesystemsData) afterLoad() {} -func (f *filesystemsData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.DynamicBytesFile) +func (d *filesystemsData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) } -func (t *tasksInodeRefs) StateTypeName() string { +func (r *tasksInodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tasksInodeRefs" } -func (t *tasksInodeRefs) StateFields() []string { +func (r *tasksInodeRefs) StateFields() []string { return []string{ "refCount", } } -func (t *tasksInodeRefs) beforeSave() {} +func (r *tasksInodeRefs) beforeSave() {} -func (t *tasksInodeRefs) StateSave(stateSinkObject state.Sink) { - t.beforeSave() - stateSinkObject.Save(0, &t.refCount) +func (r *tasksInodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (t *tasksInodeRefs) afterLoad() {} +func (r *tasksInodeRefs) afterLoad() {} -func (t *tasksInodeRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &t.refCount) +func (r *tasksInodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } func (t *tcpMemDir) StateTypeName() string { @@ -1755,30 +1755,30 @@ func (t *tcpMemDir) StateFields() []string { return nil } -func (m *mmapMinAddrData) StateTypeName() string { +func (d *mmapMinAddrData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.mmapMinAddrData" } -func (m *mmapMinAddrData) StateFields() []string { +func (d *mmapMinAddrData) StateFields() []string { return []string{ "DynamicBytesFile", "k", } } -func (m *mmapMinAddrData) beforeSave() {} +func (d *mmapMinAddrData) beforeSave() {} -func (m *mmapMinAddrData) StateSave(stateSinkObject state.Sink) { - m.beforeSave() - stateSinkObject.Save(0, &m.DynamicBytesFile) - stateSinkObject.Save(1, &m.k) +func (d *mmapMinAddrData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.k) } -func (m *mmapMinAddrData) afterLoad() {} +func (d *mmapMinAddrData) afterLoad() {} -func (m *mmapMinAddrData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &m.DynamicBytesFile) - stateSourceObject.Load(1, &m.k) +func (d *mmapMinAddrData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.k) } func (h *hostnameData) StateTypeName() string { @@ -1804,11 +1804,11 @@ func (h *hostnameData) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &h.DynamicBytesFile) } -func (t *tcpSackData) StateTypeName() string { +func (d *tcpSackData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tcpSackData" } -func (t *tcpSackData) StateFields() []string { +func (d *tcpSackData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", @@ -1816,54 +1816,54 @@ func (t *tcpSackData) StateFields() []string { } } -func (t *tcpSackData) beforeSave() {} +func (d *tcpSackData) beforeSave() {} -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 (d *tcpSackData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.stack) + stateSinkObject.Save(2, &d.enabled) } -func (t *tcpSackData) afterLoad() {} +func (d *tcpSackData) afterLoad() {} -func (t *tcpSackData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &t.DynamicBytesFile) - stateSourceObject.LoadWait(1, &t.stack) - stateSourceObject.Load(2, &t.enabled) +func (d *tcpSackData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.LoadWait(1, &d.stack) + stateSourceObject.Load(2, &d.enabled) } -func (t *tcpRecoveryData) StateTypeName() string { +func (d *tcpRecoveryData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tcpRecoveryData" } -func (t *tcpRecoveryData) StateFields() []string { +func (d *tcpRecoveryData) StateFields() []string { return []string{ "DynamicBytesFile", "stack", } } -func (t *tcpRecoveryData) beforeSave() {} +func (d *tcpRecoveryData) beforeSave() {} -func (t *tcpRecoveryData) StateSave(stateSinkObject state.Sink) { - t.beforeSave() - stateSinkObject.Save(0, &t.DynamicBytesFile) - stateSinkObject.Save(1, &t.stack) +func (d *tcpRecoveryData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.stack) } -func (t *tcpRecoveryData) afterLoad() {} +func (d *tcpRecoveryData) afterLoad() {} -func (t *tcpRecoveryData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &t.DynamicBytesFile) - stateSourceObject.LoadWait(1, &t.stack) +func (d *tcpRecoveryData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.LoadWait(1, &d.stack) } -func (t *tcpMemData) StateTypeName() string { +func (d *tcpMemData) StateTypeName() string { return "pkg/sentry/fsimpl/proc.tcpMemData" } -func (t *tcpMemData) StateFields() []string { +func (d *tcpMemData) StateFields() []string { return []string{ "DynamicBytesFile", "dir", @@ -1871,28 +1871,28 @@ func (t *tcpMemData) StateFields() []string { } } -func (t *tcpMemData) beforeSave() {} +func (d *tcpMemData) beforeSave() {} -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 (d *tcpMemData) StateSave(stateSinkObject state.Sink) { + d.beforeSave() + stateSinkObject.Save(0, &d.DynamicBytesFile) + stateSinkObject.Save(1, &d.dir) + stateSinkObject.Save(2, &d.stack) } -func (t *tcpMemData) afterLoad() {} +func (d *tcpMemData) afterLoad() {} -func (t *tcpMemData) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &t.DynamicBytesFile) - stateSourceObject.Load(1, &t.dir) - stateSourceObject.LoadWait(2, &t.stack) +func (d *tcpMemData) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &d.DynamicBytesFile) + stateSourceObject.Load(1, &d.dir) + stateSourceObject.LoadWait(2, &d.stack) } -func (i *ipForwarding) StateTypeName() string { +func (ipf *ipForwarding) StateTypeName() string { return "pkg/sentry/fsimpl/proc.ipForwarding" } -func (i *ipForwarding) StateFields() []string { +func (ipf *ipForwarding) StateFields() []string { return []string{ "DynamicBytesFile", "stack", @@ -1900,21 +1900,21 @@ func (i *ipForwarding) StateFields() []string { } } -func (i *ipForwarding) beforeSave() {} +func (ipf *ipForwarding) beforeSave() {} -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 (ipf *ipForwarding) StateSave(stateSinkObject state.Sink) { + ipf.beforeSave() + stateSinkObject.Save(0, &ipf.DynamicBytesFile) + stateSinkObject.Save(1, &ipf.stack) + stateSinkObject.Save(2, &ipf.enabled) } -func (i *ipForwarding) afterLoad() {} +func (ipf *ipForwarding) afterLoad() {} -func (i *ipForwarding) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &i.DynamicBytesFile) - stateSourceObject.LoadWait(1, &i.stack) - stateSourceObject.Load(2, &i.enabled) +func (ipf *ipForwarding) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &ipf.DynamicBytesFile) + stateSourceObject.LoadWait(1, &ipf.stack) + stateSourceObject.Load(2, &ipf.enabled) } func init() { diff --git a/pkg/sentry/fsimpl/signalfd/signalfd_state_autogen.go b/pkg/sentry/fsimpl/signalfd/signalfd_state_autogen.go index 4a1496528..b3596a886 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 (s *SignalFileDescription) StateTypeName() string { +func (sfd *SignalFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/signalfd.SignalFileDescription" } -func (s *SignalFileDescription) StateFields() []string { +func (sfd *SignalFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -21,27 +21,27 @@ func (s *SignalFileDescription) StateFields() []string { } } -func (s *SignalFileDescription) beforeSave() {} +func (sfd *SignalFileDescription) beforeSave() {} -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 (sfd *SignalFileDescription) StateSave(stateSinkObject state.Sink) { + sfd.beforeSave() + stateSinkObject.Save(0, &sfd.vfsfd) + stateSinkObject.Save(1, &sfd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &sfd.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &sfd.NoLockFD) + stateSinkObject.Save(4, &sfd.target) + stateSinkObject.Save(5, &sfd.mask) } -func (s *SignalFileDescription) afterLoad() {} +func (sfd *SignalFileDescription) afterLoad() {} -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 (sfd *SignalFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &sfd.vfsfd) + stateSourceObject.Load(1, &sfd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &sfd.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &sfd.NoLockFD) + stateSourceObject.Load(4, &sfd.target) + stateSourceObject.Load(5, &sfd.mask) } func init() { diff --git a/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go b/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go index 38bbf9eb5..6a6607555 100644 --- a/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go +++ b/pkg/sentry/fsimpl/sockfs/sockfs_state_autogen.go @@ -6,49 +6,49 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (f *filesystemType) StateTypeName() string { +func (fsType *filesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/sockfs.filesystemType" } -func (f *filesystemType) StateFields() []string { +func (fsType *filesystemType) StateFields() []string { return []string{} } -func (f *filesystemType) beforeSave() {} +func (fsType *filesystemType) beforeSave() {} -func (f *filesystemType) StateSave(stateSinkObject state.Sink) { - f.beforeSave() +func (fsType *filesystemType) StateSave(stateSinkObject state.Sink) { + fsType.beforeSave() } -func (f *filesystemType) afterLoad() {} +func (fsType *filesystemType) afterLoad() {} -func (f *filesystemType) StateLoad(stateSourceObject state.Source) { +func (fsType *filesystemType) StateLoad(stateSourceObject state.Source) { } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/sockfs.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -func (f *filesystem) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.Filesystem) - stateSinkObject.Save(1, &f.devMinor) +func (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.Filesystem) + stateSinkObject.Save(1, &fs.devMinor) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -func (f *filesystem) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.Filesystem) - stateSourceObject.Load(1, &f.devMinor) +func (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.Filesystem) + stateSourceObject.Load(1, &fs.devMinor) } func (i *inode) StateTypeName() string { diff --git a/pkg/sentry/fsimpl/sys/sys_state_autogen.go b/pkg/sentry/fsimpl/sys/sys_state_autogen.go index 6ba7397ba..410e5a7d0 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 (d *dirRefs) StateTypeName() string { +func (r *dirRefs) StateTypeName() string { return "pkg/sentry/fsimpl/sys.dirRefs" } -func (d *dirRefs) StateFields() []string { +func (r *dirRefs) StateFields() []string { return []string{ "refCount", } } -func (d *dirRefs) beforeSave() {} +func (r *dirRefs) beforeSave() {} -func (d *dirRefs) StateSave(stateSinkObject state.Sink) { - d.beforeSave() - stateSinkObject.Save(0, &d.refCount) +func (r *dirRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (d *dirRefs) afterLoad() {} +func (r *dirRefs) afterLoad() {} -func (d *dirRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &d.refCount) +func (r *dirRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } -func (k *kcovInode) StateTypeName() string { +func (i *kcovInode) StateTypeName() string { return "pkg/sentry/fsimpl/sys.kcovInode" } -func (k *kcovInode) StateFields() []string { +func (i *kcovInode) StateFields() []string { return []string{ "InodeAttrs", "InodeNoopRefCount", @@ -43,32 +43,32 @@ func (k *kcovInode) StateFields() []string { } } -func (k *kcovInode) beforeSave() {} +func (i *kcovInode) beforeSave() {} -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 (i *kcovInode) 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) + stateSinkObject.Save(4, &i.implStatFS) } -func (k *kcovInode) afterLoad() {} +func (i *kcovInode) afterLoad() {} -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 (i *kcovInode) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &i.InodeAttrs) + stateSourceObject.Load(1, &i.InodeNoopRefCount) + stateSourceObject.Load(2, &i.InodeNotDirectory) + stateSourceObject.Load(3, &i.InodeNotSymlink) + stateSourceObject.Load(4, &i.implStatFS) } -func (k *kcovFD) StateTypeName() string { +func (fd *kcovFD) StateTypeName() string { return "pkg/sentry/fsimpl/sys.kcovFD" } -func (k *kcovFD) StateFields() []string { +func (fd *kcovFD) StateFields() []string { return []string{ "FileDescriptionDefaultImpl", "NoLockFD", @@ -78,70 +78,70 @@ func (k *kcovFD) StateFields() []string { } } -func (k *kcovFD) beforeSave() {} +func (fd *kcovFD) beforeSave() {} -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 (fd *kcovFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl) + stateSinkObject.Save(1, &fd.NoLockFD) + stateSinkObject.Save(2, &fd.vfsfd) + stateSinkObject.Save(3, &fd.inode) + stateSinkObject.Save(4, &fd.kcov) } -func (k *kcovFD) afterLoad() {} +func (fd *kcovFD) afterLoad() {} -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 (fd *kcovFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl) + stateSourceObject.Load(1, &fd.NoLockFD) + stateSourceObject.Load(2, &fd.vfsfd) + stateSourceObject.Load(3, &fd.inode) + stateSourceObject.Load(4, &fd.kcov) } -func (f *FilesystemType) StateTypeName() string { +func (fsType *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/sys.FilesystemType" } -func (f *FilesystemType) StateFields() []string { +func (fsType *FilesystemType) StateFields() []string { return []string{} } -func (f *FilesystemType) beforeSave() {} +func (fsType *FilesystemType) beforeSave() {} -func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { - f.beforeSave() +func (fsType *FilesystemType) StateSave(stateSinkObject state.Sink) { + fsType.beforeSave() } -func (f *FilesystemType) afterLoad() {} +func (fsType *FilesystemType) afterLoad() {} -func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { +func (fsType *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/sys.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "Filesystem", "devMinor", } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -func (f *filesystem) StateSave(stateSinkObject state.Sink) { - f.beforeSave() - stateSinkObject.Save(0, &f.Filesystem) - stateSinkObject.Save(1, &f.devMinor) +func (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.Filesystem) + stateSinkObject.Save(1, &fs.devMinor) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -func (f *filesystem) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.Filesystem) - stateSourceObject.Load(1, &f.devMinor) +func (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.Filesystem) + stateSourceObject.Load(1, &fs.devMinor) } func (d *dir) StateTypeName() string { diff --git a/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go b/pkg/sentry/fsimpl/timerfd/timerfd_state_autogen.go index 0bfca83b9..d3c01e9e7 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 (t *TimerFileDescription) StateTypeName() string { +func (tfd *TimerFileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/timerfd.TimerFileDescription" } -func (t *TimerFileDescription) StateFields() []string { +func (tfd *TimerFileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -22,29 +22,29 @@ func (t *TimerFileDescription) StateFields() []string { } } -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 (tfd *TimerFileDescription) beforeSave() {} + +func (tfd *TimerFileDescription) StateSave(stateSinkObject state.Sink) { + tfd.beforeSave() + stateSinkObject.Save(0, &tfd.vfsfd) + stateSinkObject.Save(1, &tfd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &tfd.DentryMetadataFileDescriptionImpl) + stateSinkObject.Save(3, &tfd.NoLockFD) + stateSinkObject.Save(4, &tfd.events) + stateSinkObject.Save(5, &tfd.timer) + stateSinkObject.Save(6, &tfd.val) } -func (t *TimerFileDescription) afterLoad() {} +func (tfd *TimerFileDescription) afterLoad() {} -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 (tfd *TimerFileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &tfd.vfsfd) + stateSourceObject.Load(1, &tfd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &tfd.DentryMetadataFileDescriptionImpl) + stateSourceObject.Load(3, &tfd.NoLockFD) + stateSourceObject.Load(4, &tfd.events) + stateSourceObject.Load(5, &tfd.timer) + stateSourceObject.Load(6, &tfd.val) } func init() { diff --git a/pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go b/pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go index 8fa28e3da..a58a4ed20 100644 --- a/pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go +++ b/pkg/sentry/fsimpl/tmpfs/tmpfs_state_autogen.go @@ -6,56 +6,56 @@ import ( "gvisor.dev/gvisor/pkg/state" ) -func (d *dentryList) StateTypeName() string { +func (l *dentryList) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.dentryList" } -func (d *dentryList) StateFields() []string { +func (l *dentryList) StateFields() []string { return []string{ "head", "tail", } } -func (d *dentryList) beforeSave() {} +func (l *dentryList) beforeSave() {} -func (d *dentryList) StateSave(stateSinkObject state.Sink) { - d.beforeSave() - stateSinkObject.Save(0, &d.head) - stateSinkObject.Save(1, &d.tail) +func (l *dentryList) StateSave(stateSinkObject state.Sink) { + l.beforeSave() + stateSinkObject.Save(0, &l.head) + stateSinkObject.Save(1, &l.tail) } -func (d *dentryList) afterLoad() {} +func (l *dentryList) afterLoad() {} -func (d *dentryList) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &d.head) - stateSourceObject.Load(1, &d.tail) +func (l *dentryList) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &l.head) + stateSourceObject.Load(1, &l.tail) } -func (d *dentryEntry) StateTypeName() string { +func (e *dentryEntry) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.dentryEntry" } -func (d *dentryEntry) StateFields() []string { +func (e *dentryEntry) StateFields() []string { return []string{ "next", "prev", } } -func (d *dentryEntry) beforeSave() {} +func (e *dentryEntry) beforeSave() {} -func (d *dentryEntry) StateSave(stateSinkObject state.Sink) { - d.beforeSave() - stateSinkObject.Save(0, &d.next) - stateSinkObject.Save(1, &d.prev) +func (e *dentryEntry) StateSave(stateSinkObject state.Sink) { + e.beforeSave() + stateSinkObject.Save(0, &e.next) + stateSinkObject.Save(1, &e.prev) } -func (d *dentryEntry) afterLoad() {} +func (e *dentryEntry) afterLoad() {} -func (d *dentryEntry) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &d.next) - stateSourceObject.Load(1, &d.prev) +func (e *dentryEntry) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &e.next) + stateSourceObject.Load(1, &e.prev) } func (d *deviceFile) StateTypeName() string { @@ -90,11 +90,11 @@ func (d *deviceFile) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(3, &d.minor) } -func (d *directory) StateTypeName() string { +func (dir *directory) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.directory" } -func (d *directory) StateFields() []string { +func (dir *directory) StateFields() []string { return []string{ "dentry", "inode", @@ -104,32 +104,32 @@ func (d *directory) StateFields() []string { } } -func (d *directory) beforeSave() {} +func (dir *directory) beforeSave() {} -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 (dir *directory) StateSave(stateSinkObject state.Sink) { + dir.beforeSave() + stateSinkObject.Save(0, &dir.dentry) + stateSinkObject.Save(1, &dir.inode) + stateSinkObject.Save(2, &dir.childMap) + stateSinkObject.Save(3, &dir.numChildren) + stateSinkObject.Save(4, &dir.childList) } -func (d *directory) afterLoad() {} +func (dir *directory) afterLoad() {} -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 (dir *directory) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &dir.dentry) + stateSourceObject.Load(1, &dir.inode) + stateSourceObject.Load(2, &dir.childMap) + stateSourceObject.Load(3, &dir.numChildren) + stateSourceObject.Load(4, &dir.childList) } -func (d *directoryFD) StateTypeName() string { +func (fd *directoryFD) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.directoryFD" } -func (d *directoryFD) StateFields() []string { +func (fd *directoryFD) StateFields() []string { return []string{ "fileDescription", "DirectoryFileDescriptionDefaultImpl", @@ -138,46 +138,46 @@ func (d *directoryFD) StateFields() []string { } } -func (d *directoryFD) beforeSave() {} +func (fd *directoryFD) beforeSave() {} -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 (fd *directoryFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.fileDescription) + stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl) + stateSinkObject.Save(2, &fd.iter) + stateSinkObject.Save(3, &fd.off) } -func (d *directoryFD) afterLoad() {} +func (fd *directoryFD) afterLoad() {} -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 (fd *directoryFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.fileDescription) + stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl) + stateSourceObject.Load(2, &fd.iter) + stateSourceObject.Load(3, &fd.off) } -func (i *inodeRefs) StateTypeName() string { +func (r *inodeRefs) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.inodeRefs" } -func (i *inodeRefs) StateFields() []string { +func (r *inodeRefs) StateFields() []string { return []string{ "refCount", } } -func (i *inodeRefs) beforeSave() {} +func (r *inodeRefs) beforeSave() {} -func (i *inodeRefs) StateSave(stateSinkObject state.Sink) { - i.beforeSave() - stateSinkObject.Save(0, &i.refCount) +func (r *inodeRefs) StateSave(stateSinkObject state.Sink) { + r.beforeSave() + stateSinkObject.Save(0, &r.refCount) } -func (i *inodeRefs) afterLoad() {} +func (r *inodeRefs) afterLoad() {} -func (i *inodeRefs) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &i.refCount) +func (r *inodeRefs) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &r.refCount) } func (n *namedPipe) StateTypeName() string { @@ -206,11 +206,11 @@ func (n *namedPipe) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(1, &n.pipe) } -func (r *regularFile) StateTypeName() string { +func (rf *regularFile) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.regularFile" } -func (r *regularFile) StateFields() []string { +func (rf *regularFile) StateFields() []string { return []string{ "inode", "memFile", @@ -223,57 +223,57 @@ func (r *regularFile) StateFields() []string { } } -func (r *regularFile) beforeSave() {} +func (rf *regularFile) beforeSave() {} -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 (r *regularFile) afterLoad() {} - -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 (r *regularFileFD) StateTypeName() string { +func (rf *regularFile) StateSave(stateSinkObject state.Sink) { + rf.beforeSave() + stateSinkObject.Save(0, &rf.inode) + stateSinkObject.Save(1, &rf.memFile) + stateSinkObject.Save(2, &rf.memoryUsageKind) + stateSinkObject.Save(3, &rf.mappings) + stateSinkObject.Save(4, &rf.writableMappingPages) + stateSinkObject.Save(5, &rf.data) + stateSinkObject.Save(6, &rf.seals) + stateSinkObject.Save(7, &rf.size) +} + +func (rf *regularFile) afterLoad() {} + +func (rf *regularFile) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &rf.inode) + stateSourceObject.Load(1, &rf.memFile) + stateSourceObject.Load(2, &rf.memoryUsageKind) + stateSourceObject.Load(3, &rf.mappings) + stateSourceObject.Load(4, &rf.writableMappingPages) + stateSourceObject.Load(5, &rf.data) + stateSourceObject.Load(6, &rf.seals) + stateSourceObject.Load(7, &rf.size) +} + +func (fd *regularFileFD) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.regularFileFD" } -func (r *regularFileFD) StateFields() []string { +func (fd *regularFileFD) StateFields() []string { return []string{ "fileDescription", "off", } } -func (r *regularFileFD) beforeSave() {} +func (fd *regularFileFD) beforeSave() {} -func (r *regularFileFD) StateSave(stateSinkObject state.Sink) { - r.beforeSave() - stateSinkObject.Save(0, &r.fileDescription) - stateSinkObject.Save(1, &r.off) +func (fd *regularFileFD) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.fileDescription) + stateSinkObject.Save(1, &fd.off) } -func (r *regularFileFD) afterLoad() {} +func (fd *regularFileFD) afterLoad() {} -func (r *regularFileFD) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &r.fileDescription) - stateSourceObject.Load(1, &r.off) +func (fd *regularFileFD) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.fileDescription) + stateSourceObject.Load(1, &fd.off) } func (s *socketFile) StateTypeName() string { @@ -328,30 +328,30 @@ func (s *symlink) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(1, &s.target) } -func (f *FilesystemType) StateTypeName() string { +func (fstype *FilesystemType) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.FilesystemType" } -func (f *FilesystemType) StateFields() []string { +func (fstype *FilesystemType) StateFields() []string { return []string{} } -func (f *FilesystemType) beforeSave() {} +func (fstype *FilesystemType) beforeSave() {} -func (f *FilesystemType) StateSave(stateSinkObject state.Sink) { - f.beforeSave() +func (fstype *FilesystemType) StateSave(stateSinkObject state.Sink) { + fstype.beforeSave() } -func (f *FilesystemType) afterLoad() {} +func (fstype *FilesystemType) afterLoad() {} -func (f *FilesystemType) StateLoad(stateSourceObject state.Source) { +func (fstype *FilesystemType) StateLoad(stateSourceObject state.Source) { } -func (f *filesystem) StateTypeName() string { +func (fs *filesystem) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.filesystem" } -func (f *filesystem) StateFields() []string { +func (fs *filesystem) StateFields() []string { return []string{ "vfsfs", "memFile", @@ -361,25 +361,25 @@ func (f *filesystem) StateFields() []string { } } -func (f *filesystem) beforeSave() {} +func (fs *filesystem) beforeSave() {} -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 (fs *filesystem) StateSave(stateSinkObject state.Sink) { + fs.beforeSave() + stateSinkObject.Save(0, &fs.vfsfs) + stateSinkObject.Save(1, &fs.memFile) + stateSinkObject.Save(2, &fs.clock) + stateSinkObject.Save(3, &fs.devMinor) + stateSinkObject.Save(4, &fs.nextInoMinusOne) } -func (f *filesystem) afterLoad() {} +func (fs *filesystem) afterLoad() {} -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 (fs *filesystem) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fs.vfsfs) + stateSourceObject.Load(1, &fs.memFile) + stateSourceObject.Load(2, &fs.clock) + stateSourceObject.Load(3, &fs.devMinor) + stateSourceObject.Load(4, &fs.nextInoMinusOne) } func (f *FilesystemOpts) StateTypeName() string { @@ -508,11 +508,11 @@ func (i *inode) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(13, &i.impl) } -func (f *fileDescription) StateTypeName() string { +func (fd *fileDescription) StateTypeName() string { return "pkg/sentry/fsimpl/tmpfs.fileDescription" } -func (f *fileDescription) StateFields() []string { +func (fd *fileDescription) StateFields() []string { return []string{ "vfsfd", "FileDescriptionDefaultImpl", @@ -520,21 +520,21 @@ func (f *fileDescription) StateFields() []string { } } -func (f *fileDescription) beforeSave() {} +func (fd *fileDescription) beforeSave() {} -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 (fd *fileDescription) StateSave(stateSinkObject state.Sink) { + fd.beforeSave() + stateSinkObject.Save(0, &fd.vfsfd) + stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl) + stateSinkObject.Save(2, &fd.LockFD) } -func (f *fileDescription) afterLoad() {} +func (fd *fileDescription) afterLoad() {} -func (f *fileDescription) StateLoad(stateSourceObject state.Source) { - stateSourceObject.Load(0, &f.vfsfd) - stateSourceObject.Load(1, &f.FileDescriptionDefaultImpl) - stateSourceObject.Load(2, &f.LockFD) +func (fd *fileDescription) StateLoad(stateSourceObject state.Source) { + stateSourceObject.Load(0, &fd.vfsfd) + stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl) + stateSourceObject.Load(2, &fd.LockFD) } func init() { |