diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-05-13 17:56:48 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-13 17:56:48 +0000 |
commit | 33e16473772cfb7134f9b202448be8c998706f2d (patch) | |
tree | f67188a62a022624e7e26a3e741a90bcae449e30 /pkg | |
parent | ddecfc313b8ffa6b611e0a701ebfd3e15b5aa4a3 (diff) | |
parent | d84607762889d999f93b89e64e09d2a4dda63bf7 (diff) |
Merge release-20200422.0-297-gd846077 (automated)
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/sentry/fs/gofer/fs.go | 3 | ||||
-rwxr-xr-x | pkg/sentry/fsimpl/gofer/gofer.go | 9 |
2 files changed, 7 insertions, 5 deletions
diff --git a/pkg/sentry/fs/gofer/fs.go b/pkg/sentry/fs/gofer/fs.go index 9d41fcbdb..8ae2d78d7 100644 --- a/pkg/sentry/fs/gofer/fs.go +++ b/pkg/sentry/fs/gofer/fs.go @@ -60,8 +60,7 @@ const ( limitHostFDTranslationKey = "limit_host_fd_translation" // overlayfsStaleRead if present closes cached readonly file after the first - // write. This is done to workaround a limitation of overlayfs in kernels - // before 4.19 where open FDs are not updated after the file is copied up. + // write. This is done to workaround a limitation of Linux overlayfs. overlayfsStaleRead = "overlayfs_stale_read" ) diff --git a/pkg/sentry/fsimpl/gofer/gofer.go b/pkg/sentry/fsimpl/gofer/gofer.go index 1da8d5d82..353e2cf5b 100755 --- a/pkg/sentry/fsimpl/gofer/gofer.go +++ b/pkg/sentry/fsimpl/gofer/gofer.go @@ -143,9 +143,12 @@ type filesystemOptions struct { // If overlayfsStaleRead is true, O_RDONLY host FDs provided by the remote // filesystem may not be coherent with writable host FDs opened later, so - // mappings of the former must be replaced by mappings of the latter. This - // is usually only the case when the remote filesystem is an overlayfs - // mount on Linux < 4.19. + // all uses of the former must be replaced by uses of the latter. This is + // usually only the case when the remote filesystem is a Linux overlayfs + // mount. (Prior to Linux 4.18, patch series centered on commit + // d1d04ef8572b "ovl: stack file ops", both I/O and memory mappings were + // incoherent between pre-copy-up and post-copy-up FDs; after that patch + // series, only memory mappings are incoherent.) overlayfsStaleRead bool // If regularFilesUseSpecialFileFD is true, application FDs representing |