summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
AgeCommit message (Collapse)Author
2020-04-03Merge release-20200323.0-62-gdd3bc49 (automated)gVisor bot
2020-04-02Add NAME_MAX checks and update file timesFabricio Voznika
NAME_MAX should be enforced per filesystem implementation because other file systems may not have the same restriction. Gofer filesystem now keeps a reference to the kernel clock to avoid lookup in the Context on file access to update atime. Update access, modification, and status change times in tmpfs. Updates #1197, #1198. PiperOrigin-RevId: 304527148
2020-04-03Merge release-20200323.0-60-g5b2396d (automated)gVisor bot
2020-04-02Fix typo in TODO comments.Dean Deng
PiperOrigin-RevId: 304508083
2020-04-03Merge release-20200323.0-59-gdbc507d (automated)gVisor bot
2020-04-02Add equivalents to FMODE_PREAD/PWRITE to VFS2.Jamie Liu
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
2020-04-01Pass configurable FilesystemType to tmpfs.Nicolas Lacasse
PiperOrigin-RevId: 304234086
2020-04-01Merge release-20200323.0-49-g4e6a1a5 (automated)gVisor bot
2020-04-01Automated rollback of changelist 303799678Adin Scannell
PiperOrigin-RevId: 304221302
2020-04-01Merge release-20200323.0-48-gdb79175 (automated)gVisor bot
2020-04-01Fix 386 build tagsMichael Pratt
The build tag for 32-bit x86 is 386, not i386. Updates #2298 PiperOrigin-RevId: 304206373
2020-04-01Merge release-20200323.0-47-gd01a8ca (automated)gVisor bot
2020-04-01Add FileDescription interface for socket files.Dean Deng
Refactor the existing socket interface to share methods between VFS1 and VFS2. The method signatures do not contain anything filesystem-related, so they don't need to be re-defined for VFS2. Updates #1476, #1478, #1484, #1485. PiperOrigin-RevId: 304184545
2020-04-01Merge release-20200323.0-45-g840980a (automated)gVisor bot
2020-03-31Implement automated marshalling for slices of Marshallable types.Rahat Mahmood
PiperOrigin-RevId: 304119255
2020-04-01Merge release-20200323.0-43-g639d94f (automated)gVisor bot
2020-03-31Add socket filesystem and global disconnected socket mount for VFS2.Dean Deng
A socket mount where anonymous sockets will reside is added to the VirtualFilesystem. Socketfs is built on top of kernfs. Updates #1476, #1478, #1484, #1485. PiperOrigin-RevId: 304095251
2020-03-31Merge release-20200323.0-41-gb6639f7 (automated)gVisor bot
2020-03-31Include original copyUp error in panic if cleanupUpper fails.Nicolas Lacasse
When copyUp fails, we attempt to clean up the upper filesystem by removing any files that have already been copied-up. If the cleanup fails, we panic because the "overlay filesystem is in an inconsistent state". This CL adds the original copy-up error to the panic information, to hopefully make it easier to track down how the overlay filesystem got into the inconsistent state. PiperOrigin-RevId: 304053370
2020-03-31Fix /proc/self/mounts and /proc/self/mountinfo in VFS2.Nicolas Lacasse
Some extra fields were added to the Mount type to expose necessary data to the proc filesystem. PiperOrigin-RevId: 304053361
2020-03-31Allow passing root file type to tmpfs.Nicolas Lacasse
PiperOrigin-RevId: 304053357
2020-03-30Merge release-20200219.0-259-g3fac85d (automated)gVisor bot
2020-03-30kvm: handle exit reasons even under EINTR.Adin Scannell
In the case of other signals (preemption), inject a normal bounce and defer the signal until the vCPU has been returned from guest mode. PiperOrigin-RevId: 303799678
2020-03-28Merge release-20200219.0-255-gf6e4daa (automated)gVisor bot
2020-03-27Add vfs.PathnameReachable().Jamie Liu
/proc/[pid]/mount* omit mounts whose mount point is outside the chroot, which is checked (indirectly) via __d_path(). PiperOrigin-RevId: 303434226
2020-03-27Add FilesystemType.Name method, and FilesystemType field to Filesystem struct.Nicolas Lacasse
Both have analogues in Linux: * struct file_system_type has a char *name field. * struct super_block keeps a pointer to the file_system_type. These fields are necessary to support the `filesystem type` field in /proc/[pid]/mountinfo. PiperOrigin-RevId: 303434063
2020-03-27Merge release-20200219.0-252-g76a7ace (automated)gVisor bot
2020-03-26Add BoundEndpointAt filesystem operation.Dean Deng
BoundEndpointAt() is needed to support Unix sockets bound at a file path, corresponding to BoundEndpoint() in VFS1. Updates #1476. PiperOrigin-RevId: 303258251
2020-03-26Merge release-20200219.0-251-g137f361 (automated)gVisor bot
2020-03-26Use host-defined file owner and mode, when possible, for imported fds.Dean Deng
Using the host-defined file owner matches VFS1. It is more correct to use the host-defined mode, since the cached value may become out of date. However, kernfs.Inode.Mode() does not return an error--other filesystems on kernfs are in-memory so retrieving mode should not fail. Therefore, if the host syscall fails, we rely on a cached value instead. Updates #1672. PiperOrigin-RevId: 303220864
2020-03-26Merge release-20200219.0-249-g0e62a54 (automated)gVisor bot
2020-03-26Merge pull request #2130 from nybidari:iptablesgVisor bot
PiperOrigin-RevId: 303208407
2020-03-26Merge release-20200219.0-246-ge466ab0 (automated)gVisor bot
2020-03-26Add unique ID to Mount type.Nicolas Lacasse
Analagous to Linux's mount.mnt_id. This ID is displayed in /proc/[pid]/mountinfo. PiperOrigin-RevId: 303185564
2020-03-26Support owner matching for iptables.Nayana Bidari
This feature will match UID and GID of the packet creator, for locally generated packets. This match is only valid in the OUTPUT and POSTROUTING chains. Forwarded packets do not have any socket associated with them. Packets from kernel threads do have a socket, but usually no owner.
2020-03-26Merge release-20200219.0-238-g7aa388c (automated)gVisor bot
2020-03-26Merge pull request #1986 from lubinszARM:pr_ring0_clean_1gVisor bot
PiperOrigin-RevId: 303105826
2020-03-26Combine file mode and isDir argumentsFabricio Voznika
Updates #1035 PiperOrigin-RevId: 303021328
2020-03-25Merge release-20200219.0-229-gf2eba94 (automated)gVisor bot
2020-03-25Remove TODO to push down exec permission checkFabricio Voznika
Pushing it down requires all implementation to check for exec individualy which is not maintanable. Making it part of GenericCheckPermissions add extra cost to everyone that calls it. So it's better to keep is in VirtualFilesystem.OpenAt. Updates #1193 PiperOrigin-RevId: 302982993
2020-03-25Merge release-20200219.0-228-ge541ebe (automated)gVisor bot
2020-03-25Misc fixes to make stat_test pass (almost)Fabricio Voznika
The only test failing now requires socket which is not available in VFS2 yet. Updates #1198 PiperOrigin-RevId: 302976572
2020-03-25Set file mode and type to attributeFabricio Voznika
Makes less error prone to find file type. Updates #1197 PiperOrigin-RevId: 302974244
2020-03-25Merge release-20200219.0-223-gd8c4eff (automated)gVisor bot
2020-03-25Automated rollback of changelist 301837227Bhasker Hariharan
PiperOrigin-RevId: 302891559
2020-03-24Merge release-20200219.0-220-g7e4073a (automated)gVisor bot
2020-03-24Move tcpip.PacketBuffer and IPTables to stack package.Bhasker Hariharan
This is a precursor to be being able to build an intrusive list of PacketBuffers for use in queuing disciplines being implemented. Updates #2214 PiperOrigin-RevId: 302677662
2020-03-23Merge release-20200219.0-219-ga730d74 (automated)gVisor bot
2020-03-23Support basic /proc/net/dev metrics for netstackIan Lewis
Fixes #506 PiperOrigin-RevId: 302540404
2020-03-23Merge release-20200219.0-218-g369cf38 (automated)gVisor bot