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
|
// automatically generated by stateify.
package arch
import (
"gvisor.dev/gvisor/pkg/state"
)
func (m *MmapLayout) StateTypeName() string {
return "pkg/sentry/arch.MmapLayout"
}
func (m *MmapLayout) StateFields() []string {
return []string{
"MinAddr",
"MaxAddr",
"BottomUpBase",
"TopDownBase",
"DefaultDirection",
"MaxStackRand",
}
}
func (m *MmapLayout) beforeSave() {}
// +checklocksignore
func (m *MmapLayout) StateSave(stateSinkObject state.Sink) {
m.beforeSave()
stateSinkObject.Save(0, &m.MinAddr)
stateSinkObject.Save(1, &m.MaxAddr)
stateSinkObject.Save(2, &m.BottomUpBase)
stateSinkObject.Save(3, &m.TopDownBase)
stateSinkObject.Save(4, &m.DefaultDirection)
stateSinkObject.Save(5, &m.MaxStackRand)
}
func (m *MmapLayout) afterLoad() {}
// +checklocksignore
func (m *MmapLayout) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &m.MinAddr)
stateSourceObject.Load(1, &m.MaxAddr)
stateSourceObject.Load(2, &m.BottomUpBase)
stateSourceObject.Load(3, &m.TopDownBase)
stateSourceObject.Load(4, &m.DefaultDirection)
stateSourceObject.Load(5, &m.MaxStackRand)
}
func (a *AuxEntry) StateTypeName() string {
return "pkg/sentry/arch.AuxEntry"
}
func (a *AuxEntry) StateFields() []string {
return []string{
"Key",
"Value",
}
}
func (a *AuxEntry) beforeSave() {}
// +checklocksignore
func (a *AuxEntry) StateSave(stateSinkObject state.Sink) {
a.beforeSave()
stateSinkObject.Save(0, &a.Key)
stateSinkObject.Save(1, &a.Value)
}
func (a *AuxEntry) afterLoad() {}
// +checklocksignore
func (a *AuxEntry) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &a.Key)
stateSourceObject.Load(1, &a.Value)
}
func init() {
state.Register((*MmapLayout)(nil))
state.Register((*AuxEntry)(nil))
}
|