diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-06-17 18:36:46 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-06-17 18:36:46 +0000 |
commit | f189edb900b72e76eab4c8aca47c92833ef50091 (patch) | |
tree | ebc5bb39c8a8521213430f4858559247e07c9465 /pkg/sentry/fsimpl/host/host.go | |
parent | 253c71e6df0b25eef4f6edcfa070de857ed5e661 (diff) | |
parent | e5d97cbcc1e64185b8fab1cf563c8754edd2e52e (diff) |
Merge release-20200608.0-71-ge5d97cbcc (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/host/host.go')
-rw-r--r-- | pkg/sentry/fsimpl/host/host.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/host/host.go b/pkg/sentry/fsimpl/host/host.go index 7906242c9..2b084860e 100644 --- a/pkg/sentry/fsimpl/host/host.go +++ b/pkg/sentry/fsimpl/host/host.go @@ -91,7 +91,9 @@ func NewFD(ctx context.Context, mnt *vfs.Mount, hostFD int, opts *NewFDOptions) isTTY: opts.IsTTY, wouldBlock: wouldBlock(uint32(fileType)), seekable: seekable, - canMap: canMap(uint32(fileType)), + // NOTE(b/38213152): Technically, some obscure char devices can be memory + // mapped, but we only allow regular files. + canMap: fileType == linux.S_IFREG, } i.pf.inode = i |