summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-08-25Merge release-20200818.0-43-ga174aa759 (automated)gVisor bot
2020-08-25Add option to replace linkAddrCache with neighborCacheSam Balana
This change adds an option to replace the current implementation of ARP through linkAddrCache, with an implementation of NUD through neighborCache. Switching to using NUD for both ARP and NDP is beneficial for the reasons described by RFC 4861 Section 3.1: "[Using NUD] significantly improves the robustness of packet delivery in the presence of failing routers, partially failing or partitioned links, or nodes that change their link-layer addresses. For instance, mobile nodes can move off-link without losing any connectivity due to stale ARP caches." "Unlike ARP, Neighbor Unreachability Detection detects half-link failures and avoids sending traffic to neighbors with which two-way connectivity is absent." Along with these changes exposes the API for querying and operating the neighbor cache. Operations include: - Create a static entry - List all entries - Delete all entries - Remove an entry by address This also exposes the API to change the NUD protocol constants on a per-NIC basis to allow Neighbor Discovery to operate over links with widely varying performance characteristics. See [RFC 4861 Section 10][1] for the list of constants. Finally, an API for subscribing to NUD state changes is exposed through NUDDispatcher. See [RFC 4861 Appendix C][3] for the list of edges. Tests: pkg/tcpip/network/arp:arp_test + TestDirectRequest pkg/tcpip/network/ipv6:ipv6_test + TestLinkResolution + TestNDPValidation + TestNeighorAdvertisementWithTargetLinkLayerOption + TestNeighorSolicitationResponse + TestNeighorSolicitationWithSourceLinkLayerOption + TestRouterAdvertValidation pkg/tcpip/stack:stack_test + TestCacheWaker + TestForwardingWithFakeResolver + TestForwardingWithFakeResolverManyPackets + TestForwardingWithFakeResolverManyResolutions + TestForwardingWithFakeResolverPartialTimeout + TestForwardingWithFakeResolverTwoPackets + TestIPv6SourceAddressSelectionScopeAndSameAddress [1]: https://tools.ietf.org/html/rfc4861#section-10 [2]: https://tools.ietf.org/html/rfc4861#appendix-C Fixes #1889 Fixes #1894 Fixes #1895 Fixes #1947 Fixes #1948 Fixes #1949 Fixes #1950 PiperOrigin-RevId: 328365034
2020-08-25Merge release-20200818.0-42-gb26f7503b (automated)gVisor bot
2020-08-25Support SO_LINGER socket option.Nayana Bidari
When SO_LINGER option is enabled, the close will not return until all the queued messages are sent and acknowledged for the socket or linger timeout is reached. If the option is not set, close will return immediately. This option is mainly supported for connection oriented protocols such as TCP. PiperOrigin-RevId: 328350576
2020-08-25Merge release-20200818.0-41-g10fa583c3 (automated)gVisor bot
2020-08-25Disable PHP disk space tests.Jamie Liu
These tests print disk_free_space()/disk_total_space() and expect the printed result to be an integer (despite the fact that both the documented and returned type is float). After cl/297213789, free/total disk space on tmpfs is sufficiently large that PHP prints the result in scientific notation instead: ========DIFF======== 012+ float(9.2233720368548E+18) 013+ float(9.2233720368548E+18) 012- float(%d) 013- float(%d) ========DONE======== FAIL disk_total_space() and disk_free_space() tests [ext/standard/tests/file/disk.phpt] PiperOrigin-RevId: 328349906
2020-08-25Merge release-20200818.0-40-g46485f9d4 (automated)gVisor bot
2020-08-25[go-marshal] Support marshalling for structs with names starting with W.Ayush Ranjan
Due to how marshallable interface implementation was generated, we could not marshal a struct whose named started with W because there was a naming collision with parameter (w io.Writer) and type (w *StuctName). Used "writer" as parameter name to avoid collision. PiperOrigin-RevId: 328343930
2020-08-25Merge release-20200818.0-39-gae332d96e (automated)gVisor bot
2020-08-25Fix TCP_LINGER2 behavior to match linux.Bhasker Hariharan
We still deviate a bit from linux in how long we will actually wait in FIN-WAIT-2. Linux seems to cap it with TIME_WAIT_LEN and it's not completely obvious as to why it's done that way. For now I think we can ignore that and fix it if it really is an issue. PiperOrigin-RevId: 328324922
2020-08-25Merge release-20200818.0-38-gc61f6fcf6 (automated)gVisor bot
2020-08-25Fix deadlock in gofer direct IO.Dean Deng
Fixes several java runtime tests: java/nio/channels/FileChannel/directio/ReadDirect.java java/nio/channels/FileChannel/directio/PreadDirect.java Updates #3576. PiperOrigin-RevId: 328281849
2020-08-25Merge release-20200818.0-37-gf1821fdb6 (automated)gVisor bot
2020-08-24Automated rollback of changelist 327325153Ghanan Gowripalan
PiperOrigin-RevId: 328259353
2020-08-25Merge release-20200818.0-36-g4ad858a58 (automated)gVisor bot
2020-08-24Flush in fsimpl/gofer.regularFileFD.OnClose() if there are no dirty pages.Jamie Liu
This is closer to indistinguishable from VFS1 behavior. PiperOrigin-RevId: 328256068
2020-08-24Merge release-20200818.0-35-gee041b60b (automated)gVisor bot
2020-08-24Add check for same source in merkle tree libgVisor bot
If the data is in the same Reader as the merkle tree, we should verify from the first layer in the tree, instead of from the beginning. PiperOrigin-RevId: 328230988
2020-08-24Merge release-20200818.0-34-g2b0b5e252 (automated)gVisor bot
2020-08-24Remove go profiling flag from dockerutil.Zach Koopmans
Go profiling was removed from runsc debug in a previous change. PiperOrigin-RevId: 328203826
2020-08-24Merge release-20200818.0-33-gab6c47421 (automated)gVisor bot
2020-08-24Bump build constraints to 1.17Michael Pratt
This enables pre-release testing with 1.16. The intention is to replace these with a nogo check before the next release. PiperOrigin-RevId: 328193911
2020-08-24Merge release-20200818.0-32-g339d266be (automated)gVisor bot
2020-08-24Consider loopback bound to all addresses in subnetGhanan Gowripalan
When a loopback interface is configurd with an address and associated subnet, the loopback should treat all addresses in that subnet as an address it owns. This is mimicking linux behaviour as seen below: ``` $ ip addr show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group ... link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever $ ping 192.0.2.1 PING 192.0.2.1 (192.0.2.1) 56(84) bytes of data. ^C --- 192.0.2.1 ping statistics --- 2 packets transmitted, 0 received, 100% packet loss, time 1018ms $ ping 192.0.2.2 PING 192.0.2.2 (192.0.2.2) 56(84) bytes of data. ^C --- 192.0.2.2 ping statistics --- 3 packets transmitted, 0 received, 100% packet loss, time 2039ms $ sudo ip addr add 192.0.2.1/24 dev lo $ ip addr show dev lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group ... link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet 192.0.2.1/24 scope global lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever $ ping 192.0.2.1 PING 192.0.2.1 (192.0.2.1) 56(84) bytes of data. 64 bytes from 192.0.2.1: icmp_seq=1 ttl=64 time=0.131 ms 64 bytes from 192.0.2.1: icmp_seq=2 ttl=64 time=0.046 ms 64 bytes from 192.0.2.1: icmp_seq=3 ttl=64 time=0.048 ms ^C --- 192.0.2.1 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2042ms rtt min/avg/max/mdev = 0.046/0.075/0.131/0.039 ms $ ping 192.0.2.2 PING 192.0.2.2 (192.0.2.2) 56(84) bytes of data. 64 bytes from 192.0.2.2: icmp_seq=1 ttl=64 time=0.131 ms 64 bytes from 192.0.2.2: icmp_seq=2 ttl=64 time=0.069 ms 64 bytes from 192.0.2.2: icmp_seq=3 ttl=64 time=0.049 ms 64 bytes from 192.0.2.2: icmp_seq=4 ttl=64 time=0.035 ms ^C --- 192.0.2.2 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3049ms rtt min/avg/max/mdev = 0.035/0.071/0.131/0.036 ms ``` Test: integration_test.TestLoopbackAcceptAllInSubnet PiperOrigin-RevId: 328188546
2020-08-24Merge release-20200810.0-94-gbae25d2a0 (automated)gVisor bot
2020-08-24Update inotify documentation for gofer filesystem.Dean Deng
We now allow hard links to be created within gofer fs (see github.com/google/gvisor/commit/f20e63e31b56784c596897e86f03441f9d05f567). Update the inotify documentation accordingly. PiperOrigin-RevId: 328177485
2020-08-24Merge release-20200810.0-93-g89791a79b (automated)gVisor bot
2020-08-24Internal change.gVisor bot
PiperOrigin-RevId: 328157101
2020-08-22Merge release-20200810.0-92-ge7270096a (automated)gVisor bot
2020-08-22Implement GetFilesystem for verity fsgVisor bot
verity GetFilesystem is implemented by mounting the underlying file system, save the mount, and store both the underlying root dentry and root Merkle file dentry in verity's root dentry. PiperOrigin-RevId: 327959334
2020-08-22Merge release-20200810.0-91-g69008b68b (automated)gVisor bot
2020-08-21Add syscall tests for SO_REUSEADDR.Mithun Iyer
Add tests for socket re-bind/listen of client and server sockets with the older connection still in TIME_WAIT state and with SO_REUSEADDR enabled. PiperOrigin-RevId: 327924702
2020-08-22Merge release-20200810.0-90-g17bc5c1b0 (automated)gVisor bot
2020-08-21[vfs] Allow mountpoint to be an existing non-directory.Ayush Ranjan
Unlike linux mount(2), OCI spec allows mounting on top of an existing non-directory file. PiperOrigin-RevId: 327914342
2020-08-22Merge release-20200810.0-89-g9607515ae (automated)gVisor bot
2020-08-21stateify: Fix pretty print not printing odd numbered fields.Ting-Yu Wang
PiperOrigin-RevId: 327902182
2020-08-22Merge release-20200810.0-88-g46d11a767 (automated)gVisor bot
2020-08-21Provide fdReader/Writer for FileDescriptiongVisor bot
fdReader/Writer implements io.Reader/Writer so that they can be passed to Merkle tree library. PiperOrigin-RevId: 327901376
2020-08-21Merge release-20200810.0-87-gbd3383a7e (automated)gVisor bot
2020-08-21Move udp port exhaustion tests to a 'nogotsan' one.Ting-Yu Wang
It frequently times out under GoTSAN. PiperOrigin-RevId: 327894343
2020-08-21Merge release-20200810.0-86-g23070b2e5 (automated)gVisor bot
2020-08-21Internal change.gVisor bot
PiperOrigin-RevId: 327892274
2020-08-21Merge release-20200810.0-85-g0ea03f501 (automated)gVisor bot
2020-08-21Clarify seek behaviour for kernfs.GenericDirectoryFD.Rahat Mahmood
- Remove comment about GenericDirectoryFD not being compatible with dynamic directories. It is currently being used to implement dynamic directories. - Try to handle SEEK_END better than setting the offset to infinity. SEEK_END is poorly defined for dynamic directories anyways, so at least try make it work correctly for the static entries. Updates #1193. PiperOrigin-RevId: 327890128
2020-08-21Merge release-20200810.0-84-g5f33fdf37 (automated)gVisor bot
2020-08-21Pass overlay credentials via context in copy up.Nicolas Lacasse
Some VFS operations (those which operate on FDs) get their credentials via the context instead of via an explicit creds param. For these cases, we must pass the overlay credentials on the context. PiperOrigin-RevId: 327881259
2020-08-21Merge release-20200810.0-83-g5ec3d4ed3 (automated)gVisor bot
2020-08-21Make mounts ReadWrite first, then later change to ReadOnly.Nicolas Lacasse
This lets us create "synthetic" mountpoint directories in ReadOnly mounts during VFS setup. Also add context.WithMountNamespace, as some filesystems (like overlay) require a MountNamespace on ctx to handle vfs.Filesystem Operations. PiperOrigin-RevId: 327874971
2020-08-21Merge release-20200810.0-82-gc9e752b64 (automated)gVisor bot
2020-08-21Fix Inotify tests in open source.Zach Koopmans
The order of unlink events (dir event/file event) is undefined, so make tests accept both orderings. PiperOrigin-RevId: 327873316