github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/vfs/vfs_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  //go:build !check_invariants
     4  // +build !check_invariants
     5  
     6  package vfs
     7  
     8  import (
     9  	"github.com/ttpreport/gvisor-ligolo/pkg/state"
    10  )
    11  
    12  func (a *anonFilesystemType) StateTypeName() string {
    13  	return "pkg/sentry/vfs.anonFilesystemType"
    14  }
    15  
    16  func (a *anonFilesystemType) StateFields() []string {
    17  	return []string{}
    18  }
    19  
    20  func (a *anonFilesystemType) beforeSave() {}
    21  
    22  // +checklocksignore
    23  func (a *anonFilesystemType) StateSave(stateSinkObject state.Sink) {
    24  	a.beforeSave()
    25  }
    26  
    27  func (a *anonFilesystemType) afterLoad() {}
    28  
    29  // +checklocksignore
    30  func (a *anonFilesystemType) StateLoad(stateSourceObject state.Source) {
    31  }
    32  
    33  func (fs *anonFilesystem) StateTypeName() string {
    34  	return "pkg/sentry/vfs.anonFilesystem"
    35  }
    36  
    37  func (fs *anonFilesystem) StateFields() []string {
    38  	return []string{
    39  		"vfsfs",
    40  		"devMinor",
    41  	}
    42  }
    43  
    44  func (fs *anonFilesystem) beforeSave() {}
    45  
    46  // +checklocksignore
    47  func (fs *anonFilesystem) StateSave(stateSinkObject state.Sink) {
    48  	fs.beforeSave()
    49  	stateSinkObject.Save(0, &fs.vfsfs)
    50  	stateSinkObject.Save(1, &fs.devMinor)
    51  }
    52  
    53  func (fs *anonFilesystem) afterLoad() {}
    54  
    55  // +checklocksignore
    56  func (fs *anonFilesystem) StateLoad(stateSourceObject state.Source) {
    57  	stateSourceObject.Load(0, &fs.vfsfs)
    58  	stateSourceObject.Load(1, &fs.devMinor)
    59  }
    60  
    61  func (d *anonDentry) StateTypeName() string {
    62  	return "pkg/sentry/vfs.anonDentry"
    63  }
    64  
    65  func (d *anonDentry) StateFields() []string {
    66  	return []string{
    67  		"vfsd",
    68  		"name",
    69  		"watches",
    70  	}
    71  }
    72  
    73  func (d *anonDentry) beforeSave() {}
    74  
    75  // +checklocksignore
    76  func (d *anonDentry) StateSave(stateSinkObject state.Sink) {
    77  	d.beforeSave()
    78  	stateSinkObject.Save(0, &d.vfsd)
    79  	stateSinkObject.Save(1, &d.name)
    80  	stateSinkObject.Save(2, &d.watches)
    81  }
    82  
    83  func (d *anonDentry) afterLoad() {}
    84  
    85  // +checklocksignore
    86  func (d *anonDentry) StateLoad(stateSourceObject state.Source) {
    87  	stateSourceObject.Load(0, &d.vfsd)
    88  	stateSourceObject.Load(1, &d.name)
    89  	stateSourceObject.Load(2, &d.watches)
    90  }
    91  
    92  func (d *Dentry) StateTypeName() string {
    93  	return "pkg/sentry/vfs.Dentry"
    94  }
    95  
    96  func (d *Dentry) StateFields() []string {
    97  	return []string{
    98  		"dead",
    99  		"evictable",
   100  		"mounts",
   101  		"impl",
   102  	}
   103  }
   104  
   105  func (d *Dentry) beforeSave() {}
   106  
   107  // +checklocksignore
   108  func (d *Dentry) StateSave(stateSinkObject state.Sink) {
   109  	d.beforeSave()
   110  	stateSinkObject.Save(0, &d.dead)
   111  	stateSinkObject.Save(1, &d.evictable)
   112  	stateSinkObject.Save(2, &d.mounts)
   113  	stateSinkObject.Save(3, &d.impl)
   114  }
   115  
   116  func (d *Dentry) afterLoad() {}
   117  
   118  // +checklocksignore
   119  func (d *Dentry) StateLoad(stateSourceObject state.Source) {
   120  	stateSourceObject.Load(0, &d.dead)
   121  	stateSourceObject.Load(1, &d.evictable)
   122  	stateSourceObject.Load(2, &d.mounts)
   123  	stateSourceObject.Load(3, &d.impl)
   124  }
   125  
   126  func (kind *DeviceKind) StateTypeName() string {
   127  	return "pkg/sentry/vfs.DeviceKind"
   128  }
   129  
   130  func (kind *DeviceKind) StateFields() []string {
   131  	return nil
   132  }
   133  
   134  func (d *devTuple) StateTypeName() string {
   135  	return "pkg/sentry/vfs.devTuple"
   136  }
   137  
   138  func (d *devTuple) StateFields() []string {
   139  	return []string{
   140  		"kind",
   141  		"major",
   142  		"minor",
   143  	}
   144  }
   145  
   146  func (d *devTuple) beforeSave() {}
   147  
   148  // +checklocksignore
   149  func (d *devTuple) StateSave(stateSinkObject state.Sink) {
   150  	d.beforeSave()
   151  	stateSinkObject.Save(0, &d.kind)
   152  	stateSinkObject.Save(1, &d.major)
   153  	stateSinkObject.Save(2, &d.minor)
   154  }
   155  
   156  func (d *devTuple) afterLoad() {}
   157  
   158  // +checklocksignore
   159  func (d *devTuple) StateLoad(stateSourceObject state.Source) {
   160  	stateSourceObject.Load(0, &d.kind)
   161  	stateSourceObject.Load(1, &d.major)
   162  	stateSourceObject.Load(2, &d.minor)
   163  }
   164  
   165  func (r *registeredDevice) StateTypeName() string {
   166  	return "pkg/sentry/vfs.registeredDevice"
   167  }
   168  
   169  func (r *registeredDevice) StateFields() []string {
   170  	return []string{
   171  		"dev",
   172  		"opts",
   173  	}
   174  }
   175  
   176  func (r *registeredDevice) beforeSave() {}
   177  
   178  // +checklocksignore
   179  func (r *registeredDevice) StateSave(stateSinkObject state.Sink) {
   180  	r.beforeSave()
   181  	stateSinkObject.Save(0, &r.dev)
   182  	stateSinkObject.Save(1, &r.opts)
   183  }
   184  
   185  func (r *registeredDevice) afterLoad() {}
   186  
   187  // +checklocksignore
   188  func (r *registeredDevice) StateLoad(stateSourceObject state.Source) {
   189  	stateSourceObject.Load(0, &r.dev)
   190  	stateSourceObject.Load(1, &r.opts)
   191  }
   192  
   193  func (r *RegisterDeviceOptions) StateTypeName() string {
   194  	return "pkg/sentry/vfs.RegisterDeviceOptions"
   195  }
   196  
   197  func (r *RegisterDeviceOptions) StateFields() []string {
   198  	return []string{
   199  		"GroupName",
   200  	}
   201  }
   202  
   203  func (r *RegisterDeviceOptions) beforeSave() {}
   204  
   205  // +checklocksignore
   206  func (r *RegisterDeviceOptions) StateSave(stateSinkObject state.Sink) {
   207  	r.beforeSave()
   208  	stateSinkObject.Save(0, &r.GroupName)
   209  }
   210  
   211  func (r *RegisterDeviceOptions) afterLoad() {}
   212  
   213  // +checklocksignore
   214  func (r *RegisterDeviceOptions) StateLoad(stateSourceObject state.Source) {
   215  	stateSourceObject.Load(0, &r.GroupName)
   216  }
   217  
   218  func (ep *EpollInstance) StateTypeName() string {
   219  	return "pkg/sentry/vfs.EpollInstance"
   220  }
   221  
   222  func (ep *EpollInstance) StateFields() []string {
   223  	return []string{
   224  		"vfsfd",
   225  		"FileDescriptionDefaultImpl",
   226  		"DentryMetadataFileDescriptionImpl",
   227  		"NoLockFD",
   228  		"q",
   229  		"interest",
   230  		"ready",
   231  		"readySeq",
   232  	}
   233  }
   234  
   235  func (ep *EpollInstance) beforeSave() {}
   236  
   237  // +checklocksignore
   238  func (ep *EpollInstance) StateSave(stateSinkObject state.Sink) {
   239  	ep.beforeSave()
   240  	stateSinkObject.Save(0, &ep.vfsfd)
   241  	stateSinkObject.Save(1, &ep.FileDescriptionDefaultImpl)
   242  	stateSinkObject.Save(2, &ep.DentryMetadataFileDescriptionImpl)
   243  	stateSinkObject.Save(3, &ep.NoLockFD)
   244  	stateSinkObject.Save(4, &ep.q)
   245  	stateSinkObject.Save(5, &ep.interest)
   246  	stateSinkObject.Save(6, &ep.ready)
   247  	stateSinkObject.Save(7, &ep.readySeq)
   248  }
   249  
   250  func (ep *EpollInstance) afterLoad() {}
   251  
   252  // +checklocksignore
   253  func (ep *EpollInstance) StateLoad(stateSourceObject state.Source) {
   254  	stateSourceObject.Load(0, &ep.vfsfd)
   255  	stateSourceObject.Load(1, &ep.FileDescriptionDefaultImpl)
   256  	stateSourceObject.Load(2, &ep.DentryMetadataFileDescriptionImpl)
   257  	stateSourceObject.Load(3, &ep.NoLockFD)
   258  	stateSourceObject.Load(4, &ep.q)
   259  	stateSourceObject.Load(5, &ep.interest)
   260  	stateSourceObject.Load(6, &ep.ready)
   261  	stateSourceObject.Load(7, &ep.readySeq)
   262  }
   263  
   264  func (e *epollInterestKey) StateTypeName() string {
   265  	return "pkg/sentry/vfs.epollInterestKey"
   266  }
   267  
   268  func (e *epollInterestKey) StateFields() []string {
   269  	return []string{
   270  		"file",
   271  		"num",
   272  	}
   273  }
   274  
   275  func (e *epollInterestKey) beforeSave() {}
   276  
   277  // +checklocksignore
   278  func (e *epollInterestKey) StateSave(stateSinkObject state.Sink) {
   279  	e.beforeSave()
   280  	stateSinkObject.Save(0, &e.file)
   281  	stateSinkObject.Save(1, &e.num)
   282  }
   283  
   284  func (e *epollInterestKey) afterLoad() {}
   285  
   286  // +checklocksignore
   287  func (e *epollInterestKey) StateLoad(stateSourceObject state.Source) {
   288  	stateSourceObject.Load(0, &e.file)
   289  	stateSourceObject.Load(1, &e.num)
   290  }
   291  
   292  func (epi *epollInterest) StateTypeName() string {
   293  	return "pkg/sentry/vfs.epollInterest"
   294  }
   295  
   296  func (epi *epollInterest) StateFields() []string {
   297  	return []string{
   298  		"epoll",
   299  		"key",
   300  		"waiter",
   301  		"mask",
   302  		"ready",
   303  		"epollInterestEntry",
   304  		"readySeq",
   305  		"userData",
   306  	}
   307  }
   308  
   309  func (epi *epollInterest) beforeSave() {}
   310  
   311  // +checklocksignore
   312  func (epi *epollInterest) StateSave(stateSinkObject state.Sink) {
   313  	epi.beforeSave()
   314  	stateSinkObject.Save(0, &epi.epoll)
   315  	stateSinkObject.Save(1, &epi.key)
   316  	stateSinkObject.Save(2, &epi.waiter)
   317  	stateSinkObject.Save(3, &epi.mask)
   318  	stateSinkObject.Save(4, &epi.ready)
   319  	stateSinkObject.Save(5, &epi.epollInterestEntry)
   320  	stateSinkObject.Save(6, &epi.readySeq)
   321  	stateSinkObject.Save(7, &epi.userData)
   322  }
   323  
   324  // +checklocksignore
   325  func (epi *epollInterest) StateLoad(stateSourceObject state.Source) {
   326  	stateSourceObject.LoadWait(0, &epi.epoll)
   327  	stateSourceObject.Load(1, &epi.key)
   328  	stateSourceObject.Load(2, &epi.waiter)
   329  	stateSourceObject.Load(3, &epi.mask)
   330  	stateSourceObject.Load(4, &epi.ready)
   331  	stateSourceObject.Load(5, &epi.epollInterestEntry)
   332  	stateSourceObject.Load(6, &epi.readySeq)
   333  	stateSourceObject.Load(7, &epi.userData)
   334  	stateSourceObject.AfterLoad(epi.afterLoad)
   335  }
   336  
   337  func (l *epollInterestList) StateTypeName() string {
   338  	return "pkg/sentry/vfs.epollInterestList"
   339  }
   340  
   341  func (l *epollInterestList) StateFields() []string {
   342  	return []string{
   343  		"head",
   344  		"tail",
   345  	}
   346  }
   347  
   348  func (l *epollInterestList) beforeSave() {}
   349  
   350  // +checklocksignore
   351  func (l *epollInterestList) StateSave(stateSinkObject state.Sink) {
   352  	l.beforeSave()
   353  	stateSinkObject.Save(0, &l.head)
   354  	stateSinkObject.Save(1, &l.tail)
   355  }
   356  
   357  func (l *epollInterestList) afterLoad() {}
   358  
   359  // +checklocksignore
   360  func (l *epollInterestList) StateLoad(stateSourceObject state.Source) {
   361  	stateSourceObject.Load(0, &l.head)
   362  	stateSourceObject.Load(1, &l.tail)
   363  }
   364  
   365  func (e *epollInterestEntry) StateTypeName() string {
   366  	return "pkg/sentry/vfs.epollInterestEntry"
   367  }
   368  
   369  func (e *epollInterestEntry) StateFields() []string {
   370  	return []string{
   371  		"next",
   372  		"prev",
   373  	}
   374  }
   375  
   376  func (e *epollInterestEntry) beforeSave() {}
   377  
   378  // +checklocksignore
   379  func (e *epollInterestEntry) StateSave(stateSinkObject state.Sink) {
   380  	e.beforeSave()
   381  	stateSinkObject.Save(0, &e.next)
   382  	stateSinkObject.Save(1, &e.prev)
   383  }
   384  
   385  func (e *epollInterestEntry) afterLoad() {}
   386  
   387  // +checklocksignore
   388  func (e *epollInterestEntry) StateLoad(stateSourceObject state.Source) {
   389  	stateSourceObject.Load(0, &e.next)
   390  	stateSourceObject.Load(1, &e.prev)
   391  }
   392  
   393  func (l *eventList) StateTypeName() string {
   394  	return "pkg/sentry/vfs.eventList"
   395  }
   396  
   397  func (l *eventList) StateFields() []string {
   398  	return []string{
   399  		"head",
   400  		"tail",
   401  	}
   402  }
   403  
   404  func (l *eventList) beforeSave() {}
   405  
   406  // +checklocksignore
   407  func (l *eventList) StateSave(stateSinkObject state.Sink) {
   408  	l.beforeSave()
   409  	stateSinkObject.Save(0, &l.head)
   410  	stateSinkObject.Save(1, &l.tail)
   411  }
   412  
   413  func (l *eventList) afterLoad() {}
   414  
   415  // +checklocksignore
   416  func (l *eventList) StateLoad(stateSourceObject state.Source) {
   417  	stateSourceObject.Load(0, &l.head)
   418  	stateSourceObject.Load(1, &l.tail)
   419  }
   420  
   421  func (e *eventEntry) StateTypeName() string {
   422  	return "pkg/sentry/vfs.eventEntry"
   423  }
   424  
   425  func (e *eventEntry) StateFields() []string {
   426  	return []string{
   427  		"next",
   428  		"prev",
   429  	}
   430  }
   431  
   432  func (e *eventEntry) beforeSave() {}
   433  
   434  // +checklocksignore
   435  func (e *eventEntry) StateSave(stateSinkObject state.Sink) {
   436  	e.beforeSave()
   437  	stateSinkObject.Save(0, &e.next)
   438  	stateSinkObject.Save(1, &e.prev)
   439  }
   440  
   441  func (e *eventEntry) afterLoad() {}
   442  
   443  // +checklocksignore
   444  func (e *eventEntry) StateLoad(stateSourceObject state.Source) {
   445  	stateSourceObject.Load(0, &e.next)
   446  	stateSourceObject.Load(1, &e.prev)
   447  }
   448  
   449  func (fd *FileDescription) StateTypeName() string {
   450  	return "pkg/sentry/vfs.FileDescription"
   451  }
   452  
   453  func (fd *FileDescription) StateFields() []string {
   454  	return []string{
   455  		"FileDescriptionRefs",
   456  		"statusFlags",
   457  		"asyncHandler",
   458  		"epolls",
   459  		"vd",
   460  		"opts",
   461  		"readable",
   462  		"writable",
   463  		"usedLockBSD",
   464  		"impl",
   465  	}
   466  }
   467  
   468  func (fd *FileDescription) beforeSave() {}
   469  
   470  // +checklocksignore
   471  func (fd *FileDescription) StateSave(stateSinkObject state.Sink) {
   472  	fd.beforeSave()
   473  	stateSinkObject.Save(0, &fd.FileDescriptionRefs)
   474  	stateSinkObject.Save(1, &fd.statusFlags)
   475  	stateSinkObject.Save(2, &fd.asyncHandler)
   476  	stateSinkObject.Save(3, &fd.epolls)
   477  	stateSinkObject.Save(4, &fd.vd)
   478  	stateSinkObject.Save(5, &fd.opts)
   479  	stateSinkObject.Save(6, &fd.readable)
   480  	stateSinkObject.Save(7, &fd.writable)
   481  	stateSinkObject.Save(8, &fd.usedLockBSD)
   482  	stateSinkObject.Save(9, &fd.impl)
   483  }
   484  
   485  func (fd *FileDescription) afterLoad() {}
   486  
   487  // +checklocksignore
   488  func (fd *FileDescription) StateLoad(stateSourceObject state.Source) {
   489  	stateSourceObject.Load(0, &fd.FileDescriptionRefs)
   490  	stateSourceObject.Load(1, &fd.statusFlags)
   491  	stateSourceObject.Load(2, &fd.asyncHandler)
   492  	stateSourceObject.Load(3, &fd.epolls)
   493  	stateSourceObject.Load(4, &fd.vd)
   494  	stateSourceObject.Load(5, &fd.opts)
   495  	stateSourceObject.Load(6, &fd.readable)
   496  	stateSourceObject.Load(7, &fd.writable)
   497  	stateSourceObject.Load(8, &fd.usedLockBSD)
   498  	stateSourceObject.Load(9, &fd.impl)
   499  }
   500  
   501  func (f *FileDescriptionOptions) StateTypeName() string {
   502  	return "pkg/sentry/vfs.FileDescriptionOptions"
   503  }
   504  
   505  func (f *FileDescriptionOptions) StateFields() []string {
   506  	return []string{
   507  		"AllowDirectIO",
   508  		"DenyPRead",
   509  		"DenyPWrite",
   510  		"UseDentryMetadata",
   511  		"DenySpliceIn",
   512  	}
   513  }
   514  
   515  func (f *FileDescriptionOptions) beforeSave() {}
   516  
   517  // +checklocksignore
   518  func (f *FileDescriptionOptions) StateSave(stateSinkObject state.Sink) {
   519  	f.beforeSave()
   520  	stateSinkObject.Save(0, &f.AllowDirectIO)
   521  	stateSinkObject.Save(1, &f.DenyPRead)
   522  	stateSinkObject.Save(2, &f.DenyPWrite)
   523  	stateSinkObject.Save(3, &f.UseDentryMetadata)
   524  	stateSinkObject.Save(4, &f.DenySpliceIn)
   525  }
   526  
   527  func (f *FileDescriptionOptions) afterLoad() {}
   528  
   529  // +checklocksignore
   530  func (f *FileDescriptionOptions) StateLoad(stateSourceObject state.Source) {
   531  	stateSourceObject.Load(0, &f.AllowDirectIO)
   532  	stateSourceObject.Load(1, &f.DenyPRead)
   533  	stateSourceObject.Load(2, &f.DenyPWrite)
   534  	stateSourceObject.Load(3, &f.UseDentryMetadata)
   535  	stateSourceObject.Load(4, &f.DenySpliceIn)
   536  }
   537  
   538  func (d *Dirent) StateTypeName() string {
   539  	return "pkg/sentry/vfs.Dirent"
   540  }
   541  
   542  func (d *Dirent) StateFields() []string {
   543  	return []string{
   544  		"Name",
   545  		"Type",
   546  		"Ino",
   547  		"NextOff",
   548  	}
   549  }
   550  
   551  func (d *Dirent) beforeSave() {}
   552  
   553  // +checklocksignore
   554  func (d *Dirent) StateSave(stateSinkObject state.Sink) {
   555  	d.beforeSave()
   556  	stateSinkObject.Save(0, &d.Name)
   557  	stateSinkObject.Save(1, &d.Type)
   558  	stateSinkObject.Save(2, &d.Ino)
   559  	stateSinkObject.Save(3, &d.NextOff)
   560  }
   561  
   562  func (d *Dirent) afterLoad() {}
   563  
   564  // +checklocksignore
   565  func (d *Dirent) StateLoad(stateSourceObject state.Source) {
   566  	stateSourceObject.Load(0, &d.Name)
   567  	stateSourceObject.Load(1, &d.Type)
   568  	stateSourceObject.Load(2, &d.Ino)
   569  	stateSourceObject.Load(3, &d.NextOff)
   570  }
   571  
   572  func (f *FileDescriptionDefaultImpl) StateTypeName() string {
   573  	return "pkg/sentry/vfs.FileDescriptionDefaultImpl"
   574  }
   575  
   576  func (f *FileDescriptionDefaultImpl) StateFields() []string {
   577  	return []string{}
   578  }
   579  
   580  func (f *FileDescriptionDefaultImpl) beforeSave() {}
   581  
   582  // +checklocksignore
   583  func (f *FileDescriptionDefaultImpl) StateSave(stateSinkObject state.Sink) {
   584  	f.beforeSave()
   585  }
   586  
   587  func (f *FileDescriptionDefaultImpl) afterLoad() {}
   588  
   589  // +checklocksignore
   590  func (f *FileDescriptionDefaultImpl) StateLoad(stateSourceObject state.Source) {
   591  }
   592  
   593  func (d *DirectoryFileDescriptionDefaultImpl) StateTypeName() string {
   594  	return "pkg/sentry/vfs.DirectoryFileDescriptionDefaultImpl"
   595  }
   596  
   597  func (d *DirectoryFileDescriptionDefaultImpl) StateFields() []string {
   598  	return []string{}
   599  }
   600  
   601  func (d *DirectoryFileDescriptionDefaultImpl) beforeSave() {}
   602  
   603  // +checklocksignore
   604  func (d *DirectoryFileDescriptionDefaultImpl) StateSave(stateSinkObject state.Sink) {
   605  	d.beforeSave()
   606  }
   607  
   608  func (d *DirectoryFileDescriptionDefaultImpl) afterLoad() {}
   609  
   610  // +checklocksignore
   611  func (d *DirectoryFileDescriptionDefaultImpl) StateLoad(stateSourceObject state.Source) {
   612  }
   613  
   614  func (d *DentryMetadataFileDescriptionImpl) StateTypeName() string {
   615  	return "pkg/sentry/vfs.DentryMetadataFileDescriptionImpl"
   616  }
   617  
   618  func (d *DentryMetadataFileDescriptionImpl) StateFields() []string {
   619  	return []string{}
   620  }
   621  
   622  func (d *DentryMetadataFileDescriptionImpl) beforeSave() {}
   623  
   624  // +checklocksignore
   625  func (d *DentryMetadataFileDescriptionImpl) StateSave(stateSinkObject state.Sink) {
   626  	d.beforeSave()
   627  }
   628  
   629  func (d *DentryMetadataFileDescriptionImpl) afterLoad() {}
   630  
   631  // +checklocksignore
   632  func (d *DentryMetadataFileDescriptionImpl) StateLoad(stateSourceObject state.Source) {
   633  }
   634  
   635  func (s *StaticData) StateTypeName() string {
   636  	return "pkg/sentry/vfs.StaticData"
   637  }
   638  
   639  func (s *StaticData) StateFields() []string {
   640  	return []string{
   641  		"Data",
   642  	}
   643  }
   644  
   645  func (s *StaticData) beforeSave() {}
   646  
   647  // +checklocksignore
   648  func (s *StaticData) StateSave(stateSinkObject state.Sink) {
   649  	s.beforeSave()
   650  	stateSinkObject.Save(0, &s.Data)
   651  }
   652  
   653  func (s *StaticData) afterLoad() {}
   654  
   655  // +checklocksignore
   656  func (s *StaticData) StateLoad(stateSourceObject state.Source) {
   657  	stateSourceObject.Load(0, &s.Data)
   658  }
   659  
   660  func (fd *DynamicBytesFileDescriptionImpl) StateTypeName() string {
   661  	return "pkg/sentry/vfs.DynamicBytesFileDescriptionImpl"
   662  }
   663  
   664  func (fd *DynamicBytesFileDescriptionImpl) StateFields() []string {
   665  	return []string{
   666  		"vfsfd",
   667  		"data",
   668  		"buf",
   669  		"off",
   670  		"lastRead",
   671  	}
   672  }
   673  
   674  func (fd *DynamicBytesFileDescriptionImpl) beforeSave() {}
   675  
   676  // +checklocksignore
   677  func (fd *DynamicBytesFileDescriptionImpl) StateSave(stateSinkObject state.Sink) {
   678  	fd.beforeSave()
   679  	var bufValue []byte
   680  	bufValue = fd.saveBuf()
   681  	stateSinkObject.SaveValue(2, bufValue)
   682  	stateSinkObject.Save(0, &fd.vfsfd)
   683  	stateSinkObject.Save(1, &fd.data)
   684  	stateSinkObject.Save(3, &fd.off)
   685  	stateSinkObject.Save(4, &fd.lastRead)
   686  }
   687  
   688  func (fd *DynamicBytesFileDescriptionImpl) afterLoad() {}
   689  
   690  // +checklocksignore
   691  func (fd *DynamicBytesFileDescriptionImpl) StateLoad(stateSourceObject state.Source) {
   692  	stateSourceObject.Load(0, &fd.vfsfd)
   693  	stateSourceObject.Load(1, &fd.data)
   694  	stateSourceObject.Load(3, &fd.off)
   695  	stateSourceObject.Load(4, &fd.lastRead)
   696  	stateSourceObject.LoadValue(2, new([]byte), func(y any) { fd.loadBuf(y.([]byte)) })
   697  }
   698  
   699  func (fd *LockFD) StateTypeName() string {
   700  	return "pkg/sentry/vfs.LockFD"
   701  }
   702  
   703  func (fd *LockFD) StateFields() []string {
   704  	return []string{
   705  		"locks",
   706  	}
   707  }
   708  
   709  func (fd *LockFD) beforeSave() {}
   710  
   711  // +checklocksignore
   712  func (fd *LockFD) StateSave(stateSinkObject state.Sink) {
   713  	fd.beforeSave()
   714  	stateSinkObject.Save(0, &fd.locks)
   715  }
   716  
   717  func (fd *LockFD) afterLoad() {}
   718  
   719  // +checklocksignore
   720  func (fd *LockFD) StateLoad(stateSourceObject state.Source) {
   721  	stateSourceObject.Load(0, &fd.locks)
   722  }
   723  
   724  func (n *NoLockFD) StateTypeName() string {
   725  	return "pkg/sentry/vfs.NoLockFD"
   726  }
   727  
   728  func (n *NoLockFD) StateFields() []string {
   729  	return []string{}
   730  }
   731  
   732  func (n *NoLockFD) beforeSave() {}
   733  
   734  // +checklocksignore
   735  func (n *NoLockFD) StateSave(stateSinkObject state.Sink) {
   736  	n.beforeSave()
   737  }
   738  
   739  func (n *NoLockFD) afterLoad() {}
   740  
   741  // +checklocksignore
   742  func (n *NoLockFD) StateLoad(stateSourceObject state.Source) {
   743  }
   744  
   745  func (b *BadLockFD) StateTypeName() string {
   746  	return "pkg/sentry/vfs.BadLockFD"
   747  }
   748  
   749  func (b *BadLockFD) StateFields() []string {
   750  	return []string{}
   751  }
   752  
   753  func (b *BadLockFD) beforeSave() {}
   754  
   755  // +checklocksignore
   756  func (b *BadLockFD) StateSave(stateSinkObject state.Sink) {
   757  	b.beforeSave()
   758  }
   759  
   760  func (b *BadLockFD) afterLoad() {}
   761  
   762  // +checklocksignore
   763  func (b *BadLockFD) StateLoad(stateSourceObject state.Source) {
   764  }
   765  
   766  func (r *FileDescriptionRefs) StateTypeName() string {
   767  	return "pkg/sentry/vfs.FileDescriptionRefs"
   768  }
   769  
   770  func (r *FileDescriptionRefs) StateFields() []string {
   771  	return []string{
   772  		"refCount",
   773  	}
   774  }
   775  
   776  func (r *FileDescriptionRefs) beforeSave() {}
   777  
   778  // +checklocksignore
   779  func (r *FileDescriptionRefs) StateSave(stateSinkObject state.Sink) {
   780  	r.beforeSave()
   781  	stateSinkObject.Save(0, &r.refCount)
   782  }
   783  
   784  // +checklocksignore
   785  func (r *FileDescriptionRefs) StateLoad(stateSourceObject state.Source) {
   786  	stateSourceObject.Load(0, &r.refCount)
   787  	stateSourceObject.AfterLoad(r.afterLoad)
   788  }
   789  
   790  func (fs *Filesystem) StateTypeName() string {
   791  	return "pkg/sentry/vfs.Filesystem"
   792  }
   793  
   794  func (fs *Filesystem) StateFields() []string {
   795  	return []string{
   796  		"FilesystemRefs",
   797  		"vfs",
   798  		"fsType",
   799  		"impl",
   800  	}
   801  }
   802  
   803  func (fs *Filesystem) beforeSave() {}
   804  
   805  // +checklocksignore
   806  func (fs *Filesystem) StateSave(stateSinkObject state.Sink) {
   807  	fs.beforeSave()
   808  	stateSinkObject.Save(0, &fs.FilesystemRefs)
   809  	stateSinkObject.Save(1, &fs.vfs)
   810  	stateSinkObject.Save(2, &fs.fsType)
   811  	stateSinkObject.Save(3, &fs.impl)
   812  }
   813  
   814  func (fs *Filesystem) afterLoad() {}
   815  
   816  // +checklocksignore
   817  func (fs *Filesystem) StateLoad(stateSourceObject state.Source) {
   818  	stateSourceObject.Load(0, &fs.FilesystemRefs)
   819  	stateSourceObject.Load(1, &fs.vfs)
   820  	stateSourceObject.Load(2, &fs.fsType)
   821  	stateSourceObject.Load(3, &fs.impl)
   822  }
   823  
   824  func (p *PrependPathAtVFSRootError) StateTypeName() string {
   825  	return "pkg/sentry/vfs.PrependPathAtVFSRootError"
   826  }
   827  
   828  func (p *PrependPathAtVFSRootError) StateFields() []string {
   829  	return []string{}
   830  }
   831  
   832  func (p *PrependPathAtVFSRootError) beforeSave() {}
   833  
   834  // +checklocksignore
   835  func (p *PrependPathAtVFSRootError) StateSave(stateSinkObject state.Sink) {
   836  	p.beforeSave()
   837  }
   838  
   839  func (p *PrependPathAtVFSRootError) afterLoad() {}
   840  
   841  // +checklocksignore
   842  func (p *PrependPathAtVFSRootError) StateLoad(stateSourceObject state.Source) {
   843  }
   844  
   845  func (p *PrependPathAtNonMountRootError) StateTypeName() string {
   846  	return "pkg/sentry/vfs.PrependPathAtNonMountRootError"
   847  }
   848  
   849  func (p *PrependPathAtNonMountRootError) StateFields() []string {
   850  	return []string{}
   851  }
   852  
   853  func (p *PrependPathAtNonMountRootError) beforeSave() {}
   854  
   855  // +checklocksignore
   856  func (p *PrependPathAtNonMountRootError) StateSave(stateSinkObject state.Sink) {
   857  	p.beforeSave()
   858  }
   859  
   860  func (p *PrependPathAtNonMountRootError) afterLoad() {}
   861  
   862  // +checklocksignore
   863  func (p *PrependPathAtNonMountRootError) StateLoad(stateSourceObject state.Source) {
   864  }
   865  
   866  func (p *PrependPathSyntheticError) StateTypeName() string {
   867  	return "pkg/sentry/vfs.PrependPathSyntheticError"
   868  }
   869  
   870  func (p *PrependPathSyntheticError) StateFields() []string {
   871  	return []string{}
   872  }
   873  
   874  func (p *PrependPathSyntheticError) beforeSave() {}
   875  
   876  // +checklocksignore
   877  func (p *PrependPathSyntheticError) StateSave(stateSinkObject state.Sink) {
   878  	p.beforeSave()
   879  }
   880  
   881  func (p *PrependPathSyntheticError) afterLoad() {}
   882  
   883  // +checklocksignore
   884  func (p *PrependPathSyntheticError) StateLoad(stateSourceObject state.Source) {
   885  }
   886  
   887  func (r *FilesystemRefs) StateTypeName() string {
   888  	return "pkg/sentry/vfs.FilesystemRefs"
   889  }
   890  
   891  func (r *FilesystemRefs) StateFields() []string {
   892  	return []string{
   893  		"refCount",
   894  	}
   895  }
   896  
   897  func (r *FilesystemRefs) beforeSave() {}
   898  
   899  // +checklocksignore
   900  func (r *FilesystemRefs) StateSave(stateSinkObject state.Sink) {
   901  	r.beforeSave()
   902  	stateSinkObject.Save(0, &r.refCount)
   903  }
   904  
   905  // +checklocksignore
   906  func (r *FilesystemRefs) StateLoad(stateSourceObject state.Source) {
   907  	stateSourceObject.Load(0, &r.refCount)
   908  	stateSourceObject.AfterLoad(r.afterLoad)
   909  }
   910  
   911  func (r *registeredFilesystemType) StateTypeName() string {
   912  	return "pkg/sentry/vfs.registeredFilesystemType"
   913  }
   914  
   915  func (r *registeredFilesystemType) StateFields() []string {
   916  	return []string{
   917  		"fsType",
   918  		"opts",
   919  	}
   920  }
   921  
   922  func (r *registeredFilesystemType) beforeSave() {}
   923  
   924  // +checklocksignore
   925  func (r *registeredFilesystemType) StateSave(stateSinkObject state.Sink) {
   926  	r.beforeSave()
   927  	stateSinkObject.Save(0, &r.fsType)
   928  	stateSinkObject.Save(1, &r.opts)
   929  }
   930  
   931  func (r *registeredFilesystemType) afterLoad() {}
   932  
   933  // +checklocksignore
   934  func (r *registeredFilesystemType) StateLoad(stateSourceObject state.Source) {
   935  	stateSourceObject.Load(0, &r.fsType)
   936  	stateSourceObject.Load(1, &r.opts)
   937  }
   938  
   939  func (r *RegisterFilesystemTypeOptions) StateTypeName() string {
   940  	return "pkg/sentry/vfs.RegisterFilesystemTypeOptions"
   941  }
   942  
   943  func (r *RegisterFilesystemTypeOptions) StateFields() []string {
   944  	return []string{
   945  		"AllowUserMount",
   946  		"AllowUserList",
   947  		"RequiresDevice",
   948  	}
   949  }
   950  
   951  func (r *RegisterFilesystemTypeOptions) beforeSave() {}
   952  
   953  // +checklocksignore
   954  func (r *RegisterFilesystemTypeOptions) StateSave(stateSinkObject state.Sink) {
   955  	r.beforeSave()
   956  	stateSinkObject.Save(0, &r.AllowUserMount)
   957  	stateSinkObject.Save(1, &r.AllowUserList)
   958  	stateSinkObject.Save(2, &r.RequiresDevice)
   959  }
   960  
   961  func (r *RegisterFilesystemTypeOptions) afterLoad() {}
   962  
   963  // +checklocksignore
   964  func (r *RegisterFilesystemTypeOptions) StateLoad(stateSourceObject state.Source) {
   965  	stateSourceObject.Load(0, &r.AllowUserMount)
   966  	stateSourceObject.Load(1, &r.AllowUserList)
   967  	stateSourceObject.Load(2, &r.RequiresDevice)
   968  }
   969  
   970  func (e *EventType) StateTypeName() string {
   971  	return "pkg/sentry/vfs.EventType"
   972  }
   973  
   974  func (e *EventType) StateFields() []string {
   975  	return nil
   976  }
   977  
   978  func (i *Inotify) StateTypeName() string {
   979  	return "pkg/sentry/vfs.Inotify"
   980  }
   981  
   982  func (i *Inotify) StateFields() []string {
   983  	return []string{
   984  		"vfsfd",
   985  		"FileDescriptionDefaultImpl",
   986  		"DentryMetadataFileDescriptionImpl",
   987  		"NoLockFD",
   988  		"id",
   989  		"queue",
   990  		"events",
   991  		"scratch",
   992  		"nextWatchMinusOne",
   993  		"watches",
   994  	}
   995  }
   996  
   997  func (i *Inotify) beforeSave() {}
   998  
   999  // +checklocksignore
  1000  func (i *Inotify) StateSave(stateSinkObject state.Sink) {
  1001  	i.beforeSave()
  1002  	stateSinkObject.Save(0, &i.vfsfd)
  1003  	stateSinkObject.Save(1, &i.FileDescriptionDefaultImpl)
  1004  	stateSinkObject.Save(2, &i.DentryMetadataFileDescriptionImpl)
  1005  	stateSinkObject.Save(3, &i.NoLockFD)
  1006  	stateSinkObject.Save(4, &i.id)
  1007  	stateSinkObject.Save(5, &i.queue)
  1008  	stateSinkObject.Save(6, &i.events)
  1009  	stateSinkObject.Save(7, &i.scratch)
  1010  	stateSinkObject.Save(8, &i.nextWatchMinusOne)
  1011  	stateSinkObject.Save(9, &i.watches)
  1012  }
  1013  
  1014  func (i *Inotify) afterLoad() {}
  1015  
  1016  // +checklocksignore
  1017  func (i *Inotify) StateLoad(stateSourceObject state.Source) {
  1018  	stateSourceObject.Load(0, &i.vfsfd)
  1019  	stateSourceObject.Load(1, &i.FileDescriptionDefaultImpl)
  1020  	stateSourceObject.Load(2, &i.DentryMetadataFileDescriptionImpl)
  1021  	stateSourceObject.Load(3, &i.NoLockFD)
  1022  	stateSourceObject.Load(4, &i.id)
  1023  	stateSourceObject.Load(5, &i.queue)
  1024  	stateSourceObject.Load(6, &i.events)
  1025  	stateSourceObject.Load(7, &i.scratch)
  1026  	stateSourceObject.Load(8, &i.nextWatchMinusOne)
  1027  	stateSourceObject.Load(9, &i.watches)
  1028  }
  1029  
  1030  func (w *Watches) StateTypeName() string {
  1031  	return "pkg/sentry/vfs.Watches"
  1032  }
  1033  
  1034  func (w *Watches) StateFields() []string {
  1035  	return []string{
  1036  		"ws",
  1037  	}
  1038  }
  1039  
  1040  func (w *Watches) beforeSave() {}
  1041  
  1042  // +checklocksignore
  1043  func (w *Watches) StateSave(stateSinkObject state.Sink) {
  1044  	w.beforeSave()
  1045  	stateSinkObject.Save(0, &w.ws)
  1046  }
  1047  
  1048  func (w *Watches) afterLoad() {}
  1049  
  1050  // +checklocksignore
  1051  func (w *Watches) StateLoad(stateSourceObject state.Source) {
  1052  	stateSourceObject.Load(0, &w.ws)
  1053  }
  1054  
  1055  func (w *Watch) StateTypeName() string {
  1056  	return "pkg/sentry/vfs.Watch"
  1057  }
  1058  
  1059  func (w *Watch) StateFields() []string {
  1060  	return []string{
  1061  		"owner",
  1062  		"wd",
  1063  		"target",
  1064  		"mask",
  1065  		"expired",
  1066  	}
  1067  }
  1068  
  1069  func (w *Watch) beforeSave() {}
  1070  
  1071  // +checklocksignore
  1072  func (w *Watch) StateSave(stateSinkObject state.Sink) {
  1073  	w.beforeSave()
  1074  	stateSinkObject.Save(0, &w.owner)
  1075  	stateSinkObject.Save(1, &w.wd)
  1076  	stateSinkObject.Save(2, &w.target)
  1077  	stateSinkObject.Save(3, &w.mask)
  1078  	stateSinkObject.Save(4, &w.expired)
  1079  }
  1080  
  1081  func (w *Watch) afterLoad() {}
  1082  
  1083  // +checklocksignore
  1084  func (w *Watch) StateLoad(stateSourceObject state.Source) {
  1085  	stateSourceObject.Load(0, &w.owner)
  1086  	stateSourceObject.Load(1, &w.wd)
  1087  	stateSourceObject.Load(2, &w.target)
  1088  	stateSourceObject.Load(3, &w.mask)
  1089  	stateSourceObject.Load(4, &w.expired)
  1090  }
  1091  
  1092  func (e *Event) StateTypeName() string {
  1093  	return "pkg/sentry/vfs.Event"
  1094  }
  1095  
  1096  func (e *Event) StateFields() []string {
  1097  	return []string{
  1098  		"eventEntry",
  1099  		"wd",
  1100  		"mask",
  1101  		"cookie",
  1102  		"len",
  1103  		"name",
  1104  	}
  1105  }
  1106  
  1107  func (e *Event) beforeSave() {}
  1108  
  1109  // +checklocksignore
  1110  func (e *Event) StateSave(stateSinkObject state.Sink) {
  1111  	e.beforeSave()
  1112  	stateSinkObject.Save(0, &e.eventEntry)
  1113  	stateSinkObject.Save(1, &e.wd)
  1114  	stateSinkObject.Save(2, &e.mask)
  1115  	stateSinkObject.Save(3, &e.cookie)
  1116  	stateSinkObject.Save(4, &e.len)
  1117  	stateSinkObject.Save(5, &e.name)
  1118  }
  1119  
  1120  func (e *Event) afterLoad() {}
  1121  
  1122  // +checklocksignore
  1123  func (e *Event) StateLoad(stateSourceObject state.Source) {
  1124  	stateSourceObject.Load(0, &e.eventEntry)
  1125  	stateSourceObject.Load(1, &e.wd)
  1126  	stateSourceObject.Load(2, &e.mask)
  1127  	stateSourceObject.Load(3, &e.cookie)
  1128  	stateSourceObject.Load(4, &e.len)
  1129  	stateSourceObject.Load(5, &e.name)
  1130  }
  1131  
  1132  func (fl *FileLocks) StateTypeName() string {
  1133  	return "pkg/sentry/vfs.FileLocks"
  1134  }
  1135  
  1136  func (fl *FileLocks) StateFields() []string {
  1137  	return []string{
  1138  		"bsd",
  1139  		"posix",
  1140  	}
  1141  }
  1142  
  1143  func (fl *FileLocks) beforeSave() {}
  1144  
  1145  // +checklocksignore
  1146  func (fl *FileLocks) StateSave(stateSinkObject state.Sink) {
  1147  	fl.beforeSave()
  1148  	stateSinkObject.Save(0, &fl.bsd)
  1149  	stateSinkObject.Save(1, &fl.posix)
  1150  }
  1151  
  1152  func (fl *FileLocks) afterLoad() {}
  1153  
  1154  // +checklocksignore
  1155  func (fl *FileLocks) StateLoad(stateSourceObject state.Source) {
  1156  	stateSourceObject.Load(0, &fl.bsd)
  1157  	stateSourceObject.Load(1, &fl.posix)
  1158  }
  1159  
  1160  func (mnt *Mount) StateTypeName() string {
  1161  	return "pkg/sentry/vfs.Mount"
  1162  }
  1163  
  1164  func (mnt *Mount) StateFields() []string {
  1165  	return []string{
  1166  		"vfs",
  1167  		"fs",
  1168  		"root",
  1169  		"ID",
  1170  		"Flags",
  1171  		"key",
  1172  		"ns",
  1173  		"refs",
  1174  		"children",
  1175  		"propType",
  1176  		"sharedList",
  1177  		"sharedEntry",
  1178  		"groupID",
  1179  		"umounted",
  1180  		"writers",
  1181  	}
  1182  }
  1183  
  1184  func (mnt *Mount) beforeSave() {}
  1185  
  1186  // +checklocksignore
  1187  func (mnt *Mount) StateSave(stateSinkObject state.Sink) {
  1188  	mnt.beforeSave()
  1189  	var keyValue VirtualDentry
  1190  	keyValue = mnt.saveKey()
  1191  	stateSinkObject.SaveValue(5, keyValue)
  1192  	stateSinkObject.Save(0, &mnt.vfs)
  1193  	stateSinkObject.Save(1, &mnt.fs)
  1194  	stateSinkObject.Save(2, &mnt.root)
  1195  	stateSinkObject.Save(3, &mnt.ID)
  1196  	stateSinkObject.Save(4, &mnt.Flags)
  1197  	stateSinkObject.Save(6, &mnt.ns)
  1198  	stateSinkObject.Save(7, &mnt.refs)
  1199  	stateSinkObject.Save(8, &mnt.children)
  1200  	stateSinkObject.Save(9, &mnt.propType)
  1201  	stateSinkObject.Save(10, &mnt.sharedList)
  1202  	stateSinkObject.Save(11, &mnt.sharedEntry)
  1203  	stateSinkObject.Save(12, &mnt.groupID)
  1204  	stateSinkObject.Save(13, &mnt.umounted)
  1205  	stateSinkObject.Save(14, &mnt.writers)
  1206  }
  1207  
  1208  // +checklocksignore
  1209  func (mnt *Mount) StateLoad(stateSourceObject state.Source) {
  1210  	stateSourceObject.Load(0, &mnt.vfs)
  1211  	stateSourceObject.Load(1, &mnt.fs)
  1212  	stateSourceObject.Load(2, &mnt.root)
  1213  	stateSourceObject.Load(3, &mnt.ID)
  1214  	stateSourceObject.Load(4, &mnt.Flags)
  1215  	stateSourceObject.Load(6, &mnt.ns)
  1216  	stateSourceObject.Load(7, &mnt.refs)
  1217  	stateSourceObject.Load(8, &mnt.children)
  1218  	stateSourceObject.Load(9, &mnt.propType)
  1219  	stateSourceObject.Load(10, &mnt.sharedList)
  1220  	stateSourceObject.Load(11, &mnt.sharedEntry)
  1221  	stateSourceObject.Load(12, &mnt.groupID)
  1222  	stateSourceObject.Load(13, &mnt.umounted)
  1223  	stateSourceObject.Load(14, &mnt.writers)
  1224  	stateSourceObject.LoadValue(5, new(VirtualDentry), func(y any) { mnt.loadKey(y.(VirtualDentry)) })
  1225  	stateSourceObject.AfterLoad(mnt.afterLoad)
  1226  }
  1227  
  1228  func (mntns *MountNamespace) StateTypeName() string {
  1229  	return "pkg/sentry/vfs.MountNamespace"
  1230  }
  1231  
  1232  func (mntns *MountNamespace) StateFields() []string {
  1233  	return []string{
  1234  		"MountNamespaceRefs",
  1235  		"Owner",
  1236  		"root",
  1237  		"mountpoints",
  1238  		"mounts",
  1239  	}
  1240  }
  1241  
  1242  func (mntns *MountNamespace) beforeSave() {}
  1243  
  1244  // +checklocksignore
  1245  func (mntns *MountNamespace) StateSave(stateSinkObject state.Sink) {
  1246  	mntns.beforeSave()
  1247  	stateSinkObject.Save(0, &mntns.MountNamespaceRefs)
  1248  	stateSinkObject.Save(1, &mntns.Owner)
  1249  	stateSinkObject.Save(2, &mntns.root)
  1250  	stateSinkObject.Save(3, &mntns.mountpoints)
  1251  	stateSinkObject.Save(4, &mntns.mounts)
  1252  }
  1253  
  1254  func (mntns *MountNamespace) afterLoad() {}
  1255  
  1256  // +checklocksignore
  1257  func (mntns *MountNamespace) StateLoad(stateSourceObject state.Source) {
  1258  	stateSourceObject.Load(0, &mntns.MountNamespaceRefs)
  1259  	stateSourceObject.Load(1, &mntns.Owner)
  1260  	stateSourceObject.Load(2, &mntns.root)
  1261  	stateSourceObject.Load(3, &mntns.mountpoints)
  1262  	stateSourceObject.Load(4, &mntns.mounts)
  1263  }
  1264  
  1265  func (u *umountRecursiveOptions) StateTypeName() string {
  1266  	return "pkg/sentry/vfs.umountRecursiveOptions"
  1267  }
  1268  
  1269  func (u *umountRecursiveOptions) StateFields() []string {
  1270  	return []string{
  1271  		"eager",
  1272  		"disconnectHierarchy",
  1273  	}
  1274  }
  1275  
  1276  func (u *umountRecursiveOptions) beforeSave() {}
  1277  
  1278  // +checklocksignore
  1279  func (u *umountRecursiveOptions) StateSave(stateSinkObject state.Sink) {
  1280  	u.beforeSave()
  1281  	stateSinkObject.Save(0, &u.eager)
  1282  	stateSinkObject.Save(1, &u.disconnectHierarchy)
  1283  }
  1284  
  1285  func (u *umountRecursiveOptions) afterLoad() {}
  1286  
  1287  // +checklocksignore
  1288  func (u *umountRecursiveOptions) StateLoad(stateSourceObject state.Source) {
  1289  	stateSourceObject.Load(0, &u.eager)
  1290  	stateSourceObject.Load(1, &u.disconnectHierarchy)
  1291  }
  1292  
  1293  func (r *MountNamespaceRefs) StateTypeName() string {
  1294  	return "pkg/sentry/vfs.MountNamespaceRefs"
  1295  }
  1296  
  1297  func (r *MountNamespaceRefs) StateFields() []string {
  1298  	return []string{
  1299  		"refCount",
  1300  	}
  1301  }
  1302  
  1303  func (r *MountNamespaceRefs) beforeSave() {}
  1304  
  1305  // +checklocksignore
  1306  func (r *MountNamespaceRefs) StateSave(stateSinkObject state.Sink) {
  1307  	r.beforeSave()
  1308  	stateSinkObject.Save(0, &r.refCount)
  1309  }
  1310  
  1311  // +checklocksignore
  1312  func (r *MountNamespaceRefs) StateLoad(stateSourceObject state.Source) {
  1313  	stateSourceObject.Load(0, &r.refCount)
  1314  	stateSourceObject.AfterLoad(r.afterLoad)
  1315  }
  1316  
  1317  func (fd *opathFD) StateTypeName() string {
  1318  	return "pkg/sentry/vfs.opathFD"
  1319  }
  1320  
  1321  func (fd *opathFD) StateFields() []string {
  1322  	return []string{
  1323  		"vfsfd",
  1324  		"FileDescriptionDefaultImpl",
  1325  		"BadLockFD",
  1326  	}
  1327  }
  1328  
  1329  func (fd *opathFD) beforeSave() {}
  1330  
  1331  // +checklocksignore
  1332  func (fd *opathFD) StateSave(stateSinkObject state.Sink) {
  1333  	fd.beforeSave()
  1334  	stateSinkObject.Save(0, &fd.vfsfd)
  1335  	stateSinkObject.Save(1, &fd.FileDescriptionDefaultImpl)
  1336  	stateSinkObject.Save(2, &fd.BadLockFD)
  1337  }
  1338  
  1339  func (fd *opathFD) afterLoad() {}
  1340  
  1341  // +checklocksignore
  1342  func (fd *opathFD) StateLoad(stateSourceObject state.Source) {
  1343  	stateSourceObject.Load(0, &fd.vfsfd)
  1344  	stateSourceObject.Load(1, &fd.FileDescriptionDefaultImpl)
  1345  	stateSourceObject.Load(2, &fd.BadLockFD)
  1346  }
  1347  
  1348  func (g *GetDentryOptions) StateTypeName() string {
  1349  	return "pkg/sentry/vfs.GetDentryOptions"
  1350  }
  1351  
  1352  func (g *GetDentryOptions) StateFields() []string {
  1353  	return []string{
  1354  		"CheckSearchable",
  1355  	}
  1356  }
  1357  
  1358  func (g *GetDentryOptions) beforeSave() {}
  1359  
  1360  // +checklocksignore
  1361  func (g *GetDentryOptions) StateSave(stateSinkObject state.Sink) {
  1362  	g.beforeSave()
  1363  	stateSinkObject.Save(0, &g.CheckSearchable)
  1364  }
  1365  
  1366  func (g *GetDentryOptions) afterLoad() {}
  1367  
  1368  // +checklocksignore
  1369  func (g *GetDentryOptions) StateLoad(stateSourceObject state.Source) {
  1370  	stateSourceObject.Load(0, &g.CheckSearchable)
  1371  }
  1372  
  1373  func (m *MkdirOptions) StateTypeName() string {
  1374  	return "pkg/sentry/vfs.MkdirOptions"
  1375  }
  1376  
  1377  func (m *MkdirOptions) StateFields() []string {
  1378  	return []string{
  1379  		"Mode",
  1380  		"ForSyntheticMountpoint",
  1381  	}
  1382  }
  1383  
  1384  func (m *MkdirOptions) beforeSave() {}
  1385  
  1386  // +checklocksignore
  1387  func (m *MkdirOptions) StateSave(stateSinkObject state.Sink) {
  1388  	m.beforeSave()
  1389  	stateSinkObject.Save(0, &m.Mode)
  1390  	stateSinkObject.Save(1, &m.ForSyntheticMountpoint)
  1391  }
  1392  
  1393  func (m *MkdirOptions) afterLoad() {}
  1394  
  1395  // +checklocksignore
  1396  func (m *MkdirOptions) StateLoad(stateSourceObject state.Source) {
  1397  	stateSourceObject.Load(0, &m.Mode)
  1398  	stateSourceObject.Load(1, &m.ForSyntheticMountpoint)
  1399  }
  1400  
  1401  func (m *MknodOptions) StateTypeName() string {
  1402  	return "pkg/sentry/vfs.MknodOptions"
  1403  }
  1404  
  1405  func (m *MknodOptions) StateFields() []string {
  1406  	return []string{
  1407  		"Mode",
  1408  		"DevMajor",
  1409  		"DevMinor",
  1410  		"Endpoint",
  1411  	}
  1412  }
  1413  
  1414  func (m *MknodOptions) beforeSave() {}
  1415  
  1416  // +checklocksignore
  1417  func (m *MknodOptions) StateSave(stateSinkObject state.Sink) {
  1418  	m.beforeSave()
  1419  	stateSinkObject.Save(0, &m.Mode)
  1420  	stateSinkObject.Save(1, &m.DevMajor)
  1421  	stateSinkObject.Save(2, &m.DevMinor)
  1422  	stateSinkObject.Save(3, &m.Endpoint)
  1423  }
  1424  
  1425  func (m *MknodOptions) afterLoad() {}
  1426  
  1427  // +checklocksignore
  1428  func (m *MknodOptions) StateLoad(stateSourceObject state.Source) {
  1429  	stateSourceObject.Load(0, &m.Mode)
  1430  	stateSourceObject.Load(1, &m.DevMajor)
  1431  	stateSourceObject.Load(2, &m.DevMinor)
  1432  	stateSourceObject.Load(3, &m.Endpoint)
  1433  }
  1434  
  1435  func (m *MountFlags) StateTypeName() string {
  1436  	return "pkg/sentry/vfs.MountFlags"
  1437  }
  1438  
  1439  func (m *MountFlags) StateFields() []string {
  1440  	return []string{
  1441  		"NoExec",
  1442  		"NoATime",
  1443  		"NoDev",
  1444  		"NoSUID",
  1445  	}
  1446  }
  1447  
  1448  func (m *MountFlags) beforeSave() {}
  1449  
  1450  // +checklocksignore
  1451  func (m *MountFlags) StateSave(stateSinkObject state.Sink) {
  1452  	m.beforeSave()
  1453  	stateSinkObject.Save(0, &m.NoExec)
  1454  	stateSinkObject.Save(1, &m.NoATime)
  1455  	stateSinkObject.Save(2, &m.NoDev)
  1456  	stateSinkObject.Save(3, &m.NoSUID)
  1457  }
  1458  
  1459  func (m *MountFlags) afterLoad() {}
  1460  
  1461  // +checklocksignore
  1462  func (m *MountFlags) StateLoad(stateSourceObject state.Source) {
  1463  	stateSourceObject.Load(0, &m.NoExec)
  1464  	stateSourceObject.Load(1, &m.NoATime)
  1465  	stateSourceObject.Load(2, &m.NoDev)
  1466  	stateSourceObject.Load(3, &m.NoSUID)
  1467  }
  1468  
  1469  func (m *MountOptions) StateTypeName() string {
  1470  	return "pkg/sentry/vfs.MountOptions"
  1471  }
  1472  
  1473  func (m *MountOptions) StateFields() []string {
  1474  	return []string{
  1475  		"Flags",
  1476  		"ReadOnly",
  1477  		"GetFilesystemOptions",
  1478  		"InternalMount",
  1479  	}
  1480  }
  1481  
  1482  func (m *MountOptions) beforeSave() {}
  1483  
  1484  // +checklocksignore
  1485  func (m *MountOptions) StateSave(stateSinkObject state.Sink) {
  1486  	m.beforeSave()
  1487  	stateSinkObject.Save(0, &m.Flags)
  1488  	stateSinkObject.Save(1, &m.ReadOnly)
  1489  	stateSinkObject.Save(2, &m.GetFilesystemOptions)
  1490  	stateSinkObject.Save(3, &m.InternalMount)
  1491  }
  1492  
  1493  func (m *MountOptions) afterLoad() {}
  1494  
  1495  // +checklocksignore
  1496  func (m *MountOptions) StateLoad(stateSourceObject state.Source) {
  1497  	stateSourceObject.Load(0, &m.Flags)
  1498  	stateSourceObject.Load(1, &m.ReadOnly)
  1499  	stateSourceObject.Load(2, &m.GetFilesystemOptions)
  1500  	stateSourceObject.Load(3, &m.InternalMount)
  1501  }
  1502  
  1503  func (o *OpenOptions) StateTypeName() string {
  1504  	return "pkg/sentry/vfs.OpenOptions"
  1505  }
  1506  
  1507  func (o *OpenOptions) StateFields() []string {
  1508  	return []string{
  1509  		"Flags",
  1510  		"Mode",
  1511  		"FileExec",
  1512  	}
  1513  }
  1514  
  1515  func (o *OpenOptions) beforeSave() {}
  1516  
  1517  // +checklocksignore
  1518  func (o *OpenOptions) StateSave(stateSinkObject state.Sink) {
  1519  	o.beforeSave()
  1520  	stateSinkObject.Save(0, &o.Flags)
  1521  	stateSinkObject.Save(1, &o.Mode)
  1522  	stateSinkObject.Save(2, &o.FileExec)
  1523  }
  1524  
  1525  func (o *OpenOptions) afterLoad() {}
  1526  
  1527  // +checklocksignore
  1528  func (o *OpenOptions) StateLoad(stateSourceObject state.Source) {
  1529  	stateSourceObject.Load(0, &o.Flags)
  1530  	stateSourceObject.Load(1, &o.Mode)
  1531  	stateSourceObject.Load(2, &o.FileExec)
  1532  }
  1533  
  1534  func (r *ReadOptions) StateTypeName() string {
  1535  	return "pkg/sentry/vfs.ReadOptions"
  1536  }
  1537  
  1538  func (r *ReadOptions) StateFields() []string {
  1539  	return []string{
  1540  		"Flags",
  1541  	}
  1542  }
  1543  
  1544  func (r *ReadOptions) beforeSave() {}
  1545  
  1546  // +checklocksignore
  1547  func (r *ReadOptions) StateSave(stateSinkObject state.Sink) {
  1548  	r.beforeSave()
  1549  	stateSinkObject.Save(0, &r.Flags)
  1550  }
  1551  
  1552  func (r *ReadOptions) afterLoad() {}
  1553  
  1554  // +checklocksignore
  1555  func (r *ReadOptions) StateLoad(stateSourceObject state.Source) {
  1556  	stateSourceObject.Load(0, &r.Flags)
  1557  }
  1558  
  1559  func (r *RenameOptions) StateTypeName() string {
  1560  	return "pkg/sentry/vfs.RenameOptions"
  1561  }
  1562  
  1563  func (r *RenameOptions) StateFields() []string {
  1564  	return []string{
  1565  		"Flags",
  1566  		"MustBeDir",
  1567  	}
  1568  }
  1569  
  1570  func (r *RenameOptions) beforeSave() {}
  1571  
  1572  // +checklocksignore
  1573  func (r *RenameOptions) StateSave(stateSinkObject state.Sink) {
  1574  	r.beforeSave()
  1575  	stateSinkObject.Save(0, &r.Flags)
  1576  	stateSinkObject.Save(1, &r.MustBeDir)
  1577  }
  1578  
  1579  func (r *RenameOptions) afterLoad() {}
  1580  
  1581  // +checklocksignore
  1582  func (r *RenameOptions) StateLoad(stateSourceObject state.Source) {
  1583  	stateSourceObject.Load(0, &r.Flags)
  1584  	stateSourceObject.Load(1, &r.MustBeDir)
  1585  }
  1586  
  1587  func (s *SetStatOptions) StateTypeName() string {
  1588  	return "pkg/sentry/vfs.SetStatOptions"
  1589  }
  1590  
  1591  func (s *SetStatOptions) StateFields() []string {
  1592  	return []string{
  1593  		"Stat",
  1594  		"NeedWritePerm",
  1595  	}
  1596  }
  1597  
  1598  func (s *SetStatOptions) beforeSave() {}
  1599  
  1600  // +checklocksignore
  1601  func (s *SetStatOptions) StateSave(stateSinkObject state.Sink) {
  1602  	s.beforeSave()
  1603  	stateSinkObject.Save(0, &s.Stat)
  1604  	stateSinkObject.Save(1, &s.NeedWritePerm)
  1605  }
  1606  
  1607  func (s *SetStatOptions) afterLoad() {}
  1608  
  1609  // +checklocksignore
  1610  func (s *SetStatOptions) StateLoad(stateSourceObject state.Source) {
  1611  	stateSourceObject.Load(0, &s.Stat)
  1612  	stateSourceObject.Load(1, &s.NeedWritePerm)
  1613  }
  1614  
  1615  func (b *BoundEndpointOptions) StateTypeName() string {
  1616  	return "pkg/sentry/vfs.BoundEndpointOptions"
  1617  }
  1618  
  1619  func (b *BoundEndpointOptions) StateFields() []string {
  1620  	return []string{
  1621  		"Addr",
  1622  	}
  1623  }
  1624  
  1625  func (b *BoundEndpointOptions) beforeSave() {}
  1626  
  1627  // +checklocksignore
  1628  func (b *BoundEndpointOptions) StateSave(stateSinkObject state.Sink) {
  1629  	b.beforeSave()
  1630  	stateSinkObject.Save(0, &b.Addr)
  1631  }
  1632  
  1633  func (b *BoundEndpointOptions) afterLoad() {}
  1634  
  1635  // +checklocksignore
  1636  func (b *BoundEndpointOptions) StateLoad(stateSourceObject state.Source) {
  1637  	stateSourceObject.Load(0, &b.Addr)
  1638  }
  1639  
  1640  func (g *GetXattrOptions) StateTypeName() string {
  1641  	return "pkg/sentry/vfs.GetXattrOptions"
  1642  }
  1643  
  1644  func (g *GetXattrOptions) StateFields() []string {
  1645  	return []string{
  1646  		"Name",
  1647  		"Size",
  1648  	}
  1649  }
  1650  
  1651  func (g *GetXattrOptions) beforeSave() {}
  1652  
  1653  // +checklocksignore
  1654  func (g *GetXattrOptions) StateSave(stateSinkObject state.Sink) {
  1655  	g.beforeSave()
  1656  	stateSinkObject.Save(0, &g.Name)
  1657  	stateSinkObject.Save(1, &g.Size)
  1658  }
  1659  
  1660  func (g *GetXattrOptions) afterLoad() {}
  1661  
  1662  // +checklocksignore
  1663  func (g *GetXattrOptions) StateLoad(stateSourceObject state.Source) {
  1664  	stateSourceObject.Load(0, &g.Name)
  1665  	stateSourceObject.Load(1, &g.Size)
  1666  }
  1667  
  1668  func (s *SetXattrOptions) StateTypeName() string {
  1669  	return "pkg/sentry/vfs.SetXattrOptions"
  1670  }
  1671  
  1672  func (s *SetXattrOptions) StateFields() []string {
  1673  	return []string{
  1674  		"Name",
  1675  		"Value",
  1676  		"Flags",
  1677  	}
  1678  }
  1679  
  1680  func (s *SetXattrOptions) beforeSave() {}
  1681  
  1682  // +checklocksignore
  1683  func (s *SetXattrOptions) StateSave(stateSinkObject state.Sink) {
  1684  	s.beforeSave()
  1685  	stateSinkObject.Save(0, &s.Name)
  1686  	stateSinkObject.Save(1, &s.Value)
  1687  	stateSinkObject.Save(2, &s.Flags)
  1688  }
  1689  
  1690  func (s *SetXattrOptions) afterLoad() {}
  1691  
  1692  // +checklocksignore
  1693  func (s *SetXattrOptions) StateLoad(stateSourceObject state.Source) {
  1694  	stateSourceObject.Load(0, &s.Name)
  1695  	stateSourceObject.Load(1, &s.Value)
  1696  	stateSourceObject.Load(2, &s.Flags)
  1697  }
  1698  
  1699  func (s *StatOptions) StateTypeName() string {
  1700  	return "pkg/sentry/vfs.StatOptions"
  1701  }
  1702  
  1703  func (s *StatOptions) StateFields() []string {
  1704  	return []string{
  1705  		"Mask",
  1706  		"Sync",
  1707  	}
  1708  }
  1709  
  1710  func (s *StatOptions) beforeSave() {}
  1711  
  1712  // +checklocksignore
  1713  func (s *StatOptions) StateSave(stateSinkObject state.Sink) {
  1714  	s.beforeSave()
  1715  	stateSinkObject.Save(0, &s.Mask)
  1716  	stateSinkObject.Save(1, &s.Sync)
  1717  }
  1718  
  1719  func (s *StatOptions) afterLoad() {}
  1720  
  1721  // +checklocksignore
  1722  func (s *StatOptions) StateLoad(stateSourceObject state.Source) {
  1723  	stateSourceObject.Load(0, &s.Mask)
  1724  	stateSourceObject.Load(1, &s.Sync)
  1725  }
  1726  
  1727  func (u *UmountOptions) StateTypeName() string {
  1728  	return "pkg/sentry/vfs.UmountOptions"
  1729  }
  1730  
  1731  func (u *UmountOptions) StateFields() []string {
  1732  	return []string{
  1733  		"Flags",
  1734  	}
  1735  }
  1736  
  1737  func (u *UmountOptions) beforeSave() {}
  1738  
  1739  // +checklocksignore
  1740  func (u *UmountOptions) StateSave(stateSinkObject state.Sink) {
  1741  	u.beforeSave()
  1742  	stateSinkObject.Save(0, &u.Flags)
  1743  }
  1744  
  1745  func (u *UmountOptions) afterLoad() {}
  1746  
  1747  // +checklocksignore
  1748  func (u *UmountOptions) StateLoad(stateSourceObject state.Source) {
  1749  	stateSourceObject.Load(0, &u.Flags)
  1750  }
  1751  
  1752  func (w *WriteOptions) StateTypeName() string {
  1753  	return "pkg/sentry/vfs.WriteOptions"
  1754  }
  1755  
  1756  func (w *WriteOptions) StateFields() []string {
  1757  	return []string{
  1758  		"Flags",
  1759  	}
  1760  }
  1761  
  1762  func (w *WriteOptions) beforeSave() {}
  1763  
  1764  // +checklocksignore
  1765  func (w *WriteOptions) StateSave(stateSinkObject state.Sink) {
  1766  	w.beforeSave()
  1767  	stateSinkObject.Save(0, &w.Flags)
  1768  }
  1769  
  1770  func (w *WriteOptions) afterLoad() {}
  1771  
  1772  // +checklocksignore
  1773  func (w *WriteOptions) StateLoad(stateSourceObject state.Source) {
  1774  	stateSourceObject.Load(0, &w.Flags)
  1775  }
  1776  
  1777  func (a *AccessTypes) StateTypeName() string {
  1778  	return "pkg/sentry/vfs.AccessTypes"
  1779  }
  1780  
  1781  func (a *AccessTypes) StateFields() []string {
  1782  	return nil
  1783  }
  1784  
  1785  func (rp *ResolvingPath) StateTypeName() string {
  1786  	return "pkg/sentry/vfs.ResolvingPath"
  1787  }
  1788  
  1789  func (rp *ResolvingPath) StateFields() []string {
  1790  	return []string{
  1791  		"vfs",
  1792  		"root",
  1793  		"mount",
  1794  		"start",
  1795  		"pit",
  1796  		"flags",
  1797  		"mustBeDir",
  1798  		"symlinks",
  1799  		"curPart",
  1800  		"creds",
  1801  		"nextMount",
  1802  		"nextStart",
  1803  		"absSymlinkTarget",
  1804  		"parts",
  1805  	}
  1806  }
  1807  
  1808  func (rp *ResolvingPath) beforeSave() {}
  1809  
  1810  // +checklocksignore
  1811  func (rp *ResolvingPath) StateSave(stateSinkObject state.Sink) {
  1812  	rp.beforeSave()
  1813  	stateSinkObject.Save(0, &rp.vfs)
  1814  	stateSinkObject.Save(1, &rp.root)
  1815  	stateSinkObject.Save(2, &rp.mount)
  1816  	stateSinkObject.Save(3, &rp.start)
  1817  	stateSinkObject.Save(4, &rp.pit)
  1818  	stateSinkObject.Save(5, &rp.flags)
  1819  	stateSinkObject.Save(6, &rp.mustBeDir)
  1820  	stateSinkObject.Save(7, &rp.symlinks)
  1821  	stateSinkObject.Save(8, &rp.curPart)
  1822  	stateSinkObject.Save(9, &rp.creds)
  1823  	stateSinkObject.Save(10, &rp.nextMount)
  1824  	stateSinkObject.Save(11, &rp.nextStart)
  1825  	stateSinkObject.Save(12, &rp.absSymlinkTarget)
  1826  	stateSinkObject.Save(13, &rp.parts)
  1827  }
  1828  
  1829  func (rp *ResolvingPath) afterLoad() {}
  1830  
  1831  // +checklocksignore
  1832  func (rp *ResolvingPath) StateLoad(stateSourceObject state.Source) {
  1833  	stateSourceObject.Load(0, &rp.vfs)
  1834  	stateSourceObject.Load(1, &rp.root)
  1835  	stateSourceObject.Load(2, &rp.mount)
  1836  	stateSourceObject.Load(3, &rp.start)
  1837  	stateSourceObject.Load(4, &rp.pit)
  1838  	stateSourceObject.Load(5, &rp.flags)
  1839  	stateSourceObject.Load(6, &rp.mustBeDir)
  1840  	stateSourceObject.Load(7, &rp.symlinks)
  1841  	stateSourceObject.Load(8, &rp.curPart)
  1842  	stateSourceObject.Load(9, &rp.creds)
  1843  	stateSourceObject.Load(10, &rp.nextMount)
  1844  	stateSourceObject.Load(11, &rp.nextStart)
  1845  	stateSourceObject.Load(12, &rp.absSymlinkTarget)
  1846  	stateSourceObject.Load(13, &rp.parts)
  1847  }
  1848  
  1849  func (r *resolveMountRootOrJumpError) StateTypeName() string {
  1850  	return "pkg/sentry/vfs.resolveMountRootOrJumpError"
  1851  }
  1852  
  1853  func (r *resolveMountRootOrJumpError) StateFields() []string {
  1854  	return []string{}
  1855  }
  1856  
  1857  func (r *resolveMountRootOrJumpError) beforeSave() {}
  1858  
  1859  // +checklocksignore
  1860  func (r *resolveMountRootOrJumpError) StateSave(stateSinkObject state.Sink) {
  1861  	r.beforeSave()
  1862  }
  1863  
  1864  func (r *resolveMountRootOrJumpError) afterLoad() {}
  1865  
  1866  // +checklocksignore
  1867  func (r *resolveMountRootOrJumpError) StateLoad(stateSourceObject state.Source) {
  1868  }
  1869  
  1870  func (r *resolveMountPointError) StateTypeName() string {
  1871  	return "pkg/sentry/vfs.resolveMountPointError"
  1872  }
  1873  
  1874  func (r *resolveMountPointError) StateFields() []string {
  1875  	return []string{}
  1876  }
  1877  
  1878  func (r *resolveMountPointError) beforeSave() {}
  1879  
  1880  // +checklocksignore
  1881  func (r *resolveMountPointError) StateSave(stateSinkObject state.Sink) {
  1882  	r.beforeSave()
  1883  }
  1884  
  1885  func (r *resolveMountPointError) afterLoad() {}
  1886  
  1887  // +checklocksignore
  1888  func (r *resolveMountPointError) StateLoad(stateSourceObject state.Source) {
  1889  }
  1890  
  1891  func (r *resolveAbsSymlinkError) StateTypeName() string {
  1892  	return "pkg/sentry/vfs.resolveAbsSymlinkError"
  1893  }
  1894  
  1895  func (r *resolveAbsSymlinkError) StateFields() []string {
  1896  	return []string{}
  1897  }
  1898  
  1899  func (r *resolveAbsSymlinkError) beforeSave() {}
  1900  
  1901  // +checklocksignore
  1902  func (r *resolveAbsSymlinkError) StateSave(stateSinkObject state.Sink) {
  1903  	r.beforeSave()
  1904  }
  1905  
  1906  func (r *resolveAbsSymlinkError) afterLoad() {}
  1907  
  1908  // +checklocksignore
  1909  func (r *resolveAbsSymlinkError) StateLoad(stateSourceObject state.Source) {
  1910  }
  1911  
  1912  func (l *sharedList) StateTypeName() string {
  1913  	return "pkg/sentry/vfs.sharedList"
  1914  }
  1915  
  1916  func (l *sharedList) StateFields() []string {
  1917  	return []string{
  1918  		"head",
  1919  		"tail",
  1920  	}
  1921  }
  1922  
  1923  func (l *sharedList) beforeSave() {}
  1924  
  1925  // +checklocksignore
  1926  func (l *sharedList) StateSave(stateSinkObject state.Sink) {
  1927  	l.beforeSave()
  1928  	stateSinkObject.Save(0, &l.head)
  1929  	stateSinkObject.Save(1, &l.tail)
  1930  }
  1931  
  1932  func (l *sharedList) afterLoad() {}
  1933  
  1934  // +checklocksignore
  1935  func (l *sharedList) StateLoad(stateSourceObject state.Source) {
  1936  	stateSourceObject.Load(0, &l.head)
  1937  	stateSourceObject.Load(1, &l.tail)
  1938  }
  1939  
  1940  func (e *sharedEntry) StateTypeName() string {
  1941  	return "pkg/sentry/vfs.sharedEntry"
  1942  }
  1943  
  1944  func (e *sharedEntry) StateFields() []string {
  1945  	return []string{
  1946  		"next",
  1947  		"prev",
  1948  	}
  1949  }
  1950  
  1951  func (e *sharedEntry) beforeSave() {}
  1952  
  1953  // +checklocksignore
  1954  func (e *sharedEntry) StateSave(stateSinkObject state.Sink) {
  1955  	e.beforeSave()
  1956  	stateSinkObject.Save(0, &e.next)
  1957  	stateSinkObject.Save(1, &e.prev)
  1958  }
  1959  
  1960  func (e *sharedEntry) afterLoad() {}
  1961  
  1962  // +checklocksignore
  1963  func (e *sharedEntry) StateLoad(stateSourceObject state.Source) {
  1964  	stateSourceObject.Load(0, &e.next)
  1965  	stateSourceObject.Load(1, &e.prev)
  1966  }
  1967  
  1968  func (vfs *VirtualFilesystem) StateTypeName() string {
  1969  	return "pkg/sentry/vfs.VirtualFilesystem"
  1970  }
  1971  
  1972  func (vfs *VirtualFilesystem) StateFields() []string {
  1973  	return []string{
  1974  		"mounts",
  1975  		"mountpoints",
  1976  		"lastMountID",
  1977  		"anonMount",
  1978  		"devices",
  1979  		"dynCharDevMajorUsed",
  1980  		"anonBlockDevMinorNext",
  1981  		"anonBlockDevMinor",
  1982  		"fsTypes",
  1983  		"filesystems",
  1984  		"groupIDBitmap",
  1985  		"mountPromises",
  1986  	}
  1987  }
  1988  
  1989  func (vfs *VirtualFilesystem) beforeSave() {}
  1990  
  1991  // +checklocksignore
  1992  func (vfs *VirtualFilesystem) StateSave(stateSinkObject state.Sink) {
  1993  	vfs.beforeSave()
  1994  	var mountsValue []*Mount
  1995  	mountsValue = vfs.saveMounts()
  1996  	stateSinkObject.SaveValue(0, mountsValue)
  1997  	stateSinkObject.Save(1, &vfs.mountpoints)
  1998  	stateSinkObject.Save(2, &vfs.lastMountID)
  1999  	stateSinkObject.Save(3, &vfs.anonMount)
  2000  	stateSinkObject.Save(4, &vfs.devices)
  2001  	stateSinkObject.Save(5, &vfs.dynCharDevMajorUsed)
  2002  	stateSinkObject.Save(6, &vfs.anonBlockDevMinorNext)
  2003  	stateSinkObject.Save(7, &vfs.anonBlockDevMinor)
  2004  	stateSinkObject.Save(8, &vfs.fsTypes)
  2005  	stateSinkObject.Save(9, &vfs.filesystems)
  2006  	stateSinkObject.Save(10, &vfs.groupIDBitmap)
  2007  	stateSinkObject.Save(11, &vfs.mountPromises)
  2008  }
  2009  
  2010  func (vfs *VirtualFilesystem) afterLoad() {}
  2011  
  2012  // +checklocksignore
  2013  func (vfs *VirtualFilesystem) StateLoad(stateSourceObject state.Source) {
  2014  	stateSourceObject.Load(1, &vfs.mountpoints)
  2015  	stateSourceObject.Load(2, &vfs.lastMountID)
  2016  	stateSourceObject.Load(3, &vfs.anonMount)
  2017  	stateSourceObject.Load(4, &vfs.devices)
  2018  	stateSourceObject.Load(5, &vfs.dynCharDevMajorUsed)
  2019  	stateSourceObject.Load(6, &vfs.anonBlockDevMinorNext)
  2020  	stateSourceObject.Load(7, &vfs.anonBlockDevMinor)
  2021  	stateSourceObject.Load(8, &vfs.fsTypes)
  2022  	stateSourceObject.Load(9, &vfs.filesystems)
  2023  	stateSourceObject.Load(10, &vfs.groupIDBitmap)
  2024  	stateSourceObject.Load(11, &vfs.mountPromises)
  2025  	stateSourceObject.LoadValue(0, new([]*Mount), func(y any) { vfs.loadMounts(y.([]*Mount)) })
  2026  }
  2027  
  2028  func (p *PathOperation) StateTypeName() string {
  2029  	return "pkg/sentry/vfs.PathOperation"
  2030  }
  2031  
  2032  func (p *PathOperation) StateFields() []string {
  2033  	return []string{
  2034  		"Root",
  2035  		"Start",
  2036  		"Path",
  2037  		"FollowFinalSymlink",
  2038  	}
  2039  }
  2040  
  2041  func (p *PathOperation) beforeSave() {}
  2042  
  2043  // +checklocksignore
  2044  func (p *PathOperation) StateSave(stateSinkObject state.Sink) {
  2045  	p.beforeSave()
  2046  	stateSinkObject.Save(0, &p.Root)
  2047  	stateSinkObject.Save(1, &p.Start)
  2048  	stateSinkObject.Save(2, &p.Path)
  2049  	stateSinkObject.Save(3, &p.FollowFinalSymlink)
  2050  }
  2051  
  2052  func (p *PathOperation) afterLoad() {}
  2053  
  2054  // +checklocksignore
  2055  func (p *PathOperation) StateLoad(stateSourceObject state.Source) {
  2056  	stateSourceObject.Load(0, &p.Root)
  2057  	stateSourceObject.Load(1, &p.Start)
  2058  	stateSourceObject.Load(2, &p.Path)
  2059  	stateSourceObject.Load(3, &p.FollowFinalSymlink)
  2060  }
  2061  
  2062  func (vd *VirtualDentry) StateTypeName() string {
  2063  	return "pkg/sentry/vfs.VirtualDentry"
  2064  }
  2065  
  2066  func (vd *VirtualDentry) StateFields() []string {
  2067  	return []string{
  2068  		"mount",
  2069  		"dentry",
  2070  	}
  2071  }
  2072  
  2073  func (vd *VirtualDentry) beforeSave() {}
  2074  
  2075  // +checklocksignore
  2076  func (vd *VirtualDentry) StateSave(stateSinkObject state.Sink) {
  2077  	vd.beforeSave()
  2078  	stateSinkObject.Save(0, &vd.mount)
  2079  	stateSinkObject.Save(1, &vd.dentry)
  2080  }
  2081  
  2082  func (vd *VirtualDentry) afterLoad() {}
  2083  
  2084  // +checklocksignore
  2085  func (vd *VirtualDentry) StateLoad(stateSourceObject state.Source) {
  2086  	stateSourceObject.Load(0, &vd.mount)
  2087  	stateSourceObject.Load(1, &vd.dentry)
  2088  }
  2089  
  2090  func init() {
  2091  	state.Register((*anonFilesystemType)(nil))
  2092  	state.Register((*anonFilesystem)(nil))
  2093  	state.Register((*anonDentry)(nil))
  2094  	state.Register((*Dentry)(nil))
  2095  	state.Register((*DeviceKind)(nil))
  2096  	state.Register((*devTuple)(nil))
  2097  	state.Register((*registeredDevice)(nil))
  2098  	state.Register((*RegisterDeviceOptions)(nil))
  2099  	state.Register((*EpollInstance)(nil))
  2100  	state.Register((*epollInterestKey)(nil))
  2101  	state.Register((*epollInterest)(nil))
  2102  	state.Register((*epollInterestList)(nil))
  2103  	state.Register((*epollInterestEntry)(nil))
  2104  	state.Register((*eventList)(nil))
  2105  	state.Register((*eventEntry)(nil))
  2106  	state.Register((*FileDescription)(nil))
  2107  	state.Register((*FileDescriptionOptions)(nil))
  2108  	state.Register((*Dirent)(nil))
  2109  	state.Register((*FileDescriptionDefaultImpl)(nil))
  2110  	state.Register((*DirectoryFileDescriptionDefaultImpl)(nil))
  2111  	state.Register((*DentryMetadataFileDescriptionImpl)(nil))
  2112  	state.Register((*StaticData)(nil))
  2113  	state.Register((*DynamicBytesFileDescriptionImpl)(nil))
  2114  	state.Register((*LockFD)(nil))
  2115  	state.Register((*NoLockFD)(nil))
  2116  	state.Register((*BadLockFD)(nil))
  2117  	state.Register((*FileDescriptionRefs)(nil))
  2118  	state.Register((*Filesystem)(nil))
  2119  	state.Register((*PrependPathAtVFSRootError)(nil))
  2120  	state.Register((*PrependPathAtNonMountRootError)(nil))
  2121  	state.Register((*PrependPathSyntheticError)(nil))
  2122  	state.Register((*FilesystemRefs)(nil))
  2123  	state.Register((*registeredFilesystemType)(nil))
  2124  	state.Register((*RegisterFilesystemTypeOptions)(nil))
  2125  	state.Register((*EventType)(nil))
  2126  	state.Register((*Inotify)(nil))
  2127  	state.Register((*Watches)(nil))
  2128  	state.Register((*Watch)(nil))
  2129  	state.Register((*Event)(nil))
  2130  	state.Register((*FileLocks)(nil))
  2131  	state.Register((*Mount)(nil))
  2132  	state.Register((*MountNamespace)(nil))
  2133  	state.Register((*umountRecursiveOptions)(nil))
  2134  	state.Register((*MountNamespaceRefs)(nil))
  2135  	state.Register((*opathFD)(nil))
  2136  	state.Register((*GetDentryOptions)(nil))
  2137  	state.Register((*MkdirOptions)(nil))
  2138  	state.Register((*MknodOptions)(nil))
  2139  	state.Register((*MountFlags)(nil))
  2140  	state.Register((*MountOptions)(nil))
  2141  	state.Register((*OpenOptions)(nil))
  2142  	state.Register((*ReadOptions)(nil))
  2143  	state.Register((*RenameOptions)(nil))
  2144  	state.Register((*SetStatOptions)(nil))
  2145  	state.Register((*BoundEndpointOptions)(nil))
  2146  	state.Register((*GetXattrOptions)(nil))
  2147  	state.Register((*SetXattrOptions)(nil))
  2148  	state.Register((*StatOptions)(nil))
  2149  	state.Register((*UmountOptions)(nil))
  2150  	state.Register((*WriteOptions)(nil))
  2151  	state.Register((*AccessTypes)(nil))
  2152  	state.Register((*ResolvingPath)(nil))
  2153  	state.Register((*resolveMountRootOrJumpError)(nil))
  2154  	state.Register((*resolveMountPointError)(nil))
  2155  	state.Register((*resolveAbsSymlinkError)(nil))
  2156  	state.Register((*sharedList)(nil))
  2157  	state.Register((*sharedEntry)(nil))
  2158  	state.Register((*VirtualFilesystem)(nil))
  2159  	state.Register((*PathOperation)(nil))
  2160  	state.Register((*VirtualDentry)(nil))
  2161  }