summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-08-12 08:44:47 +0000
committergVisor bot <gvisor-bot@google.com>2021-08-12 08:44:47 +0000
commit5bd8f886db24151734e03497661e5521d1dfcc48 (patch)
treedb4948a593ba768c6b14796aa715ffd84473d0a2 /pkg
parent7e3845c246594cf53f846a6b3adf0b601368dd52 (diff)
parent3416a3db77bf80cc1100b7d206fe0b68d424d7c9 (diff)
Merge release-20210726.0-57-g3416a3db7 (automated)
Diffstat (limited to 'pkg')
-rw-r--r--pkg/refs/refs_state_autogen.go3
-rw-r--r--pkg/safemem/io.go52
-rw-r--r--pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go3
-rw-r--r--pkg/sentry/fs/fs_state_autogen.go3
-rw-r--r--pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go9
-rw-r--r--pkg/sentry/fs/gofer/gofer_state_autogen.go3
-rw-r--r--pkg/sentry/fs/lock/lock_state_autogen.go3
-rw-r--r--pkg/sentry/fsimpl/fuse/fuse_state_autogen.go6
-rw-r--r--pkg/sentry/kernel/auth/auth_state_autogen.go3
-rw-r--r--pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go3
-rw-r--r--pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go3
-rw-r--r--pkg/sentry/kernel/kernel_state_autogen.go24
-rw-r--r--pkg/sentry/loader/loader_state_autogen.go3
-rw-r--r--pkg/sentry/memmap/memmap_impl_state_autogen.go3
-rw-r--r--pkg/sentry/mm/mm_state_autogen.go12
-rw-r--r--pkg/sentry/pgalloc/pgalloc_state_autogen.go9
-rw-r--r--pkg/sentry/socket/unix/transport/transport_state_autogen.go3
-rw-r--r--pkg/sentry/vfs/vfs_state_autogen.go9
-rw-r--r--pkg/tcpip/stack/stack_state_autogen.go3
-rw-r--r--pkg/tcpip/transport/icmp/icmp_state_autogen.go6
-rw-r--r--pkg/tcpip/transport/packet/packet_state_autogen.go6
-rw-r--r--pkg/tcpip/transport/raw/raw_state_autogen.go6
-rw-r--r--pkg/tcpip/transport/tcp/tcp_state_autogen.go12
-rw-r--r--pkg/tcpip/transport/udp/udp_state_autogen.go6
24 files changed, 94 insertions, 99 deletions
diff --git a/pkg/refs/refs_state_autogen.go b/pkg/refs/refs_state_autogen.go
index 53d22d315..86a102119 100644
--- a/pkg/refs/refs_state_autogen.go
+++ b/pkg/refs/refs_state_autogen.go
@@ -22,7 +22,8 @@ func (w *WeakRef) beforeSave() {}
// +checklocksignore
func (w *WeakRef) StateSave(stateSinkObject state.Sink) {
w.beforeSave()
- var objValue savedReference = w.saveObj()
+ var objValue savedReference
+ objValue = w.saveObj()
stateSinkObject.SaveValue(0, objValue)
stateSinkObject.Save(1, &w.user)
}
diff --git a/pkg/safemem/io.go b/pkg/safemem/io.go
index f039a5c34..9551ca853 100644
--- a/pkg/safemem/io.go
+++ b/pkg/safemem/io.go
@@ -207,58 +207,6 @@ func (r FromIOReader) readToBlock(dst Block, buf []byte) (int, []byte, error) {
return wbn, buf, rerr
}
-// FromIOReaderAt implements Reader for an io.ReaderAt. Does not repeatedly
-// invoke io.ReaderAt.ReadAt because ReadAt is more strict than Read. A partial
-// read indicates an error. This is not thread-safe.
-type FromIOReaderAt struct {
- ReaderAt io.ReaderAt
- Offset int64
-}
-
-// ReadToBlocks implements Reader.ReadToBlocks.
-func (r FromIOReaderAt) ReadToBlocks(dsts BlockSeq) (uint64, error) {
- var buf []byte
- var done uint64
- for !dsts.IsEmpty() {
- dst := dsts.Head()
- var n int
- var err error
- n, buf, err = r.readToBlock(dst, buf)
- done += uint64(n)
- if n != dst.Len() {
- return done, err
- }
- dsts = dsts.Tail()
- if err != nil {
- if dsts.IsEmpty() && err == io.EOF {
- return done, nil
- }
- return done, err
- }
- }
- return done, nil
-}
-
-func (r FromIOReaderAt) readToBlock(dst Block, buf []byte) (int, []byte, error) {
- // io.Reader isn't safecopy-aware, so we have to buffer Blocks that require
- // safecopy.
- if !dst.NeedSafecopy() {
- n, err := r.ReaderAt.ReadAt(dst.ToSlice(), r.Offset)
- r.Offset += int64(n)
- return n, buf, err
- }
- if len(buf) < dst.Len() {
- buf = make([]byte, dst.Len())
- }
- rn, rerr := r.ReaderAt.ReadAt(buf[:dst.Len()], r.Offset)
- r.Offset += int64(rn)
- wbn, wberr := Copy(dst, BlockFromSafeSlice(buf[:rn]))
- if wberr != nil {
- return wbn, buf, wberr
- }
- return wbn, buf, rerr
-}
-
// FromIOWriter implements Writer for an io.Writer by repeatedly invoking
// io.Writer.Write until it returns an error or partial write.
//
diff --git a/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go b/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go
index 92dcd2391..68406ce66 100644
--- a/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go
+++ b/pkg/sentry/fs/fdpipe/fdpipe_state_autogen.go
@@ -22,7 +22,8 @@ func (p *pipeOperations) StateFields() []string {
// +checklocksignore
func (p *pipeOperations) StateSave(stateSinkObject state.Sink) {
p.beforeSave()
- var flagsValue fs.FileFlags = p.saveFlags()
+ var flagsValue fs.FileFlags
+ flagsValue = p.saveFlags()
stateSinkObject.SaveValue(0, flagsValue)
stateSinkObject.Save(1, &p.opener)
stateSinkObject.Save(2, &p.readAheadBuffer)
diff --git a/pkg/sentry/fs/fs_state_autogen.go b/pkg/sentry/fs/fs_state_autogen.go
index a4a67fca2..62ab34d6f 100644
--- a/pkg/sentry/fs/fs_state_autogen.go
+++ b/pkg/sentry/fs/fs_state_autogen.go
@@ -328,7 +328,8 @@ func (d *Dirent) StateFields() []string {
// +checklocksignore
func (d *Dirent) StateSave(stateSinkObject state.Sink) {
d.beforeSave()
- var childrenValue map[string]*Dirent = d.saveChildren()
+ var childrenValue map[string]*Dirent
+ childrenValue = d.saveChildren()
stateSinkObject.SaveValue(7, childrenValue)
stateSinkObject.Save(0, &d.AtomicRefCount)
stateSinkObject.Save(1, &d.userVisible)
diff --git a/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go b/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go
index b7f95bde7..9671c2349 100644
--- a/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go
+++ b/pkg/sentry/fs/fsutil/fsutil_impl_state_autogen.go
@@ -21,7 +21,8 @@ func (s *DirtySet) beforeSave() {}
// +checklocksignore
func (s *DirtySet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *DirtySegmentDataSlices = s.saveRoot()
+ var rootValue *DirtySegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
@@ -124,7 +125,8 @@ func (s *FileRangeSet) beforeSave() {}
// +checklocksignore
func (s *FileRangeSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *FileRangeSegmentDataSlices = s.saveRoot()
+ var rootValue *FileRangeSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
@@ -227,7 +229,8 @@ func (s *FrameRefSet) beforeSave() {}
// +checklocksignore
func (s *FrameRefSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *FrameRefSegmentDataSlices = s.saveRoot()
+ var rootValue *FrameRefSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
diff --git a/pkg/sentry/fs/gofer/gofer_state_autogen.go b/pkg/sentry/fs/gofer/gofer_state_autogen.go
index d22ecc3c2..e36638c37 100644
--- a/pkg/sentry/fs/gofer/gofer_state_autogen.go
+++ b/pkg/sentry/fs/gofer/gofer_state_autogen.go
@@ -130,7 +130,8 @@ func (i *inodeFileState) StateFields() []string {
// +checklocksignore
func (i *inodeFileState) StateSave(stateSinkObject state.Sink) {
i.beforeSave()
- var loadingValue struct{} = i.saveLoading()
+ var loadingValue struct{}
+ loadingValue = i.saveLoading()
stateSinkObject.SaveValue(2, loadingValue)
stateSinkObject.Save(0, &i.s)
stateSinkObject.Save(1, &i.sattr)
diff --git a/pkg/sentry/fs/lock/lock_state_autogen.go b/pkg/sentry/fs/lock/lock_state_autogen.go
index a0ad18763..4a9d0a1d8 100644
--- a/pkg/sentry/fs/lock/lock_state_autogen.go
+++ b/pkg/sentry/fs/lock/lock_state_autogen.go
@@ -133,7 +133,8 @@ func (s *LockSet) beforeSave() {}
// +checklocksignore
func (s *LockSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *LockSegmentDataSlices = s.saveRoot()
+ var rootValue *LockSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
diff --git a/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go b/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go
index f61e010dc..711a6c425 100644
--- a/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go
+++ b/pkg/sentry/fsimpl/fuse/fuse_state_autogen.go
@@ -42,7 +42,8 @@ func (conn *connection) beforeSave() {}
// +checklocksignore
func (conn *connection) StateSave(stateSinkObject state.Sink) {
conn.beforeSave()
- var initializedChanValue bool = conn.saveInitializedChan()
+ var initializedChanValue bool
+ initializedChanValue = conn.saveInitializedChan()
stateSinkObject.SaveValue(3, initializedChanValue)
stateSinkObject.Save(0, &conn.fd)
stateSinkObject.Save(1, &conn.attributeVersion)
@@ -144,7 +145,8 @@ func (fd *DeviceFD) beforeSave() {}
// +checklocksignore
func (fd *DeviceFD) StateSave(stateSinkObject state.Sink) {
fd.beforeSave()
- var fullQueueChValue int = fd.saveFullQueueCh()
+ var fullQueueChValue int
+ fullQueueChValue = fd.saveFullQueueCh()
stateSinkObject.SaveValue(12, fullQueueChValue)
stateSinkObject.Save(0, &fd.vfsfd)
stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl)
diff --git a/pkg/sentry/kernel/auth/auth_state_autogen.go b/pkg/sentry/kernel/auth/auth_state_autogen.go
index 5a7f55933..dea316420 100644
--- a/pkg/sentry/kernel/auth/auth_state_autogen.go
+++ b/pkg/sentry/kernel/auth/auth_state_autogen.go
@@ -141,7 +141,8 @@ func (s *idMapSet) beforeSave() {}
// +checklocksignore
func (s *idMapSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *idMapSegmentDataSlices = s.saveRoot()
+ var rootValue *idMapSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
diff --git a/pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go b/pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go
index 61f7e4ce9..28674a087 100644
--- a/pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go
+++ b/pkg/sentry/kernel/auth/auth_unsafe_state_autogen.go
@@ -21,7 +21,8 @@ func (p *AtomicPtrCredentials) beforeSave() {}
// +checklocksignore
func (p *AtomicPtrCredentials) StateSave(stateSinkObject state.Sink) {
p.beforeSave()
- var ptrValue *Credentials = p.savePtr()
+ var ptrValue *Credentials
+ ptrValue = p.savePtr()
stateSinkObject.SaveValue(0, ptrValue)
}
diff --git a/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go b/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go
index 84bb180fc..b06acb209 100644
--- a/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go
+++ b/pkg/sentry/kernel/futex/futex_unsafe_state_autogen.go
@@ -21,7 +21,8 @@ func (p *AtomicPtrBucket) beforeSave() {}
// +checklocksignore
func (p *AtomicPtrBucket) StateSave(stateSinkObject state.Sink) {
p.beforeSave()
- var ptrValue *bucket = p.savePtr()
+ var ptrValue *bucket
+ ptrValue = p.savePtr()
stateSinkObject.SaveValue(0, ptrValue)
}
diff --git a/pkg/sentry/kernel/kernel_state_autogen.go b/pkg/sentry/kernel/kernel_state_autogen.go
index fc07a1251..d48c96425 100644
--- a/pkg/sentry/kernel/kernel_state_autogen.go
+++ b/pkg/sentry/kernel/kernel_state_autogen.go
@@ -231,7 +231,8 @@ func (f *FDTable) beforeSave() {}
// +checklocksignore
func (f *FDTable) StateSave(stateSinkObject state.Sink) {
f.beforeSave()
- var descriptorTableValue map[int32]descriptor = f.saveDescriptorTable()
+ var descriptorTableValue map[int32]descriptor
+ descriptorTableValue = f.saveDescriptorTable()
stateSinkObject.SaveValue(2, descriptorTableValue)
stateSinkObject.Save(0, &f.FDTableRefs)
stateSinkObject.Save(1, &f.k)
@@ -447,9 +448,11 @@ func (k *Kernel) beforeSave() {}
// +checklocksignore
func (k *Kernel) StateSave(stateSinkObject state.Sink) {
k.beforeSave()
- var danglingEndpointsValue []tcpip.Endpoint = k.saveDanglingEndpoints()
+ var danglingEndpointsValue []tcpip.Endpoint
+ danglingEndpointsValue = k.saveDanglingEndpoints()
stateSinkObject.SaveValue(22, danglingEndpointsValue)
- var deviceRegistryValue *device.Registry = k.saveDeviceRegistry()
+ var deviceRegistryValue *device.Registry
+ deviceRegistryValue = k.saveDeviceRegistry()
stateSinkObject.SaveValue(26, deviceRegistryValue)
stateSinkObject.Save(0, &k.featureSet)
stateSinkObject.Save(1, &k.timekeeper)
@@ -610,7 +613,8 @@ func (p *pendingSignals) beforeSave() {}
// +checklocksignore
func (p *pendingSignals) StateSave(stateSinkObject state.Sink) {
p.beforeSave()
- var signalsValue []savedPendingSignal = p.saveSignals()
+ var signalsValue []savedPendingSignal
+ signalsValue = p.saveSignals()
stateSinkObject.SaveValue(0, signalsValue)
}
@@ -1376,9 +1380,11 @@ func (t *Task) StateSave(stateSinkObject state.Sink) {
if !state.IsZeroValue(&t.signalQueue) {
state.Failf("signalQueue is %#v, expected zero", &t.signalQueue)
}
- var ptraceTracerValue *Task = t.savePtraceTracer()
+ var ptraceTracerValue *Task
+ ptraceTracerValue = t.savePtraceTracer()
stateSinkObject.SaveValue(31, ptraceTracerValue)
- var syscallFiltersValue []bpf.Program = t.saveSyscallFilters()
+ var syscallFiltersValue []bpf.Program
+ syscallFiltersValue = t.saveSyscallFilters()
stateSinkObject.SaveValue(48, syscallFiltersValue)
stateSinkObject.Save(0, &t.taskNode)
stateSinkObject.Save(1, &t.runState)
@@ -1715,7 +1721,8 @@ func (image *TaskImage) beforeSave() {}
// +checklocksignore
func (image *TaskImage) StateSave(stateSinkObject state.Sink) {
image.beforeSave()
- var stValue syscallTableInfo = image.saveSt()
+ var stValue syscallTableInfo
+ stValue = image.saveSt()
stateSinkObject.SaveValue(4, stValue)
stateSinkObject.Save(0, &image.Name)
stateSinkObject.Save(1, &image.Arch)
@@ -2095,7 +2102,8 @@ func (tg *ThreadGroup) beforeSave() {}
// +checklocksignore
func (tg *ThreadGroup) StateSave(stateSinkObject state.Sink) {
tg.beforeSave()
- var oldRSeqCriticalValue *OldRSeqCriticalRegion = tg.saveOldRSeqCritical()
+ var oldRSeqCriticalValue *OldRSeqCriticalRegion
+ oldRSeqCriticalValue = tg.saveOldRSeqCritical()
stateSinkObject.SaveValue(29, oldRSeqCriticalValue)
stateSinkObject.Save(0, &tg.threadGroupNode)
stateSinkObject.Save(1, &tg.signalHandlers)
diff --git a/pkg/sentry/loader/loader_state_autogen.go b/pkg/sentry/loader/loader_state_autogen.go
index 7d001c54b..84f3fbb19 100644
--- a/pkg/sentry/loader/loader_state_autogen.go
+++ b/pkg/sentry/loader/loader_state_autogen.go
@@ -25,7 +25,8 @@ func (v *VDSO) beforeSave() {}
// +checklocksignore
func (v *VDSO) StateSave(stateSinkObject state.Sink) {
v.beforeSave()
- var phdrsValue []elfProgHeader = v.savePhdrs()
+ var phdrsValue []elfProgHeader
+ phdrsValue = v.savePhdrs()
stateSinkObject.SaveValue(4, phdrsValue)
stateSinkObject.Save(0, &v.ParamPage)
stateSinkObject.Save(1, &v.vdso)
diff --git a/pkg/sentry/memmap/memmap_impl_state_autogen.go b/pkg/sentry/memmap/memmap_impl_state_autogen.go
index d65558bbe..02c96e66d 100644
--- a/pkg/sentry/memmap/memmap_impl_state_autogen.go
+++ b/pkg/sentry/memmap/memmap_impl_state_autogen.go
@@ -21,7 +21,8 @@ func (s *MappingSet) beforeSave() {}
// +checklocksignore
func (s *MappingSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *MappingSegmentDataSlices = s.saveRoot()
+ var rootValue *MappingSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
diff --git a/pkg/sentry/mm/mm_state_autogen.go b/pkg/sentry/mm/mm_state_autogen.go
index c4cdf8bd2..cf5992fe1 100644
--- a/pkg/sentry/mm/mm_state_autogen.go
+++ b/pkg/sentry/mm/mm_state_autogen.go
@@ -162,7 +162,8 @@ func (s *fileRefcountSet) beforeSave() {}
// +checklocksignore
func (s *fileRefcountSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *fileRefcountSegmentDataSlices = s.saveRoot()
+ var rootValue *fileRefcountSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
@@ -426,7 +427,8 @@ func (vma *vma) beforeSave() {}
// +checklocksignore
func (vma *vma) StateSave(stateSinkObject state.Sink) {
vma.beforeSave()
- var realPermsValue int = vma.saveRealPerms()
+ var realPermsValue int
+ realPermsValue = vma.saveRealPerms()
stateSinkObject.SaveValue(2, realPermsValue)
stateSinkObject.Save(0, &vma.mappable)
stateSinkObject.Save(1, &vma.off)
@@ -533,7 +535,8 @@ func (s *pmaSet) beforeSave() {}
// +checklocksignore
func (s *pmaSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *pmaSegmentDataSlices = s.saveRoot()
+ var rootValue *pmaSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
@@ -694,7 +697,8 @@ func (s *vmaSet) beforeSave() {}
// +checklocksignore
func (s *vmaSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *vmaSegmentDataSlices = s.saveRoot()
+ var rootValue *vmaSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
diff --git a/pkg/sentry/pgalloc/pgalloc_state_autogen.go b/pkg/sentry/pgalloc/pgalloc_state_autogen.go
index 272186381..e1df238fb 100644
--- a/pkg/sentry/pgalloc/pgalloc_state_autogen.go
+++ b/pkg/sentry/pgalloc/pgalloc_state_autogen.go
@@ -49,7 +49,8 @@ func (s *evictableRangeSet) beforeSave() {}
// +checklocksignore
func (s *evictableRangeSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *evictableRangeSegmentDataSlices = s.saveRoot()
+ var rootValue *evictableRangeSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
@@ -183,7 +184,8 @@ func (s *reclaimSet) beforeSave() {}
// +checklocksignore
func (s *reclaimSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *reclaimSegmentDataSlices = s.saveRoot()
+ var rootValue *reclaimSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
@@ -286,7 +288,8 @@ func (s *usageSet) beforeSave() {}
// +checklocksignore
func (s *usageSet) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var rootValue *usageSegmentDataSlices = s.saveRoot()
+ var rootValue *usageSegmentDataSlices
+ rootValue = s.saveRoot()
stateSinkObject.SaveValue(0, rootValue)
}
diff --git a/pkg/sentry/socket/unix/transport/transport_state_autogen.go b/pkg/sentry/socket/unix/transport/transport_state_autogen.go
index 946b0032e..730a89b9c 100644
--- a/pkg/sentry/socket/unix/transport/transport_state_autogen.go
+++ b/pkg/sentry/socket/unix/transport/transport_state_autogen.go
@@ -25,7 +25,8 @@ func (e *connectionedEndpoint) beforeSave() {}
// +checklocksignore
func (e *connectionedEndpoint) StateSave(stateSinkObject state.Sink) {
e.beforeSave()
- var acceptedChanValue []*connectionedEndpoint = e.saveAcceptedChan()
+ var acceptedChanValue []*connectionedEndpoint
+ acceptedChanValue = e.saveAcceptedChan()
stateSinkObject.SaveValue(4, acceptedChanValue)
stateSinkObject.Save(0, &e.baseEndpoint)
stateSinkObject.Save(1, &e.id)
diff --git a/pkg/sentry/vfs/vfs_state_autogen.go b/pkg/sentry/vfs/vfs_state_autogen.go
index 364adcc0f..a460f4055 100644
--- a/pkg/sentry/vfs/vfs_state_autogen.go
+++ b/pkg/sentry/vfs/vfs_state_autogen.go
@@ -654,7 +654,8 @@ func (fd *DynamicBytesFileDescriptionImpl) beforeSave() {}
// +checklocksignore
func (fd *DynamicBytesFileDescriptionImpl) StateSave(stateSinkObject state.Sink) {
fd.beforeSave()
- var bufValue []byte = fd.saveBuf()
+ var bufValue []byte
+ bufValue = fd.saveBuf()
stateSinkObject.SaveValue(1, bufValue)
stateSinkObject.Save(0, &fd.data)
stateSinkObject.Save(2, &fd.off)
@@ -1157,7 +1158,8 @@ func (mnt *Mount) beforeSave() {}
// +checklocksignore
func (mnt *Mount) StateSave(stateSinkObject state.Sink) {
mnt.beforeSave()
- var keyValue VirtualDentry = mnt.saveKey()
+ var keyValue VirtualDentry
+ keyValue = mnt.saveKey()
stateSinkObject.SaveValue(5, keyValue)
stateSinkObject.Save(0, &mnt.vfs)
stateSinkObject.Save(1, &mnt.fs)
@@ -1891,7 +1893,8 @@ func (vfs *VirtualFilesystem) beforeSave() {}
// +checklocksignore
func (vfs *VirtualFilesystem) StateSave(stateSinkObject state.Sink) {
vfs.beforeSave()
- var mountsValue []*Mount = vfs.saveMounts()
+ var mountsValue []*Mount
+ mountsValue = vfs.saveMounts()
stateSinkObject.SaveValue(0, mountsValue)
stateSinkObject.Save(1, &vfs.mountpoints)
stateSinkObject.Save(2, &vfs.lastMountID)
diff --git a/pkg/tcpip/stack/stack_state_autogen.go b/pkg/tcpip/stack/stack_state_autogen.go
index 037c7b745..54f2574ac 100644
--- a/pkg/tcpip/stack/stack_state_autogen.go
+++ b/pkg/tcpip/stack/stack_state_autogen.go
@@ -100,7 +100,8 @@ func (cn *conn) beforeSave() {}
// +checklocksignore
func (cn *conn) StateSave(stateSinkObject state.Sink) {
cn.beforeSave()
- var lastUsedValue unixTime = cn.saveLastUsed()
+ var lastUsedValue unixTime
+ lastUsedValue = cn.saveLastUsed()
stateSinkObject.SaveValue(5, lastUsedValue)
stateSinkObject.Save(0, &cn.original)
stateSinkObject.Save(1, &cn.reply)
diff --git a/pkg/tcpip/transport/icmp/icmp_state_autogen.go b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
index acfc8ff5f..d90b76d9c 100644
--- a/pkg/tcpip/transport/icmp/icmp_state_autogen.go
+++ b/pkg/tcpip/transport/icmp/icmp_state_autogen.go
@@ -25,9 +25,11 @@ func (p *icmpPacket) beforeSave() {}
// +checklocksignore
func (p *icmpPacket) StateSave(stateSinkObject state.Sink) {
p.beforeSave()
- var dataValue buffer.VectorisedView = p.saveData()
+ var dataValue buffer.VectorisedView
+ dataValue = p.saveData()
stateSinkObject.SaveValue(2, dataValue)
- var receivedAtValue int64 = p.saveReceivedAt()
+ var receivedAtValue int64
+ receivedAtValue = p.saveReceivedAt()
stateSinkObject.SaveValue(3, receivedAtValue)
stateSinkObject.Save(0, &p.icmpPacketEntry)
stateSinkObject.Save(1, &p.senderAddress)
diff --git a/pkg/tcpip/transport/packet/packet_state_autogen.go b/pkg/tcpip/transport/packet/packet_state_autogen.go
index 304f67c12..2640a55d0 100644
--- a/pkg/tcpip/transport/packet/packet_state_autogen.go
+++ b/pkg/tcpip/transport/packet/packet_state_autogen.go
@@ -26,9 +26,11 @@ func (p *packet) beforeSave() {}
// +checklocksignore
func (p *packet) StateSave(stateSinkObject state.Sink) {
p.beforeSave()
- var dataValue buffer.VectorisedView = p.saveData()
+ var dataValue buffer.VectorisedView
+ dataValue = p.saveData()
stateSinkObject.SaveValue(1, dataValue)
- var receivedAtValue int64 = p.saveReceivedAt()
+ var receivedAtValue int64
+ receivedAtValue = p.saveReceivedAt()
stateSinkObject.SaveValue(2, receivedAtValue)
stateSinkObject.Save(0, &p.packetEntry)
stateSinkObject.Save(3, &p.senderAddr)
diff --git a/pkg/tcpip/transport/raw/raw_state_autogen.go b/pkg/tcpip/transport/raw/raw_state_autogen.go
index aaeed9775..0d65444d2 100644
--- a/pkg/tcpip/transport/raw/raw_state_autogen.go
+++ b/pkg/tcpip/transport/raw/raw_state_autogen.go
@@ -25,9 +25,11 @@ func (p *rawPacket) beforeSave() {}
// +checklocksignore
func (p *rawPacket) StateSave(stateSinkObject state.Sink) {
p.beforeSave()
- var dataValue buffer.VectorisedView = p.saveData()
+ var dataValue buffer.VectorisedView
+ dataValue = p.saveData()
stateSinkObject.SaveValue(1, dataValue)
- var receivedAtValue int64 = p.saveReceivedAt()
+ var receivedAtValue int64
+ receivedAtValue = p.saveReceivedAt()
stateSinkObject.SaveValue(2, receivedAtValue)
stateSinkObject.Save(0, &p.rawPacketEntry)
stateSinkObject.Save(3, &p.senderAddr)
diff --git a/pkg/tcpip/transport/tcp/tcp_state_autogen.go b/pkg/tcpip/transport/tcp/tcp_state_autogen.go
index 9c46d31d7..13061d2b1 100644
--- a/pkg/tcpip/transport/tcp/tcp_state_autogen.go
+++ b/pkg/tcpip/transport/tcp/tcp_state_autogen.go
@@ -135,7 +135,8 @@ func (a *accepted) beforeSave() {}
// +checklocksignore
func (a *accepted) StateSave(stateSinkObject state.Sink) {
a.beforeSave()
- var endpointsValue []*endpoint = a.saveEndpoints()
+ var endpointsValue []*endpoint
+ endpointsValue = a.saveEndpoints()
stateSinkObject.SaveValue(0, endpointsValue)
stateSinkObject.Save(1, &a.cap)
}
@@ -210,7 +211,8 @@ func (e *endpoint) StateFields() []string {
// +checklocksignore
func (e *endpoint) StateSave(stateSinkObject state.Sink) {
e.beforeSave()
- var stateValue EndpointState = e.saveState()
+ var stateValue EndpointState
+ stateValue = e.saveState()
stateSinkObject.SaveValue(10, stateValue)
stateSinkObject.Save(0, &e.TCPEndpointStateInner)
stateSinkObject.Save(1, &e.TransportEndpointInfo)
@@ -580,9 +582,11 @@ func (s *segment) beforeSave() {}
// +checklocksignore
func (s *segment) StateSave(stateSinkObject state.Sink) {
s.beforeSave()
- var dataValue buffer.VectorisedView = s.saveData()
+ var dataValue buffer.VectorisedView
+ dataValue = s.saveData()
stateSinkObject.SaveValue(8, dataValue)
- var optionsValue []byte = s.saveOptions()
+ var optionsValue []byte
+ optionsValue = s.saveOptions()
stateSinkObject.SaveValue(17, optionsValue)
stateSinkObject.Save(0, &s.segmentEntry)
stateSinkObject.Save(1, &s.refCnt)
diff --git a/pkg/tcpip/transport/udp/udp_state_autogen.go b/pkg/tcpip/transport/udp/udp_state_autogen.go
index 6a3da67e2..fd87cf524 100644
--- a/pkg/tcpip/transport/udp/udp_state_autogen.go
+++ b/pkg/tcpip/transport/udp/udp_state_autogen.go
@@ -28,9 +28,11 @@ func (p *udpPacket) beforeSave() {}
// +checklocksignore
func (p *udpPacket) StateSave(stateSinkObject state.Sink) {
p.beforeSave()
- var dataValue buffer.VectorisedView = p.saveData()
+ var dataValue buffer.VectorisedView
+ dataValue = p.saveData()
stateSinkObject.SaveValue(4, dataValue)
- var receivedAtValue int64 = p.saveReceivedAt()
+ var receivedAtValue int64
+ receivedAtValue = p.saveReceivedAt()
stateSinkObject.SaveValue(5, receivedAtValue)
stateSinkObject.Save(0, &p.udpPacketEntry)
stateSinkObject.Save(1, &p.senderAddress)