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
|
// automatically generated by stateify.
package ipc
import (
"gvisor.dev/gvisor/pkg/state"
)
func (o *Object) StateTypeName() string {
return "pkg/sentry/kernel/ipc.Object"
}
func (o *Object) StateFields() []string {
return []string{
"UserNS",
"ID",
"Key",
"Creator",
"Owner",
"Perms",
}
}
func (o *Object) beforeSave() {}
// +checklocksignore
func (o *Object) StateSave(stateSinkObject state.Sink) {
o.beforeSave()
stateSinkObject.Save(0, &o.UserNS)
stateSinkObject.Save(1, &o.ID)
stateSinkObject.Save(2, &o.Key)
stateSinkObject.Save(3, &o.Creator)
stateSinkObject.Save(4, &o.Owner)
stateSinkObject.Save(5, &o.Perms)
}
func (o *Object) afterLoad() {}
// +checklocksignore
func (o *Object) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &o.UserNS)
stateSourceObject.Load(1, &o.ID)
stateSourceObject.Load(2, &o.Key)
stateSourceObject.Load(3, &o.Creator)
stateSourceObject.Load(4, &o.Owner)
stateSourceObject.Load(5, &o.Perms)
}
func (r *Registry) StateTypeName() string {
return "pkg/sentry/kernel/ipc.Registry"
}
func (r *Registry) StateFields() []string {
return []string{
"UserNS",
"objects",
"keysToIDs",
"lastIDUsed",
}
}
func (r *Registry) beforeSave() {}
// +checklocksignore
func (r *Registry) StateSave(stateSinkObject state.Sink) {
r.beforeSave()
stateSinkObject.Save(0, &r.UserNS)
stateSinkObject.Save(1, &r.objects)
stateSinkObject.Save(2, &r.keysToIDs)
stateSinkObject.Save(3, &r.lastIDUsed)
}
func (r *Registry) afterLoad() {}
// +checklocksignore
func (r *Registry) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &r.UserNS)
stateSourceObject.Load(1, &r.objects)
stateSourceObject.Load(2, &r.keysToIDs)
stateSourceObject.Load(3, &r.lastIDUsed)
}
func init() {
state.Register((*Object)(nil))
state.Register((*Registry)(nil))
}
|