summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/tmpfs
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2020-04-02 16:57:08 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-02 16:58:24 -0700
commitdbc507dc5cfde2f69a94a58fcb2744ef0899ce7e (patch)
treecbdaeb18c40b1cd74fe2e9f9edf7724559de98a5 /pkg/sentry/fsimpl/tmpfs
parentecc3d01d181a6ae6d3cc72531542d9ea5fe3e376 (diff)
Add equivalents to FMODE_PREAD/PWRITE to VFS2.
This is mostly required for PipeTest_OffsetCalls. The options are DenyPRead/PWrite rather than AllowPRead/PWrite since, in Linux terms, fs/open.c:do_dentry_open sets FMODE_PREAD|FMODE_PWRITE unconditionally (although it allows filesystem implementations of open to unset these flags), so they're set for most FDs; it's usually FDs created outside of open(2) that don't get them, e.g.: - Syscall-created pipes (fs/pipe.c:create_pipe_files => fs/file_table.c:alloc_file_pseudo) - Epoll instances (fs/eventpoll.c:do_epoll_create => fs/anon_inodes.c:anon_inode_getfile => alloc_file_pseudo) - Sockets (net/socket.c:sock_alloc_file => alloc_file_pseudo) This CL adds the flags to epoll instances; a subsequent CL reworks the VFS2 implementation of pipe FDs to be filesystem-independent and adds the flags there, and sockets aren't implemented yet. Updates #1035 PiperOrigin-RevId: 304506434
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs')
0 files changed, 0 insertions, 0 deletions