summaryrefslogtreecommitdiffhomepage
path: root/pkg
AgeCommit message (Collapse)Author
2021-06-22Merge release-20210614.0-13-g01bcd55c3 (automated)gVisor bot
2021-06-22Merge pull request #5051 from lubinszARM:pr_escapes_1gVisor bot
PiperOrigin-RevId: 380904249
2021-06-22Merge release-20210614.0-10-g04a81bc33 (automated)gVisor bot
2021-06-22Trigger poll/epoll events on zero-length hostinet sendmsgIan Lewis
Fixes #2726 PiperOrigin-RevId: 380753516
2021-06-22Merge release-20210614.0-9-gc6da1b002 (automated)gVisor bot
2021-06-21clean up tcpdump TODOsKevin Krakauer
tcpdump is largely supported. We've also chose not to implement writeable AF_PACKET sockets, and there's a bug specifically for promiscuous mode (#3333). Fixes #173. PiperOrigin-RevId: 380733686
2021-06-22Merge release-20210614.0-8-g1e472a857 (automated)gVisor bot
2021-06-21Improve stopped container handlingFabricio Voznika
Getting state of a stopped container would fail and could lead containerd to not detecting that the container had actually stopped. Now stopped and deleted containers return `stopped` state. Also makes other messages more consistent when container is stopped. Some where still sending messages to runsc and failing in different ways. Now they go through `initState` state machine like the other messages. There are a few changes to improve debugability with it as well. Fixes #5861 PiperOrigin-RevId: 380698513
2021-06-21Merge release-20210614.0-7-g298cf3062 (automated)gVisor bot
2021-06-21Use fake clocks in NDP testsGhanan Gowripalan
Updates #5940. PiperOrigin-RevId: 380668609
2021-06-21Merge release-20210614.0-6-g45cd7c1b1 (automated)gVisor bot
2021-06-21netstack: don't ACK SYNs in TIME-WAITKevin Krakauer
It was possible for a SYN to arrive after the endpoint sent an ACK as part of the transition to TIME-WAIT, but before returning from handleSegmentsLocked(). This caused the SYN to be dequeued and ACK'd despite the change in EndpointState. Deflakes TestTCPTimeWaitNewSyn. Tested with: blaze test --config=gotsan --runs_per_test 10000 \ //third_party/gvisor/pkg/tcpip/transport/tcp:tcp_x_test -j 2000 \ // --test_filter TestTCPTimeWaitNewSyn PiperOrigin-RevId: 380639808
2021-06-19Merge release-20210614.0-4-gaa8a6fa2f (automated)gVisor bot
2021-06-18Add endpoints to map only if registerEndpoint succeeds.Bhasker Hariharan
epsByNIC.registerEndpoint can add a multiportEndpoint to its map of nic->multiportEndpoint even if multiport.Endpoint.singleRegisterEndpoint failed. Same for transportDemuxer.singleRegisterEndpoint which ends up adding an entry to nic->epsByNIC even if epsByNIC.registerEndpoint fails. These breaks an invariant which the code assumes that a multiportEndpoint/endpointsByNIC always have at least one valid entry. PiperOrigin-RevId: 380310115
2021-06-18Merge release-20210614.0-3-g081c463ad (automated)gVisor bot
2021-06-18Include off-link route's preference in update eventsGhanan Gowripalan
RFC 4191 supports the notion of a preference value for default routers and more-specific routes, so update the OffLinkRouteUpdate event to include this preference value so integrators may prioritize routes based on a route's advertised preference value. Note, more-specific route discovery is not supported yet, but will be in a later change. Updates #6172. Test: ndp_test.TestRouterDiscovery PiperOrigin-RevId: 380243716
2021-06-18Merge release-20210607.0-56-g1f2ce9f46 (automated)gVisor bot
2021-06-17[syserror] Change p9 server to use linuxerr.Zach Koopmans
Change the p9 server to use *errors.Error defined in pkg linuxerr. Done separate from the client so that we ensure different p9 server/client versions work with each other. PiperOrigin-RevId: 380084491
2021-06-17Merge release-20210607.0-55-gbc27a9918 (automated)gVisor bot
2021-06-17remove outdated ip6tables TODOsKevin Krakauer
IPv6 SO_ORIGINAL_DST is supported, and the flag check as-written will detect when other flags are needed. Fixes #3549. PiperOrigin-RevId: 380059115
2021-06-17Merge release-20210607.0-54-g3cf1644a3 (automated)gVisor bot
2021-06-17Move tcpip.Clock impl to TimekeeperTamir Duberstein
...and pass it explicitly. This reverts commit b63e61828d0652ad1769db342c17a3529d2d24ed. PiperOrigin-RevId: 380039167
2021-06-17Merge release-20210607.0-53-g0f5c1f5ea (automated)gVisor bot
2021-06-17raw sockets: don't overwrite destination addressKevin Krakauer
Also makes the behavior of raw sockets WRT fragmentation clearer, and makes the ICMPv4 header-length check explicit. Fixes #3160. PiperOrigin-RevId: 380033450
2021-06-16Merge release-20210607.0-52-g34152da7e (automated)gVisor bot
2021-06-16Fix broken hdrincl testKevin Krakauer
Fixes #3159. PiperOrigin-RevId: 379814096
2021-06-16Merge release-20210607.0-51-g63b4f6e29 (automated)gVisor bot
2021-06-16[syserror] Refactor linuxerr and error package.Zach Koopmans
Move Error struct to pkg/errors package for use in multiple places. Move linuxerr static definitions under pkg/errors/linuxerr. Add a lookup list for quick lookup of *errors.Error by errno. This is useful when converting syserror errors and unix.Errno/syscall.Errrno values to *errors.Error. Update benchmarks routines to include conversions. The below benchmarks show *errors.Error usage to be comparable to using unix.Errno. BenchmarkAssignUnix BenchmarkAssignUnix-32 787875022 1.284 ns/op BenchmarkAssignLinuxerr BenchmarkAssignLinuxerr-32 1000000000 1.209 ns/op BenchmarkAssignSyserror BenchmarkAssignSyserror-32 759269229 1.429 ns/op BenchmarkCompareUnix BenchmarkCompareUnix-32 1000000000 1.310 ns/op BenchmarkCompareLinuxerr BenchmarkCompareLinuxerr-32 1000000000 1.241 ns/op BenchmarkCompareSyserror BenchmarkCompareSyserror-32 147196165 8.248 ns/op BenchmarkSwitchUnix BenchmarkSwitchUnix-32 373233556 3.664 ns/op BenchmarkSwitchLinuxerr BenchmarkSwitchLinuxerr-32 476323929 3.294 ns/op BenchmarkSwitchSyserror BenchmarkSwitchSyserror-32 39293408 29.62 ns/op BenchmarkReturnUnix BenchmarkReturnUnix-32 1000000000 0.5042 ns/op BenchmarkReturnLinuxerr BenchmarkReturnLinuxerr-32 1000000000 0.8152 ns/op BenchmarkConvertUnixLinuxerr BenchmarkConvertUnixLinuxerr-32 739948875 1.547 ns/op BenchmarkConvertUnixLinuxerrZero BenchmarkConvertUnixLinuxerrZero-32 977733974 1.489 ns/op PiperOrigin-RevId: 379806801
2021-06-16Merge release-20210607.0-50-g47149b7c4 (automated)gVisor bot
2021-06-16kvm: mark UpperHalf PTE-s as globalAndrei Vagin
UpperHalf is shared with all address spaces. PiperOrigin-RevId: 379790539
2021-06-16Merge release-20210607.0-49-g4add64d2b (automated)gVisor bot
2021-06-16Merge pull request #5991 from zhlhahaha:2165gVisor bot
PiperOrigin-RevId: 379766106
2021-06-15Merge release-20210607.0-46-g3a8ba8ed9 (automated)gVisor bot
2021-06-14Support parsing Prf field in RAsGhanan Gowripalan
This change prepares for a later change which actually handles the Prf field in RAs to discover default routers with preference values, as per RFC 4191. Updates #6172. Test: header_test.TestNDPRouterAdvert PiperOrigin-RevId: 379421710
2021-06-14Merge release-20210607.0-43-gd4af8da36 (automated)gVisor bot
2021-06-14Rename DefaultRouter event to OffLinkRoute eventGhanan Gowripalan
This change prepares for a later change which supports the NDP Route Information option to discover more-specific routes, as per RFC 4191. Updates #6172. PiperOrigin-RevId: 379361330
2021-06-14Merge release-20210607.0-42-gb9db1c031 (automated)gVisor bot
2021-06-14Fix typoMichael Pratt
PiperOrigin-RevId: 379337677
2021-06-14Merge release-20210607.0-41-g9c7ff24fe (automated)gVisor bot
2021-06-14Cleanup iptables bug TODOsKevin Krakauer
There are many references to unimplemented iptables features that link to #170, but that bug is about Istio support specifically. Istio is supported, so the references should change. Some TODOs are addressed, some removed because they are not features requested by users, and some are left as implementation notes. Fixes #170. PiperOrigin-RevId: 379328488
2021-06-14Merge release-20210607.0-40-gb720bcb6f (automated)gVisor bot
2021-06-14Always accept discovered configurations from NDPGhanan Gowripalan
Before this change, the NDPDispatcher was allowed to "cancel" the discovery of default routers/prefixes and auto-generate addresses. No use case exists for this today so we drop this for now. If a use case comes up in the future, we should instead invalidate the discovered configuration through the stack instead of during discovery. PiperOrigin-RevId: 379327009
2021-06-14Merge release-20210601.0-52-g5c9e84622 (automated)gVisor bot
2021-06-13Remove usermem dependency from marshalIan Lewis
Both marshal and usermem are depended on by many packages and a dependency on marshal can often create circular dependencies. marshal should consider adding internal dependencies carefully moving forward. Fixes #6160 PiperOrigin-RevId: 379199882
2021-06-12Merge release-20210601.0-51-gb92e8ee8d (automated)gVisor bot
2021-06-11Fix //test/syscalls:exec_test_nativeZach Koopmans
Later kernels add empty arguments to argv, throwing off return values for the exec_basic_workload.cc binary. This is result of a bug introduced by ccbb18b67323b "exec/binfmt_script: Don't modify bprm->buf and then return - ENOEXEC". Before this change, an empty interpreter string was reported if the first non-space/non-tab character after "#!" was '\0' (end of file, previously- overwritten trailing space or tab, or previously-overwritten first newline). After this change, an empty interpreter string is reported if all characters after "#!" are spaces or tabs, or the first non-space non-tab character is at i_end, which is the position of the first newline after "#!". However, if there is no newline after "#!" (as in ExecTest.InterpreterScriptNoPath), then i_end = buf_end (= bprm->buf + sizeof(bprm->buf) - 1, the last possible byte in the buffer) and neither condition holds. Change white space for script inputs to take into account the above bug. Co-authored-by: Andrei Vagin <avagin@gmail.com> PiperOrigin-RevId: 378997171
2021-06-12Merge release-20210601.0-50-gec6a7ebc7 (automated)gVisor bot
2021-06-11Rework the workaround of the XCR0 issueAndrei Vagin
XCR0 has to be synchronized with the host. We can call xsave from the host context and then call xrstor from the guest context and vise versa. This means we need to support the same set of FPU features in both contexts. PiperOrigin-RevId: 378988281
2021-06-11Merge release-20210601.0-47-g0892420c9 (automated)gVisor bot
2021-06-10Minor VFS2 xattr changes.Jamie Liu
- Allow the gofer client to use most xattr namespaces. As documented by the updated comment, this is consistent with e.g. Linux's FUSE client, and allows gofers to provide extended attributes from FUSE filesystems. - Make tmpfs' listxattr omit xattrs in the "trusted" namespace for non-privileged users. PiperOrigin-RevId: 378778854