summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/kernfs
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fsimpl/kernfs')
-rw-r--r--pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go58
1 files changed, 58 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go b/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go
index 7ac76bd5b..5b8d033ec 100644
--- a/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go
+++ b/pkg/sentry/fsimpl/kernfs/kernfs_state_autogen.go
@@ -19,6 +19,7 @@ func (l *dentryList) StateFields() []string {
func (l *dentryList) beforeSave() {}
+// +checklocksignore
func (l *dentryList) StateSave(stateSinkObject state.Sink) {
l.beforeSave()
stateSinkObject.Save(0, &l.head)
@@ -27,6 +28,7 @@ func (l *dentryList) StateSave(stateSinkObject state.Sink) {
func (l *dentryList) afterLoad() {}
+// +checklocksignore
func (l *dentryList) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &l.head)
stateSourceObject.Load(1, &l.tail)
@@ -45,6 +47,7 @@ func (e *dentryEntry) StateFields() []string {
func (e *dentryEntry) beforeSave() {}
+// +checklocksignore
func (e *dentryEntry) StateSave(stateSinkObject state.Sink) {
e.beforeSave()
stateSinkObject.Save(0, &e.next)
@@ -53,6 +56,7 @@ func (e *dentryEntry) StateSave(stateSinkObject state.Sink) {
func (e *dentryEntry) afterLoad() {}
+// +checklocksignore
func (e *dentryEntry) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &e.next)
stateSourceObject.Load(1, &e.prev)
@@ -76,6 +80,7 @@ func (f *DynamicBytesFile) StateFields() []string {
func (f *DynamicBytesFile) beforeSave() {}
+// +checklocksignore
func (f *DynamicBytesFile) StateSave(stateSinkObject state.Sink) {
f.beforeSave()
stateSinkObject.Save(0, &f.InodeAttrs)
@@ -89,6 +94,7 @@ func (f *DynamicBytesFile) StateSave(stateSinkObject state.Sink) {
func (f *DynamicBytesFile) afterLoad() {}
+// +checklocksignore
func (f *DynamicBytesFile) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &f.InodeAttrs)
stateSourceObject.Load(1, &f.InodeNoStatFS)
@@ -115,6 +121,7 @@ func (fd *DynamicBytesFD) StateFields() []string {
func (fd *DynamicBytesFD) beforeSave() {}
+// +checklocksignore
func (fd *DynamicBytesFD) StateSave(stateSinkObject state.Sink) {
fd.beforeSave()
stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl)
@@ -126,6 +133,7 @@ func (fd *DynamicBytesFD) StateSave(stateSinkObject state.Sink) {
func (fd *DynamicBytesFD) afterLoad() {}
+// +checklocksignore
func (fd *DynamicBytesFD) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl)
stateSourceObject.Load(1, &fd.DynamicBytesFileDescriptionImpl)
@@ -154,6 +162,7 @@ func (g *GenericDirectoryFDOptions) StateFields() []string {
func (g *GenericDirectoryFDOptions) beforeSave() {}
+// +checklocksignore
func (g *GenericDirectoryFDOptions) StateSave(stateSinkObject state.Sink) {
g.beforeSave()
stateSinkObject.Save(0, &g.SeekEnd)
@@ -161,6 +170,7 @@ func (g *GenericDirectoryFDOptions) StateSave(stateSinkObject state.Sink) {
func (g *GenericDirectoryFDOptions) afterLoad() {}
+// +checklocksignore
func (g *GenericDirectoryFDOptions) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &g.SeekEnd)
}
@@ -183,6 +193,7 @@ func (fd *GenericDirectoryFD) StateFields() []string {
func (fd *GenericDirectoryFD) beforeSave() {}
+// +checklocksignore
func (fd *GenericDirectoryFD) StateSave(stateSinkObject state.Sink) {
fd.beforeSave()
stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl)
@@ -196,6 +207,7 @@ func (fd *GenericDirectoryFD) StateSave(stateSinkObject state.Sink) {
func (fd *GenericDirectoryFD) afterLoad() {}
+// +checklocksignore
func (fd *GenericDirectoryFD) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl)
stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl)
@@ -218,6 +230,7 @@ func (i *InodeNoopRefCount) StateFields() []string {
func (i *InodeNoopRefCount) beforeSave() {}
+// +checklocksignore
func (i *InodeNoopRefCount) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.InodeTemporary)
@@ -225,6 +238,7 @@ func (i *InodeNoopRefCount) StateSave(stateSinkObject state.Sink) {
func (i *InodeNoopRefCount) afterLoad() {}
+// +checklocksignore
func (i *InodeNoopRefCount) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.InodeTemporary)
}
@@ -239,12 +253,14 @@ func (i *InodeDirectoryNoNewChildren) StateFields() []string {
func (i *InodeDirectoryNoNewChildren) beforeSave() {}
+// +checklocksignore
func (i *InodeDirectoryNoNewChildren) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
}
func (i *InodeDirectoryNoNewChildren) afterLoad() {}
+// +checklocksignore
func (i *InodeDirectoryNoNewChildren) StateLoad(stateSourceObject state.Source) {
}
@@ -260,6 +276,7 @@ func (i *InodeNotDirectory) StateFields() []string {
func (i *InodeNotDirectory) beforeSave() {}
+// +checklocksignore
func (i *InodeNotDirectory) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.InodeAlwaysValid)
@@ -267,6 +284,7 @@ func (i *InodeNotDirectory) StateSave(stateSinkObject state.Sink) {
func (i *InodeNotDirectory) afterLoad() {}
+// +checklocksignore
func (i *InodeNotDirectory) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.InodeAlwaysValid)
}
@@ -281,12 +299,14 @@ func (i *InodeNotSymlink) StateFields() []string {
func (i *InodeNotSymlink) beforeSave() {}
+// +checklocksignore
func (i *InodeNotSymlink) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
}
func (i *InodeNotSymlink) afterLoad() {}
+// +checklocksignore
func (i *InodeNotSymlink) StateLoad(stateSourceObject state.Source) {
}
@@ -312,6 +332,7 @@ func (a *InodeAttrs) StateFields() []string {
func (a *InodeAttrs) beforeSave() {}
+// +checklocksignore
func (a *InodeAttrs) StateSave(stateSinkObject state.Sink) {
a.beforeSave()
stateSinkObject.Save(0, &a.devMajor)
@@ -329,6 +350,7 @@ func (a *InodeAttrs) StateSave(stateSinkObject state.Sink) {
func (a *InodeAttrs) afterLoad() {}
+// +checklocksignore
func (a *InodeAttrs) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &a.devMajor)
stateSourceObject.Load(1, &a.devMinor)
@@ -358,6 +380,7 @@ func (s *slot) StateFields() []string {
func (s *slot) beforeSave() {}
+// +checklocksignore
func (s *slot) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
stateSinkObject.Save(0, &s.name)
@@ -368,6 +391,7 @@ func (s *slot) StateSave(stateSinkObject state.Sink) {
func (s *slot) afterLoad() {}
+// +checklocksignore
func (s *slot) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &s.name)
stateSourceObject.Load(1, &s.inode)
@@ -387,6 +411,7 @@ func (o *OrderedChildrenOptions) StateFields() []string {
func (o *OrderedChildrenOptions) beforeSave() {}
+// +checklocksignore
func (o *OrderedChildrenOptions) StateSave(stateSinkObject state.Sink) {
o.beforeSave()
stateSinkObject.Save(0, &o.Writable)
@@ -394,6 +419,7 @@ func (o *OrderedChildrenOptions) StateSave(stateSinkObject state.Sink) {
func (o *OrderedChildrenOptions) afterLoad() {}
+// +checklocksignore
func (o *OrderedChildrenOptions) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &o.Writable)
}
@@ -412,6 +438,7 @@ func (o *OrderedChildren) StateFields() []string {
func (o *OrderedChildren) beforeSave() {}
+// +checklocksignore
func (o *OrderedChildren) StateSave(stateSinkObject state.Sink) {
o.beforeSave()
stateSinkObject.Save(0, &o.writable)
@@ -421,6 +448,7 @@ func (o *OrderedChildren) StateSave(stateSinkObject state.Sink) {
func (o *OrderedChildren) afterLoad() {}
+// +checklocksignore
func (o *OrderedChildren) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &o.writable)
stateSourceObject.Load(1, &o.order)
@@ -439,6 +467,7 @@ func (i *InodeSymlink) StateFields() []string {
func (i *InodeSymlink) beforeSave() {}
+// +checklocksignore
func (i *InodeSymlink) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.InodeNotDirectory)
@@ -446,6 +475,7 @@ func (i *InodeSymlink) StateSave(stateSinkObject state.Sink) {
func (i *InodeSymlink) afterLoad() {}
+// +checklocksignore
func (i *InodeSymlink) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.InodeNotDirectory)
}
@@ -471,6 +501,7 @@ func (s *StaticDirectory) StateFields() []string {
func (s *StaticDirectory) beforeSave() {}
+// +checklocksignore
func (s *StaticDirectory) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
stateSinkObject.Save(0, &s.InodeAlwaysValid)
@@ -487,6 +518,7 @@ func (s *StaticDirectory) StateSave(stateSinkObject state.Sink) {
func (s *StaticDirectory) afterLoad() {}
+// +checklocksignore
func (s *StaticDirectory) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &s.InodeAlwaysValid)
stateSourceObject.Load(1, &s.InodeAttrs)
@@ -510,12 +542,14 @@ func (i *InodeAlwaysValid) StateFields() []string {
func (i *InodeAlwaysValid) beforeSave() {}
+// +checklocksignore
func (i *InodeAlwaysValid) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
}
func (i *InodeAlwaysValid) afterLoad() {}
+// +checklocksignore
func (i *InodeAlwaysValid) StateLoad(stateSourceObject state.Source) {
}
@@ -529,12 +563,14 @@ func (i *InodeTemporary) StateFields() []string {
func (i *InodeTemporary) beforeSave() {}
+// +checklocksignore
func (i *InodeTemporary) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
}
func (i *InodeTemporary) afterLoad() {}
+// +checklocksignore
func (i *InodeTemporary) StateLoad(stateSourceObject state.Source) {
}
@@ -548,12 +584,14 @@ func (i *InodeNoStatFS) StateFields() []string {
func (i *InodeNoStatFS) beforeSave() {}
+// +checklocksignore
func (i *InodeNoStatFS) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
}
func (i *InodeNoStatFS) afterLoad() {}
+// +checklocksignore
func (i *InodeNoStatFS) StateLoad(stateSourceObject state.Source) {
}
@@ -575,6 +613,7 @@ func (fs *Filesystem) StateFields() []string {
func (fs *Filesystem) beforeSave() {}
+// +checklocksignore
func (fs *Filesystem) StateSave(stateSinkObject state.Sink) {
fs.beforeSave()
stateSinkObject.Save(0, &fs.vfsfs)
@@ -588,6 +627,7 @@ func (fs *Filesystem) StateSave(stateSinkObject state.Sink) {
func (fs *Filesystem) afterLoad() {}
+// +checklocksignore
func (fs *Filesystem) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &fs.vfsfs)
stateSourceObject.Load(1, &fs.droppedDentries)
@@ -619,6 +659,7 @@ func (d *Dentry) StateFields() []string {
func (d *Dentry) beforeSave() {}
+// +checklocksignore
func (d *Dentry) StateSave(stateSinkObject state.Sink) {
d.beforeSave()
stateSinkObject.Save(0, &d.vfsd)
@@ -633,6 +674,7 @@ func (d *Dentry) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(9, &d.inode)
}
+// +checklocksignore
func (d *Dentry) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &d.vfsd)
stateSourceObject.Load(1, &d.refs)
@@ -661,6 +703,7 @@ func (i *inodePlatformFile) StateFields() []string {
func (i *inodePlatformFile) beforeSave() {}
+// +checklocksignore
func (i *inodePlatformFile) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.hostFD)
@@ -668,6 +711,7 @@ func (i *inodePlatformFile) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(2, &i.fileMapper)
}
+// +checklocksignore
func (i *inodePlatformFile) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.hostFD)
stateSourceObject.Load(1, &i.fdRefs)
@@ -688,6 +732,7 @@ func (i *CachedMappable) StateFields() []string {
func (i *CachedMappable) beforeSave() {}
+// +checklocksignore
func (i *CachedMappable) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
stateSinkObject.Save(0, &i.mappings)
@@ -696,6 +741,7 @@ func (i *CachedMappable) StateSave(stateSinkObject state.Sink) {
func (i *CachedMappable) afterLoad() {}
+// +checklocksignore
func (i *CachedMappable) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.mappings)
stateSourceObject.Load(1, &i.pf)
@@ -714,6 +760,7 @@ func (l *slotList) StateFields() []string {
func (l *slotList) beforeSave() {}
+// +checklocksignore
func (l *slotList) StateSave(stateSinkObject state.Sink) {
l.beforeSave()
stateSinkObject.Save(0, &l.head)
@@ -722,6 +769,7 @@ func (l *slotList) StateSave(stateSinkObject state.Sink) {
func (l *slotList) afterLoad() {}
+// +checklocksignore
func (l *slotList) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &l.head)
stateSourceObject.Load(1, &l.tail)
@@ -740,6 +788,7 @@ func (e *slotEntry) StateFields() []string {
func (e *slotEntry) beforeSave() {}
+// +checklocksignore
func (e *slotEntry) StateSave(stateSinkObject state.Sink) {
e.beforeSave()
stateSinkObject.Save(0, &e.next)
@@ -748,6 +797,7 @@ func (e *slotEntry) StateSave(stateSinkObject state.Sink) {
func (e *slotEntry) afterLoad() {}
+// +checklocksignore
func (e *slotEntry) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &e.next)
stateSourceObject.Load(1, &e.prev)
@@ -765,11 +815,13 @@ func (r *StaticDirectoryRefs) StateFields() []string {
func (r *StaticDirectoryRefs) beforeSave() {}
+// +checklocksignore
func (r *StaticDirectoryRefs) StateSave(stateSinkObject state.Sink) {
r.beforeSave()
stateSinkObject.Save(0, &r.refCount)
}
+// +checklocksignore
func (r *StaticDirectoryRefs) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &r.refCount)
stateSourceObject.AfterLoad(r.afterLoad)
@@ -791,6 +843,7 @@ func (s *StaticSymlink) StateFields() []string {
func (s *StaticSymlink) beforeSave() {}
+// +checklocksignore
func (s *StaticSymlink) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
stateSinkObject.Save(0, &s.InodeAttrs)
@@ -802,6 +855,7 @@ func (s *StaticSymlink) StateSave(stateSinkObject state.Sink) {
func (s *StaticSymlink) afterLoad() {}
+// +checklocksignore
func (s *StaticSymlink) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &s.InodeAttrs)
stateSourceObject.Load(1, &s.InodeNoopRefCount)
@@ -828,6 +882,7 @@ func (dir *syntheticDirectory) StateFields() []string {
func (dir *syntheticDirectory) beforeSave() {}
+// +checklocksignore
func (dir *syntheticDirectory) StateSave(stateSinkObject state.Sink) {
dir.beforeSave()
stateSinkObject.Save(0, &dir.InodeAlwaysValid)
@@ -841,6 +896,7 @@ func (dir *syntheticDirectory) StateSave(stateSinkObject state.Sink) {
func (dir *syntheticDirectory) afterLoad() {}
+// +checklocksignore
func (dir *syntheticDirectory) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &dir.InodeAlwaysValid)
stateSourceObject.Load(1, &dir.InodeAttrs)
@@ -863,11 +919,13 @@ func (r *syntheticDirectoryRefs) StateFields() []string {
func (r *syntheticDirectoryRefs) beforeSave() {}
+// +checklocksignore
func (r *syntheticDirectoryRefs) StateSave(stateSinkObject state.Sink) {
r.beforeSave()
stateSinkObject.Save(0, &r.refCount)
}
+// +checklocksignore
func (r *syntheticDirectoryRefs) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &r.refCount)
stateSourceObject.AfterLoad(r.afterLoad)