diff options
Diffstat (limited to 'pkg/sentry/fsbridge')
-rw-r--r-- | pkg/sentry/fsbridge/BUILD | 24 | ||||
-rwxr-xr-x[-rw-r--r--] | pkg/sentry/fsbridge/bridge.go | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | pkg/sentry/fsbridge/fs.go | 0 | ||||
-rwxr-xr-x | pkg/sentry/fsbridge/fsbridge_state_autogen.go | 66 | ||||
-rwxr-xr-x[-rw-r--r--] | pkg/sentry/fsbridge/vfs.go | 0 |
5 files changed, 66 insertions, 24 deletions
diff --git a/pkg/sentry/fsbridge/BUILD b/pkg/sentry/fsbridge/BUILD deleted file mode 100644 index 6c798f0bd..000000000 --- a/pkg/sentry/fsbridge/BUILD +++ /dev/null @@ -1,24 +0,0 @@ -load("//tools:defs.bzl", "go_library") - -licenses(["notice"]) - -go_library( - name = "fsbridge", - srcs = [ - "bridge.go", - "fs.go", - "vfs.go", - ], - visibility = ["//pkg/sentry:internal"], - deps = [ - "//pkg/abi/linux", - "//pkg/context", - "//pkg/fspath", - "//pkg/sentry/fs", - "//pkg/sentry/kernel/auth", - "//pkg/sentry/memmap", - "//pkg/sentry/vfs", - "//pkg/syserror", - "//pkg/usermem", - ], -) diff --git a/pkg/sentry/fsbridge/bridge.go b/pkg/sentry/fsbridge/bridge.go index 8e7590721..8e7590721 100644..100755 --- a/pkg/sentry/fsbridge/bridge.go +++ b/pkg/sentry/fsbridge/bridge.go diff --git a/pkg/sentry/fsbridge/fs.go b/pkg/sentry/fsbridge/fs.go index 093ce1fb3..093ce1fb3 100644..100755 --- a/pkg/sentry/fsbridge/fs.go +++ b/pkg/sentry/fsbridge/fs.go diff --git a/pkg/sentry/fsbridge/fsbridge_state_autogen.go b/pkg/sentry/fsbridge/fsbridge_state_autogen.go new file mode 100755 index 000000000..51b57d859 --- /dev/null +++ b/pkg/sentry/fsbridge/fsbridge_state_autogen.go @@ -0,0 +1,66 @@ +// automatically generated by stateify. + +package fsbridge + +import ( + "gvisor.dev/gvisor/pkg/state" +) + +func (x *fsFile) beforeSave() {} +func (x *fsFile) save(m state.Map) { + x.beforeSave() + m.Save("file", &x.file) +} + +func (x *fsFile) afterLoad() {} +func (x *fsFile) load(m state.Map) { + m.Load("file", &x.file) +} + +func (x *fsLookup) beforeSave() {} +func (x *fsLookup) save(m state.Map) { + x.beforeSave() + m.Save("mntns", &x.mntns) + m.Save("root", &x.root) + m.Save("workingDir", &x.workingDir) +} + +func (x *fsLookup) afterLoad() {} +func (x *fsLookup) load(m state.Map) { + m.Load("mntns", &x.mntns) + m.Load("root", &x.root) + m.Load("workingDir", &x.workingDir) +} + +func (x *vfsFile) beforeSave() {} +func (x *vfsFile) save(m state.Map) { + x.beforeSave() + m.Save("file", &x.file) +} + +func (x *vfsFile) afterLoad() {} +func (x *vfsFile) load(m state.Map) { + m.Load("file", &x.file) +} + +func (x *vfsLookup) beforeSave() {} +func (x *vfsLookup) save(m state.Map) { + x.beforeSave() + m.Save("mntns", &x.mntns) + m.Save("root", &x.root) + m.Save("workingDir", &x.workingDir) +} + +func (x *vfsLookup) afterLoad() {} +func (x *vfsLookup) load(m state.Map) { + m.Load("mntns", &x.mntns) + m.Load("root", &x.root) + m.Load("workingDir", &x.workingDir) +} + +func init() { + state.Register("pkg/sentry/fsbridge.fsFile", (*fsFile)(nil), state.Fns{Save: (*fsFile).save, Load: (*fsFile).load}) + state.Register("pkg/sentry/fsbridge.fsLookup", (*fsLookup)(nil), state.Fns{Save: (*fsLookup).save, Load: (*fsLookup).load}) + state.Register("pkg/sentry/fsbridge.vfsFile", (*vfsFile)(nil), state.Fns{Save: (*vfsFile).save, Load: (*vfsFile).load}) + state.Register("pkg/sentry/fsbridge.vfsLookup", (*vfsLookup)(nil), state.Fns{Save: (*vfsLookup).save, Load: (*vfsLookup).load}) +} diff --git a/pkg/sentry/fsbridge/vfs.go b/pkg/sentry/fsbridge/vfs.go index 79b808359..79b808359 100644..100755 --- a/pkg/sentry/fsbridge/vfs.go +++ b/pkg/sentry/fsbridge/vfs.go |