1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
// automatically generated by stateify.
package host
import (
"gvisor.dev/gvisor/pkg/state"
)
func (x *descriptor) save(m state.Map) {
x.beforeSave()
m.Save("origFD", &x.origFD)
m.Save("wouldBlock", &x.wouldBlock)
}
func (x *descriptor) load(m state.Map) {
m.Load("origFD", &x.origFD)
m.Load("wouldBlock", &x.wouldBlock)
m.AfterLoad(x.afterLoad)
}
func (x *fileOperations) beforeSave() {}
func (x *fileOperations) save(m state.Map) {
x.beforeSave()
m.Save("iops", &x.iops)
m.Save("dirCursor", &x.dirCursor)
}
func (x *fileOperations) afterLoad() {}
func (x *fileOperations) load(m state.Map) {
m.LoadWait("iops", &x.iops)
m.Load("dirCursor", &x.dirCursor)
}
func (x *filesystem) beforeSave() {}
func (x *filesystem) save(m state.Map) {
x.beforeSave()
}
func (x *filesystem) afterLoad() {}
func (x *filesystem) load(m state.Map) {
}
func (x *inodeOperations) beforeSave() {}
func (x *inodeOperations) save(m state.Map) {
x.beforeSave()
m.Save("fileState", &x.fileState)
m.Save("cachingInodeOps", &x.cachingInodeOps)
}
func (x *inodeOperations) afterLoad() {}
func (x *inodeOperations) load(m state.Map) {
m.LoadWait("fileState", &x.fileState)
m.Load("cachingInodeOps", &x.cachingInodeOps)
}
func (x *inodeFileState) beforeSave() {}
func (x *inodeFileState) save(m state.Map) {
x.beforeSave()
if !state.IsZeroValue(x.queue) {
m.Failf("queue is %v, expected zero", x.queue)
}
m.Save("descriptor", &x.descriptor)
m.Save("sattr", &x.sattr)
m.Save("savedUAttr", &x.savedUAttr)
}
func (x *inodeFileState) load(m state.Map) {
m.LoadWait("descriptor", &x.descriptor)
m.LoadWait("sattr", &x.sattr)
m.Load("savedUAttr", &x.savedUAttr)
m.AfterLoad(x.afterLoad)
}
func (x *ConnectedEndpoint) save(m state.Map) {
x.beforeSave()
m.Save("ref", &x.ref)
m.Save("queue", &x.queue)
m.Save("path", &x.path)
m.Save("srfd", &x.srfd)
m.Save("stype", &x.stype)
}
func (x *ConnectedEndpoint) load(m state.Map) {
m.Load("ref", &x.ref)
m.Load("queue", &x.queue)
m.Load("path", &x.path)
m.LoadWait("srfd", &x.srfd)
m.Load("stype", &x.stype)
m.AfterLoad(x.afterLoad)
}
func (x *TTYFileOperations) beforeSave() {}
func (x *TTYFileOperations) save(m state.Map) {
x.beforeSave()
m.Save("fileOperations", &x.fileOperations)
m.Save("session", &x.session)
m.Save("fgProcessGroup", &x.fgProcessGroup)
m.Save("termios", &x.termios)
}
func (x *TTYFileOperations) afterLoad() {}
func (x *TTYFileOperations) load(m state.Map) {
m.Load("fileOperations", &x.fileOperations)
m.Load("session", &x.session)
m.Load("fgProcessGroup", &x.fgProcessGroup)
m.Load("termios", &x.termios)
}
func init() {
state.Register("pkg/sentry/fs/host.descriptor", (*descriptor)(nil), state.Fns{Save: (*descriptor).save, Load: (*descriptor).load})
state.Register("pkg/sentry/fs/host.fileOperations", (*fileOperations)(nil), state.Fns{Save: (*fileOperations).save, Load: (*fileOperations).load})
state.Register("pkg/sentry/fs/host.filesystem", (*filesystem)(nil), state.Fns{Save: (*filesystem).save, Load: (*filesystem).load})
state.Register("pkg/sentry/fs/host.inodeOperations", (*inodeOperations)(nil), state.Fns{Save: (*inodeOperations).save, Load: (*inodeOperations).load})
state.Register("pkg/sentry/fs/host.inodeFileState", (*inodeFileState)(nil), state.Fns{Save: (*inodeFileState).save, Load: (*inodeFileState).load})
state.Register("pkg/sentry/fs/host.ConnectedEndpoint", (*ConnectedEndpoint)(nil), state.Fns{Save: (*ConnectedEndpoint).save, Load: (*ConnectedEndpoint).load})
state.Register("pkg/sentry/fs/host.TTYFileOperations", (*TTYFileOperations)(nil), state.Fns{Save: (*TTYFileOperations).save, Load: (*TTYFileOperations).load})
}
|