// automatically generated by stateify. package kernel import ( "gvisor.dev/gvisor/pkg/bpf" "gvisor.dev/gvisor/pkg/sentry/device" "gvisor.dev/gvisor/pkg/state" "gvisor.dev/gvisor/pkg/tcpip" ) func (a *abstractEndpoint) StateTypeName() string { return "pkg/sentry/kernel.abstractEndpoint" } func (a *abstractEndpoint) StateFields() []string { return []string{ "ep", "socket", "name", "ns", } } func (a *abstractEndpoint) beforeSave() {} func (a *abstractEndpoint) StateSave(stateSinkObject state.Sink) { a.beforeSave() stateSinkObject.Save(0, &a.ep) stateSinkObject.Save(1, &a.socket) stateSinkObject.Save(2, &a.name) stateSinkObject.Save(3, &a.ns) } func (a *abstractEndpoint) afterLoad() {} func (a *abstractEndpoint) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &a.ep) stateSourceObject.Load(1, &a.socket) stateSourceObject.Load(2, &a.name) stateSourceObject.Load(3, &a.ns) } func (a *AbstractSocketNamespace) StateTypeName() string { return "pkg/sentry/kernel.AbstractSocketNamespace" } func (a *AbstractSocketNamespace) StateFields() []string { return []string{ "endpoints", } } func (a *AbstractSocketNamespace) beforeSave() {} func (a *AbstractSocketNamespace) StateSave(stateSinkObject state.Sink) { a.beforeSave() stateSinkObject.Save(0, &a.endpoints) } func (a *AbstractSocketNamespace) afterLoad() {} func (a *AbstractSocketNamespace) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &a.endpoints) } func (f *FDFlags) StateTypeName() string { return "pkg/sentry/kernel.FDFlags" } func (f *FDFlags) StateFields() []string { return []string{ "CloseOnExec", } } func (f *FDFlags) beforeSave() {} func (f *FDFlags) StateSave(stateSinkObject state.Sink) { f.beforeSave() stateSinkObject.Save(0, &f.CloseOnExec) } func (f *FDFlags) afterLoad() {} func (f *FDFlags) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &f.CloseOnExec) } func (d *descriptor) StateTypeName() string { return "pkg/sentry/kernel.descriptor" } func (d *descriptor) StateFields() []string { return []string{ "file", "fileVFS2", "flags", } } func (d *descriptor) beforeSave() {} func (d *descriptor) StateSave(stateSinkObject state.Sink) { d.beforeSave() stateSinkObject.Save(0, &d.file) stateSinkObject.Save(1, &d.fileVFS2) stateSinkObject.Save(2, &d.flags) } func (d *descriptor) afterLoad() {} func (d *descriptor) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &d.file) stateSourceObject.Load(1, &d.fileVFS2) stateSourceObject.Load(2, &d.flags) } func (f *FDTable) StateTypeName() string { return "pkg/sentry/kernel.FDTable" } func (f *FDTable) StateFields() []string { return []string{ "FDTableRefs", "k", "next", "used", "descriptorTable", } } func (f *FDTable) beforeSave() {} func (f *FDTable) StateSave(stateSinkObject state.Sink) { f.beforeSave() var descriptorTableValue map[int32]descriptor = f.saveDescriptorTable() stateSinkObject.SaveValue(4, descriptorTableValue) stateSinkObject.Save(0, &f.FDTableRefs) stateSinkObject.Save(1, &f.k) stateSinkObject.Save(2, &f.next) stateSinkObject.Save(3, &f.used) } func (f *FDTable) afterLoad() {} func (f *FDTable) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &f.FDTableRefs) stateSourceObject.Load(1, &f.k) stateSourceObject.Load(2, &f.next) stateSourceObject.Load(3, &f.used) stateSourceObject.LoadValue(4, new(map[int32]descriptor), func(y interface{}) { f.loadDescriptorTable(y.(map[int32]descriptor)) }) } func (r *FDTableRefs) StateTypeName() string { return "pkg/sentry/kernel.FDTableRefs" } func (r *FDTableRefs) StateFields() []string { return []string{ "refCount", } } func (r *FDTableRefs) beforeSave() {} func (r *FDTableRefs) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.refCount) } func (r *FDTableRefs) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.refCount) stateSourceObject.AfterLoad(r.afterLoad) } func (f *FSContext) StateTypeName() string { return "pkg/sentry/kernel.FSContext" } func (f *FSContext) StateFields() []string { return []string{ "FSContextRefs", "root", "rootVFS2", "cwd", "cwdVFS2", "umask", } } func (f *FSContext) beforeSave() {} func (f *FSContext) StateSave(stateSinkObject state.Sink) { f.beforeSave() stateSinkObject.Save(0, &f.FSContextRefs) stateSinkObject.Save(1, &f.root) stateSinkObject.Save(2, &f.rootVFS2) stateSinkObject.Save(3, &f.cwd) stateSinkObject.Save(4, &f.cwdVFS2) stateSinkObject.Save(5, &f.umask) } func (f *FSContext) afterLoad() {} func (f *FSContext) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &f.FSContextRefs) stateSourceObject.Load(1, &f.root) stateSourceObject.Load(2, &f.rootVFS2) stateSourceObject.Load(3, &f.cwd) stateSourceObject.Load(4, &f.cwdVFS2) stateSourceObject.Load(5, &f.umask) } func (r *FSContextRefs) StateTypeName() string { return "pkg/sentry/kernel.FSContextRefs" } func (r *FSContextRefs) StateFields() []string { return []string{ "refCount", } } func (r *FSContextRefs) beforeSave() {} func (r *FSContextRefs) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.refCount) } func (r *FSContextRefs) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.refCount) stateSourceObject.AfterLoad(r.afterLoad) } func (i *IPCNamespace) StateTypeName() string { return "pkg/sentry/kernel.IPCNamespace" } func (i *IPCNamespace) StateFields() []string { return []string{ "IPCNamespaceRefs", "userNS", "semaphores", "shms", } } func (i *IPCNamespace) beforeSave() {} func (i *IPCNamespace) StateSave(stateSinkObject state.Sink) { i.beforeSave() stateSinkObject.Save(0, &i.IPCNamespaceRefs) stateSinkObject.Save(1, &i.userNS) stateSinkObject.Save(2, &i.semaphores) stateSinkObject.Save(3, &i.shms) } func (i *IPCNamespace) afterLoad() {} func (i *IPCNamespace) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &i.IPCNamespaceRefs) stateSourceObject.Load(1, &i.userNS) stateSourceObject.Load(2, &i.semaphores) stateSourceObject.Load(3, &i.shms) } func (r *IPCNamespaceRefs) StateTypeName() string { return "pkg/sentry/kernel.IPCNamespaceRefs" } func (r *IPCNamespaceRefs) StateFields() []string { return []string{ "refCount", } } func (r *IPCNamespaceRefs) beforeSave() {} func (r *IPCNamespaceRefs) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.refCount) } func (r *IPCNamespaceRefs) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.refCount) stateSourceObject.AfterLoad(r.afterLoad) } func (k *Kernel) StateTypeName() string { return "pkg/sentry/kernel.Kernel" } func (k *Kernel) StateFields() []string { return []string{ "featureSet", "timekeeper", "tasks", "rootUserNamespace", "rootNetworkNamespace", "applicationCores", "useHostCores", "extraAuxv", "vdso", "rootUTSNamespace", "rootIPCNamespace", "rootAbstractSocketNamespace", "futexes", "globalInit", "realtimeClock", "monotonicClock", "syslog", "runningTasks", "cpuClock", "cpuClockTickerDisabled", "cpuClockTickerSetting", "uniqueID", "nextInotifyCookie", "netlinkPorts", "danglingEndpoints", "sockets", "socketsVFS2", "nextSocketRecord", "deviceRegistry", "DirentCacheLimiter", "SpecialOpts", "vfs", "hostMount", "pipeMount", "shmMount", "socketMount", "SleepForAddressSpaceActivation", } } func (k *Kernel) beforeSave() {} func (k *Kernel) StateSave(stateSinkObject state.Sink) { k.beforeSave() var danglingEndpointsValue []tcpip.Endpoint = k.saveDanglingEndpoints() stateSinkObject.SaveValue(24, danglingEndpointsValue) var deviceRegistryValue *device.Registry = k.saveDeviceRegistry() stateSinkObject.SaveValue(28, deviceRegistryValue) stateSinkObject.Save(0, &k.featureSet) stateSinkObject.Save(1, &k.timekeeper) stateSinkObject.Save(2, &k.tasks) stateSinkObject.Save(3, &k.rootUserNamespace) stateSinkObject.Save(4, &k.rootNetworkNamespace) stateSinkObject.Save(5, &k.applicationCores) stateSinkObject.Save(6, &k.useHostCores) stateSinkObject.Save(7, &k.extraAuxv) stateSinkObject.Save(8, &k.vdso) stateSinkObject.Save(9, &k.rootUTSNamespace) stateSinkObject.Save(10, &k.rootIPCNamespace) stateSinkObject.Save(11, &k.rootAbstractSocketNamespace) stateSinkObject.Save(12, &k.futexes) stateSinkObject.Save(13, &k.globalInit) stateSinkObject.Save(14, &k.realtimeClock) stateSinkObject.Save(15, &k.monotonicClock) stateSinkObject.Save(16, &k.syslog) stateSinkObject.Save(17, &k.runningTasks) stateSinkObject.Save(18, &k.cpuClock) stateSinkObject.Save(19, &k.cpuClockTickerDisabled) stateSinkObject.Save(20, &k.cpuClockTickerSetting) stateSinkObject.Save(21, &k.uniqueID) stateSinkObject.Save(22, &k.nextInotifyCookie) stateSinkObject.Save(23, &k.netlinkPorts) stateSinkObject.Save(25, &k.sockets) stateSinkObject.Save(26, &k.socketsVFS2) stateSinkObject.Save(27, &k.nextSocketRecord) stateSinkObject.Save(29, &k.DirentCacheLimiter) stateSinkObject.Save(30, &k.SpecialOpts) stateSinkObject.Save(31, &k.vfs) stateSinkObject.Save(32, &k.hostMount) stateSinkObject.Save(33, &k.pipeMount) stateSinkObject.Save(34, &k.shmMount) stateSinkObject.Save(35, &k.socketMount) stateSinkObject.Save(36, &k.SleepForAddressSpaceActivation) } func (k *Kernel) afterLoad() {} func (k *Kernel) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &k.featureSet) stateSourceObject.Load(1, &k.timekeeper) stateSourceObject.Load(2, &k.tasks) stateSourceObject.Load(3, &k.rootUserNamespace) stateSourceObject.Load(4, &k.rootNetworkNamespace) stateSourceObject.Load(5, &k.applicationCores) stateSourceObject.Load(6, &k.useHostCores) stateSourceObject.Load(7, &k.extraAuxv) stateSourceObject.Load(8, &k.vdso) stateSourceObject.Load(9, &k.rootUTSNamespace) stateSourceObject.Load(10, &k.rootIPCNamespace) stateSourceObject.Load(11, &k.rootAbstractSocketNamespace) stateSourceObject.Load(12, &k.futexes) stateSourceObject.Load(13, &k.globalInit) stateSourceObject.Load(14, &k.realtimeClock) stateSourceObject.Load(15, &k.monotonicClock) stateSourceObject.Load(16, &k.syslog) stateSourceObject.Load(17, &k.runningTasks) stateSourceObject.Load(18, &k.cpuClock) stateSourceObject.Load(19, &k.cpuClockTickerDisabled) stateSourceObject.Load(20, &k.cpuClockTickerSetting) stateSourceObject.Load(21, &k.uniqueID) stateSourceObject.Load(22, &k.nextInotifyCookie) stateSourceObject.Load(23, &k.netlinkPorts) stateSourceObject.Load(25, &k.sockets) stateSourceObject.Load(26, &k.socketsVFS2) stateSourceObject.Load(27, &k.nextSocketRecord) stateSourceObject.Load(29, &k.DirentCacheLimiter) stateSourceObject.Load(30, &k.SpecialOpts) stateSourceObject.Load(31, &k.vfs) stateSourceObject.Load(32, &k.hostMount) stateSourceObject.Load(33, &k.pipeMount) stateSourceObject.Load(34, &k.shmMount) stateSourceObject.Load(35, &k.socketMount) stateSourceObject.Load(36, &k.SleepForAddressSpaceActivation) stateSourceObject.LoadValue(24, new([]tcpip.Endpoint), func(y interface{}) { k.loadDanglingEndpoints(y.([]tcpip.Endpoint)) }) stateSourceObject.LoadValue(28, new(*device.Registry), func(y interface{}) { k.loadDeviceRegistry(y.(*device.Registry)) }) } func (s *SocketRecord) StateTypeName() string { return "pkg/sentry/kernel.SocketRecord" } func (s *SocketRecord) StateFields() []string { return []string{ "k", "Sock", "SockVFS2", "ID", } } func (s *SocketRecord) beforeSave() {} func (s *SocketRecord) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.k) stateSinkObject.Save(1, &s.Sock) stateSinkObject.Save(2, &s.SockVFS2) stateSinkObject.Save(3, &s.ID) } func (s *SocketRecord) afterLoad() {} func (s *SocketRecord) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.k) stateSourceObject.Load(1, &s.Sock) stateSourceObject.Load(2, &s.SockVFS2) stateSourceObject.Load(3, &s.ID) } func (s *SocketRecordVFS1) StateTypeName() string { return "pkg/sentry/kernel.SocketRecordVFS1" } func (s *SocketRecordVFS1) StateFields() []string { return []string{ "socketEntry", "SocketRecord", } } func (s *SocketRecordVFS1) beforeSave() {} func (s *SocketRecordVFS1) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.socketEntry) stateSinkObject.Save(1, &s.SocketRecord) } func (s *SocketRecordVFS1) afterLoad() {} func (s *SocketRecordVFS1) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.socketEntry) stateSourceObject.Load(1, &s.SocketRecord) } func (p *pendingSignals) StateTypeName() string { return "pkg/sentry/kernel.pendingSignals" } func (p *pendingSignals) StateFields() []string { return []string{ "signals", } } func (p *pendingSignals) beforeSave() {} func (p *pendingSignals) StateSave(stateSinkObject state.Sink) { p.beforeSave() var signalsValue []savedPendingSignal = p.saveSignals() stateSinkObject.SaveValue(0, signalsValue) } func (p *pendingSignals) afterLoad() {} func (p *pendingSignals) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadValue(0, new([]savedPendingSignal), func(y interface{}) { p.loadSignals(y.([]savedPendingSignal)) }) } func (p *pendingSignalQueue) StateTypeName() string { return "pkg/sentry/kernel.pendingSignalQueue" } func (p *pendingSignalQueue) StateFields() []string { return []string{ "pendingSignalList", "length", } } func (p *pendingSignalQueue) beforeSave() {} func (p *pendingSignalQueue) StateSave(stateSinkObject state.Sink) { p.beforeSave() stateSinkObject.Save(0, &p.pendingSignalList) stateSinkObject.Save(1, &p.length) } func (p *pendingSignalQueue) afterLoad() {} func (p *pendingSignalQueue) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &p.pendingSignalList) stateSourceObject.Load(1, &p.length) } func (p *pendingSignal) StateTypeName() string { return "pkg/sentry/kernel.pendingSignal" } func (p *pendingSignal) StateFields() []string { return []string{ "pendingSignalEntry", "SignalInfo", "timer", } } func (p *pendingSignal) beforeSave() {} func (p *pendingSignal) StateSave(stateSinkObject state.Sink) { p.beforeSave() stateSinkObject.Save(0, &p.pendingSignalEntry) stateSinkObject.Save(1, &p.SignalInfo) stateSinkObject.Save(2, &p.timer) } func (p *pendingSignal) afterLoad() {} func (p *pendingSignal) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &p.pendingSignalEntry) stateSourceObject.Load(1, &p.SignalInfo) stateSourceObject.Load(2, &p.timer) } func (l *pendingSignalList) StateTypeName() string { return "pkg/sentry/kernel.pendingSignalList" } func (l *pendingSignalList) StateFields() []string { return []string{ "head", "tail", } } func (l *pendingSignalList) beforeSave() {} func (l *pendingSignalList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *pendingSignalList) afterLoad() {} func (l *pendingSignalList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *pendingSignalEntry) StateTypeName() string { return "pkg/sentry/kernel.pendingSignalEntry" } func (e *pendingSignalEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *pendingSignalEntry) beforeSave() {} func (e *pendingSignalEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *pendingSignalEntry) afterLoad() {} func (e *pendingSignalEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func (s *savedPendingSignal) StateTypeName() string { return "pkg/sentry/kernel.savedPendingSignal" } func (s *savedPendingSignal) StateFields() []string { return []string{ "si", "timer", } } func (s *savedPendingSignal) beforeSave() {} func (s *savedPendingSignal) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.si) stateSinkObject.Save(1, &s.timer) } func (s *savedPendingSignal) afterLoad() {} func (s *savedPendingSignal) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.si) stateSourceObject.Load(1, &s.timer) } func (it *IntervalTimer) StateTypeName() string { return "pkg/sentry/kernel.IntervalTimer" } func (it *IntervalTimer) StateFields() []string { return []string{ "timer", "target", "signo", "id", "sigval", "group", "sigpending", "sigorphan", "overrunCur", "overrunLast", } } func (it *IntervalTimer) beforeSave() {} func (it *IntervalTimer) StateSave(stateSinkObject state.Sink) { it.beforeSave() stateSinkObject.Save(0, &it.timer) stateSinkObject.Save(1, &it.target) stateSinkObject.Save(2, &it.signo) stateSinkObject.Save(3, &it.id) stateSinkObject.Save(4, &it.sigval) stateSinkObject.Save(5, &it.group) stateSinkObject.Save(6, &it.sigpending) stateSinkObject.Save(7, &it.sigorphan) stateSinkObject.Save(8, &it.overrunCur) stateSinkObject.Save(9, &it.overrunLast) } func (it *IntervalTimer) afterLoad() {} func (it *IntervalTimer) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &it.timer) stateSourceObject.Load(1, &it.target) stateSourceObject.Load(2, &it.signo) stateSourceObject.Load(3, &it.id) stateSourceObject.Load(4, &it.sigval) stateSourceObject.Load(5, &it.group) stateSourceObject.Load(6, &it.sigpending) stateSourceObject.Load(7, &it.sigorphan) stateSourceObject.Load(8, &it.overrunCur) stateSourceObject.Load(9, &it.overrunLast) } func (l *processGroupList) StateTypeName() string { return "pkg/sentry/kernel.processGroupList" } func (l *processGroupList) StateFields() []string { return []string{ "head", "tail", } } func (l *processGroupList) beforeSave() {} func (l *processGroupList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *processGroupList) afterLoad() {} func (l *processGroupList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *processGroupEntry) StateTypeName() string { return "pkg/sentry/kernel.processGroupEntry" } func (e *processGroupEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *processGroupEntry) beforeSave() {} func (e *processGroupEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *processGroupEntry) afterLoad() {} func (e *processGroupEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func (r *ProcessGroupRefs) StateTypeName() string { return "pkg/sentry/kernel.ProcessGroupRefs" } func (r *ProcessGroupRefs) StateFields() []string { return []string{ "refCount", } } func (r *ProcessGroupRefs) beforeSave() {} func (r *ProcessGroupRefs) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.refCount) } func (r *ProcessGroupRefs) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.refCount) stateSourceObject.AfterLoad(r.afterLoad) } func (p *ptraceOptions) StateTypeName() string { return "pkg/sentry/kernel.ptraceOptions" } func (p *ptraceOptions) StateFields() []string { return []string{ "ExitKill", "SysGood", "TraceClone", "TraceExec", "TraceExit", "TraceFork", "TraceSeccomp", "TraceVfork", "TraceVforkDone", } } func (p *ptraceOptions) beforeSave() {} func (p *ptraceOptions) StateSave(stateSinkObject state.Sink) { p.beforeSave() stateSinkObject.Save(0, &p.ExitKill) stateSinkObject.Save(1, &p.SysGood) stateSinkObject.Save(2, &p.TraceClone) stateSinkObject.Save(3, &p.TraceExec) stateSinkObject.Save(4, &p.TraceExit) stateSinkObject.Save(5, &p.TraceFork) stateSinkObject.Save(6, &p.TraceSeccomp) stateSinkObject.Save(7, &p.TraceVfork) stateSinkObject.Save(8, &p.TraceVforkDone) } func (p *ptraceOptions) afterLoad() {} func (p *ptraceOptions) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &p.ExitKill) stateSourceObject.Load(1, &p.SysGood) stateSourceObject.Load(2, &p.TraceClone) stateSourceObject.Load(3, &p.TraceExec) stateSourceObject.Load(4, &p.TraceExit) stateSourceObject.Load(5, &p.TraceFork) stateSourceObject.Load(6, &p.TraceSeccomp) stateSourceObject.Load(7, &p.TraceVfork) stateSourceObject.Load(8, &p.TraceVforkDone) } func (s *ptraceStop) StateTypeName() string { return "pkg/sentry/kernel.ptraceStop" } func (s *ptraceStop) StateFields() []string { return []string{ "frozen", "listen", } } func (s *ptraceStop) beforeSave() {} func (s *ptraceStop) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.frozen) stateSinkObject.Save(1, &s.listen) } func (s *ptraceStop) afterLoad() {} func (s *ptraceStop) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.frozen) stateSourceObject.Load(1, &s.listen) } func (o *OldRSeqCriticalRegion) StateTypeName() string { return "pkg/sentry/kernel.OldRSeqCriticalRegion" } func (o *OldRSeqCriticalRegion) StateFields() []string { return []string{ "CriticalSection", "Restart", } } func (o *OldRSeqCriticalRegion) beforeSave() {} func (o *OldRSeqCriticalRegion) StateSave(stateSinkObject state.Sink) { o.beforeSave() stateSinkObject.Save(0, &o.CriticalSection) stateSinkObject.Save(1, &o.Restart) } func (o *OldRSeqCriticalRegion) afterLoad() {} func (o *OldRSeqCriticalRegion) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &o.CriticalSection) stateSourceObject.Load(1, &o.Restart) } func (l *sessionList) StateTypeName() string { return "pkg/sentry/kernel.sessionList" } func (l *sessionList) StateFields() []string { return []string{ "head", "tail", } } func (l *sessionList) beforeSave() {} func (l *sessionList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *sessionList) afterLoad() {} func (l *sessionList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *sessionEntry) StateTypeName() string { return "pkg/sentry/kernel.sessionEntry" } func (e *sessionEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *sessionEntry) beforeSave() {} func (e *sessionEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *sessionEntry) afterLoad() {} func (e *sessionEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func (r *SessionRefs) StateTypeName() string { return "pkg/sentry/kernel.SessionRefs" } func (r *SessionRefs) StateFields() []string { return []string{ "refCount", } } func (r *SessionRefs) beforeSave() {} func (r *SessionRefs) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.refCount) } func (r *SessionRefs) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.refCount) stateSourceObject.AfterLoad(r.afterLoad) } func (s *Session) StateTypeName() string { return "pkg/sentry/kernel.Session" } func (s *Session) StateFields() []string { return []string{ "SessionRefs", "leader", "id", "foreground", "processGroups", "sessionEntry", } } func (s *Session) beforeSave() {} func (s *Session) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.SessionRefs) stateSinkObject.Save(1, &s.leader) stateSinkObject.Save(2, &s.id) stateSinkObject.Save(3, &s.foreground) stateSinkObject.Save(4, &s.processGroups) stateSinkObject.Save(5, &s.sessionEntry) } func (s *Session) afterLoad() {} func (s *Session) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.SessionRefs) stateSourceObject.Load(1, &s.leader) stateSourceObject.Load(2, &s.id) stateSourceObject.Load(3, &s.foreground) stateSourceObject.Load(4, &s.processGroups) stateSourceObject.Load(5, &s.sessionEntry) } func (pg *ProcessGroup) StateTypeName() string { return "pkg/sentry/kernel.ProcessGroup" } func (pg *ProcessGroup) StateFields() []string { return []string{ "refs", "originator", "id", "session", "ancestors", "processGroupEntry", } } func (pg *ProcessGroup) beforeSave() {} func (pg *ProcessGroup) StateSave(stateSinkObject state.Sink) { pg.beforeSave() stateSinkObject.Save(0, &pg.refs) stateSinkObject.Save(1, &pg.originator) stateSinkObject.Save(2, &pg.id) stateSinkObject.Save(3, &pg.session) stateSinkObject.Save(4, &pg.ancestors) stateSinkObject.Save(5, &pg.processGroupEntry) } func (pg *ProcessGroup) afterLoad() {} func (pg *ProcessGroup) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &pg.refs) stateSourceObject.Load(1, &pg.originator) stateSourceObject.Load(2, &pg.id) stateSourceObject.Load(3, &pg.session) stateSourceObject.Load(4, &pg.ancestors) stateSourceObject.Load(5, &pg.processGroupEntry) } func (sh *SignalHandlers) StateTypeName() string { return "pkg/sentry/kernel.SignalHandlers" } func (sh *SignalHandlers) StateFields() []string { return []string{ "actions", } } func (sh *SignalHandlers) beforeSave() {} func (sh *SignalHandlers) StateSave(stateSinkObject state.Sink) { sh.beforeSave() stateSinkObject.Save(0, &sh.actions) } func (sh *SignalHandlers) afterLoad() {} func (sh *SignalHandlers) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &sh.actions) } func (l *socketList) StateTypeName() string { return "pkg/sentry/kernel.socketList" } func (l *socketList) StateFields() []string { return []string{ "head", "tail", } } func (l *socketList) beforeSave() {} func (l *socketList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *socketList) afterLoad() {} func (l *socketList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *socketEntry) StateTypeName() string { return "pkg/sentry/kernel.socketEntry" } func (e *socketEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *socketEntry) beforeSave() {} func (e *socketEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *socketEntry) afterLoad() {} func (e *socketEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func (s *syscallTableInfo) StateTypeName() string { return "pkg/sentry/kernel.syscallTableInfo" } func (s *syscallTableInfo) StateFields() []string { return []string{ "OS", "Arch", } } func (s *syscallTableInfo) beforeSave() {} func (s *syscallTableInfo) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.OS) stateSinkObject.Save(1, &s.Arch) } func (s *syscallTableInfo) afterLoad() {} func (s *syscallTableInfo) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.OS) stateSourceObject.Load(1, &s.Arch) } func (s *syslog) StateTypeName() string { return "pkg/sentry/kernel.syslog" } func (s *syslog) StateFields() []string { return []string{ "msg", } } func (s *syslog) beforeSave() {} func (s *syslog) StateSave(stateSinkObject state.Sink) { s.beforeSave() stateSinkObject.Save(0, &s.msg) } func (s *syslog) afterLoad() {} func (s *syslog) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &s.msg) } func (t *Task) StateTypeName() string { return "pkg/sentry/kernel.Task" } func (t *Task) StateFields() []string { return []string{ "taskNode", "runState", "taskWorkCount", "taskWork", "haveSyscallReturn", "gosched", "yieldCount", "pendingSignals", "signalMask", "realSignalMask", "haveSavedSignalMask", "savedSignalMask", "signalStack", "groupStopPending", "groupStopAcknowledged", "trapStopPending", "trapNotifyPending", "stop", "exitStatus", "syscallRestartBlock", "k", "containerID", "tc", "fsContext", "fdTable", "vforkParent", "exitState", "exitTracerNotified", "exitTracerAcked", "exitParentNotified", "exitParentAcked", "ptraceTracer", "ptraceTracees", "ptraceSeized", "ptraceOpts", "ptraceSyscallMode", "ptraceSinglestep", "ptraceCode", "ptraceSiginfo", "ptraceEventMsg", "ioUsage", "creds", "utsns", "ipcns", "abstractSockets", "mountNamespaceVFS2", "parentDeathSignal", "syscallFilters", "cleartid", "allowedCPUMask", "cpu", "niceness", "numaPolicy", "numaNodeMask", "netns", "rseqCPU", "oldRSeqCPUAddr", "rseqAddr", "rseqSignature", "robustList", "startTime", "kcov", } } func (t *Task) beforeSave() {} func (t *Task) StateSave(stateSinkObject state.Sink) { t.beforeSave() if !state.IsZeroValue(&t.signalQueue) { state.Failf("signalQueue is %#v, expected zero", &t.signalQueue) } var ptraceTracerValue *Task = t.savePtraceTracer() stateSinkObject.SaveValue(31, ptraceTracerValue) var syscallFiltersValue []bpf.Program = t.saveSyscallFilters() stateSinkObject.SaveValue(47, syscallFiltersValue) stateSinkObject.Save(0, &t.taskNode) stateSinkObject.Save(1, &t.runState) stateSinkObject.Save(2, &t.taskWorkCount) stateSinkObject.Save(3, &t.taskWork) stateSinkObject.Save(4, &t.haveSyscallReturn) stateSinkObject.Save(5, &t.gosched) stateSinkObject.Save(6, &t.yieldCount) stateSinkObject.Save(7, &t.pendingSignals) stateSinkObject.Save(8, &t.signalMask) stateSinkObject.Save(9, &t.realSignalMask) stateSinkObject.Save(10, &t.haveSavedSignalMask) stateSinkObject.Save(11, &t.savedSignalMask) stateSinkObject.Save(12, &t.signalStack) stateSinkObject.Save(13, &t.groupStopPending) stateSinkObject.Save(14, &t.groupStopAcknowledged) stateSinkObject.Save(15, &t.trapStopPending) stateSinkObject.Save(16, &t.trapNotifyPending) stateSinkObject.Save(17, &t.stop) stateSinkObject.Save(18, &t.exitStatus) stateSinkObject.Save(19, &t.syscallRestartBlock) stateSinkObject.Save(20, &t.k) stateSinkObject.Save(21, &t.containerID) stateSinkObject.Save(22, &t.tc) stateSinkObject.Save(23, &t.fsContext) stateSinkObject.Save(24, &t.fdTable) stateSinkObject.Save(25, &t.vforkParent) stateSinkObject.Save(26, &t.exitState) stateSinkObject.Save(27, &t.exitTracerNotified) stateSinkObject.Save(28, &t.exitTracerAcked) stateSinkObject.Save(29, &t.exitParentNotified) stateSinkObject.Save(30, &t.exitParentAcked) stateSinkObject.Save(32, &t.ptraceTracees) stateSinkObject.Save(33, &t.ptraceSeized) stateSinkObject.Save(34, &t.ptraceOpts) stateSinkObject.Save(35, &t.ptraceSyscallMode) stateSinkObject.Save(36, &t.ptraceSinglestep) stateSinkObject.Save(37, &t.ptraceCode) stateSinkObject.Save(38, &t.ptraceSiginfo) stateSinkObject.Save(39, &t.ptraceEventMsg) stateSinkObject.Save(40, &t.ioUsage) stateSinkObject.Save(41, &t.creds) stateSinkObject.Save(42, &t.utsns) stateSinkObject.Save(43, &t.ipcns) stateSinkObject.Save(44, &t.abstractSockets) stateSinkObject.Save(45, &t.mountNamespaceVFS2) stateSinkObject.Save(46, &t.parentDeathSignal) stateSinkObject.Save(48, &t.cleartid) stateSinkObject.Save(49, &t.allowedCPUMask) stateSinkObject.Save(50, &t.cpu) stateSinkObject.Save(51, &t.niceness) stateSinkObject.Save(52, &t.numaPolicy) stateSinkObject.Save(53, &t.numaNodeMask) stateSinkObject.Save(54, &t.netns) stateSinkObject.Save(55, &t.rseqCPU) stateSinkObject.Save(56, &t.oldRSeqCPUAddr) stateSinkObject.Save(57, &t.rseqAddr) stateSinkObject.Save(58, &t.rseqSignature) stateSinkObject.Save(59, &t.robustList) stateSinkObject.Save(60, &t.startTime) stateSinkObject.Save(61, &t.kcov) } func (t *Task) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &t.taskNode) stateSourceObject.Load(1, &t.runState) stateSourceObject.Load(2, &t.taskWorkCount) stateSourceObject.Load(3, &t.taskWork) stateSourceObject.Load(4, &t.haveSyscallReturn) stateSourceObject.Load(5, &t.gosched) stateSourceObject.Load(6, &t.yieldCount) stateSourceObject.Load(7, &t.pendingSignals) stateSourceObject.Load(8, &t.signalMask) stateSourceObject.Load(9, &t.realSignalMask) stateSourceObject.Load(10, &t.haveSavedSignalMask) stateSourceObject.Load(11, &t.savedSignalMask) stateSourceObject.Load(12, &t.signalStack) stateSourceObject.Load(13, &t.groupStopPending) stateSourceObject.Load(14, &t.groupStopAcknowledged) stateSourceObject.Load(15, &t.trapStopPending) stateSourceObject.Load(16, &t.trapNotifyPending) stateSourceObject.Load(17, &t.stop) stateSourceObject.Load(18, &t.exitStatus) stateSourceObject.Load(19, &t.syscallRestartBlock) stateSourceObject.Load(20, &t.k) stateSourceObject.Load(21, &t.containerID) stateSourceObject.Load(22, &t.tc) stateSourceObject.Load(23, &t.fsContext) stateSourceObject.Load(24, &t.fdTable) stateSourceObject.Load(25, &t.vforkParent) stateSourceObject.Load(26, &t.exitState) stateSourceObject.Load(27, &t.exitTracerNotified) stateSourceObject.Load(28, &t.exitTracerAcked) stateSourceObject.Load(29, &t.exitParentNotified) stateSourceObject.Load(30, &t.exitParentAcked) stateSourceObject.Load(32, &t.ptraceTracees) stateSourceObject.Load(33, &t.ptraceSeized) stateSourceObject.Load(34, &t.ptraceOpts) stateSourceObject.Load(35, &t.ptraceSyscallMode) stateSourceObject.Load(36, &t.ptraceSinglestep) stateSourceObject.Load(37, &t.ptraceCode) stateSourceObject.Load(38, &t.ptraceSiginfo) stateSourceObject.Load(39, &t.ptraceEventMsg) stateSourceObject.Load(40, &t.ioUsage) stateSourceObject.Load(41, &t.creds) stateSourceObject.Load(42, &t.utsns) stateSourceObject.Load(43, &t.ipcns) stateSourceObject.Load(44, &t.abstractSockets) stateSourceObject.Load(45, &t.mountNamespaceVFS2) stateSourceObject.Load(46, &t.parentDeathSignal) stateSourceObject.Load(48, &t.cleartid) stateSourceObject.Load(49, &t.allowedCPUMask) stateSourceObject.Load(50, &t.cpu) stateSourceObject.Load(51, &t.niceness) stateSourceObject.Load(52, &t.numaPolicy) stateSourceObject.Load(53, &t.numaNodeMask) stateSourceObject.Load(54, &t.netns) stateSourceObject.Load(55, &t.rseqCPU) stateSourceObject.Load(56, &t.oldRSeqCPUAddr) stateSourceObject.Load(57, &t.rseqAddr) stateSourceObject.Load(58, &t.rseqSignature) stateSourceObject.Load(59, &t.robustList) stateSourceObject.Load(60, &t.startTime) stateSourceObject.Load(61, &t.kcov) stateSourceObject.LoadValue(31, new(*Task), func(y interface{}) { t.loadPtraceTracer(y.(*Task)) }) stateSourceObject.LoadValue(47, new([]bpf.Program), func(y interface{}) { t.loadSyscallFilters(y.([]bpf.Program)) }) stateSourceObject.AfterLoad(t.afterLoad) } func (r *runSyscallAfterPtraceEventClone) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterPtraceEventClone" } func (r *runSyscallAfterPtraceEventClone) StateFields() []string { return []string{ "vforkChild", "vforkChildTID", } } func (r *runSyscallAfterPtraceEventClone) beforeSave() {} func (r *runSyscallAfterPtraceEventClone) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.vforkChild) stateSinkObject.Save(1, &r.vforkChildTID) } func (r *runSyscallAfterPtraceEventClone) afterLoad() {} func (r *runSyscallAfterPtraceEventClone) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.vforkChild) stateSourceObject.Load(1, &r.vforkChildTID) } func (r *runSyscallAfterVforkStop) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterVforkStop" } func (r *runSyscallAfterVforkStop) StateFields() []string { return []string{ "childTID", } } func (r *runSyscallAfterVforkStop) beforeSave() {} func (r *runSyscallAfterVforkStop) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.childTID) } func (r *runSyscallAfterVforkStop) afterLoad() {} func (r *runSyscallAfterVforkStop) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.childTID) } func (v *vforkStop) StateTypeName() string { return "pkg/sentry/kernel.vforkStop" } func (v *vforkStop) StateFields() []string { return []string{} } func (v *vforkStop) beforeSave() {} func (v *vforkStop) StateSave(stateSinkObject state.Sink) { v.beforeSave() } func (v *vforkStop) afterLoad() {} func (v *vforkStop) StateLoad(stateSourceObject state.Source) { } func (tc *TaskContext) StateTypeName() string { return "pkg/sentry/kernel.TaskContext" } func (tc *TaskContext) StateFields() []string { return []string{ "Name", "Arch", "MemoryManager", "fu", "st", } } func (tc *TaskContext) beforeSave() {} func (tc *TaskContext) StateSave(stateSinkObject state.Sink) { tc.beforeSave() var stValue syscallTableInfo = tc.saveSt() stateSinkObject.SaveValue(4, stValue) stateSinkObject.Save(0, &tc.Name) stateSinkObject.Save(1, &tc.Arch) stateSinkObject.Save(2, &tc.MemoryManager) stateSinkObject.Save(3, &tc.fu) } func (tc *TaskContext) afterLoad() {} func (tc *TaskContext) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &tc.Name) stateSourceObject.Load(1, &tc.Arch) stateSourceObject.Load(2, &tc.MemoryManager) stateSourceObject.Load(3, &tc.fu) stateSourceObject.LoadValue(4, new(syscallTableInfo), func(y interface{}) { tc.loadSt(y.(syscallTableInfo)) }) } func (e *execStop) StateTypeName() string { return "pkg/sentry/kernel.execStop" } func (e *execStop) StateFields() []string { return []string{} } func (e *execStop) beforeSave() {} func (e *execStop) StateSave(stateSinkObject state.Sink) { e.beforeSave() } func (e *execStop) afterLoad() {} func (e *execStop) StateLoad(stateSourceObject state.Source) { } func (r *runSyscallAfterExecStop) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterExecStop" } func (r *runSyscallAfterExecStop) StateFields() []string { return []string{ "tc", } } func (r *runSyscallAfterExecStop) beforeSave() {} func (r *runSyscallAfterExecStop) StateSave(stateSinkObject state.Sink) { r.beforeSave() stateSinkObject.Save(0, &r.tc) } func (r *runSyscallAfterExecStop) afterLoad() {} func (r *runSyscallAfterExecStop) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &r.tc) } func (es *ExitStatus) StateTypeName() string { return "pkg/sentry/kernel.ExitStatus" } func (es *ExitStatus) StateFields() []string { return []string{ "Code", "Signo", } } func (es *ExitStatus) beforeSave() {} func (es *ExitStatus) StateSave(stateSinkObject state.Sink) { es.beforeSave() stateSinkObject.Save(0, &es.Code) stateSinkObject.Save(1, &es.Signo) } func (es *ExitStatus) afterLoad() {} func (es *ExitStatus) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &es.Code) stateSourceObject.Load(1, &es.Signo) } func (r *runExit) StateTypeName() string { return "pkg/sentry/kernel.runExit" } func (r *runExit) StateFields() []string { return []string{} } func (r *runExit) beforeSave() {} func (r *runExit) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runExit) afterLoad() {} func (r *runExit) StateLoad(stateSourceObject state.Source) { } func (r *runExitMain) StateTypeName() string { return "pkg/sentry/kernel.runExitMain" } func (r *runExitMain) StateFields() []string { return []string{} } func (r *runExitMain) beforeSave() {} func (r *runExitMain) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runExitMain) afterLoad() {} func (r *runExitMain) StateLoad(stateSourceObject state.Source) { } func (r *runExitNotify) StateTypeName() string { return "pkg/sentry/kernel.runExitNotify" } func (r *runExitNotify) StateFields() []string { return []string{} } func (r *runExitNotify) beforeSave() {} func (r *runExitNotify) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runExitNotify) afterLoad() {} func (r *runExitNotify) StateLoad(stateSourceObject state.Source) { } func (l *taskList) StateTypeName() string { return "pkg/sentry/kernel.taskList" } func (l *taskList) StateFields() []string { return []string{ "head", "tail", } } func (l *taskList) beforeSave() {} func (l *taskList) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.head) stateSinkObject.Save(1, &l.tail) } func (l *taskList) afterLoad() {} func (l *taskList) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.head) stateSourceObject.Load(1, &l.tail) } func (e *taskEntry) StateTypeName() string { return "pkg/sentry/kernel.taskEntry" } func (e *taskEntry) StateFields() []string { return []string{ "next", "prev", } } func (e *taskEntry) beforeSave() {} func (e *taskEntry) StateSave(stateSinkObject state.Sink) { e.beforeSave() stateSinkObject.Save(0, &e.next) stateSinkObject.Save(1, &e.prev) } func (e *taskEntry) afterLoad() {} func (e *taskEntry) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &e.next) stateSourceObject.Load(1, &e.prev) } func (app *runApp) StateTypeName() string { return "pkg/sentry/kernel.runApp" } func (app *runApp) StateFields() []string { return []string{} } func (app *runApp) beforeSave() {} func (app *runApp) StateSave(stateSinkObject state.Sink) { app.beforeSave() } func (app *runApp) afterLoad() {} func (app *runApp) StateLoad(stateSourceObject state.Source) { } func (ts *TaskGoroutineSchedInfo) StateTypeName() string { return "pkg/sentry/kernel.TaskGoroutineSchedInfo" } func (ts *TaskGoroutineSchedInfo) StateFields() []string { return []string{ "Timestamp", "State", "UserTicks", "SysTicks", } } func (ts *TaskGoroutineSchedInfo) beforeSave() {} func (ts *TaskGoroutineSchedInfo) StateSave(stateSinkObject state.Sink) { ts.beforeSave() stateSinkObject.Save(0, &ts.Timestamp) stateSinkObject.Save(1, &ts.State) stateSinkObject.Save(2, &ts.UserTicks) stateSinkObject.Save(3, &ts.SysTicks) } func (ts *TaskGoroutineSchedInfo) afterLoad() {} func (ts *TaskGoroutineSchedInfo) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &ts.Timestamp) stateSourceObject.Load(1, &ts.State) stateSourceObject.Load(2, &ts.UserTicks) stateSourceObject.Load(3, &ts.SysTicks) } func (tc *taskClock) StateTypeName() string { return "pkg/sentry/kernel.taskClock" } func (tc *taskClock) StateFields() []string { return []string{ "t", "includeSys", } } func (tc *taskClock) beforeSave() {} func (tc *taskClock) StateSave(stateSinkObject state.Sink) { tc.beforeSave() stateSinkObject.Save(0, &tc.t) stateSinkObject.Save(1, &tc.includeSys) } func (tc *taskClock) afterLoad() {} func (tc *taskClock) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &tc.t) stateSourceObject.Load(1, &tc.includeSys) } func (tgc *tgClock) StateTypeName() string { return "pkg/sentry/kernel.tgClock" } func (tgc *tgClock) StateFields() []string { return []string{ "tg", "includeSys", } } func (tgc *tgClock) beforeSave() {} func (tgc *tgClock) StateSave(stateSinkObject state.Sink) { tgc.beforeSave() stateSinkObject.Save(0, &tgc.tg) stateSinkObject.Save(1, &tgc.includeSys) } func (tgc *tgClock) afterLoad() {} func (tgc *tgClock) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &tgc.tg) stateSourceObject.Load(1, &tgc.includeSys) } func (g *groupStop) StateTypeName() string { return "pkg/sentry/kernel.groupStop" } func (g *groupStop) StateFields() []string { return []string{} } func (g *groupStop) beforeSave() {} func (g *groupStop) StateSave(stateSinkObject state.Sink) { g.beforeSave() } func (g *groupStop) afterLoad() {} func (g *groupStop) StateLoad(stateSourceObject state.Source) { } func (r *runInterrupt) StateTypeName() string { return "pkg/sentry/kernel.runInterrupt" } func (r *runInterrupt) StateFields() []string { return []string{} } func (r *runInterrupt) beforeSave() {} func (r *runInterrupt) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runInterrupt) afterLoad() {} func (r *runInterrupt) StateLoad(stateSourceObject state.Source) { } func (r *runInterruptAfterSignalDeliveryStop) StateTypeName() string { return "pkg/sentry/kernel.runInterruptAfterSignalDeliveryStop" } func (r *runInterruptAfterSignalDeliveryStop) StateFields() []string { return []string{} } func (r *runInterruptAfterSignalDeliveryStop) beforeSave() {} func (r *runInterruptAfterSignalDeliveryStop) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runInterruptAfterSignalDeliveryStop) afterLoad() {} func (r *runInterruptAfterSignalDeliveryStop) StateLoad(stateSourceObject state.Source) { } func (r *runSyscallAfterSyscallEnterStop) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterSyscallEnterStop" } func (r *runSyscallAfterSyscallEnterStop) StateFields() []string { return []string{} } func (r *runSyscallAfterSyscallEnterStop) beforeSave() {} func (r *runSyscallAfterSyscallEnterStop) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runSyscallAfterSyscallEnterStop) afterLoad() {} func (r *runSyscallAfterSyscallEnterStop) StateLoad(stateSourceObject state.Source) { } func (r *runSyscallAfterSysemuStop) StateTypeName() string { return "pkg/sentry/kernel.runSyscallAfterSysemuStop" } func (r *runSyscallAfterSysemuStop) StateFields() []string { return []string{} } func (r *runSyscallAfterSysemuStop) beforeSave() {} func (r *runSyscallAfterSysemuStop) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runSyscallAfterSysemuStop) afterLoad() {} func (r *runSyscallAfterSysemuStop) StateLoad(stateSourceObject state.Source) { } func (r *runSyscallReinvoke) StateTypeName() string { return "pkg/sentry/kernel.runSyscallReinvoke" } func (r *runSyscallReinvoke) StateFields() []string { return []string{} } func (r *runSyscallReinvoke) beforeSave() {} func (r *runSyscallReinvoke) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runSyscallReinvoke) afterLoad() {} func (r *runSyscallReinvoke) StateLoad(stateSourceObject state.Source) { } func (r *runSyscallExit) StateTypeName() string { return "pkg/sentry/kernel.runSyscallExit" } func (r *runSyscallExit) StateFields() []string { return []string{} } func (r *runSyscallExit) beforeSave() {} func (r *runSyscallExit) StateSave(stateSinkObject state.Sink) { r.beforeSave() } func (r *runSyscallExit) afterLoad() {} func (r *runSyscallExit) StateLoad(stateSourceObject state.Source) { } func (tg *ThreadGroup) StateTypeName() string { return "pkg/sentry/kernel.ThreadGroup" } func (tg *ThreadGroup) StateFields() []string { return []string{ "threadGroupNode", "signalHandlers", "pendingSignals", "groupStopDequeued", "groupStopSignal", "groupStopPendingCount", "groupStopComplete", "groupStopWaitable", "groupContNotify", "groupContInterrupted", "groupContWaitable", "exiting", "exitStatus", "terminationSignal", "itimerRealTimer", "itimerVirtSetting", "itimerProfSetting", "rlimitCPUSoftSetting", "cpuTimersEnabled", "timers", "nextTimerID", "exitedCPUStats", "childCPUStats", "ioUsage", "maxRSS", "childMaxRSS", "limits", "processGroup", "execed", "oldRSeqCritical", "mounts", "tty", "oomScoreAdj", } } func (tg *ThreadGroup) beforeSave() {} func (tg *ThreadGroup) StateSave(stateSinkObject state.Sink) { tg.beforeSave() var oldRSeqCriticalValue *OldRSeqCriticalRegion = tg.saveOldRSeqCritical() stateSinkObject.SaveValue(29, oldRSeqCriticalValue) stateSinkObject.Save(0, &tg.threadGroupNode) stateSinkObject.Save(1, &tg.signalHandlers) stateSinkObject.Save(2, &tg.pendingSignals) stateSinkObject.Save(3, &tg.groupStopDequeued) stateSinkObject.Save(4, &tg.groupStopSignal) stateSinkObject.Save(5, &tg.groupStopPendingCount) stateSinkObject.Save(6, &tg.groupStopComplete) stateSinkObject.Save(7, &tg.groupStopWaitable) stateSinkObject.Save(8, &tg.groupContNotify) stateSinkObject.Save(9, &tg.groupContInterrupted) stateSinkObject.Save(10, &tg.groupContWaitable) stateSinkObject.Save(11, &tg.exiting) stateSinkObject.Save(12, &tg.exitStatus) stateSinkObject.Save(13, &tg.terminationSignal) stateSinkObject.Save(14, &tg.itimerRealTimer) stateSinkObject.Save(15, &tg.itimerVirtSetting) stateSinkObject.Save(16, &tg.itimerProfSetting) stateSinkObject.Save(17, &tg.rlimitCPUSoftSetting) stateSinkObject.Save(18, &tg.cpuTimersEnabled) stateSinkObject.Save(19, &tg.timers) stateSinkObject.Save(20, &tg.nextTimerID) stateSinkObject.Save(21, &tg.exitedCPUStats) stateSinkObject.Save(22, &tg.childCPUStats) stateSinkObject.Save(23, &tg.ioUsage) stateSinkObject.Save(24, &tg.maxRSS) stateSinkObject.Save(25, &tg.childMaxRSS) stateSinkObject.Save(26, &tg.limits) stateSinkObject.Save(27, &tg.processGroup) stateSinkObject.Save(28, &tg.execed) stateSinkObject.Save(30, &tg.mounts) stateSinkObject.Save(31, &tg.tty) stateSinkObject.Save(32, &tg.oomScoreAdj) } func (tg *ThreadGroup) afterLoad() {} func (tg *ThreadGroup) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &tg.threadGroupNode) stateSourceObject.Load(1, &tg.signalHandlers) stateSourceObject.Load(2, &tg.pendingSignals) stateSourceObject.Load(3, &tg.groupStopDequeued) stateSourceObject.Load(4, &tg.groupStopSignal) stateSourceObject.Load(5, &tg.groupStopPendingCount) stateSourceObject.Load(6, &tg.groupStopComplete) stateSourceObject.Load(7, &tg.groupStopWaitable) stateSourceObject.Load(8, &tg.groupContNotify) stateSourceObject.Load(9, &tg.groupContInterrupted) stateSourceObject.Load(10, &tg.groupContWaitable) stateSourceObject.Load(11, &tg.exiting) stateSourceObject.Load(12, &tg.exitStatus) stateSourceObject.Load(13, &tg.terminationSignal) stateSourceObject.Load(14, &tg.itimerRealTimer) stateSourceObject.Load(15, &tg.itimerVirtSetting) stateSourceObject.Load(16, &tg.itimerProfSetting) stateSourceObject.Load(17, &tg.rlimitCPUSoftSetting) stateSourceObject.Load(18, &tg.cpuTimersEnabled) stateSourceObject.Load(19, &tg.timers) stateSourceObject.Load(20, &tg.nextTimerID) stateSourceObject.Load(21, &tg.exitedCPUStats) stateSourceObject.Load(22, &tg.childCPUStats) stateSourceObject.Load(23, &tg.ioUsage) stateSourceObject.Load(24, &tg.maxRSS) stateSourceObject.Load(25, &tg.childMaxRSS) stateSourceObject.Load(26, &tg.limits) stateSourceObject.Load(27, &tg.processGroup) stateSourceObject.Load(28, &tg.execed) stateSourceObject.Load(30, &tg.mounts) stateSourceObject.Load(31, &tg.tty) stateSourceObject.Load(32, &tg.oomScoreAdj) stateSourceObject.LoadValue(29, new(*OldRSeqCriticalRegion), func(y interface{}) { tg.loadOldRSeqCritical(y.(*OldRSeqCriticalRegion)) }) } func (l *itimerRealListener) StateTypeName() string { return "pkg/sentry/kernel.itimerRealListener" } func (l *itimerRealListener) StateFields() []string { return []string{ "tg", } } func (l *itimerRealListener) beforeSave() {} func (l *itimerRealListener) StateSave(stateSinkObject state.Sink) { l.beforeSave() stateSinkObject.Save(0, &l.tg) } func (l *itimerRealListener) afterLoad() {} func (l *itimerRealListener) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &l.tg) } func (ts *TaskSet) StateTypeName() string { return "pkg/sentry/kernel.TaskSet" } func (ts *TaskSet) StateFields() []string { return []string{ "Root", "sessions", } } func (ts *TaskSet) beforeSave() {} func (ts *TaskSet) StateSave(stateSinkObject state.Sink) { ts.beforeSave() stateSinkObject.Save(0, &ts.Root) stateSinkObject.Save(1, &ts.sessions) } func (ts *TaskSet) afterLoad() {} func (ts *TaskSet) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &ts.Root) stateSourceObject.Load(1, &ts.sessions) } func (ns *PIDNamespace) StateTypeName() string { return "pkg/sentry/kernel.PIDNamespace" } func (ns *PIDNamespace) StateFields() []string { return []string{ "owner", "parent", "userns", "last", "tasks", "tids", "tgids", "sessions", "sids", "processGroups", "pgids", "exiting", } } func (ns *PIDNamespace) beforeSave() {} func (ns *PIDNamespace) StateSave(stateSinkObject state.Sink) { ns.beforeSave() stateSinkObject.Save(0, &ns.owner) stateSinkObject.Save(1, &ns.parent) stateSinkObject.Save(2, &ns.userns) stateSinkObject.Save(3, &ns.last) stateSinkObject.Save(4, &ns.tasks) stateSinkObject.Save(5, &ns.tids) stateSinkObject.Save(6, &ns.tgids) stateSinkObject.Save(7, &ns.sessions) stateSinkObject.Save(8, &ns.sids) stateSinkObject.Save(9, &ns.processGroups) stateSinkObject.Save(10, &ns.pgids) stateSinkObject.Save(11, &ns.exiting) } func (ns *PIDNamespace) afterLoad() {} func (ns *PIDNamespace) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &ns.owner) stateSourceObject.Load(1, &ns.parent) stateSourceObject.Load(2, &ns.userns) stateSourceObject.Load(3, &ns.last) stateSourceObject.Load(4, &ns.tasks) stateSourceObject.Load(5, &ns.tids) stateSourceObject.Load(6, &ns.tgids) stateSourceObject.Load(7, &ns.sessions) stateSourceObject.Load(8, &ns.sids) stateSourceObject.Load(9, &ns.processGroups) stateSourceObject.Load(10, &ns.pgids) stateSourceObject.Load(11, &ns.exiting) } func (t *threadGroupNode) StateTypeName() string { return "pkg/sentry/kernel.threadGroupNode" } func (t *threadGroupNode) StateFields() []string { return []string{ "pidns", "leader", "execing", "tasks", "tasksCount", "liveTasks", "activeTasks", } } func (t *threadGroupNode) beforeSave() {} func (t *threadGroupNode) StateSave(stateSinkObject state.Sink) { t.beforeSave() stateSinkObject.Save(0, &t.pidns) stateSinkObject.Save(1, &t.leader) stateSinkObject.Save(2, &t.execing) stateSinkObject.Save(3, &t.tasks) stateSinkObject.Save(4, &t.tasksCount) stateSinkObject.Save(5, &t.liveTasks) stateSinkObject.Save(6, &t.activeTasks) } func (t *threadGroupNode) afterLoad() {} func (t *threadGroupNode) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &t.pidns) stateSourceObject.Load(1, &t.leader) stateSourceObject.Load(2, &t.execing) stateSourceObject.Load(3, &t.tasks) stateSourceObject.Load(4, &t.tasksCount) stateSourceObject.Load(5, &t.liveTasks) stateSourceObject.Load(6, &t.activeTasks) } func (t *taskNode) StateTypeName() string { return "pkg/sentry/kernel.taskNode" } func (t *taskNode) StateFields() []string { return []string{ "tg", "taskEntry", "parent", "children", "childPIDNamespace", } } func (t *taskNode) beforeSave() {} func (t *taskNode) StateSave(stateSinkObject state.Sink) { t.beforeSave() stateSinkObject.Save(0, &t.tg) stateSinkObject.Save(1, &t.taskEntry) stateSinkObject.Save(2, &t.parent) stateSinkObject.Save(3, &t.children) stateSinkObject.Save(4, &t.childPIDNamespace) } func (t *taskNode) afterLoad() {} func (t *taskNode) StateLoad(stateSourceObject state.Source) { stateSourceObject.LoadWait(0, &t.tg) stateSourceObject.Load(1, &t.taskEntry) stateSourceObject.Load(2, &t.parent) stateSourceObject.Load(3, &t.children) stateSourceObject.Load(4, &t.childPIDNamespace) } func (t *Timekeeper) StateTypeName() string { return "pkg/sentry/kernel.Timekeeper" } func (t *Timekeeper) StateFields() []string { return []string{ "bootTime", "saveMonotonic", "saveRealtime", "params", } } func (t *Timekeeper) StateSave(stateSinkObject state.Sink) { t.beforeSave() stateSinkObject.Save(0, &t.bootTime) stateSinkObject.Save(1, &t.saveMonotonic) stateSinkObject.Save(2, &t.saveRealtime) stateSinkObject.Save(3, &t.params) } func (t *Timekeeper) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &t.bootTime) stateSourceObject.Load(1, &t.saveMonotonic) stateSourceObject.Load(2, &t.saveRealtime) stateSourceObject.Load(3, &t.params) stateSourceObject.AfterLoad(t.afterLoad) } func (tc *timekeeperClock) StateTypeName() string { return "pkg/sentry/kernel.timekeeperClock" } func (tc *timekeeperClock) StateFields() []string { return []string{ "tk", "c", } } func (tc *timekeeperClock) beforeSave() {} func (tc *timekeeperClock) StateSave(stateSinkObject state.Sink) { tc.beforeSave() stateSinkObject.Save(0, &tc.tk) stateSinkObject.Save(1, &tc.c) } func (tc *timekeeperClock) afterLoad() {} func (tc *timekeeperClock) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &tc.tk) stateSourceObject.Load(1, &tc.c) } func (t *TTY) StateTypeName() string { return "pkg/sentry/kernel.TTY" } func (t *TTY) StateFields() []string { return []string{ "Index", "tg", } } func (t *TTY) beforeSave() {} func (t *TTY) StateSave(stateSinkObject state.Sink) { t.beforeSave() stateSinkObject.Save(0, &t.Index) stateSinkObject.Save(1, &t.tg) } func (t *TTY) afterLoad() {} func (t *TTY) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &t.Index) stateSourceObject.Load(1, &t.tg) } func (u *UTSNamespace) StateTypeName() string { return "pkg/sentry/kernel.UTSNamespace" } func (u *UTSNamespace) StateFields() []string { return []string{ "hostName", "domainName", "userns", } } func (u *UTSNamespace) beforeSave() {} func (u *UTSNamespace) StateSave(stateSinkObject state.Sink) { u.beforeSave() stateSinkObject.Save(0, &u.hostName) stateSinkObject.Save(1, &u.domainName) stateSinkObject.Save(2, &u.userns) } func (u *UTSNamespace) afterLoad() {} func (u *UTSNamespace) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &u.hostName) stateSourceObject.Load(1, &u.domainName) stateSourceObject.Load(2, &u.userns) } func (v *VDSOParamPage) StateTypeName() string { return "pkg/sentry/kernel.VDSOParamPage" } func (v *VDSOParamPage) StateFields() []string { return []string{ "mfp", "fr", "seq", "copyScratchBuffer", } } func (v *VDSOParamPage) beforeSave() {} func (v *VDSOParamPage) StateSave(stateSinkObject state.Sink) { v.beforeSave() stateSinkObject.Save(0, &v.mfp) stateSinkObject.Save(1, &v.fr) stateSinkObject.Save(2, &v.seq) stateSinkObject.Save(3, &v.copyScratchBuffer) } func (v *VDSOParamPage) afterLoad() {} func (v *VDSOParamPage) StateLoad(stateSourceObject state.Source) { stateSourceObject.Load(0, &v.mfp) stateSourceObject.Load(1, &v.fr) stateSourceObject.Load(2, &v.seq) stateSourceObject.Load(3, &v.copyScratchBuffer) } func init() { state.Register((*abstractEndpoint)(nil)) state.Register((*AbstractSocketNamespace)(nil)) state.Register((*FDFlags)(nil)) state.Register((*descriptor)(nil)) state.Register((*FDTable)(nil)) state.Register((*FDTableRefs)(nil)) state.Register((*FSContext)(nil)) state.Register((*FSContextRefs)(nil)) state.Register((*IPCNamespace)(nil)) state.Register((*IPCNamespaceRefs)(nil)) state.Register((*Kernel)(nil)) state.Register((*SocketRecord)(nil)) state.Register((*SocketRecordVFS1)(nil)) state.Register((*pendingSignals)(nil)) state.Register((*pendingSignalQueue)(nil)) state.Register((*pendingSignal)(nil)) state.Register((*pendingSignalList)(nil)) state.Register((*pendingSignalEntry)(nil)) state.Register((*savedPendingSignal)(nil)) state.Register((*IntervalTimer)(nil)) state.Register((*processGroupList)(nil)) state.Register((*processGroupEntry)(nil)) state.Register((*ProcessGroupRefs)(nil)) state.Register((*ptraceOptions)(nil)) state.Register((*ptraceStop)(nil)) state.Register((*OldRSeqCriticalRegion)(nil)) state.Register((*sessionList)(nil)) state.Register((*sessionEntry)(nil)) state.Register((*SessionRefs)(nil)) state.Register((*Session)(nil)) state.Register((*ProcessGroup)(nil)) state.Register((*SignalHandlers)(nil)) state.Register((*socketList)(nil)) state.Register((*socketEntry)(nil)) state.Register((*syscallTableInfo)(nil)) state.Register((*syslog)(nil)) state.Register((*Task)(nil)) state.Register((*runSyscallAfterPtraceEventClone)(nil)) state.Register((*runSyscallAfterVforkStop)(nil)) state.Register((*vforkStop)(nil)) state.Register((*TaskContext)(nil)) state.Register((*execStop)(nil)) state.Register((*runSyscallAfterExecStop)(nil)) state.Register((*ExitStatus)(nil)) state.Register((*runExit)(nil)) state.Register((*runExitMain)(nil)) state.Register((*runExitNotify)(nil)) state.Register((*taskList)(nil)) state.Register((*taskEntry)(nil)) state.Register((*runApp)(nil)) state.Register((*TaskGoroutineSchedInfo)(nil)) state.Register((*taskClock)(nil)) state.Register((*tgClock)(nil)) state.Register((*groupStop)(nil)) state.Register((*runInterrupt)(nil)) state.Register((*runInterruptAfterSignalDeliveryStop)(nil)) state.Register((*runSyscallAfterSyscallEnterStop)(nil)) state.Register((*runSyscallAfterSysemuStop)(nil)) state.Register((*runSyscallReinvoke)(nil)) state.Register((*runSyscallExit)(nil)) state.Register((*ThreadGroup)(nil)) state.Register((*itimerRealListener)(nil)) state.Register((*TaskSet)(nil)) state.Register((*PIDNamespace)(nil)) state.Register((*threadGroupNode)(nil)) state.Register((*taskNode)(nil)) state.Register((*Timekeeper)(nil)) state.Register((*timekeeperClock)(nil)) state.Register((*TTY)(nil)) state.Register((*UTSNamespace)(nil)) state.Register((*VDSOParamPage)(nil)) }