github.com/metacubex/gvisor@v0.0.0-20240320004321-933faba989ec/pkg/sentry/kernel/kernel_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package kernel
     4  
     5  import (
     6  	"context"
     7  
     8  	"github.com/metacubex/gvisor/pkg/state"
     9  	"github.com/metacubex/gvisor/pkg/tcpip"
    10  )
    11  
    12  func (c *Cgroup) StateTypeName() string {
    13  	return "pkg/sentry/kernel.Cgroup"
    14  }
    15  
    16  func (c *Cgroup) StateFields() []string {
    17  	return []string{
    18  		"Dentry",
    19  		"CgroupImpl",
    20  	}
    21  }
    22  
    23  func (c *Cgroup) beforeSave() {}
    24  
    25  // +checklocksignore
    26  func (c *Cgroup) StateSave(stateSinkObject state.Sink) {
    27  	c.beforeSave()
    28  	stateSinkObject.Save(0, &c.Dentry)
    29  	stateSinkObject.Save(1, &c.CgroupImpl)
    30  }
    31  
    32  func (c *Cgroup) afterLoad(context.Context) {}
    33  
    34  // +checklocksignore
    35  func (c *Cgroup) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    36  	stateSourceObject.Load(0, &c.Dentry)
    37  	stateSourceObject.Load(1, &c.CgroupImpl)
    38  }
    39  
    40  func (h *hierarchy) StateTypeName() string {
    41  	return "pkg/sentry/kernel.hierarchy"
    42  }
    43  
    44  func (h *hierarchy) StateFields() []string {
    45  	return []string{
    46  		"id",
    47  		"name",
    48  		"controllers",
    49  		"fs",
    50  	}
    51  }
    52  
    53  func (h *hierarchy) beforeSave() {}
    54  
    55  // +checklocksignore
    56  func (h *hierarchy) StateSave(stateSinkObject state.Sink) {
    57  	h.beforeSave()
    58  	stateSinkObject.Save(0, &h.id)
    59  	stateSinkObject.Save(1, &h.name)
    60  	stateSinkObject.Save(2, &h.controllers)
    61  	stateSinkObject.Save(3, &h.fs)
    62  }
    63  
    64  func (h *hierarchy) afterLoad(context.Context) {}
    65  
    66  // +checklocksignore
    67  func (h *hierarchy) StateLoad(ctx context.Context, stateSourceObject state.Source) {
    68  	stateSourceObject.Load(0, &h.id)
    69  	stateSourceObject.Load(1, &h.name)
    70  	stateSourceObject.Load(2, &h.controllers)
    71  	stateSourceObject.Load(3, &h.fs)
    72  }
    73  
    74  func (r *CgroupRegistry) StateTypeName() string {
    75  	return "pkg/sentry/kernel.CgroupRegistry"
    76  }
    77  
    78  func (r *CgroupRegistry) StateFields() []string {
    79  	return []string{
    80  		"lastHierarchyID",
    81  		"lastCgroupID",
    82  		"controllers",
    83  		"hierarchies",
    84  		"hierarchiesByName",
    85  		"cgroups",
    86  	}
    87  }
    88  
    89  func (r *CgroupRegistry) beforeSave() {}
    90  
    91  // +checklocksignore
    92  func (r *CgroupRegistry) StateSave(stateSinkObject state.Sink) {
    93  	r.beforeSave()
    94  	stateSinkObject.Save(0, &r.lastHierarchyID)
    95  	stateSinkObject.Save(1, &r.lastCgroupID)
    96  	stateSinkObject.Save(2, &r.controllers)
    97  	stateSinkObject.Save(3, &r.hierarchies)
    98  	stateSinkObject.Save(4, &r.hierarchiesByName)
    99  	stateSinkObject.Save(5, &r.cgroups)
   100  }
   101  
   102  func (r *CgroupRegistry) afterLoad(context.Context) {}
   103  
   104  // +checklocksignore
   105  func (r *CgroupRegistry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   106  	stateSourceObject.Load(0, &r.lastHierarchyID)
   107  	stateSourceObject.Load(1, &r.lastCgroupID)
   108  	stateSourceObject.Load(2, &r.controllers)
   109  	stateSourceObject.Load(3, &r.hierarchies)
   110  	stateSourceObject.Load(4, &r.hierarchiesByName)
   111  	stateSourceObject.Load(5, &r.cgroups)
   112  }
   113  
   114  func (f *FDFlags) StateTypeName() string {
   115  	return "pkg/sentry/kernel.FDFlags"
   116  }
   117  
   118  func (f *FDFlags) StateFields() []string {
   119  	return []string{
   120  		"CloseOnExec",
   121  	}
   122  }
   123  
   124  func (f *FDFlags) beforeSave() {}
   125  
   126  // +checklocksignore
   127  func (f *FDFlags) StateSave(stateSinkObject state.Sink) {
   128  	f.beforeSave()
   129  	stateSinkObject.Save(0, &f.CloseOnExec)
   130  }
   131  
   132  func (f *FDFlags) afterLoad(context.Context) {}
   133  
   134  // +checklocksignore
   135  func (f *FDFlags) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   136  	stateSourceObject.Load(0, &f.CloseOnExec)
   137  }
   138  
   139  func (d *descriptor) StateTypeName() string {
   140  	return "pkg/sentry/kernel.descriptor"
   141  }
   142  
   143  func (d *descriptor) StateFields() []string {
   144  	return []string{
   145  		"file",
   146  		"flags",
   147  	}
   148  }
   149  
   150  func (d *descriptor) beforeSave() {}
   151  
   152  // +checklocksignore
   153  func (d *descriptor) StateSave(stateSinkObject state.Sink) {
   154  	d.beforeSave()
   155  	stateSinkObject.Save(0, &d.file)
   156  	stateSinkObject.Save(1, &d.flags)
   157  }
   158  
   159  func (d *descriptor) afterLoad(context.Context) {}
   160  
   161  // +checklocksignore
   162  func (d *descriptor) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   163  	stateSourceObject.Load(0, &d.file)
   164  	stateSourceObject.Load(1, &d.flags)
   165  }
   166  
   167  func (f *FDTable) StateTypeName() string {
   168  	return "pkg/sentry/kernel.FDTable"
   169  }
   170  
   171  func (f *FDTable) StateFields() []string {
   172  	return []string{
   173  		"FDTableRefs",
   174  		"k",
   175  		"descriptorTable",
   176  	}
   177  }
   178  
   179  func (f *FDTable) beforeSave() {}
   180  
   181  // +checklocksignore
   182  func (f *FDTable) StateSave(stateSinkObject state.Sink) {
   183  	f.beforeSave()
   184  	var descriptorTableValue map[int32]descriptor
   185  	descriptorTableValue = f.saveDescriptorTable()
   186  	stateSinkObject.SaveValue(2, descriptorTableValue)
   187  	stateSinkObject.Save(0, &f.FDTableRefs)
   188  	stateSinkObject.Save(1, &f.k)
   189  }
   190  
   191  func (f *FDTable) afterLoad(context.Context) {}
   192  
   193  // +checklocksignore
   194  func (f *FDTable) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   195  	stateSourceObject.Load(0, &f.FDTableRefs)
   196  	stateSourceObject.Load(1, &f.k)
   197  	stateSourceObject.LoadValue(2, new(map[int32]descriptor), func(y any) { f.loadDescriptorTable(ctx, y.(map[int32]descriptor)) })
   198  }
   199  
   200  func (r *FDTableRefs) StateTypeName() string {
   201  	return "pkg/sentry/kernel.FDTableRefs"
   202  }
   203  
   204  func (r *FDTableRefs) StateFields() []string {
   205  	return []string{
   206  		"refCount",
   207  	}
   208  }
   209  
   210  func (r *FDTableRefs) beforeSave() {}
   211  
   212  // +checklocksignore
   213  func (r *FDTableRefs) StateSave(stateSinkObject state.Sink) {
   214  	r.beforeSave()
   215  	stateSinkObject.Save(0, &r.refCount)
   216  }
   217  
   218  // +checklocksignore
   219  func (r *FDTableRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   220  	stateSourceObject.Load(0, &r.refCount)
   221  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
   222  }
   223  
   224  func (f *FSContext) StateTypeName() string {
   225  	return "pkg/sentry/kernel.FSContext"
   226  }
   227  
   228  func (f *FSContext) StateFields() []string {
   229  	return []string{
   230  		"FSContextRefs",
   231  		"root",
   232  		"cwd",
   233  		"umask",
   234  	}
   235  }
   236  
   237  func (f *FSContext) beforeSave() {}
   238  
   239  // +checklocksignore
   240  func (f *FSContext) StateSave(stateSinkObject state.Sink) {
   241  	f.beforeSave()
   242  	stateSinkObject.Save(0, &f.FSContextRefs)
   243  	stateSinkObject.Save(1, &f.root)
   244  	stateSinkObject.Save(2, &f.cwd)
   245  	stateSinkObject.Save(3, &f.umask)
   246  }
   247  
   248  func (f *FSContext) afterLoad(context.Context) {}
   249  
   250  // +checklocksignore
   251  func (f *FSContext) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   252  	stateSourceObject.Load(0, &f.FSContextRefs)
   253  	stateSourceObject.Load(1, &f.root)
   254  	stateSourceObject.Load(2, &f.cwd)
   255  	stateSourceObject.Load(3, &f.umask)
   256  }
   257  
   258  func (r *FSContextRefs) StateTypeName() string {
   259  	return "pkg/sentry/kernel.FSContextRefs"
   260  }
   261  
   262  func (r *FSContextRefs) StateFields() []string {
   263  	return []string{
   264  		"refCount",
   265  	}
   266  }
   267  
   268  func (r *FSContextRefs) beforeSave() {}
   269  
   270  // +checklocksignore
   271  func (r *FSContextRefs) StateSave(stateSinkObject state.Sink) {
   272  	r.beforeSave()
   273  	stateSinkObject.Save(0, &r.refCount)
   274  }
   275  
   276  // +checklocksignore
   277  func (r *FSContextRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   278  	stateSourceObject.Load(0, &r.refCount)
   279  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
   280  }
   281  
   282  func (i *IPCNamespace) StateTypeName() string {
   283  	return "pkg/sentry/kernel.IPCNamespace"
   284  }
   285  
   286  func (i *IPCNamespace) StateFields() []string {
   287  	return []string{
   288  		"inode",
   289  		"userNS",
   290  		"queues",
   291  		"semaphores",
   292  		"shms",
   293  		"posixQueues",
   294  	}
   295  }
   296  
   297  func (i *IPCNamespace) beforeSave() {}
   298  
   299  // +checklocksignore
   300  func (i *IPCNamespace) StateSave(stateSinkObject state.Sink) {
   301  	i.beforeSave()
   302  	stateSinkObject.Save(0, &i.inode)
   303  	stateSinkObject.Save(1, &i.userNS)
   304  	stateSinkObject.Save(2, &i.queues)
   305  	stateSinkObject.Save(3, &i.semaphores)
   306  	stateSinkObject.Save(4, &i.shms)
   307  	stateSinkObject.Save(5, &i.posixQueues)
   308  }
   309  
   310  func (i *IPCNamespace) afterLoad(context.Context) {}
   311  
   312  // +checklocksignore
   313  func (i *IPCNamespace) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   314  	stateSourceObject.Load(0, &i.inode)
   315  	stateSourceObject.Load(1, &i.userNS)
   316  	stateSourceObject.Load(2, &i.queues)
   317  	stateSourceObject.Load(3, &i.semaphores)
   318  	stateSourceObject.Load(4, &i.shms)
   319  	stateSourceObject.Load(5, &i.posixQueues)
   320  }
   321  
   322  func (uc *UserCounters) StateTypeName() string {
   323  	return "pkg/sentry/kernel.UserCounters"
   324  }
   325  
   326  func (uc *UserCounters) StateFields() []string {
   327  	return []string{
   328  		"uid",
   329  		"rlimitNProc",
   330  	}
   331  }
   332  
   333  func (uc *UserCounters) beforeSave() {}
   334  
   335  // +checklocksignore
   336  func (uc *UserCounters) StateSave(stateSinkObject state.Sink) {
   337  	uc.beforeSave()
   338  	stateSinkObject.Save(0, &uc.uid)
   339  	stateSinkObject.Save(1, &uc.rlimitNProc)
   340  }
   341  
   342  func (uc *UserCounters) afterLoad(context.Context) {}
   343  
   344  // +checklocksignore
   345  func (uc *UserCounters) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   346  	stateSourceObject.Load(0, &uc.uid)
   347  	stateSourceObject.Load(1, &uc.rlimitNProc)
   348  }
   349  
   350  func (c *CgroupMount) StateTypeName() string {
   351  	return "pkg/sentry/kernel.CgroupMount"
   352  }
   353  
   354  func (c *CgroupMount) StateFields() []string {
   355  	return []string{
   356  		"Fs",
   357  		"Root",
   358  		"Mount",
   359  	}
   360  }
   361  
   362  func (c *CgroupMount) beforeSave() {}
   363  
   364  // +checklocksignore
   365  func (c *CgroupMount) StateSave(stateSinkObject state.Sink) {
   366  	c.beforeSave()
   367  	stateSinkObject.Save(0, &c.Fs)
   368  	stateSinkObject.Save(1, &c.Root)
   369  	stateSinkObject.Save(2, &c.Mount)
   370  }
   371  
   372  func (c *CgroupMount) afterLoad(context.Context) {}
   373  
   374  // +checklocksignore
   375  func (c *CgroupMount) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   376  	stateSourceObject.Load(0, &c.Fs)
   377  	stateSourceObject.Load(1, &c.Root)
   378  	stateSourceObject.Load(2, &c.Mount)
   379  }
   380  
   381  func (k *Kernel) StateTypeName() string {
   382  	return "pkg/sentry/kernel.Kernel"
   383  }
   384  
   385  func (k *Kernel) StateFields() []string {
   386  	return []string{
   387  		"featureSet",
   388  		"timekeeper",
   389  		"tasks",
   390  		"rootUserNamespace",
   391  		"rootNetworkNamespace",
   392  		"applicationCores",
   393  		"useHostCores",
   394  		"extraAuxv",
   395  		"vdso",
   396  		"rootUTSNamespace",
   397  		"rootIPCNamespace",
   398  		"futexes",
   399  		"globalInit",
   400  		"syslog",
   401  		"runningTasks",
   402  		"cpuClock",
   403  		"cpuClockTickerRunning",
   404  		"uniqueID",
   405  		"nextInotifyCookie",
   406  		"netlinkPorts",
   407  		"danglingEndpoints",
   408  		"sockets",
   409  		"nextSocketRecord",
   410  		"SpecialOpts",
   411  		"vfs",
   412  		"hostMount",
   413  		"pipeMount",
   414  		"nsfsMount",
   415  		"shmMount",
   416  		"socketMount",
   417  		"sysVShmDevID",
   418  		"SleepForAddressSpaceActivation",
   419  		"ptraceExceptions",
   420  		"YAMAPtraceScope",
   421  		"cgroupRegistry",
   422  		"cgroupMountsMap",
   423  		"userCountersMap",
   424  		"MaxFDLimit",
   425  	}
   426  }
   427  
   428  func (k *Kernel) beforeSave() {}
   429  
   430  // +checklocksignore
   431  func (k *Kernel) StateSave(stateSinkObject state.Sink) {
   432  	k.beforeSave()
   433  	var danglingEndpointsValue []tcpip.Endpoint
   434  	danglingEndpointsValue = k.saveDanglingEndpoints()
   435  	stateSinkObject.SaveValue(20, danglingEndpointsValue)
   436  	stateSinkObject.Save(0, &k.featureSet)
   437  	stateSinkObject.Save(1, &k.timekeeper)
   438  	stateSinkObject.Save(2, &k.tasks)
   439  	stateSinkObject.Save(3, &k.rootUserNamespace)
   440  	stateSinkObject.Save(4, &k.rootNetworkNamespace)
   441  	stateSinkObject.Save(5, &k.applicationCores)
   442  	stateSinkObject.Save(6, &k.useHostCores)
   443  	stateSinkObject.Save(7, &k.extraAuxv)
   444  	stateSinkObject.Save(8, &k.vdso)
   445  	stateSinkObject.Save(9, &k.rootUTSNamespace)
   446  	stateSinkObject.Save(10, &k.rootIPCNamespace)
   447  	stateSinkObject.Save(11, &k.futexes)
   448  	stateSinkObject.Save(12, &k.globalInit)
   449  	stateSinkObject.Save(13, &k.syslog)
   450  	stateSinkObject.Save(14, &k.runningTasks)
   451  	stateSinkObject.Save(15, &k.cpuClock)
   452  	stateSinkObject.Save(16, &k.cpuClockTickerRunning)
   453  	stateSinkObject.Save(17, &k.uniqueID)
   454  	stateSinkObject.Save(18, &k.nextInotifyCookie)
   455  	stateSinkObject.Save(19, &k.netlinkPorts)
   456  	stateSinkObject.Save(21, &k.sockets)
   457  	stateSinkObject.Save(22, &k.nextSocketRecord)
   458  	stateSinkObject.Save(23, &k.SpecialOpts)
   459  	stateSinkObject.Save(24, &k.vfs)
   460  	stateSinkObject.Save(25, &k.hostMount)
   461  	stateSinkObject.Save(26, &k.pipeMount)
   462  	stateSinkObject.Save(27, &k.nsfsMount)
   463  	stateSinkObject.Save(28, &k.shmMount)
   464  	stateSinkObject.Save(29, &k.socketMount)
   465  	stateSinkObject.Save(30, &k.sysVShmDevID)
   466  	stateSinkObject.Save(31, &k.SleepForAddressSpaceActivation)
   467  	stateSinkObject.Save(32, &k.ptraceExceptions)
   468  	stateSinkObject.Save(33, &k.YAMAPtraceScope)
   469  	stateSinkObject.Save(34, &k.cgroupRegistry)
   470  	stateSinkObject.Save(35, &k.cgroupMountsMap)
   471  	stateSinkObject.Save(36, &k.userCountersMap)
   472  	stateSinkObject.Save(37, &k.MaxFDLimit)
   473  }
   474  
   475  func (k *Kernel) afterLoad(context.Context) {}
   476  
   477  // +checklocksignore
   478  func (k *Kernel) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   479  	stateSourceObject.Load(0, &k.featureSet)
   480  	stateSourceObject.Load(1, &k.timekeeper)
   481  	stateSourceObject.Load(2, &k.tasks)
   482  	stateSourceObject.Load(3, &k.rootUserNamespace)
   483  	stateSourceObject.Load(4, &k.rootNetworkNamespace)
   484  	stateSourceObject.Load(5, &k.applicationCores)
   485  	stateSourceObject.Load(6, &k.useHostCores)
   486  	stateSourceObject.Load(7, &k.extraAuxv)
   487  	stateSourceObject.Load(8, &k.vdso)
   488  	stateSourceObject.Load(9, &k.rootUTSNamespace)
   489  	stateSourceObject.Load(10, &k.rootIPCNamespace)
   490  	stateSourceObject.Load(11, &k.futexes)
   491  	stateSourceObject.Load(12, &k.globalInit)
   492  	stateSourceObject.Load(13, &k.syslog)
   493  	stateSourceObject.Load(14, &k.runningTasks)
   494  	stateSourceObject.Load(15, &k.cpuClock)
   495  	stateSourceObject.Load(16, &k.cpuClockTickerRunning)
   496  	stateSourceObject.Load(17, &k.uniqueID)
   497  	stateSourceObject.Load(18, &k.nextInotifyCookie)
   498  	stateSourceObject.Load(19, &k.netlinkPorts)
   499  	stateSourceObject.Load(21, &k.sockets)
   500  	stateSourceObject.Load(22, &k.nextSocketRecord)
   501  	stateSourceObject.Load(23, &k.SpecialOpts)
   502  	stateSourceObject.Load(24, &k.vfs)
   503  	stateSourceObject.Load(25, &k.hostMount)
   504  	stateSourceObject.Load(26, &k.pipeMount)
   505  	stateSourceObject.Load(27, &k.nsfsMount)
   506  	stateSourceObject.Load(28, &k.shmMount)
   507  	stateSourceObject.Load(29, &k.socketMount)
   508  	stateSourceObject.Load(30, &k.sysVShmDevID)
   509  	stateSourceObject.Load(31, &k.SleepForAddressSpaceActivation)
   510  	stateSourceObject.Load(32, &k.ptraceExceptions)
   511  	stateSourceObject.Load(33, &k.YAMAPtraceScope)
   512  	stateSourceObject.Load(34, &k.cgroupRegistry)
   513  	stateSourceObject.Load(35, &k.cgroupMountsMap)
   514  	stateSourceObject.Load(36, &k.userCountersMap)
   515  	stateSourceObject.Load(37, &k.MaxFDLimit)
   516  	stateSourceObject.LoadValue(20, new([]tcpip.Endpoint), func(y any) { k.loadDanglingEndpoints(ctx, y.([]tcpip.Endpoint)) })
   517  }
   518  
   519  func (p *privateMemoryFileMetadata) StateTypeName() string {
   520  	return "pkg/sentry/kernel.privateMemoryFileMetadata"
   521  }
   522  
   523  func (p *privateMemoryFileMetadata) StateFields() []string {
   524  	return []string{
   525  		"owners",
   526  	}
   527  }
   528  
   529  func (p *privateMemoryFileMetadata) beforeSave() {}
   530  
   531  // +checklocksignore
   532  func (p *privateMemoryFileMetadata) StateSave(stateSinkObject state.Sink) {
   533  	p.beforeSave()
   534  	stateSinkObject.Save(0, &p.owners)
   535  }
   536  
   537  func (p *privateMemoryFileMetadata) afterLoad(context.Context) {}
   538  
   539  // +checklocksignore
   540  func (p *privateMemoryFileMetadata) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   541  	stateSourceObject.Load(0, &p.owners)
   542  }
   543  
   544  func (s *SocketRecord) StateTypeName() string {
   545  	return "pkg/sentry/kernel.SocketRecord"
   546  }
   547  
   548  func (s *SocketRecord) StateFields() []string {
   549  	return []string{
   550  		"k",
   551  		"Sock",
   552  		"ID",
   553  	}
   554  }
   555  
   556  func (s *SocketRecord) beforeSave() {}
   557  
   558  // +checklocksignore
   559  func (s *SocketRecord) StateSave(stateSinkObject state.Sink) {
   560  	s.beforeSave()
   561  	stateSinkObject.Save(0, &s.k)
   562  	stateSinkObject.Save(1, &s.Sock)
   563  	stateSinkObject.Save(2, &s.ID)
   564  }
   565  
   566  func (s *SocketRecord) afterLoad(context.Context) {}
   567  
   568  // +checklocksignore
   569  func (s *SocketRecord) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   570  	stateSourceObject.Load(0, &s.k)
   571  	stateSourceObject.Load(1, &s.Sock)
   572  	stateSourceObject.Load(2, &s.ID)
   573  }
   574  
   575  func (p *pendingSignals) StateTypeName() string {
   576  	return "pkg/sentry/kernel.pendingSignals"
   577  }
   578  
   579  func (p *pendingSignals) StateFields() []string {
   580  	return []string{
   581  		"signals",
   582  	}
   583  }
   584  
   585  func (p *pendingSignals) beforeSave() {}
   586  
   587  // +checklocksignore
   588  func (p *pendingSignals) StateSave(stateSinkObject state.Sink) {
   589  	p.beforeSave()
   590  	var signalsValue []savedPendingSignal
   591  	signalsValue = p.saveSignals()
   592  	stateSinkObject.SaveValue(0, signalsValue)
   593  }
   594  
   595  func (p *pendingSignals) afterLoad(context.Context) {}
   596  
   597  // +checklocksignore
   598  func (p *pendingSignals) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   599  	stateSourceObject.LoadValue(0, new([]savedPendingSignal), func(y any) { p.loadSignals(ctx, y.([]savedPendingSignal)) })
   600  }
   601  
   602  func (p *pendingSignalQueue) StateTypeName() string {
   603  	return "pkg/sentry/kernel.pendingSignalQueue"
   604  }
   605  
   606  func (p *pendingSignalQueue) StateFields() []string {
   607  	return []string{
   608  		"pendingSignalList",
   609  		"length",
   610  	}
   611  }
   612  
   613  func (p *pendingSignalQueue) beforeSave() {}
   614  
   615  // +checklocksignore
   616  func (p *pendingSignalQueue) StateSave(stateSinkObject state.Sink) {
   617  	p.beforeSave()
   618  	stateSinkObject.Save(0, &p.pendingSignalList)
   619  	stateSinkObject.Save(1, &p.length)
   620  }
   621  
   622  func (p *pendingSignalQueue) afterLoad(context.Context) {}
   623  
   624  // +checklocksignore
   625  func (p *pendingSignalQueue) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   626  	stateSourceObject.Load(0, &p.pendingSignalList)
   627  	stateSourceObject.Load(1, &p.length)
   628  }
   629  
   630  func (p *pendingSignal) StateTypeName() string {
   631  	return "pkg/sentry/kernel.pendingSignal"
   632  }
   633  
   634  func (p *pendingSignal) StateFields() []string {
   635  	return []string{
   636  		"pendingSignalEntry",
   637  		"SignalInfo",
   638  		"timer",
   639  	}
   640  }
   641  
   642  func (p *pendingSignal) beforeSave() {}
   643  
   644  // +checklocksignore
   645  func (p *pendingSignal) StateSave(stateSinkObject state.Sink) {
   646  	p.beforeSave()
   647  	stateSinkObject.Save(0, &p.pendingSignalEntry)
   648  	stateSinkObject.Save(1, &p.SignalInfo)
   649  	stateSinkObject.Save(2, &p.timer)
   650  }
   651  
   652  func (p *pendingSignal) afterLoad(context.Context) {}
   653  
   654  // +checklocksignore
   655  func (p *pendingSignal) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   656  	stateSourceObject.Load(0, &p.pendingSignalEntry)
   657  	stateSourceObject.Load(1, &p.SignalInfo)
   658  	stateSourceObject.Load(2, &p.timer)
   659  }
   660  
   661  func (l *pendingSignalList) StateTypeName() string {
   662  	return "pkg/sentry/kernel.pendingSignalList"
   663  }
   664  
   665  func (l *pendingSignalList) StateFields() []string {
   666  	return []string{
   667  		"head",
   668  		"tail",
   669  	}
   670  }
   671  
   672  func (l *pendingSignalList) beforeSave() {}
   673  
   674  // +checklocksignore
   675  func (l *pendingSignalList) StateSave(stateSinkObject state.Sink) {
   676  	l.beforeSave()
   677  	stateSinkObject.Save(0, &l.head)
   678  	stateSinkObject.Save(1, &l.tail)
   679  }
   680  
   681  func (l *pendingSignalList) afterLoad(context.Context) {}
   682  
   683  // +checklocksignore
   684  func (l *pendingSignalList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   685  	stateSourceObject.Load(0, &l.head)
   686  	stateSourceObject.Load(1, &l.tail)
   687  }
   688  
   689  func (e *pendingSignalEntry) StateTypeName() string {
   690  	return "pkg/sentry/kernel.pendingSignalEntry"
   691  }
   692  
   693  func (e *pendingSignalEntry) StateFields() []string {
   694  	return []string{
   695  		"next",
   696  		"prev",
   697  	}
   698  }
   699  
   700  func (e *pendingSignalEntry) beforeSave() {}
   701  
   702  // +checklocksignore
   703  func (e *pendingSignalEntry) StateSave(stateSinkObject state.Sink) {
   704  	e.beforeSave()
   705  	stateSinkObject.Save(0, &e.next)
   706  	stateSinkObject.Save(1, &e.prev)
   707  }
   708  
   709  func (e *pendingSignalEntry) afterLoad(context.Context) {}
   710  
   711  // +checklocksignore
   712  func (e *pendingSignalEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   713  	stateSourceObject.Load(0, &e.next)
   714  	stateSourceObject.Load(1, &e.prev)
   715  }
   716  
   717  func (s *savedPendingSignal) StateTypeName() string {
   718  	return "pkg/sentry/kernel.savedPendingSignal"
   719  }
   720  
   721  func (s *savedPendingSignal) StateFields() []string {
   722  	return []string{
   723  		"si",
   724  		"timer",
   725  	}
   726  }
   727  
   728  func (s *savedPendingSignal) beforeSave() {}
   729  
   730  // +checklocksignore
   731  func (s *savedPendingSignal) StateSave(stateSinkObject state.Sink) {
   732  	s.beforeSave()
   733  	stateSinkObject.Save(0, &s.si)
   734  	stateSinkObject.Save(1, &s.timer)
   735  }
   736  
   737  func (s *savedPendingSignal) afterLoad(context.Context) {}
   738  
   739  // +checklocksignore
   740  func (s *savedPendingSignal) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   741  	stateSourceObject.Load(0, &s.si)
   742  	stateSourceObject.Load(1, &s.timer)
   743  }
   744  
   745  func (it *IntervalTimer) StateTypeName() string {
   746  	return "pkg/sentry/kernel.IntervalTimer"
   747  }
   748  
   749  func (it *IntervalTimer) StateFields() []string {
   750  	return []string{
   751  		"timer",
   752  		"target",
   753  		"signo",
   754  		"id",
   755  		"sigval",
   756  		"group",
   757  		"sigpending",
   758  		"sigorphan",
   759  		"overrunCur",
   760  		"overrunLast",
   761  	}
   762  }
   763  
   764  func (it *IntervalTimer) beforeSave() {}
   765  
   766  // +checklocksignore
   767  func (it *IntervalTimer) StateSave(stateSinkObject state.Sink) {
   768  	it.beforeSave()
   769  	stateSinkObject.Save(0, &it.timer)
   770  	stateSinkObject.Save(1, &it.target)
   771  	stateSinkObject.Save(2, &it.signo)
   772  	stateSinkObject.Save(3, &it.id)
   773  	stateSinkObject.Save(4, &it.sigval)
   774  	stateSinkObject.Save(5, &it.group)
   775  	stateSinkObject.Save(6, &it.sigpending)
   776  	stateSinkObject.Save(7, &it.sigorphan)
   777  	stateSinkObject.Save(8, &it.overrunCur)
   778  	stateSinkObject.Save(9, &it.overrunLast)
   779  }
   780  
   781  func (it *IntervalTimer) afterLoad(context.Context) {}
   782  
   783  // +checklocksignore
   784  func (it *IntervalTimer) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   785  	stateSourceObject.Load(0, &it.timer)
   786  	stateSourceObject.Load(1, &it.target)
   787  	stateSourceObject.Load(2, &it.signo)
   788  	stateSourceObject.Load(3, &it.id)
   789  	stateSourceObject.Load(4, &it.sigval)
   790  	stateSourceObject.Load(5, &it.group)
   791  	stateSourceObject.Load(6, &it.sigpending)
   792  	stateSourceObject.Load(7, &it.sigorphan)
   793  	stateSourceObject.Load(8, &it.overrunCur)
   794  	stateSourceObject.Load(9, &it.overrunLast)
   795  }
   796  
   797  func (l *processGroupList) StateTypeName() string {
   798  	return "pkg/sentry/kernel.processGroupList"
   799  }
   800  
   801  func (l *processGroupList) StateFields() []string {
   802  	return []string{
   803  		"head",
   804  		"tail",
   805  	}
   806  }
   807  
   808  func (l *processGroupList) beforeSave() {}
   809  
   810  // +checklocksignore
   811  func (l *processGroupList) StateSave(stateSinkObject state.Sink) {
   812  	l.beforeSave()
   813  	stateSinkObject.Save(0, &l.head)
   814  	stateSinkObject.Save(1, &l.tail)
   815  }
   816  
   817  func (l *processGroupList) afterLoad(context.Context) {}
   818  
   819  // +checklocksignore
   820  func (l *processGroupList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   821  	stateSourceObject.Load(0, &l.head)
   822  	stateSourceObject.Load(1, &l.tail)
   823  }
   824  
   825  func (e *processGroupEntry) StateTypeName() string {
   826  	return "pkg/sentry/kernel.processGroupEntry"
   827  }
   828  
   829  func (e *processGroupEntry) StateFields() []string {
   830  	return []string{
   831  		"next",
   832  		"prev",
   833  	}
   834  }
   835  
   836  func (e *processGroupEntry) beforeSave() {}
   837  
   838  // +checklocksignore
   839  func (e *processGroupEntry) StateSave(stateSinkObject state.Sink) {
   840  	e.beforeSave()
   841  	stateSinkObject.Save(0, &e.next)
   842  	stateSinkObject.Save(1, &e.prev)
   843  }
   844  
   845  func (e *processGroupEntry) afterLoad(context.Context) {}
   846  
   847  // +checklocksignore
   848  func (e *processGroupEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   849  	stateSourceObject.Load(0, &e.next)
   850  	stateSourceObject.Load(1, &e.prev)
   851  }
   852  
   853  func (r *ProcessGroupRefs) StateTypeName() string {
   854  	return "pkg/sentry/kernel.ProcessGroupRefs"
   855  }
   856  
   857  func (r *ProcessGroupRefs) StateFields() []string {
   858  	return []string{
   859  		"refCount",
   860  	}
   861  }
   862  
   863  func (r *ProcessGroupRefs) beforeSave() {}
   864  
   865  // +checklocksignore
   866  func (r *ProcessGroupRefs) StateSave(stateSinkObject state.Sink) {
   867  	r.beforeSave()
   868  	stateSinkObject.Save(0, &r.refCount)
   869  }
   870  
   871  // +checklocksignore
   872  func (r *ProcessGroupRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   873  	stateSourceObject.Load(0, &r.refCount)
   874  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
   875  }
   876  
   877  func (p *ptraceOptions) StateTypeName() string {
   878  	return "pkg/sentry/kernel.ptraceOptions"
   879  }
   880  
   881  func (p *ptraceOptions) StateFields() []string {
   882  	return []string{
   883  		"ExitKill",
   884  		"SysGood",
   885  		"TraceClone",
   886  		"TraceExec",
   887  		"TraceExit",
   888  		"TraceFork",
   889  		"TraceSeccomp",
   890  		"TraceVfork",
   891  		"TraceVforkDone",
   892  	}
   893  }
   894  
   895  func (p *ptraceOptions) beforeSave() {}
   896  
   897  // +checklocksignore
   898  func (p *ptraceOptions) StateSave(stateSinkObject state.Sink) {
   899  	p.beforeSave()
   900  	stateSinkObject.Save(0, &p.ExitKill)
   901  	stateSinkObject.Save(1, &p.SysGood)
   902  	stateSinkObject.Save(2, &p.TraceClone)
   903  	stateSinkObject.Save(3, &p.TraceExec)
   904  	stateSinkObject.Save(4, &p.TraceExit)
   905  	stateSinkObject.Save(5, &p.TraceFork)
   906  	stateSinkObject.Save(6, &p.TraceSeccomp)
   907  	stateSinkObject.Save(7, &p.TraceVfork)
   908  	stateSinkObject.Save(8, &p.TraceVforkDone)
   909  }
   910  
   911  func (p *ptraceOptions) afterLoad(context.Context) {}
   912  
   913  // +checklocksignore
   914  func (p *ptraceOptions) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   915  	stateSourceObject.Load(0, &p.ExitKill)
   916  	stateSourceObject.Load(1, &p.SysGood)
   917  	stateSourceObject.Load(2, &p.TraceClone)
   918  	stateSourceObject.Load(3, &p.TraceExec)
   919  	stateSourceObject.Load(4, &p.TraceExit)
   920  	stateSourceObject.Load(5, &p.TraceFork)
   921  	stateSourceObject.Load(6, &p.TraceSeccomp)
   922  	stateSourceObject.Load(7, &p.TraceVfork)
   923  	stateSourceObject.Load(8, &p.TraceVforkDone)
   924  }
   925  
   926  func (s *ptraceStop) StateTypeName() string {
   927  	return "pkg/sentry/kernel.ptraceStop"
   928  }
   929  
   930  func (s *ptraceStop) StateFields() []string {
   931  	return []string{
   932  		"frozen",
   933  		"listen",
   934  	}
   935  }
   936  
   937  func (s *ptraceStop) beforeSave() {}
   938  
   939  // +checklocksignore
   940  func (s *ptraceStop) StateSave(stateSinkObject state.Sink) {
   941  	s.beforeSave()
   942  	stateSinkObject.Save(0, &s.frozen)
   943  	stateSinkObject.Save(1, &s.listen)
   944  }
   945  
   946  func (s *ptraceStop) afterLoad(context.Context) {}
   947  
   948  // +checklocksignore
   949  func (s *ptraceStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   950  	stateSourceObject.Load(0, &s.frozen)
   951  	stateSourceObject.Load(1, &s.listen)
   952  }
   953  
   954  func (o *OldRSeqCriticalRegion) StateTypeName() string {
   955  	return "pkg/sentry/kernel.OldRSeqCriticalRegion"
   956  }
   957  
   958  func (o *OldRSeqCriticalRegion) StateFields() []string {
   959  	return []string{
   960  		"CriticalSection",
   961  		"Restart",
   962  	}
   963  }
   964  
   965  func (o *OldRSeqCriticalRegion) beforeSave() {}
   966  
   967  // +checklocksignore
   968  func (o *OldRSeqCriticalRegion) StateSave(stateSinkObject state.Sink) {
   969  	o.beforeSave()
   970  	stateSinkObject.Save(0, &o.CriticalSection)
   971  	stateSinkObject.Save(1, &o.Restart)
   972  }
   973  
   974  func (o *OldRSeqCriticalRegion) afterLoad(context.Context) {}
   975  
   976  // +checklocksignore
   977  func (o *OldRSeqCriticalRegion) StateLoad(ctx context.Context, stateSourceObject state.Source) {
   978  	stateSourceObject.Load(0, &o.CriticalSection)
   979  	stateSourceObject.Load(1, &o.Restart)
   980  }
   981  
   982  func (ts *taskSeccomp) StateTypeName() string {
   983  	return "pkg/sentry/kernel.taskSeccomp"
   984  }
   985  
   986  func (ts *taskSeccomp) StateFields() []string {
   987  	return []string{
   988  		"filters",
   989  		"cache",
   990  		"cacheAuditNumber",
   991  	}
   992  }
   993  
   994  func (ts *taskSeccomp) beforeSave() {}
   995  
   996  // +checklocksignore
   997  func (ts *taskSeccomp) StateSave(stateSinkObject state.Sink) {
   998  	ts.beforeSave()
   999  	stateSinkObject.Save(0, &ts.filters)
  1000  	stateSinkObject.Save(1, &ts.cache)
  1001  	stateSinkObject.Save(2, &ts.cacheAuditNumber)
  1002  }
  1003  
  1004  func (ts *taskSeccomp) afterLoad(context.Context) {}
  1005  
  1006  // +checklocksignore
  1007  func (ts *taskSeccomp) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1008  	stateSourceObject.Load(0, &ts.filters)
  1009  	stateSourceObject.Load(1, &ts.cache)
  1010  	stateSourceObject.Load(2, &ts.cacheAuditNumber)
  1011  }
  1012  
  1013  func (l *sessionList) StateTypeName() string {
  1014  	return "pkg/sentry/kernel.sessionList"
  1015  }
  1016  
  1017  func (l *sessionList) StateFields() []string {
  1018  	return []string{
  1019  		"head",
  1020  		"tail",
  1021  	}
  1022  }
  1023  
  1024  func (l *sessionList) beforeSave() {}
  1025  
  1026  // +checklocksignore
  1027  func (l *sessionList) StateSave(stateSinkObject state.Sink) {
  1028  	l.beforeSave()
  1029  	stateSinkObject.Save(0, &l.head)
  1030  	stateSinkObject.Save(1, &l.tail)
  1031  }
  1032  
  1033  func (l *sessionList) afterLoad(context.Context) {}
  1034  
  1035  // +checklocksignore
  1036  func (l *sessionList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1037  	stateSourceObject.Load(0, &l.head)
  1038  	stateSourceObject.Load(1, &l.tail)
  1039  }
  1040  
  1041  func (e *sessionEntry) StateTypeName() string {
  1042  	return "pkg/sentry/kernel.sessionEntry"
  1043  }
  1044  
  1045  func (e *sessionEntry) StateFields() []string {
  1046  	return []string{
  1047  		"next",
  1048  		"prev",
  1049  	}
  1050  }
  1051  
  1052  func (e *sessionEntry) beforeSave() {}
  1053  
  1054  // +checklocksignore
  1055  func (e *sessionEntry) StateSave(stateSinkObject state.Sink) {
  1056  	e.beforeSave()
  1057  	stateSinkObject.Save(0, &e.next)
  1058  	stateSinkObject.Save(1, &e.prev)
  1059  }
  1060  
  1061  func (e *sessionEntry) afterLoad(context.Context) {}
  1062  
  1063  // +checklocksignore
  1064  func (e *sessionEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1065  	stateSourceObject.Load(0, &e.next)
  1066  	stateSourceObject.Load(1, &e.prev)
  1067  }
  1068  
  1069  func (r *SessionRefs) StateTypeName() string {
  1070  	return "pkg/sentry/kernel.SessionRefs"
  1071  }
  1072  
  1073  func (r *SessionRefs) StateFields() []string {
  1074  	return []string{
  1075  		"refCount",
  1076  	}
  1077  }
  1078  
  1079  func (r *SessionRefs) beforeSave() {}
  1080  
  1081  // +checklocksignore
  1082  func (r *SessionRefs) StateSave(stateSinkObject state.Sink) {
  1083  	r.beforeSave()
  1084  	stateSinkObject.Save(0, &r.refCount)
  1085  }
  1086  
  1087  // +checklocksignore
  1088  func (r *SessionRefs) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1089  	stateSourceObject.Load(0, &r.refCount)
  1090  	stateSourceObject.AfterLoad(func() { r.afterLoad(ctx) })
  1091  }
  1092  
  1093  func (s *Session) StateTypeName() string {
  1094  	return "pkg/sentry/kernel.Session"
  1095  }
  1096  
  1097  func (s *Session) StateFields() []string {
  1098  	return []string{
  1099  		"SessionRefs",
  1100  		"leader",
  1101  		"id",
  1102  		"foreground",
  1103  		"processGroups",
  1104  		"sessionEntry",
  1105  	}
  1106  }
  1107  
  1108  func (s *Session) beforeSave() {}
  1109  
  1110  // +checklocksignore
  1111  func (s *Session) StateSave(stateSinkObject state.Sink) {
  1112  	s.beforeSave()
  1113  	stateSinkObject.Save(0, &s.SessionRefs)
  1114  	stateSinkObject.Save(1, &s.leader)
  1115  	stateSinkObject.Save(2, &s.id)
  1116  	stateSinkObject.Save(3, &s.foreground)
  1117  	stateSinkObject.Save(4, &s.processGroups)
  1118  	stateSinkObject.Save(5, &s.sessionEntry)
  1119  }
  1120  
  1121  func (s *Session) afterLoad(context.Context) {}
  1122  
  1123  // +checklocksignore
  1124  func (s *Session) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1125  	stateSourceObject.Load(0, &s.SessionRefs)
  1126  	stateSourceObject.Load(1, &s.leader)
  1127  	stateSourceObject.Load(2, &s.id)
  1128  	stateSourceObject.Load(3, &s.foreground)
  1129  	stateSourceObject.Load(4, &s.processGroups)
  1130  	stateSourceObject.Load(5, &s.sessionEntry)
  1131  }
  1132  
  1133  func (pg *ProcessGroup) StateTypeName() string {
  1134  	return "pkg/sentry/kernel.ProcessGroup"
  1135  }
  1136  
  1137  func (pg *ProcessGroup) StateFields() []string {
  1138  	return []string{
  1139  		"refs",
  1140  		"originator",
  1141  		"id",
  1142  		"session",
  1143  		"ancestors",
  1144  		"processGroupEntry",
  1145  	}
  1146  }
  1147  
  1148  func (pg *ProcessGroup) beforeSave() {}
  1149  
  1150  // +checklocksignore
  1151  func (pg *ProcessGroup) StateSave(stateSinkObject state.Sink) {
  1152  	pg.beforeSave()
  1153  	stateSinkObject.Save(0, &pg.refs)
  1154  	stateSinkObject.Save(1, &pg.originator)
  1155  	stateSinkObject.Save(2, &pg.id)
  1156  	stateSinkObject.Save(3, &pg.session)
  1157  	stateSinkObject.Save(4, &pg.ancestors)
  1158  	stateSinkObject.Save(5, &pg.processGroupEntry)
  1159  }
  1160  
  1161  func (pg *ProcessGroup) afterLoad(context.Context) {}
  1162  
  1163  // +checklocksignore
  1164  func (pg *ProcessGroup) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1165  	stateSourceObject.Load(0, &pg.refs)
  1166  	stateSourceObject.Load(1, &pg.originator)
  1167  	stateSourceObject.Load(2, &pg.id)
  1168  	stateSourceObject.Load(3, &pg.session)
  1169  	stateSourceObject.Load(4, &pg.ancestors)
  1170  	stateSourceObject.Load(5, &pg.processGroupEntry)
  1171  }
  1172  
  1173  func (sh *SignalHandlers) StateTypeName() string {
  1174  	return "pkg/sentry/kernel.SignalHandlers"
  1175  }
  1176  
  1177  func (sh *SignalHandlers) StateFields() []string {
  1178  	return []string{
  1179  		"actions",
  1180  	}
  1181  }
  1182  
  1183  func (sh *SignalHandlers) beforeSave() {}
  1184  
  1185  // +checklocksignore
  1186  func (sh *SignalHandlers) StateSave(stateSinkObject state.Sink) {
  1187  	sh.beforeSave()
  1188  	stateSinkObject.Save(0, &sh.actions)
  1189  }
  1190  
  1191  func (sh *SignalHandlers) afterLoad(context.Context) {}
  1192  
  1193  // +checklocksignore
  1194  func (sh *SignalHandlers) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1195  	stateSourceObject.Load(0, &sh.actions)
  1196  }
  1197  
  1198  func (s *syscallTableInfo) StateTypeName() string {
  1199  	return "pkg/sentry/kernel.syscallTableInfo"
  1200  }
  1201  
  1202  func (s *syscallTableInfo) StateFields() []string {
  1203  	return []string{
  1204  		"OS",
  1205  		"Arch",
  1206  	}
  1207  }
  1208  
  1209  func (s *syscallTableInfo) beforeSave() {}
  1210  
  1211  // +checklocksignore
  1212  func (s *syscallTableInfo) StateSave(stateSinkObject state.Sink) {
  1213  	s.beforeSave()
  1214  	stateSinkObject.Save(0, &s.OS)
  1215  	stateSinkObject.Save(1, &s.Arch)
  1216  }
  1217  
  1218  func (s *syscallTableInfo) afterLoad(context.Context) {}
  1219  
  1220  // +checklocksignore
  1221  func (s *syscallTableInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1222  	stateSourceObject.Load(0, &s.OS)
  1223  	stateSourceObject.Load(1, &s.Arch)
  1224  }
  1225  
  1226  func (s *syslog) StateTypeName() string {
  1227  	return "pkg/sentry/kernel.syslog"
  1228  }
  1229  
  1230  func (s *syslog) StateFields() []string {
  1231  	return []string{
  1232  		"msg",
  1233  	}
  1234  }
  1235  
  1236  func (s *syslog) beforeSave() {}
  1237  
  1238  // +checklocksignore
  1239  func (s *syslog) StateSave(stateSinkObject state.Sink) {
  1240  	s.beforeSave()
  1241  	stateSinkObject.Save(0, &s.msg)
  1242  }
  1243  
  1244  func (s *syslog) afterLoad(context.Context) {}
  1245  
  1246  // +checklocksignore
  1247  func (s *syslog) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1248  	stateSourceObject.Load(0, &s.msg)
  1249  }
  1250  
  1251  func (t *Task) StateTypeName() string {
  1252  	return "pkg/sentry/kernel.Task"
  1253  }
  1254  
  1255  func (t *Task) StateFields() []string {
  1256  	return []string{
  1257  		"taskNode",
  1258  		"runState",
  1259  		"taskWorkCount",
  1260  		"taskWork",
  1261  		"haveSyscallReturn",
  1262  		"gosched",
  1263  		"yieldCount",
  1264  		"pendingSignals",
  1265  		"signalMask",
  1266  		"realSignalMask",
  1267  		"haveSavedSignalMask",
  1268  		"savedSignalMask",
  1269  		"signalStack",
  1270  		"signalQueue",
  1271  		"groupStopPending",
  1272  		"groupStopAcknowledged",
  1273  		"trapStopPending",
  1274  		"trapNotifyPending",
  1275  		"stop",
  1276  		"exitStatus",
  1277  		"syscallRestartBlock",
  1278  		"k",
  1279  		"containerID",
  1280  		"image",
  1281  		"fsContext",
  1282  		"fdTable",
  1283  		"vforkParent",
  1284  		"exitState",
  1285  		"exitTracerNotified",
  1286  		"exitTracerAcked",
  1287  		"exitParentNotified",
  1288  		"exitParentAcked",
  1289  		"ptraceTracer",
  1290  		"ptraceTracees",
  1291  		"ptraceSeized",
  1292  		"ptraceOpts",
  1293  		"ptraceSyscallMode",
  1294  		"ptraceSinglestep",
  1295  		"ptraceCode",
  1296  		"ptraceSiginfo",
  1297  		"ptraceEventMsg",
  1298  		"ptraceYAMAExceptionAdded",
  1299  		"ioUsage",
  1300  		"creds",
  1301  		"utsns",
  1302  		"ipcns",
  1303  		"mountNamespace",
  1304  		"parentDeathSignal",
  1305  		"seccomp",
  1306  		"cleartid",
  1307  		"allowedCPUMask",
  1308  		"cpu",
  1309  		"niceness",
  1310  		"numaPolicy",
  1311  		"numaNodeMask",
  1312  		"netns",
  1313  		"rseqCPU",
  1314  		"oldRSeqCPUAddr",
  1315  		"rseqAddr",
  1316  		"rseqSignature",
  1317  		"robustList",
  1318  		"startTime",
  1319  		"kcov",
  1320  		"cgroups",
  1321  		"memCgID",
  1322  		"userCounters",
  1323  		"sessionKeyring",
  1324  	}
  1325  }
  1326  
  1327  func (t *Task) beforeSave() {}
  1328  
  1329  // +checklocksignore
  1330  func (t *Task) StateSave(stateSinkObject state.Sink) {
  1331  	t.beforeSave()
  1332  	var ptraceTracerValue *Task
  1333  	ptraceTracerValue = t.savePtraceTracer()
  1334  	stateSinkObject.SaveValue(32, ptraceTracerValue)
  1335  	var seccompValue *taskSeccomp
  1336  	seccompValue = t.saveSeccomp()
  1337  	stateSinkObject.SaveValue(48, seccompValue)
  1338  	stateSinkObject.Save(0, &t.taskNode)
  1339  	stateSinkObject.Save(1, &t.runState)
  1340  	stateSinkObject.Save(2, &t.taskWorkCount)
  1341  	stateSinkObject.Save(3, &t.taskWork)
  1342  	stateSinkObject.Save(4, &t.haveSyscallReturn)
  1343  	stateSinkObject.Save(5, &t.gosched)
  1344  	stateSinkObject.Save(6, &t.yieldCount)
  1345  	stateSinkObject.Save(7, &t.pendingSignals)
  1346  	stateSinkObject.Save(8, &t.signalMask)
  1347  	stateSinkObject.Save(9, &t.realSignalMask)
  1348  	stateSinkObject.Save(10, &t.haveSavedSignalMask)
  1349  	stateSinkObject.Save(11, &t.savedSignalMask)
  1350  	stateSinkObject.Save(12, &t.signalStack)
  1351  	stateSinkObject.Save(13, &t.signalQueue)
  1352  	stateSinkObject.Save(14, &t.groupStopPending)
  1353  	stateSinkObject.Save(15, &t.groupStopAcknowledged)
  1354  	stateSinkObject.Save(16, &t.trapStopPending)
  1355  	stateSinkObject.Save(17, &t.trapNotifyPending)
  1356  	stateSinkObject.Save(18, &t.stop)
  1357  	stateSinkObject.Save(19, &t.exitStatus)
  1358  	stateSinkObject.Save(20, &t.syscallRestartBlock)
  1359  	stateSinkObject.Save(21, &t.k)
  1360  	stateSinkObject.Save(22, &t.containerID)
  1361  	stateSinkObject.Save(23, &t.image)
  1362  	stateSinkObject.Save(24, &t.fsContext)
  1363  	stateSinkObject.Save(25, &t.fdTable)
  1364  	stateSinkObject.Save(26, &t.vforkParent)
  1365  	stateSinkObject.Save(27, &t.exitState)
  1366  	stateSinkObject.Save(28, &t.exitTracerNotified)
  1367  	stateSinkObject.Save(29, &t.exitTracerAcked)
  1368  	stateSinkObject.Save(30, &t.exitParentNotified)
  1369  	stateSinkObject.Save(31, &t.exitParentAcked)
  1370  	stateSinkObject.Save(33, &t.ptraceTracees)
  1371  	stateSinkObject.Save(34, &t.ptraceSeized)
  1372  	stateSinkObject.Save(35, &t.ptraceOpts)
  1373  	stateSinkObject.Save(36, &t.ptraceSyscallMode)
  1374  	stateSinkObject.Save(37, &t.ptraceSinglestep)
  1375  	stateSinkObject.Save(38, &t.ptraceCode)
  1376  	stateSinkObject.Save(39, &t.ptraceSiginfo)
  1377  	stateSinkObject.Save(40, &t.ptraceEventMsg)
  1378  	stateSinkObject.Save(41, &t.ptraceYAMAExceptionAdded)
  1379  	stateSinkObject.Save(42, &t.ioUsage)
  1380  	stateSinkObject.Save(43, &t.creds)
  1381  	stateSinkObject.Save(44, &t.utsns)
  1382  	stateSinkObject.Save(45, &t.ipcns)
  1383  	stateSinkObject.Save(46, &t.mountNamespace)
  1384  	stateSinkObject.Save(47, &t.parentDeathSignal)
  1385  	stateSinkObject.Save(49, &t.cleartid)
  1386  	stateSinkObject.Save(50, &t.allowedCPUMask)
  1387  	stateSinkObject.Save(51, &t.cpu)
  1388  	stateSinkObject.Save(52, &t.niceness)
  1389  	stateSinkObject.Save(53, &t.numaPolicy)
  1390  	stateSinkObject.Save(54, &t.numaNodeMask)
  1391  	stateSinkObject.Save(55, &t.netns)
  1392  	stateSinkObject.Save(56, &t.rseqCPU)
  1393  	stateSinkObject.Save(57, &t.oldRSeqCPUAddr)
  1394  	stateSinkObject.Save(58, &t.rseqAddr)
  1395  	stateSinkObject.Save(59, &t.rseqSignature)
  1396  	stateSinkObject.Save(60, &t.robustList)
  1397  	stateSinkObject.Save(61, &t.startTime)
  1398  	stateSinkObject.Save(62, &t.kcov)
  1399  	stateSinkObject.Save(63, &t.cgroups)
  1400  	stateSinkObject.Save(64, &t.memCgID)
  1401  	stateSinkObject.Save(65, &t.userCounters)
  1402  	stateSinkObject.Save(66, &t.sessionKeyring)
  1403  }
  1404  
  1405  // +checklocksignore
  1406  func (t *Task) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1407  	stateSourceObject.Load(0, &t.taskNode)
  1408  	stateSourceObject.Load(1, &t.runState)
  1409  	stateSourceObject.Load(2, &t.taskWorkCount)
  1410  	stateSourceObject.Load(3, &t.taskWork)
  1411  	stateSourceObject.Load(4, &t.haveSyscallReturn)
  1412  	stateSourceObject.Load(5, &t.gosched)
  1413  	stateSourceObject.Load(6, &t.yieldCount)
  1414  	stateSourceObject.Load(7, &t.pendingSignals)
  1415  	stateSourceObject.Load(8, &t.signalMask)
  1416  	stateSourceObject.Load(9, &t.realSignalMask)
  1417  	stateSourceObject.Load(10, &t.haveSavedSignalMask)
  1418  	stateSourceObject.Load(11, &t.savedSignalMask)
  1419  	stateSourceObject.Load(12, &t.signalStack)
  1420  	stateSourceObject.Load(13, &t.signalQueue)
  1421  	stateSourceObject.Load(14, &t.groupStopPending)
  1422  	stateSourceObject.Load(15, &t.groupStopAcknowledged)
  1423  	stateSourceObject.Load(16, &t.trapStopPending)
  1424  	stateSourceObject.Load(17, &t.trapNotifyPending)
  1425  	stateSourceObject.Load(18, &t.stop)
  1426  	stateSourceObject.Load(19, &t.exitStatus)
  1427  	stateSourceObject.Load(20, &t.syscallRestartBlock)
  1428  	stateSourceObject.Load(21, &t.k)
  1429  	stateSourceObject.Load(22, &t.containerID)
  1430  	stateSourceObject.Load(23, &t.image)
  1431  	stateSourceObject.Load(24, &t.fsContext)
  1432  	stateSourceObject.Load(25, &t.fdTable)
  1433  	stateSourceObject.Load(26, &t.vforkParent)
  1434  	stateSourceObject.Load(27, &t.exitState)
  1435  	stateSourceObject.Load(28, &t.exitTracerNotified)
  1436  	stateSourceObject.Load(29, &t.exitTracerAcked)
  1437  	stateSourceObject.Load(30, &t.exitParentNotified)
  1438  	stateSourceObject.Load(31, &t.exitParentAcked)
  1439  	stateSourceObject.Load(33, &t.ptraceTracees)
  1440  	stateSourceObject.Load(34, &t.ptraceSeized)
  1441  	stateSourceObject.Load(35, &t.ptraceOpts)
  1442  	stateSourceObject.Load(36, &t.ptraceSyscallMode)
  1443  	stateSourceObject.Load(37, &t.ptraceSinglestep)
  1444  	stateSourceObject.Load(38, &t.ptraceCode)
  1445  	stateSourceObject.Load(39, &t.ptraceSiginfo)
  1446  	stateSourceObject.Load(40, &t.ptraceEventMsg)
  1447  	stateSourceObject.Load(41, &t.ptraceYAMAExceptionAdded)
  1448  	stateSourceObject.Load(42, &t.ioUsage)
  1449  	stateSourceObject.Load(43, &t.creds)
  1450  	stateSourceObject.Load(44, &t.utsns)
  1451  	stateSourceObject.Load(45, &t.ipcns)
  1452  	stateSourceObject.Load(46, &t.mountNamespace)
  1453  	stateSourceObject.Load(47, &t.parentDeathSignal)
  1454  	stateSourceObject.Load(49, &t.cleartid)
  1455  	stateSourceObject.Load(50, &t.allowedCPUMask)
  1456  	stateSourceObject.Load(51, &t.cpu)
  1457  	stateSourceObject.Load(52, &t.niceness)
  1458  	stateSourceObject.Load(53, &t.numaPolicy)
  1459  	stateSourceObject.Load(54, &t.numaNodeMask)
  1460  	stateSourceObject.Load(55, &t.netns)
  1461  	stateSourceObject.Load(56, &t.rseqCPU)
  1462  	stateSourceObject.Load(57, &t.oldRSeqCPUAddr)
  1463  	stateSourceObject.Load(58, &t.rseqAddr)
  1464  	stateSourceObject.Load(59, &t.rseqSignature)
  1465  	stateSourceObject.Load(60, &t.robustList)
  1466  	stateSourceObject.Load(61, &t.startTime)
  1467  	stateSourceObject.Load(62, &t.kcov)
  1468  	stateSourceObject.Load(63, &t.cgroups)
  1469  	stateSourceObject.Load(64, &t.memCgID)
  1470  	stateSourceObject.Load(65, &t.userCounters)
  1471  	stateSourceObject.Load(66, &t.sessionKeyring)
  1472  	stateSourceObject.LoadValue(32, new(*Task), func(y any) { t.loadPtraceTracer(ctx, y.(*Task)) })
  1473  	stateSourceObject.LoadValue(48, new(*taskSeccomp), func(y any) { t.loadSeccomp(ctx, y.(*taskSeccomp)) })
  1474  	stateSourceObject.AfterLoad(func() { t.afterLoad(ctx) })
  1475  }
  1476  
  1477  func (r *runSyscallAfterPtraceEventClone) StateTypeName() string {
  1478  	return "pkg/sentry/kernel.runSyscallAfterPtraceEventClone"
  1479  }
  1480  
  1481  func (r *runSyscallAfterPtraceEventClone) StateFields() []string {
  1482  	return []string{
  1483  		"vforkChild",
  1484  		"vforkChildTID",
  1485  	}
  1486  }
  1487  
  1488  func (r *runSyscallAfterPtraceEventClone) beforeSave() {}
  1489  
  1490  // +checklocksignore
  1491  func (r *runSyscallAfterPtraceEventClone) StateSave(stateSinkObject state.Sink) {
  1492  	r.beforeSave()
  1493  	stateSinkObject.Save(0, &r.vforkChild)
  1494  	stateSinkObject.Save(1, &r.vforkChildTID)
  1495  }
  1496  
  1497  func (r *runSyscallAfterPtraceEventClone) afterLoad(context.Context) {}
  1498  
  1499  // +checklocksignore
  1500  func (r *runSyscallAfterPtraceEventClone) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1501  	stateSourceObject.Load(0, &r.vforkChild)
  1502  	stateSourceObject.Load(1, &r.vforkChildTID)
  1503  }
  1504  
  1505  func (r *runSyscallAfterVforkStop) StateTypeName() string {
  1506  	return "pkg/sentry/kernel.runSyscallAfterVforkStop"
  1507  }
  1508  
  1509  func (r *runSyscallAfterVforkStop) StateFields() []string {
  1510  	return []string{
  1511  		"childTID",
  1512  	}
  1513  }
  1514  
  1515  func (r *runSyscallAfterVforkStop) beforeSave() {}
  1516  
  1517  // +checklocksignore
  1518  func (r *runSyscallAfterVforkStop) StateSave(stateSinkObject state.Sink) {
  1519  	r.beforeSave()
  1520  	stateSinkObject.Save(0, &r.childTID)
  1521  }
  1522  
  1523  func (r *runSyscallAfterVforkStop) afterLoad(context.Context) {}
  1524  
  1525  // +checklocksignore
  1526  func (r *runSyscallAfterVforkStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1527  	stateSourceObject.Load(0, &r.childTID)
  1528  }
  1529  
  1530  func (v *vforkStop) StateTypeName() string {
  1531  	return "pkg/sentry/kernel.vforkStop"
  1532  }
  1533  
  1534  func (v *vforkStop) StateFields() []string {
  1535  	return []string{}
  1536  }
  1537  
  1538  func (v *vforkStop) beforeSave() {}
  1539  
  1540  // +checklocksignore
  1541  func (v *vforkStop) StateSave(stateSinkObject state.Sink) {
  1542  	v.beforeSave()
  1543  }
  1544  
  1545  func (v *vforkStop) afterLoad(context.Context) {}
  1546  
  1547  // +checklocksignore
  1548  func (v *vforkStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1549  }
  1550  
  1551  func (e *execStop) StateTypeName() string {
  1552  	return "pkg/sentry/kernel.execStop"
  1553  }
  1554  
  1555  func (e *execStop) StateFields() []string {
  1556  	return []string{}
  1557  }
  1558  
  1559  func (e *execStop) beforeSave() {}
  1560  
  1561  // +checklocksignore
  1562  func (e *execStop) StateSave(stateSinkObject state.Sink) {
  1563  	e.beforeSave()
  1564  }
  1565  
  1566  func (e *execStop) afterLoad(context.Context) {}
  1567  
  1568  // +checklocksignore
  1569  func (e *execStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1570  }
  1571  
  1572  func (r *runSyscallAfterExecStop) StateTypeName() string {
  1573  	return "pkg/sentry/kernel.runSyscallAfterExecStop"
  1574  }
  1575  
  1576  func (r *runSyscallAfterExecStop) StateFields() []string {
  1577  	return []string{
  1578  		"image",
  1579  	}
  1580  }
  1581  
  1582  func (r *runSyscallAfterExecStop) beforeSave() {}
  1583  
  1584  // +checklocksignore
  1585  func (r *runSyscallAfterExecStop) StateSave(stateSinkObject state.Sink) {
  1586  	r.beforeSave()
  1587  	stateSinkObject.Save(0, &r.image)
  1588  }
  1589  
  1590  func (r *runSyscallAfterExecStop) afterLoad(context.Context) {}
  1591  
  1592  // +checklocksignore
  1593  func (r *runSyscallAfterExecStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1594  	stateSourceObject.Load(0, &r.image)
  1595  }
  1596  
  1597  func (r *runExit) StateTypeName() string {
  1598  	return "pkg/sentry/kernel.runExit"
  1599  }
  1600  
  1601  func (r *runExit) StateFields() []string {
  1602  	return []string{}
  1603  }
  1604  
  1605  func (r *runExit) beforeSave() {}
  1606  
  1607  // +checklocksignore
  1608  func (r *runExit) StateSave(stateSinkObject state.Sink) {
  1609  	r.beforeSave()
  1610  }
  1611  
  1612  func (r *runExit) afterLoad(context.Context) {}
  1613  
  1614  // +checklocksignore
  1615  func (r *runExit) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1616  }
  1617  
  1618  func (r *runExitMain) StateTypeName() string {
  1619  	return "pkg/sentry/kernel.runExitMain"
  1620  }
  1621  
  1622  func (r *runExitMain) StateFields() []string {
  1623  	return []string{}
  1624  }
  1625  
  1626  func (r *runExitMain) beforeSave() {}
  1627  
  1628  // +checklocksignore
  1629  func (r *runExitMain) StateSave(stateSinkObject state.Sink) {
  1630  	r.beforeSave()
  1631  }
  1632  
  1633  func (r *runExitMain) afterLoad(context.Context) {}
  1634  
  1635  // +checklocksignore
  1636  func (r *runExitMain) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1637  }
  1638  
  1639  func (r *runExitNotify) StateTypeName() string {
  1640  	return "pkg/sentry/kernel.runExitNotify"
  1641  }
  1642  
  1643  func (r *runExitNotify) StateFields() []string {
  1644  	return []string{}
  1645  }
  1646  
  1647  func (r *runExitNotify) beforeSave() {}
  1648  
  1649  // +checklocksignore
  1650  func (r *runExitNotify) StateSave(stateSinkObject state.Sink) {
  1651  	r.beforeSave()
  1652  }
  1653  
  1654  func (r *runExitNotify) afterLoad(context.Context) {}
  1655  
  1656  // +checklocksignore
  1657  func (r *runExitNotify) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1658  }
  1659  
  1660  func (image *TaskImage) StateTypeName() string {
  1661  	return "pkg/sentry/kernel.TaskImage"
  1662  }
  1663  
  1664  func (image *TaskImage) StateFields() []string {
  1665  	return []string{
  1666  		"Name",
  1667  		"Arch",
  1668  		"MemoryManager",
  1669  		"fu",
  1670  		"st",
  1671  		"fileCaps",
  1672  	}
  1673  }
  1674  
  1675  func (image *TaskImage) beforeSave() {}
  1676  
  1677  // +checklocksignore
  1678  func (image *TaskImage) StateSave(stateSinkObject state.Sink) {
  1679  	image.beforeSave()
  1680  	var stValue syscallTableInfo
  1681  	stValue = image.saveSt()
  1682  	stateSinkObject.SaveValue(4, stValue)
  1683  	stateSinkObject.Save(0, &image.Name)
  1684  	stateSinkObject.Save(1, &image.Arch)
  1685  	stateSinkObject.Save(2, &image.MemoryManager)
  1686  	stateSinkObject.Save(3, &image.fu)
  1687  	stateSinkObject.Save(5, &image.fileCaps)
  1688  }
  1689  
  1690  func (image *TaskImage) afterLoad(context.Context) {}
  1691  
  1692  // +checklocksignore
  1693  func (image *TaskImage) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1694  	stateSourceObject.Load(0, &image.Name)
  1695  	stateSourceObject.Load(1, &image.Arch)
  1696  	stateSourceObject.Load(2, &image.MemoryManager)
  1697  	stateSourceObject.Load(3, &image.fu)
  1698  	stateSourceObject.Load(5, &image.fileCaps)
  1699  	stateSourceObject.LoadValue(4, new(syscallTableInfo), func(y any) { image.loadSt(ctx, y.(syscallTableInfo)) })
  1700  }
  1701  
  1702  func (l *taskList) StateTypeName() string {
  1703  	return "pkg/sentry/kernel.taskList"
  1704  }
  1705  
  1706  func (l *taskList) StateFields() []string {
  1707  	return []string{
  1708  		"head",
  1709  		"tail",
  1710  	}
  1711  }
  1712  
  1713  func (l *taskList) beforeSave() {}
  1714  
  1715  // +checklocksignore
  1716  func (l *taskList) StateSave(stateSinkObject state.Sink) {
  1717  	l.beforeSave()
  1718  	stateSinkObject.Save(0, &l.head)
  1719  	stateSinkObject.Save(1, &l.tail)
  1720  }
  1721  
  1722  func (l *taskList) afterLoad(context.Context) {}
  1723  
  1724  // +checklocksignore
  1725  func (l *taskList) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1726  	stateSourceObject.Load(0, &l.head)
  1727  	stateSourceObject.Load(1, &l.tail)
  1728  }
  1729  
  1730  func (e *taskEntry) StateTypeName() string {
  1731  	return "pkg/sentry/kernel.taskEntry"
  1732  }
  1733  
  1734  func (e *taskEntry) StateFields() []string {
  1735  	return []string{
  1736  		"next",
  1737  		"prev",
  1738  	}
  1739  }
  1740  
  1741  func (e *taskEntry) beforeSave() {}
  1742  
  1743  // +checklocksignore
  1744  func (e *taskEntry) StateSave(stateSinkObject state.Sink) {
  1745  	e.beforeSave()
  1746  	stateSinkObject.Save(0, &e.next)
  1747  	stateSinkObject.Save(1, &e.prev)
  1748  }
  1749  
  1750  func (e *taskEntry) afterLoad(context.Context) {}
  1751  
  1752  // +checklocksignore
  1753  func (e *taskEntry) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1754  	stateSourceObject.Load(0, &e.next)
  1755  	stateSourceObject.Load(1, &e.prev)
  1756  }
  1757  
  1758  func (app *runApp) StateTypeName() string {
  1759  	return "pkg/sentry/kernel.runApp"
  1760  }
  1761  
  1762  func (app *runApp) StateFields() []string {
  1763  	return []string{}
  1764  }
  1765  
  1766  func (app *runApp) beforeSave() {}
  1767  
  1768  // +checklocksignore
  1769  func (app *runApp) StateSave(stateSinkObject state.Sink) {
  1770  	app.beforeSave()
  1771  }
  1772  
  1773  func (app *runApp) afterLoad(context.Context) {}
  1774  
  1775  // +checklocksignore
  1776  func (app *runApp) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1777  }
  1778  
  1779  func (ts *TaskGoroutineSchedInfo) StateTypeName() string {
  1780  	return "pkg/sentry/kernel.TaskGoroutineSchedInfo"
  1781  }
  1782  
  1783  func (ts *TaskGoroutineSchedInfo) StateFields() []string {
  1784  	return []string{
  1785  		"Timestamp",
  1786  		"State",
  1787  		"UserTicks",
  1788  		"SysTicks",
  1789  	}
  1790  }
  1791  
  1792  func (ts *TaskGoroutineSchedInfo) beforeSave() {}
  1793  
  1794  // +checklocksignore
  1795  func (ts *TaskGoroutineSchedInfo) StateSave(stateSinkObject state.Sink) {
  1796  	ts.beforeSave()
  1797  	stateSinkObject.Save(0, &ts.Timestamp)
  1798  	stateSinkObject.Save(1, &ts.State)
  1799  	stateSinkObject.Save(2, &ts.UserTicks)
  1800  	stateSinkObject.Save(3, &ts.SysTicks)
  1801  }
  1802  
  1803  func (ts *TaskGoroutineSchedInfo) afterLoad(context.Context) {}
  1804  
  1805  // +checklocksignore
  1806  func (ts *TaskGoroutineSchedInfo) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1807  	stateSourceObject.Load(0, &ts.Timestamp)
  1808  	stateSourceObject.Load(1, &ts.State)
  1809  	stateSourceObject.Load(2, &ts.UserTicks)
  1810  	stateSourceObject.Load(3, &ts.SysTicks)
  1811  }
  1812  
  1813  func (tc *taskClock) StateTypeName() string {
  1814  	return "pkg/sentry/kernel.taskClock"
  1815  }
  1816  
  1817  func (tc *taskClock) StateFields() []string {
  1818  	return []string{
  1819  		"t",
  1820  		"includeSys",
  1821  	}
  1822  }
  1823  
  1824  func (tc *taskClock) beforeSave() {}
  1825  
  1826  // +checklocksignore
  1827  func (tc *taskClock) StateSave(stateSinkObject state.Sink) {
  1828  	tc.beforeSave()
  1829  	stateSinkObject.Save(0, &tc.t)
  1830  	stateSinkObject.Save(1, &tc.includeSys)
  1831  }
  1832  
  1833  func (tc *taskClock) afterLoad(context.Context) {}
  1834  
  1835  // +checklocksignore
  1836  func (tc *taskClock) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1837  	stateSourceObject.Load(0, &tc.t)
  1838  	stateSourceObject.Load(1, &tc.includeSys)
  1839  }
  1840  
  1841  func (tgc *tgClock) StateTypeName() string {
  1842  	return "pkg/sentry/kernel.tgClock"
  1843  }
  1844  
  1845  func (tgc *tgClock) StateFields() []string {
  1846  	return []string{
  1847  		"tg",
  1848  		"includeSys",
  1849  	}
  1850  }
  1851  
  1852  func (tgc *tgClock) beforeSave() {}
  1853  
  1854  // +checklocksignore
  1855  func (tgc *tgClock) StateSave(stateSinkObject state.Sink) {
  1856  	tgc.beforeSave()
  1857  	stateSinkObject.Save(0, &tgc.tg)
  1858  	stateSinkObject.Save(1, &tgc.includeSys)
  1859  }
  1860  
  1861  func (tgc *tgClock) afterLoad(context.Context) {}
  1862  
  1863  // +checklocksignore
  1864  func (tgc *tgClock) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1865  	stateSourceObject.Load(0, &tgc.tg)
  1866  	stateSourceObject.Load(1, &tgc.includeSys)
  1867  }
  1868  
  1869  func (g *groupStop) StateTypeName() string {
  1870  	return "pkg/sentry/kernel.groupStop"
  1871  }
  1872  
  1873  func (g *groupStop) StateFields() []string {
  1874  	return []string{}
  1875  }
  1876  
  1877  func (g *groupStop) beforeSave() {}
  1878  
  1879  // +checklocksignore
  1880  func (g *groupStop) StateSave(stateSinkObject state.Sink) {
  1881  	g.beforeSave()
  1882  }
  1883  
  1884  func (g *groupStop) afterLoad(context.Context) {}
  1885  
  1886  // +checklocksignore
  1887  func (g *groupStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1888  }
  1889  
  1890  func (r *runInterrupt) StateTypeName() string {
  1891  	return "pkg/sentry/kernel.runInterrupt"
  1892  }
  1893  
  1894  func (r *runInterrupt) StateFields() []string {
  1895  	return []string{}
  1896  }
  1897  
  1898  func (r *runInterrupt) beforeSave() {}
  1899  
  1900  // +checklocksignore
  1901  func (r *runInterrupt) StateSave(stateSinkObject state.Sink) {
  1902  	r.beforeSave()
  1903  }
  1904  
  1905  func (r *runInterrupt) afterLoad(context.Context) {}
  1906  
  1907  // +checklocksignore
  1908  func (r *runInterrupt) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1909  }
  1910  
  1911  func (r *runInterruptAfterSignalDeliveryStop) StateTypeName() string {
  1912  	return "pkg/sentry/kernel.runInterruptAfterSignalDeliveryStop"
  1913  }
  1914  
  1915  func (r *runInterruptAfterSignalDeliveryStop) StateFields() []string {
  1916  	return []string{}
  1917  }
  1918  
  1919  func (r *runInterruptAfterSignalDeliveryStop) beforeSave() {}
  1920  
  1921  // +checklocksignore
  1922  func (r *runInterruptAfterSignalDeliveryStop) StateSave(stateSinkObject state.Sink) {
  1923  	r.beforeSave()
  1924  }
  1925  
  1926  func (r *runInterruptAfterSignalDeliveryStop) afterLoad(context.Context) {}
  1927  
  1928  // +checklocksignore
  1929  func (r *runInterruptAfterSignalDeliveryStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1930  }
  1931  
  1932  func (r *runSyscallAfterSyscallEnterStop) StateTypeName() string {
  1933  	return "pkg/sentry/kernel.runSyscallAfterSyscallEnterStop"
  1934  }
  1935  
  1936  func (r *runSyscallAfterSyscallEnterStop) StateFields() []string {
  1937  	return []string{}
  1938  }
  1939  
  1940  func (r *runSyscallAfterSyscallEnterStop) beforeSave() {}
  1941  
  1942  // +checklocksignore
  1943  func (r *runSyscallAfterSyscallEnterStop) StateSave(stateSinkObject state.Sink) {
  1944  	r.beforeSave()
  1945  }
  1946  
  1947  func (r *runSyscallAfterSyscallEnterStop) afterLoad(context.Context) {}
  1948  
  1949  // +checklocksignore
  1950  func (r *runSyscallAfterSyscallEnterStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1951  }
  1952  
  1953  func (r *runSyscallAfterSysemuStop) StateTypeName() string {
  1954  	return "pkg/sentry/kernel.runSyscallAfterSysemuStop"
  1955  }
  1956  
  1957  func (r *runSyscallAfterSysemuStop) StateFields() []string {
  1958  	return []string{}
  1959  }
  1960  
  1961  func (r *runSyscallAfterSysemuStop) beforeSave() {}
  1962  
  1963  // +checklocksignore
  1964  func (r *runSyscallAfterSysemuStop) StateSave(stateSinkObject state.Sink) {
  1965  	r.beforeSave()
  1966  }
  1967  
  1968  func (r *runSyscallAfterSysemuStop) afterLoad(context.Context) {}
  1969  
  1970  // +checklocksignore
  1971  func (r *runSyscallAfterSysemuStop) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1972  }
  1973  
  1974  func (r *runSyscallReinvoke) StateTypeName() string {
  1975  	return "pkg/sentry/kernel.runSyscallReinvoke"
  1976  }
  1977  
  1978  func (r *runSyscallReinvoke) StateFields() []string {
  1979  	return []string{}
  1980  }
  1981  
  1982  func (r *runSyscallReinvoke) beforeSave() {}
  1983  
  1984  // +checklocksignore
  1985  func (r *runSyscallReinvoke) StateSave(stateSinkObject state.Sink) {
  1986  	r.beforeSave()
  1987  }
  1988  
  1989  func (r *runSyscallReinvoke) afterLoad(context.Context) {}
  1990  
  1991  // +checklocksignore
  1992  func (r *runSyscallReinvoke) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  1993  }
  1994  
  1995  func (r *runSyscallExit) StateTypeName() string {
  1996  	return "pkg/sentry/kernel.runSyscallExit"
  1997  }
  1998  
  1999  func (r *runSyscallExit) StateFields() []string {
  2000  	return []string{}
  2001  }
  2002  
  2003  func (r *runSyscallExit) beforeSave() {}
  2004  
  2005  // +checklocksignore
  2006  func (r *runSyscallExit) StateSave(stateSinkObject state.Sink) {
  2007  	r.beforeSave()
  2008  }
  2009  
  2010  func (r *runSyscallExit) afterLoad(context.Context) {}
  2011  
  2012  // +checklocksignore
  2013  func (r *runSyscallExit) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2014  }
  2015  
  2016  func (tg *ThreadGroup) StateTypeName() string {
  2017  	return "pkg/sentry/kernel.ThreadGroup"
  2018  }
  2019  
  2020  func (tg *ThreadGroup) StateFields() []string {
  2021  	return []string{
  2022  		"threadGroupNode",
  2023  		"signalHandlers",
  2024  		"pendingSignals",
  2025  		"groupStopDequeued",
  2026  		"groupStopSignal",
  2027  		"groupStopPendingCount",
  2028  		"groupStopComplete",
  2029  		"groupStopWaitable",
  2030  		"groupContNotify",
  2031  		"groupContInterrupted",
  2032  		"groupContWaitable",
  2033  		"exiting",
  2034  		"exitStatus",
  2035  		"terminationSignal",
  2036  		"itimerRealTimer",
  2037  		"itimerVirtSetting",
  2038  		"itimerProfSetting",
  2039  		"rlimitCPUSoftSetting",
  2040  		"cpuTimersEnabled",
  2041  		"timers",
  2042  		"nextTimerID",
  2043  		"exitedCPUStats",
  2044  		"childCPUStats",
  2045  		"ioUsage",
  2046  		"maxRSS",
  2047  		"childMaxRSS",
  2048  		"limits",
  2049  		"processGroup",
  2050  		"execed",
  2051  		"oldRSeqCritical",
  2052  		"tty",
  2053  		"oomScoreAdj",
  2054  		"isChildSubreaper",
  2055  		"hasChildSubreaper",
  2056  	}
  2057  }
  2058  
  2059  func (tg *ThreadGroup) beforeSave() {}
  2060  
  2061  // +checklocksignore
  2062  func (tg *ThreadGroup) StateSave(stateSinkObject state.Sink) {
  2063  	tg.beforeSave()
  2064  	var oldRSeqCriticalValue *OldRSeqCriticalRegion
  2065  	oldRSeqCriticalValue = tg.saveOldRSeqCritical()
  2066  	stateSinkObject.SaveValue(29, oldRSeqCriticalValue)
  2067  	stateSinkObject.Save(0, &tg.threadGroupNode)
  2068  	stateSinkObject.Save(1, &tg.signalHandlers)
  2069  	stateSinkObject.Save(2, &tg.pendingSignals)
  2070  	stateSinkObject.Save(3, &tg.groupStopDequeued)
  2071  	stateSinkObject.Save(4, &tg.groupStopSignal)
  2072  	stateSinkObject.Save(5, &tg.groupStopPendingCount)
  2073  	stateSinkObject.Save(6, &tg.groupStopComplete)
  2074  	stateSinkObject.Save(7, &tg.groupStopWaitable)
  2075  	stateSinkObject.Save(8, &tg.groupContNotify)
  2076  	stateSinkObject.Save(9, &tg.groupContInterrupted)
  2077  	stateSinkObject.Save(10, &tg.groupContWaitable)
  2078  	stateSinkObject.Save(11, &tg.exiting)
  2079  	stateSinkObject.Save(12, &tg.exitStatus)
  2080  	stateSinkObject.Save(13, &tg.terminationSignal)
  2081  	stateSinkObject.Save(14, &tg.itimerRealTimer)
  2082  	stateSinkObject.Save(15, &tg.itimerVirtSetting)
  2083  	stateSinkObject.Save(16, &tg.itimerProfSetting)
  2084  	stateSinkObject.Save(17, &tg.rlimitCPUSoftSetting)
  2085  	stateSinkObject.Save(18, &tg.cpuTimersEnabled)
  2086  	stateSinkObject.Save(19, &tg.timers)
  2087  	stateSinkObject.Save(20, &tg.nextTimerID)
  2088  	stateSinkObject.Save(21, &tg.exitedCPUStats)
  2089  	stateSinkObject.Save(22, &tg.childCPUStats)
  2090  	stateSinkObject.Save(23, &tg.ioUsage)
  2091  	stateSinkObject.Save(24, &tg.maxRSS)
  2092  	stateSinkObject.Save(25, &tg.childMaxRSS)
  2093  	stateSinkObject.Save(26, &tg.limits)
  2094  	stateSinkObject.Save(27, &tg.processGroup)
  2095  	stateSinkObject.Save(28, &tg.execed)
  2096  	stateSinkObject.Save(30, &tg.tty)
  2097  	stateSinkObject.Save(31, &tg.oomScoreAdj)
  2098  	stateSinkObject.Save(32, &tg.isChildSubreaper)
  2099  	stateSinkObject.Save(33, &tg.hasChildSubreaper)
  2100  }
  2101  
  2102  func (tg *ThreadGroup) afterLoad(context.Context) {}
  2103  
  2104  // +checklocksignore
  2105  func (tg *ThreadGroup) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2106  	stateSourceObject.Load(0, &tg.threadGroupNode)
  2107  	stateSourceObject.Load(1, &tg.signalHandlers)
  2108  	stateSourceObject.Load(2, &tg.pendingSignals)
  2109  	stateSourceObject.Load(3, &tg.groupStopDequeued)
  2110  	stateSourceObject.Load(4, &tg.groupStopSignal)
  2111  	stateSourceObject.Load(5, &tg.groupStopPendingCount)
  2112  	stateSourceObject.Load(6, &tg.groupStopComplete)
  2113  	stateSourceObject.Load(7, &tg.groupStopWaitable)
  2114  	stateSourceObject.Load(8, &tg.groupContNotify)
  2115  	stateSourceObject.Load(9, &tg.groupContInterrupted)
  2116  	stateSourceObject.Load(10, &tg.groupContWaitable)
  2117  	stateSourceObject.Load(11, &tg.exiting)
  2118  	stateSourceObject.Load(12, &tg.exitStatus)
  2119  	stateSourceObject.Load(13, &tg.terminationSignal)
  2120  	stateSourceObject.Load(14, &tg.itimerRealTimer)
  2121  	stateSourceObject.Load(15, &tg.itimerVirtSetting)
  2122  	stateSourceObject.Load(16, &tg.itimerProfSetting)
  2123  	stateSourceObject.Load(17, &tg.rlimitCPUSoftSetting)
  2124  	stateSourceObject.Load(18, &tg.cpuTimersEnabled)
  2125  	stateSourceObject.Load(19, &tg.timers)
  2126  	stateSourceObject.Load(20, &tg.nextTimerID)
  2127  	stateSourceObject.Load(21, &tg.exitedCPUStats)
  2128  	stateSourceObject.Load(22, &tg.childCPUStats)
  2129  	stateSourceObject.Load(23, &tg.ioUsage)
  2130  	stateSourceObject.Load(24, &tg.maxRSS)
  2131  	stateSourceObject.Load(25, &tg.childMaxRSS)
  2132  	stateSourceObject.Load(26, &tg.limits)
  2133  	stateSourceObject.Load(27, &tg.processGroup)
  2134  	stateSourceObject.Load(28, &tg.execed)
  2135  	stateSourceObject.Load(30, &tg.tty)
  2136  	stateSourceObject.Load(31, &tg.oomScoreAdj)
  2137  	stateSourceObject.Load(32, &tg.isChildSubreaper)
  2138  	stateSourceObject.Load(33, &tg.hasChildSubreaper)
  2139  	stateSourceObject.LoadValue(29, new(*OldRSeqCriticalRegion), func(y any) { tg.loadOldRSeqCritical(ctx, y.(*OldRSeqCriticalRegion)) })
  2140  }
  2141  
  2142  func (l *itimerRealListener) StateTypeName() string {
  2143  	return "pkg/sentry/kernel.itimerRealListener"
  2144  }
  2145  
  2146  func (l *itimerRealListener) StateFields() []string {
  2147  	return []string{
  2148  		"tg",
  2149  	}
  2150  }
  2151  
  2152  func (l *itimerRealListener) beforeSave() {}
  2153  
  2154  // +checklocksignore
  2155  func (l *itimerRealListener) StateSave(stateSinkObject state.Sink) {
  2156  	l.beforeSave()
  2157  	stateSinkObject.Save(0, &l.tg)
  2158  }
  2159  
  2160  func (l *itimerRealListener) afterLoad(context.Context) {}
  2161  
  2162  // +checklocksignore
  2163  func (l *itimerRealListener) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2164  	stateSourceObject.Load(0, &l.tg)
  2165  }
  2166  
  2167  func (ts *TaskSet) StateTypeName() string {
  2168  	return "pkg/sentry/kernel.TaskSet"
  2169  }
  2170  
  2171  func (ts *TaskSet) StateFields() []string {
  2172  	return []string{
  2173  		"Root",
  2174  		"sessions",
  2175  	}
  2176  }
  2177  
  2178  func (ts *TaskSet) beforeSave() {}
  2179  
  2180  // +checklocksignore
  2181  func (ts *TaskSet) StateSave(stateSinkObject state.Sink) {
  2182  	ts.beforeSave()
  2183  	stateSinkObject.Save(0, &ts.Root)
  2184  	stateSinkObject.Save(1, &ts.sessions)
  2185  }
  2186  
  2187  func (ts *TaskSet) afterLoad(context.Context) {}
  2188  
  2189  // +checklocksignore
  2190  func (ts *TaskSet) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2191  	stateSourceObject.Load(0, &ts.Root)
  2192  	stateSourceObject.Load(1, &ts.sessions)
  2193  }
  2194  
  2195  func (ns *PIDNamespace) StateTypeName() string {
  2196  	return "pkg/sentry/kernel.PIDNamespace"
  2197  }
  2198  
  2199  func (ns *PIDNamespace) StateFields() []string {
  2200  	return []string{
  2201  		"owner",
  2202  		"parent",
  2203  		"userns",
  2204  		"id",
  2205  		"last",
  2206  		"tasks",
  2207  		"tids",
  2208  		"tgids",
  2209  		"sessions",
  2210  		"sids",
  2211  		"processGroups",
  2212  		"pgids",
  2213  		"exiting",
  2214  		"extra",
  2215  	}
  2216  }
  2217  
  2218  func (ns *PIDNamespace) beforeSave() {}
  2219  
  2220  // +checklocksignore
  2221  func (ns *PIDNamespace) StateSave(stateSinkObject state.Sink) {
  2222  	ns.beforeSave()
  2223  	stateSinkObject.Save(0, &ns.owner)
  2224  	stateSinkObject.Save(1, &ns.parent)
  2225  	stateSinkObject.Save(2, &ns.userns)
  2226  	stateSinkObject.Save(3, &ns.id)
  2227  	stateSinkObject.Save(4, &ns.last)
  2228  	stateSinkObject.Save(5, &ns.tasks)
  2229  	stateSinkObject.Save(6, &ns.tids)
  2230  	stateSinkObject.Save(7, &ns.tgids)
  2231  	stateSinkObject.Save(8, &ns.sessions)
  2232  	stateSinkObject.Save(9, &ns.sids)
  2233  	stateSinkObject.Save(10, &ns.processGroups)
  2234  	stateSinkObject.Save(11, &ns.pgids)
  2235  	stateSinkObject.Save(12, &ns.exiting)
  2236  	stateSinkObject.Save(13, &ns.extra)
  2237  }
  2238  
  2239  func (ns *PIDNamespace) afterLoad(context.Context) {}
  2240  
  2241  // +checklocksignore
  2242  func (ns *PIDNamespace) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2243  	stateSourceObject.Load(0, &ns.owner)
  2244  	stateSourceObject.Load(1, &ns.parent)
  2245  	stateSourceObject.Load(2, &ns.userns)
  2246  	stateSourceObject.Load(3, &ns.id)
  2247  	stateSourceObject.Load(4, &ns.last)
  2248  	stateSourceObject.Load(5, &ns.tasks)
  2249  	stateSourceObject.Load(6, &ns.tids)
  2250  	stateSourceObject.Load(7, &ns.tgids)
  2251  	stateSourceObject.Load(8, &ns.sessions)
  2252  	stateSourceObject.Load(9, &ns.sids)
  2253  	stateSourceObject.Load(10, &ns.processGroups)
  2254  	stateSourceObject.Load(11, &ns.pgids)
  2255  	stateSourceObject.Load(12, &ns.exiting)
  2256  	stateSourceObject.Load(13, &ns.extra)
  2257  }
  2258  
  2259  func (t *threadGroupNode) StateTypeName() string {
  2260  	return "pkg/sentry/kernel.threadGroupNode"
  2261  }
  2262  
  2263  func (t *threadGroupNode) StateFields() []string {
  2264  	return []string{
  2265  		"pidns",
  2266  		"pidWithinNS",
  2267  		"eventQueue",
  2268  		"leader",
  2269  		"execing",
  2270  		"tasks",
  2271  		"tasksCount",
  2272  		"liveTasks",
  2273  		"activeTasks",
  2274  	}
  2275  }
  2276  
  2277  func (t *threadGroupNode) beforeSave() {}
  2278  
  2279  // +checklocksignore
  2280  func (t *threadGroupNode) StateSave(stateSinkObject state.Sink) {
  2281  	t.beforeSave()
  2282  	stateSinkObject.Save(0, &t.pidns)
  2283  	stateSinkObject.Save(1, &t.pidWithinNS)
  2284  	stateSinkObject.Save(2, &t.eventQueue)
  2285  	stateSinkObject.Save(3, &t.leader)
  2286  	stateSinkObject.Save(4, &t.execing)
  2287  	stateSinkObject.Save(5, &t.tasks)
  2288  	stateSinkObject.Save(6, &t.tasksCount)
  2289  	stateSinkObject.Save(7, &t.liveTasks)
  2290  	stateSinkObject.Save(8, &t.activeTasks)
  2291  }
  2292  
  2293  func (t *threadGroupNode) afterLoad(context.Context) {}
  2294  
  2295  // +checklocksignore
  2296  func (t *threadGroupNode) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2297  	stateSourceObject.Load(0, &t.pidns)
  2298  	stateSourceObject.Load(1, &t.pidWithinNS)
  2299  	stateSourceObject.Load(2, &t.eventQueue)
  2300  	stateSourceObject.Load(3, &t.leader)
  2301  	stateSourceObject.Load(4, &t.execing)
  2302  	stateSourceObject.Load(5, &t.tasks)
  2303  	stateSourceObject.Load(6, &t.tasksCount)
  2304  	stateSourceObject.Load(7, &t.liveTasks)
  2305  	stateSourceObject.Load(8, &t.activeTasks)
  2306  }
  2307  
  2308  func (t *taskNode) StateTypeName() string {
  2309  	return "pkg/sentry/kernel.taskNode"
  2310  }
  2311  
  2312  func (t *taskNode) StateFields() []string {
  2313  	return []string{
  2314  		"tg",
  2315  		"taskEntry",
  2316  		"parent",
  2317  		"children",
  2318  		"childPIDNamespace",
  2319  	}
  2320  }
  2321  
  2322  func (t *taskNode) beforeSave() {}
  2323  
  2324  // +checklocksignore
  2325  func (t *taskNode) StateSave(stateSinkObject state.Sink) {
  2326  	t.beforeSave()
  2327  	stateSinkObject.Save(0, &t.tg)
  2328  	stateSinkObject.Save(1, &t.taskEntry)
  2329  	stateSinkObject.Save(2, &t.parent)
  2330  	stateSinkObject.Save(3, &t.children)
  2331  	stateSinkObject.Save(4, &t.childPIDNamespace)
  2332  }
  2333  
  2334  func (t *taskNode) afterLoad(context.Context) {}
  2335  
  2336  // +checklocksignore
  2337  func (t *taskNode) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2338  	stateSourceObject.LoadWait(0, &t.tg)
  2339  	stateSourceObject.Load(1, &t.taskEntry)
  2340  	stateSourceObject.Load(2, &t.parent)
  2341  	stateSourceObject.Load(3, &t.children)
  2342  	stateSourceObject.Load(4, &t.childPIDNamespace)
  2343  }
  2344  
  2345  func (t *Timekeeper) StateTypeName() string {
  2346  	return "pkg/sentry/kernel.Timekeeper"
  2347  }
  2348  
  2349  func (t *Timekeeper) StateFields() []string {
  2350  	return []string{
  2351  		"realtimeClock",
  2352  		"monotonicClock",
  2353  		"bootTime",
  2354  		"saveMonotonic",
  2355  		"saveRealtime",
  2356  		"params",
  2357  	}
  2358  }
  2359  
  2360  // +checklocksignore
  2361  func (t *Timekeeper) StateSave(stateSinkObject state.Sink) {
  2362  	t.beforeSave()
  2363  	stateSinkObject.Save(0, &t.realtimeClock)
  2364  	stateSinkObject.Save(1, &t.monotonicClock)
  2365  	stateSinkObject.Save(2, &t.bootTime)
  2366  	stateSinkObject.Save(3, &t.saveMonotonic)
  2367  	stateSinkObject.Save(4, &t.saveRealtime)
  2368  	stateSinkObject.Save(5, &t.params)
  2369  }
  2370  
  2371  // +checklocksignore
  2372  func (t *Timekeeper) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2373  	stateSourceObject.Load(0, &t.realtimeClock)
  2374  	stateSourceObject.Load(1, &t.monotonicClock)
  2375  	stateSourceObject.Load(2, &t.bootTime)
  2376  	stateSourceObject.Load(3, &t.saveMonotonic)
  2377  	stateSourceObject.Load(4, &t.saveRealtime)
  2378  	stateSourceObject.Load(5, &t.params)
  2379  	stateSourceObject.AfterLoad(func() { t.afterLoad(ctx) })
  2380  }
  2381  
  2382  func (tc *timekeeperClock) StateTypeName() string {
  2383  	return "pkg/sentry/kernel.timekeeperClock"
  2384  }
  2385  
  2386  func (tc *timekeeperClock) StateFields() []string {
  2387  	return []string{
  2388  		"tk",
  2389  		"c",
  2390  	}
  2391  }
  2392  
  2393  func (tc *timekeeperClock) beforeSave() {}
  2394  
  2395  // +checklocksignore
  2396  func (tc *timekeeperClock) StateSave(stateSinkObject state.Sink) {
  2397  	tc.beforeSave()
  2398  	stateSinkObject.Save(0, &tc.tk)
  2399  	stateSinkObject.Save(1, &tc.c)
  2400  }
  2401  
  2402  func (tc *timekeeperClock) afterLoad(context.Context) {}
  2403  
  2404  // +checklocksignore
  2405  func (tc *timekeeperClock) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2406  	stateSourceObject.Load(0, &tc.tk)
  2407  	stateSourceObject.Load(1, &tc.c)
  2408  }
  2409  
  2410  func (tty *TTY) StateTypeName() string {
  2411  	return "pkg/sentry/kernel.TTY"
  2412  }
  2413  
  2414  func (tty *TTY) StateFields() []string {
  2415  	return []string{
  2416  		"Index",
  2417  		"tg",
  2418  	}
  2419  }
  2420  
  2421  func (tty *TTY) beforeSave() {}
  2422  
  2423  // +checklocksignore
  2424  func (tty *TTY) StateSave(stateSinkObject state.Sink) {
  2425  	tty.beforeSave()
  2426  	stateSinkObject.Save(0, &tty.Index)
  2427  	stateSinkObject.Save(1, &tty.tg)
  2428  }
  2429  
  2430  func (tty *TTY) afterLoad(context.Context) {}
  2431  
  2432  // +checklocksignore
  2433  func (tty *TTY) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2434  	stateSourceObject.Load(0, &tty.Index)
  2435  	stateSourceObject.Load(1, &tty.tg)
  2436  }
  2437  
  2438  func (u *UTSNamespace) StateTypeName() string {
  2439  	return "pkg/sentry/kernel.UTSNamespace"
  2440  }
  2441  
  2442  func (u *UTSNamespace) StateFields() []string {
  2443  	return []string{
  2444  		"hostName",
  2445  		"domainName",
  2446  		"userns",
  2447  		"inode",
  2448  	}
  2449  }
  2450  
  2451  func (u *UTSNamespace) beforeSave() {}
  2452  
  2453  // +checklocksignore
  2454  func (u *UTSNamespace) StateSave(stateSinkObject state.Sink) {
  2455  	u.beforeSave()
  2456  	stateSinkObject.Save(0, &u.hostName)
  2457  	stateSinkObject.Save(1, &u.domainName)
  2458  	stateSinkObject.Save(2, &u.userns)
  2459  	stateSinkObject.Save(3, &u.inode)
  2460  }
  2461  
  2462  func (u *UTSNamespace) afterLoad(context.Context) {}
  2463  
  2464  // +checklocksignore
  2465  func (u *UTSNamespace) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2466  	stateSourceObject.Load(0, &u.hostName)
  2467  	stateSourceObject.Load(1, &u.domainName)
  2468  	stateSourceObject.Load(2, &u.userns)
  2469  	stateSourceObject.Load(3, &u.inode)
  2470  }
  2471  
  2472  func (v *VDSOParamPage) StateTypeName() string {
  2473  	return "pkg/sentry/kernel.VDSOParamPage"
  2474  }
  2475  
  2476  func (v *VDSOParamPage) StateFields() []string {
  2477  	return []string{
  2478  		"fr",
  2479  		"seq",
  2480  		"copyScratchBuffer",
  2481  	}
  2482  }
  2483  
  2484  func (v *VDSOParamPage) beforeSave() {}
  2485  
  2486  // +checklocksignore
  2487  func (v *VDSOParamPage) StateSave(stateSinkObject state.Sink) {
  2488  	v.beforeSave()
  2489  	stateSinkObject.Save(0, &v.fr)
  2490  	stateSinkObject.Save(1, &v.seq)
  2491  	stateSinkObject.Save(2, &v.copyScratchBuffer)
  2492  }
  2493  
  2494  // +checklocksignore
  2495  func (v *VDSOParamPage) StateLoad(ctx context.Context, stateSourceObject state.Source) {
  2496  	stateSourceObject.Load(0, &v.fr)
  2497  	stateSourceObject.Load(1, &v.seq)
  2498  	stateSourceObject.Load(2, &v.copyScratchBuffer)
  2499  	stateSourceObject.AfterLoad(func() { v.afterLoad(ctx) })
  2500  }
  2501  
  2502  func init() {
  2503  	state.Register((*Cgroup)(nil))
  2504  	state.Register((*hierarchy)(nil))
  2505  	state.Register((*CgroupRegistry)(nil))
  2506  	state.Register((*FDFlags)(nil))
  2507  	state.Register((*descriptor)(nil))
  2508  	state.Register((*FDTable)(nil))
  2509  	state.Register((*FDTableRefs)(nil))
  2510  	state.Register((*FSContext)(nil))
  2511  	state.Register((*FSContextRefs)(nil))
  2512  	state.Register((*IPCNamespace)(nil))
  2513  	state.Register((*UserCounters)(nil))
  2514  	state.Register((*CgroupMount)(nil))
  2515  	state.Register((*Kernel)(nil))
  2516  	state.Register((*privateMemoryFileMetadata)(nil))
  2517  	state.Register((*SocketRecord)(nil))
  2518  	state.Register((*pendingSignals)(nil))
  2519  	state.Register((*pendingSignalQueue)(nil))
  2520  	state.Register((*pendingSignal)(nil))
  2521  	state.Register((*pendingSignalList)(nil))
  2522  	state.Register((*pendingSignalEntry)(nil))
  2523  	state.Register((*savedPendingSignal)(nil))
  2524  	state.Register((*IntervalTimer)(nil))
  2525  	state.Register((*processGroupList)(nil))
  2526  	state.Register((*processGroupEntry)(nil))
  2527  	state.Register((*ProcessGroupRefs)(nil))
  2528  	state.Register((*ptraceOptions)(nil))
  2529  	state.Register((*ptraceStop)(nil))
  2530  	state.Register((*OldRSeqCriticalRegion)(nil))
  2531  	state.Register((*taskSeccomp)(nil))
  2532  	state.Register((*sessionList)(nil))
  2533  	state.Register((*sessionEntry)(nil))
  2534  	state.Register((*SessionRefs)(nil))
  2535  	state.Register((*Session)(nil))
  2536  	state.Register((*ProcessGroup)(nil))
  2537  	state.Register((*SignalHandlers)(nil))
  2538  	state.Register((*syscallTableInfo)(nil))
  2539  	state.Register((*syslog)(nil))
  2540  	state.Register((*Task)(nil))
  2541  	state.Register((*runSyscallAfterPtraceEventClone)(nil))
  2542  	state.Register((*runSyscallAfterVforkStop)(nil))
  2543  	state.Register((*vforkStop)(nil))
  2544  	state.Register((*execStop)(nil))
  2545  	state.Register((*runSyscallAfterExecStop)(nil))
  2546  	state.Register((*runExit)(nil))
  2547  	state.Register((*runExitMain)(nil))
  2548  	state.Register((*runExitNotify)(nil))
  2549  	state.Register((*TaskImage)(nil))
  2550  	state.Register((*taskList)(nil))
  2551  	state.Register((*taskEntry)(nil))
  2552  	state.Register((*runApp)(nil))
  2553  	state.Register((*TaskGoroutineSchedInfo)(nil))
  2554  	state.Register((*taskClock)(nil))
  2555  	state.Register((*tgClock)(nil))
  2556  	state.Register((*groupStop)(nil))
  2557  	state.Register((*runInterrupt)(nil))
  2558  	state.Register((*runInterruptAfterSignalDeliveryStop)(nil))
  2559  	state.Register((*runSyscallAfterSyscallEnterStop)(nil))
  2560  	state.Register((*runSyscallAfterSysemuStop)(nil))
  2561  	state.Register((*runSyscallReinvoke)(nil))
  2562  	state.Register((*runSyscallExit)(nil))
  2563  	state.Register((*ThreadGroup)(nil))
  2564  	state.Register((*itimerRealListener)(nil))
  2565  	state.Register((*TaskSet)(nil))
  2566  	state.Register((*PIDNamespace)(nil))
  2567  	state.Register((*threadGroupNode)(nil))
  2568  	state.Register((*taskNode)(nil))
  2569  	state.Register((*Timekeeper)(nil))
  2570  	state.Register((*timekeeperClock)(nil))
  2571  	state.Register((*TTY)(nil))
  2572  	state.Register((*UTSNamespace)(nil))
  2573  	state.Register((*VDSOParamPage)(nil))
  2574  }