summaryrefslogtreecommitdiffhomepage
path: root/pkg
AgeCommit message (Collapse)Author
2020-01-04Merge release-20191213.0-59-g83ab47e (automated)gVisor bot
2020-01-03Use opaque interface identifiers when generating IPv6 addresses via SLAACGhanan Gowripalan
Support using opaque interface identifiers when generating IPv6 addresses via SLAAC when configured to do so. Note, this change does not handle retries in response to DAD conflicts yet. That will also come in a later change. Test: Test that when SLAAC addresses are generated, they use opaque interface identifiers when configured to do so. PiperOrigin-RevId: 288078605
2020-01-04Merge release-20191213.0-58-gbf53d32 (automated)gVisor bot
2020-01-03Remove FIXME comments to close old bug.Zach Koopmans
PiperOrigin-RevId: 288075400
2020-01-03Merge release-20191213.0-57-gd1d878a (automated)gVisor bot
2020-01-03Support generating opaque interface identifiers as defined by RFC 7217Ghanan Gowripalan
Support generating opaque interface identifiers as defined by RFC 7217 for auto-generated IPv6 link-local addresses. Opaque interface identifiers will also be used for IPv6 addresses auto-generated via SLAAC in a later change. Note, this change does not handle retries in response to DAD conflicts yet. That will also come in a later change. Tests: Test that when configured to generated opaque IIDs, they are properly generated as outlined by RFC 7217. PiperOrigin-RevId: 288035349
2019-12-30Merge release-20191213.0-56-g1f384ac (automated)gVisor bot
2019-12-30Add VFS2 support for device special files.Jamie Liu
- Add FileDescriptionOptions.UseDentryMetadata, which reduces the amount of boilerplate needed for device FDs and the like between filesystems. - Switch back to having FileDescription.Init() take references on the Mount and Dentry; otherwise managing refcounts around failed calls to OpenDeviceSpecialFile() / Device.Open() is tricky. PiperOrigin-RevId: 287575574
2019-12-27Merge release-20191213.0-55-g796f53c (automated)gVisor bot
2019-12-27Add VFS2 support for /proc/filesystems.Jamie Liu
Updates #1195 PiperOrigin-RevId: 287269106
2019-12-26Merge release-20191213.0-54-g3c125eb (automated)gVisor bot
2019-12-26Initial procfs implementation in VFSv2Fabricio Voznika
Updates #1195 PiperOrigin-RevId: 287227722
2019-12-26Merge release-20191213.0-53-g5b9034c (automated)gVisor bot
2019-12-26Merge pull request #1461 from xiaobo55x:ptrace_sysemugVisor bot
PiperOrigin-RevId: 287225250
2019-12-26Merge release-20191213.0-51-g7b5a59d (automated)gVisor bot
2019-12-26Merge pull request #1460 from lubinszARM:pr_clean_code1gVisor bot
PiperOrigin-RevId: 287221280
2019-12-26Merge release-20191213.0-49-g87e4d03 (automated)gVisor bot
2019-12-26Automated rollback of changelist 287029703gVisor bot
PiperOrigin-RevId: 287217899
2019-12-24Merge release-20191213.0-48-ge013c48 (automated)gVisor bot
2019-12-24Enable IP_RECVTOS socket option for datagram socketsRyan Heacock
Added the ability to get/set the IP_RECVTOS socket option on UDP endpoints. If enabled, TOS from the incoming Network Header passed as ancillary data in the ControlMessages. Test: * Added unit test to udp_test.go that tests getting/setting as well as verifying that we receive expected TOS from incoming packet. * Added a syscall test PiperOrigin-RevId: 287029703
2019-12-24slight changes to ring0&pagetables for Arm64Bin Lu
There are 2 jobs have been finished in this patch: 1, a comment was added to explain the purpose of the extra NOPs in Vectors(). 2, some merge errors were fixed. Signed-off-by: Bin Lu <bin.lu@arm.com>
2019-12-23Fix deadlock in kernfs.Filesystem.revalidateChildLockedFabricio Voznika
It was calling Dentry.InsertChild with the dentry's mutex already locked. Updates #1035 PiperOrigin-RevId: 286962742
2019-12-23Merge release-20191213.0-46-gf45df75 (automated)gVisor bot
2019-12-23Clean up vfs.FilesystemImpl methods that operate on parent directories.Jamie Liu
- Make FilesystemImpl methods that operate on parent directories require !rp.Done() (i.e. there is at least one path component to resolve) as precondition and postcondition (in cases where they do not finish path resolution due to mount boundary / absolute symlink), and require that they do not need to follow the last path component (the file being created / deleted) as a symlink. Check for these in VFS. - Add FilesystemImpl.GetParentDentryAt(), which is required to obtain the old parent directory for VFS.RenameAt(). (Passing the Dentry to be renamed instead has the wrong semantics if the file named by the old path is a mount point since the Dentry will be on the wrong Mount.) - Update memfs to implement these methods correctly (?), including RenameAt. - Change fspath.Parse() to allow empty paths (to simplify implementation of AT_EMPTY_PATH). - Change vfs.PathOperation to take a fspath.Path instead of a raw pathname; non-test callers will need to fspath.Parse() pathnames themselves anyway in order to detect absolute paths and select PathOperation.Start accordingly. PiperOrigin-RevId: 286934941
2019-12-23Merge release-20191213.0-44-g5bc4ae9 (automated)gVisor bot
2019-12-23Clear any host-specific NDP state when becoming a routerGhanan Gowripalan
This change supports clearing all host-only NDP state when NICs become routers. All discovered routers, discovered on-link prefixes and auto-generated addresses will be invalidated when becoming a router. This is because normally, routers do not process Router Advertisements to discover routers or on-link prefixes, and do not do SLAAC. Tests: Unittest to make sure that all discovered routers, discovered prefixes and auto-generated addresses get invalidated when transitioning from a host to a router. PiperOrigin-RevId: 286902309
2019-12-23Replace syscall.PTRACE_SYSEMU with unix.PTRACE_SYSEMUHaibo Xu
Linux PTRACE_SYSEMU support on arm64 was merged to mainline from V5.3, and the corresponding support in go also enabled recently. Since the "syscall" package is locked down from go 1.4, so the ptrace PTRACE_SYSEMU definition can't be added to package "syscall" on arm64. According to the golang community, updates required by new systems or versions should use the corresponding package in the golang.org/x/sys repository instead(https://golang.org/pkg/syscall/). Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I2f917bb2be62f990c3e158e2bb99e094ea03f751
2019-12-21Merge release-20191213.0-41-g818eb22 (automated)gVisor bot
2019-12-20Add vfs.ResolvingPath.HandleJump().Jamie Liu
PiperOrigin-RevId: 286666533
2019-12-21Merge release-20191213.0-40-g21a14e9 (automated)gVisor bot
2019-12-20Add vfs.Dentry.Children().Jamie Liu
PiperOrigin-RevId: 286660774
2019-12-20Merge release-20191213.0-39-g08c39e2 (automated)gVisor bot
2019-12-20Change TODO to track correct bug.Kevin Krakauer
PiperOrigin-RevId: 286639163
2019-12-20Merge release-20191213.0-38-g3eb489e (automated)gVisor bot
2019-12-20Move VFS2 file description status flags to vfs.FileDescription.Jamie Liu
PiperOrigin-RevId: 286616668
2019-12-20Merge release-20191213.0-37-g822d847 (automated)gVisor bot
2019-12-20Check for valid nfds before copying in an fd set.Dean Deng
Otherwise, CopyInFDSet will try to allocate a negative-length slice. PiperOrigin-RevId: 286584907
2019-12-20Merge release-20191213.0-36-g29955a4 (automated)gVisor bot
2019-12-19futex: wake one waiter if futex_wake is called with a non-positive valueAndrei Vagin
This change is needed to be compatible with the Linux kernel. There is no glibc wrapper for the futex system call, so it is easy to make a mistake and call syscall(__NR_futex, FUTEX_WAKE, addr) without the fourth argument. This works on Linux, because it wakes one waiter even if val is nonpositive. PiperOrigin-RevId: 286494396
2019-12-19Merge release-20191213.0-33-gbb00438 (automated)gVisor bot
2019-12-19Make masterInodeOperations.Truncate take a pointer receiver.Nicolas Lacasse
Otherwise a copy happens, which triggers a data race when reading masterInodeOperations.SimpleFileOperations.uattr, which must be accessed with a lock held. PiperOrigin-RevId: 286464473
2019-12-19Merge release-20191213.0-32-g57ce26c (automated)gVisor bot
2019-12-18net/tcp: allow to call listen without bindAndrei Vagin
When listen(2) is called on an unbound socket, the socket is automatically bound to a random free port with the local address set to INADDR_ANY. PiperOrigin-RevId: 286305906
2019-12-19Merge release-20191213.0-31-g98e8246 (automated)gVisor bot
2019-12-18Merge pull request #890 from lubinszARM:pr_phyapgVisor bot
PiperOrigin-RevId: 286299056
2019-12-19Merge release-20191213.0-28-g7444012 (automated)gVisor bot
2019-12-18Add VFS2 plumbing for extended attributes.Jamie Liu
PiperOrigin-RevId: 286281274
2019-12-18Merge release-20191213.0-27-g8e6e87f (automated)gVisor bot
2019-12-18Allow 'out-of-line' routing table updates for Router and Prefix discovery eventsGhanan Gowripalan
This change removes the requirement that a new routing table be provided when a router or prefix discovery event happens so that an updated routing table may be provided to the stack at a later time from the event. This change is to address the use case where the netstack integrator may need to obtain a lock before providing updated routes in response to the events above. As an example, say we have an integrator that performs the below two operations operations as described: A. Normal route update: 1. Obtain integrator lock 2. Update routes in the integrator 3. Call Stack.SetRouteTable with the updated routes 3.1. Obtain Stack lock 3.2. Update routes in Stack 3.3. Release Stack lock 4. Release integrator lock B. NDP event triggered route update: 1. Obtain Stack lock 2. Call event handler 2.1. Obtain integrator lock 2.2. Update routes in the integrator 2.3. Release integrator lock 2.4. Return updated routes to update Stack 3. Update routes in Stack 4. Release Stack lock A deadlock may occur if a Normal route update was attemped at the same time an NDP event triggered route update was attempted. With threads T1 and T2: 1) T1 -> A.1, A.2 2) T2 -> B.1 3) T1 -> A.3 (hangs at A.3.1 since Stack lock is taken in step 2) 4) T2 -> B.2 (hangs at B.2.1 since integrator lock is taken in step 1) Test: Existing tests were modified to not provide or expect routing table changes in response to Router and Prefix discovery events. PiperOrigin-RevId: 286274712
2019-12-18Merge release-20191210.0-54-gac3b3bb (automated)gVisor bot