diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-24 06:37:35 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-24 06:37:35 +0000 |
commit | 9183888b520beeee8609170819a28bea89202909 (patch) | |
tree | 3cdcfa4de9ced4c539ab7c57e4cf58ffea980f6c /pkg/sentry/syscalls | |
parent | cab13958a54419262aba2a0cd7f1075ed02c8ee0 (diff) | |
parent | 364ac92baf83f2352f78b718090472639bd92a76 (diff) |
Merge release-20200608.0-119-g364ac92ba (automated)
Diffstat (limited to 'pkg/sentry/syscalls')
-rw-r--r-- | pkg/sentry/syscalls/linux/linux_state_autogen.go | 106 | ||||
-rw-r--r-- | pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go | 32 |
2 files changed, 98 insertions, 40 deletions
diff --git a/pkg/sentry/syscalls/linux/linux_state_autogen.go b/pkg/sentry/syscalls/linux/linux_state_autogen.go index c76ccd1d5..8d70a3ee6 100644 --- a/pkg/sentry/syscalls/linux/linux_state_autogen.go +++ b/pkg/sentry/syscalls/linux/linux_state_autogen.go @@ -6,57 +6,101 @@ import ( "gvisor.dev/gvisor/pkg/state" ) +func (x *futexWaitRestartBlock) StateTypeName() string { + return "pkg/sentry/syscalls/linux.futexWaitRestartBlock" +} + +func (x *futexWaitRestartBlock) StateFields() []string { + return []string{ + "duration", + "addr", + "private", + "val", + "mask", + } +} + func (x *futexWaitRestartBlock) beforeSave() {} -func (x *futexWaitRestartBlock) save(m state.Map) { + +func (x *futexWaitRestartBlock) StateSave(m state.Sink) { x.beforeSave() - m.Save("duration", &x.duration) - m.Save("addr", &x.addr) - m.Save("private", &x.private) - m.Save("val", &x.val) - m.Save("mask", &x.mask) + m.Save(0, &x.duration) + m.Save(1, &x.addr) + m.Save(2, &x.private) + m.Save(3, &x.val) + m.Save(4, &x.mask) } func (x *futexWaitRestartBlock) afterLoad() {} -func (x *futexWaitRestartBlock) load(m state.Map) { - m.Load("duration", &x.duration) - m.Load("addr", &x.addr) - m.Load("private", &x.private) - m.Load("val", &x.val) - m.Load("mask", &x.mask) + +func (x *futexWaitRestartBlock) StateLoad(m state.Source) { + m.Load(0, &x.duration) + m.Load(1, &x.addr) + m.Load(2, &x.private) + m.Load(3, &x.val) + m.Load(4, &x.mask) +} + +func (x *pollRestartBlock) StateTypeName() string { + return "pkg/sentry/syscalls/linux.pollRestartBlock" +} + +func (x *pollRestartBlock) StateFields() []string { + return []string{ + "pfdAddr", + "nfds", + "timeout", + } } func (x *pollRestartBlock) beforeSave() {} -func (x *pollRestartBlock) save(m state.Map) { + +func (x *pollRestartBlock) StateSave(m state.Sink) { x.beforeSave() - m.Save("pfdAddr", &x.pfdAddr) - m.Save("nfds", &x.nfds) - m.Save("timeout", &x.timeout) + m.Save(0, &x.pfdAddr) + m.Save(1, &x.nfds) + m.Save(2, &x.timeout) } func (x *pollRestartBlock) afterLoad() {} -func (x *pollRestartBlock) load(m state.Map) { - m.Load("pfdAddr", &x.pfdAddr) - m.Load("nfds", &x.nfds) - m.Load("timeout", &x.timeout) + +func (x *pollRestartBlock) StateLoad(m state.Source) { + m.Load(0, &x.pfdAddr) + m.Load(1, &x.nfds) + m.Load(2, &x.timeout) +} + +func (x *clockNanosleepRestartBlock) StateTypeName() string { + return "pkg/sentry/syscalls/linux.clockNanosleepRestartBlock" +} + +func (x *clockNanosleepRestartBlock) StateFields() []string { + return []string{ + "c", + "duration", + "rem", + } } func (x *clockNanosleepRestartBlock) beforeSave() {} -func (x *clockNanosleepRestartBlock) save(m state.Map) { + +func (x *clockNanosleepRestartBlock) StateSave(m state.Sink) { x.beforeSave() - m.Save("c", &x.c) - m.Save("duration", &x.duration) - m.Save("rem", &x.rem) + m.Save(0, &x.c) + m.Save(1, &x.duration) + m.Save(2, &x.rem) } func (x *clockNanosleepRestartBlock) afterLoad() {} -func (x *clockNanosleepRestartBlock) load(m state.Map) { - m.Load("c", &x.c) - m.Load("duration", &x.duration) - m.Load("rem", &x.rem) + +func (x *clockNanosleepRestartBlock) StateLoad(m state.Source) { + m.Load(0, &x.c) + m.Load(1, &x.duration) + m.Load(2, &x.rem) } func init() { - state.Register("pkg/sentry/syscalls/linux.futexWaitRestartBlock", (*futexWaitRestartBlock)(nil), state.Fns{Save: (*futexWaitRestartBlock).save, Load: (*futexWaitRestartBlock).load}) - state.Register("pkg/sentry/syscalls/linux.pollRestartBlock", (*pollRestartBlock)(nil), state.Fns{Save: (*pollRestartBlock).save, Load: (*pollRestartBlock).load}) - state.Register("pkg/sentry/syscalls/linux.clockNanosleepRestartBlock", (*clockNanosleepRestartBlock)(nil), state.Fns{Save: (*clockNanosleepRestartBlock).save, Load: (*clockNanosleepRestartBlock).load}) + state.Register((*futexWaitRestartBlock)(nil)) + state.Register((*pollRestartBlock)(nil)) + state.Register((*clockNanosleepRestartBlock)(nil)) } diff --git a/pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go b/pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go index 570100331..031381834 100644 --- a/pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go +++ b/pkg/sentry/syscalls/linux/vfs2/vfs2_state_autogen.go @@ -6,21 +6,35 @@ import ( "gvisor.dev/gvisor/pkg/state" ) +func (x *pollRestartBlock) StateTypeName() string { + return "pkg/sentry/syscalls/linux/vfs2.pollRestartBlock" +} + +func (x *pollRestartBlock) StateFields() []string { + return []string{ + "pfdAddr", + "nfds", + "timeout", + } +} + func (x *pollRestartBlock) beforeSave() {} -func (x *pollRestartBlock) save(m state.Map) { + +func (x *pollRestartBlock) StateSave(m state.Sink) { x.beforeSave() - m.Save("pfdAddr", &x.pfdAddr) - m.Save("nfds", &x.nfds) - m.Save("timeout", &x.timeout) + m.Save(0, &x.pfdAddr) + m.Save(1, &x.nfds) + m.Save(2, &x.timeout) } func (x *pollRestartBlock) afterLoad() {} -func (x *pollRestartBlock) load(m state.Map) { - m.Load("pfdAddr", &x.pfdAddr) - m.Load("nfds", &x.nfds) - m.Load("timeout", &x.timeout) + +func (x *pollRestartBlock) StateLoad(m state.Source) { + m.Load(0, &x.pfdAddr) + m.Load(1, &x.nfds) + m.Load(2, &x.timeout) } func init() { - state.Register("pkg/sentry/syscalls/linux/vfs2.pollRestartBlock", (*pollRestartBlock)(nil), state.Fns{Save: (*pollRestartBlock).save, Load: (*pollRestartBlock).load}) + state.Register((*pollRestartBlock)(nil)) } |