summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/host
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-10-12 23:33:20 +0000
committergVisor bot <gvisor-bot@google.com>2020-10-12 23:33:20 +0000
commit213e252ab30dc0646d3de409dedd58f5c55e05af (patch)
tree42375535ec08b69adc388d81f22cba5a92bb1cd2 /pkg/sentry/fsimpl/host
parent1b455257f0fb4494bfd10802d8011a073a0672e4 (diff)
parente7bbe70f79aa9308c2eb54b057ee5779b22f478e (diff)
Merge release-20200928.0-94-ge7bbe70f7 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/host')
-rw-r--r--pkg/sentry/fsimpl/host/host.go3
-rw-r--r--pkg/sentry/fsimpl/host/host_state_autogen.go47
2 files changed, 27 insertions, 23 deletions
diff --git a/pkg/sentry/fsimpl/host/host.go b/pkg/sentry/fsimpl/host/host.go
index ffe4ddb32..da1e3bf4b 100644
--- a/pkg/sentry/fsimpl/host/host.go
+++ b/pkg/sentry/fsimpl/host/host.go
@@ -118,7 +118,7 @@ func NewFD(ctx context.Context, mnt *vfs.Mount, hostFD int, opts *NewFDOptions)
if err != nil {
return nil, err
}
- d.Init(i)
+ d.Init(&fs.Filesystem, i)
// i.open will take a reference on d.
defer d.DecRef(ctx)
@@ -195,6 +195,7 @@ type inode struct {
kernfs.InodeNoStatFS
kernfs.InodeNotDirectory
kernfs.InodeNotSymlink
+ kernfs.InodeTemporary // This holds no meaning as this inode can't be Looked up and is always valid.
locks vfs.FileLocks
diff --git a/pkg/sentry/fsimpl/host/host_state_autogen.go b/pkg/sentry/fsimpl/host/host_state_autogen.go
index c18cef145..5aaee37c3 100644
--- a/pkg/sentry/fsimpl/host/host_state_autogen.go
+++ b/pkg/sentry/fsimpl/host/host_state_autogen.go
@@ -83,6 +83,7 @@ func (i *inode) StateFields() []string {
"InodeNoStatFS",
"InodeNotDirectory",
"InodeNotSymlink",
+ "InodeTemporary",
"locks",
"inodeRefs",
"hostFD",
@@ -104,17 +105,18 @@ func (i *inode) StateSave(stateSinkObject state.Sink) {
stateSinkObject.Save(0, &i.InodeNoStatFS)
stateSinkObject.Save(1, &i.InodeNotDirectory)
stateSinkObject.Save(2, &i.InodeNotSymlink)
- stateSinkObject.Save(3, &i.locks)
- stateSinkObject.Save(4, &i.inodeRefs)
- stateSinkObject.Save(5, &i.hostFD)
- stateSinkObject.Save(6, &i.ino)
- stateSinkObject.Save(7, &i.isTTY)
- stateSinkObject.Save(8, &i.seekable)
- stateSinkObject.Save(9, &i.wouldBlock)
- stateSinkObject.Save(10, &i.queue)
- stateSinkObject.Save(11, &i.canMap)
- stateSinkObject.Save(12, &i.mappings)
- stateSinkObject.Save(13, &i.pf)
+ stateSinkObject.Save(3, &i.InodeTemporary)
+ stateSinkObject.Save(4, &i.locks)
+ stateSinkObject.Save(5, &i.inodeRefs)
+ stateSinkObject.Save(6, &i.hostFD)
+ stateSinkObject.Save(7, &i.ino)
+ stateSinkObject.Save(8, &i.isTTY)
+ stateSinkObject.Save(9, &i.seekable)
+ stateSinkObject.Save(10, &i.wouldBlock)
+ stateSinkObject.Save(11, &i.queue)
+ stateSinkObject.Save(12, &i.canMap)
+ stateSinkObject.Save(13, &i.mappings)
+ stateSinkObject.Save(14, &i.pf)
}
func (i *inode) afterLoad() {}
@@ -123,17 +125,18 @@ func (i *inode) StateLoad(stateSourceObject state.Source) {
stateSourceObject.Load(0, &i.InodeNoStatFS)
stateSourceObject.Load(1, &i.InodeNotDirectory)
stateSourceObject.Load(2, &i.InodeNotSymlink)
- stateSourceObject.Load(3, &i.locks)
- stateSourceObject.Load(4, &i.inodeRefs)
- stateSourceObject.Load(5, &i.hostFD)
- stateSourceObject.Load(6, &i.ino)
- stateSourceObject.Load(7, &i.isTTY)
- stateSourceObject.Load(8, &i.seekable)
- stateSourceObject.Load(9, &i.wouldBlock)
- stateSourceObject.Load(10, &i.queue)
- stateSourceObject.Load(11, &i.canMap)
- stateSourceObject.Load(12, &i.mappings)
- stateSourceObject.Load(13, &i.pf)
+ stateSourceObject.Load(3, &i.InodeTemporary)
+ stateSourceObject.Load(4, &i.locks)
+ stateSourceObject.Load(5, &i.inodeRefs)
+ stateSourceObject.Load(6, &i.hostFD)
+ stateSourceObject.Load(7, &i.ino)
+ stateSourceObject.Load(8, &i.isTTY)
+ stateSourceObject.Load(9, &i.seekable)
+ stateSourceObject.Load(10, &i.wouldBlock)
+ stateSourceObject.Load(11, &i.queue)
+ stateSourceObject.Load(12, &i.canMap)
+ stateSourceObject.Load(13, &i.mappings)
+ stateSourceObject.Load(14, &i.pf)
}
func (f *fileDescription) StateTypeName() string {