summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-01-28Prefer Type& over Type &Michael Pratt
And Type* over Type *. This is basically a whitespace only change. gVisor code already prefers left-alignment of pointers and references, but clang-format formats for consistency with the majority of a file, and some files leaned the wrong way. This is a one-time pass to make us completely conforming. Autogenerated with: $ find . \( -name "*.cc" -or -name "*.c" -or -name "*.h" \) \ | xargs clang-format -i -style="{BasedOnStyle: Google, \ DerivePointerAlignment: false, PointerAlignment: Left}" PiperOrigin-RevId: 291972421
2020-01-27Create platform_util for tests.Adin Scannell
PiperOrigin-RevId: 291869423
2020-01-27Add a type to represent the NDP Source Link Layer Address optionGhanan Gowripalan
Tests: - header.TestNDPSourceLinkLayerAddressOptionEthernetAddress - header.TestNDPSourceLinkLayerAddressOptionSerialize - header.TestNDPOptionsIterCheck - header.TestNDPOptionsIter PiperOrigin-RevId: 291856429
2020-01-27Fix header ordering and format all C++ code.Adin Scannell
PiperOrigin-RevId: 291844200
2020-01-27Merge pull request #1561 from zhangningdlut:chris_ttygVisor bot
PiperOrigin-RevId: 291821850
2020-01-27Cleanup glog and add real caller information.Adin Scannell
In general, we've learned that logging must be avoided at all costs in the hot path. It's unlikely that the optimizations here were significant in any case, since buffer would certainly escape. This also adds a test to ensure that the caller identification works as expected, and so that logging can be benchmarked. Original: BenchmarkGoogleLogging-6 1222255 949 ns/op With this change: BenchmarkGoogleLogging-6 517323 2346 ns/op Fixes #184 PiperOrigin-RevId: 291815420
2020-01-27Update package locations.Adin Scannell
Because the abi will depend on the core types for marshalling (usermem, context, safemem, safecopy), these need to be flattened from the sentry directory. These packages contain no sentry-specific details. PiperOrigin-RevId: 291811289
2020-01-27Merge pull request #1676 from majek:marek/FIX-1632-expose-NewPacketConngVisor bot
PiperOrigin-RevId: 291803499
2020-01-27Fix licenses.Adin Scannell
The preferred Copyright holder is "The gVisor Authors". PiperOrigin-RevId: 291786657
2020-01-27Update ChecksumVVWithoffset to use unrolled version.Bhasker Hariharan
Fixes #1656 PiperOrigin-RevId: 291777279
2020-01-27Update bug number for supporting extended attribute namespaces.Dean Deng
PiperOrigin-RevId: 291774815
2020-01-27Refactor to hide C from channel.Endpoint.Ting-Yu Wang
This is to aid later implementation for /dev/net/tun device. PiperOrigin-RevId: 291746025
2020-01-27Standardize on tools directory.Adin Scannell
PiperOrigin-RevId: 291745021
2020-01-27Expose gonet.NewPacketConn, for parity with gonet.NewConn APIMarek Majkowski
gonet.Conn can be created with both gonet.NewConn and gonet.Dial. gonet.PacketConn was created only by gonet.DialUDP. This prevented us from being able to use PacketConn in udp.NewForwarder() context. This simple constructor - NewPacketConn, allows user to create correct structure from that context.
2020-01-27Replace calculateChecksum w/ the unrolled version.Bhasker Hariharan
Fixes #1656 PiperOrigin-RevId: 291703760
2020-01-26Unroll checksum computation loop.Bhasker Hariharan
Checksum computation is one of the most expensive bits of packet processing. Manual unrolling of the loop provides significant improvement in checksum speed. Updates #1656 BenchmarkChecksum/checksum_64-12 49834124 23.6 ns/op BenchmarkChecksum/checksum_128-12 27111997 44.1 ns/op BenchmarkChecksum/checksum_256-12 11416683 91.5 ns/op BenchmarkChecksum/checksum_512-12 6375298 174 ns/op BenchmarkChecksum/checksum_1024-12 3403852 338 ns/op BenchmarkChecksum/checksum_1500-12 2343576 493 ns/op BenchmarkChecksum/checksum_2048-12 1730521 656 ns/op BenchmarkChecksum/checksum_4096-12 920469 1327 ns/op BenchmarkChecksum/checksum_8192-12 445885 2637 ns/op BenchmarkChecksum/checksum_16384-12 226342 5268 ns/op BenchmarkChecksum/checksum_32767-12 114210 10503 ns/op BenchmarkChecksum/checksum_32768-12 99138 10610 ns/op BenchmarkChecksum/checksum_65535-12 53438 21158 ns/op BenchmarkChecksum/checksum_65536-12 52993 21067 ns/op BenchmarkUnrolledChecksum/checksum_64-12 61035639 19.1 ns/op BenchmarkUnrolledChecksum/checksum_128-12 36067015 33.6 ns/op BenchmarkUnrolledChecksum/checksum_256-12 19731220 60.4 ns/op BenchmarkUnrolledChecksum/checksum_512-12 9091291 116 ns/op BenchmarkUnrolledChecksum/checksum_1024-12 4976406 226 ns/op BenchmarkUnrolledChecksum/checksum_1500-12 3685224 328 ns/op BenchmarkUnrolledChecksum/checksum_2048-12 2579108 447 ns/op BenchmarkUnrolledChecksum/checksum_4096-12 1350475 887 ns/op BenchmarkUnrolledChecksum/checksum_8192-12 658248 1780 ns/op BenchmarkUnrolledChecksum/checksum_16384-12 335869 3534 ns/op BenchmarkUnrolledChecksum/checksum_32767-12 168650 7095 ns/op BenchmarkUnrolledChecksum/checksum_32768-12 168075 7098 ns/op BenchmarkUnrolledChecksum/checksum_65535-12 75085 14277 ns/op BenchmarkUnrolledChecksum/checksum_65536-12 75921 14127 ns/op PiperOrigin-RevId: 291643290
2020-01-24Add support for device special files to VFS2 tmpfs.Jamie Liu
PiperOrigin-RevId: 291471892
2020-01-24Lock the NIC when checking if an address is tentativeGhanan Gowripalan
PiperOrigin-RevId: 291426657
2020-01-24Add anonymous device number allocation to VFS2.Jamie Liu
Note that in VFS2, filesystem device numbers are per-vfs.FilesystemImpl rather than global, avoiding the need for a "registry" type to handle save/restore. (This is more consistent with Linux anyway: compare e.g. mm/shmem.c:shmem_mount() => fs/super.c:mount_nodev() => (indirectly) set_anon_super().) PiperOrigin-RevId: 291425193
2020-01-24Increase timeouts for NDP tests' async eventsGhanan Gowripalan
Increase the timeout to 1s when waiting for async NDP events to help reduce flakiness. This will not significantly increase test times as the async events continue to receive an event on a channel. The increased timeout allows more time for an event to be sent on the channel as the previous timeout of 100ms caused some flakes. Test: Existing tests pass PiperOrigin-RevId: 291420936
2020-01-24Ignore external SIGURGMichael Pratt
Go 1.14+ sends SIGURG to Ms to attempt asynchronous preemption of a G. Since it can't guarantee that a SIGURG is only related to preemption, it continues to forward them to signal.Notify (see runtime.sighandler). We should ignore these signals, as applications shouldn't receive them. Note that this means that truly external SIGURG can no longer be sent to the application (as with SIGCHLD). PiperOrigin-RevId: 291415357
2020-01-24Fix corpus_name to match our ingestion config[1].Brad Burlage
PiperOrigin-RevId: 291412676
2020-01-23Remove epoll entry from map when dropping it.Nicolas Lacasse
This pattern (delete from map when dropping) is also used in epoll.RemoveEntry, and seems like generally a good idea. PiperOrigin-RevId: 291268208
2020-01-23Merge pull request #1617 from kevinGC:iptables-write-filter-protogVisor bot
PiperOrigin-RevId: 291249314
2020-01-23Fix kythe build.Brad Burlage
* Pass --auth_credentials now that we're using RBE * Fix kzips not being uploaded to the root of the GCS bucket PiperOrigin-RevId: 291241757
2020-01-23Check for EINTR from KVM_CREATE_VMMichael Pratt
The kernel may return EINTR from: kvm_create_vm kvm_init_mmu_notifier mmu_notifier_register do_mmu_notifier_register mm_take_all_locks Go 1.14's preemptive scheduling signals make hitting this much more likely. PiperOrigin-RevId: 291212669
2020-01-23Try running kythe build on RBE.Brad Burlage
Also add our RBE project/instance to the --config=remote defaults. PiperOrigin-RevId: 291201426
2020-01-23Fix master build case.Adin Scannell
Otherwise, this will be built when building a specific release tag (typically in the past), causing the master binary to be overwritten with something older. We can generally assume that tags will be applied after the commit has been integrated, and therefore that any builds pointing to tags will use only the tags. Another way to fix this would be to introduce something akin to the KOKORO_BUILD_NIGHTLY environment variable, but it doesn't seem strictly necessary. PiperOrigin-RevId: 291198171
2020-01-22De-duplicate common test functionality for VFS2 filesystems.Rahat Mahmood
PiperOrigin-RevId: 291041576
2020-01-22Use embedded mutex pattern for stack.NICGhanan Gowripalan
- Wrap NIC's fields that should only be accessed while holding the mutex in an anonymous struct with the embedded mutex. - Make sure NIC's spoofing and promiscuous mode flags are only read while holding the NIC's mutex. - Use the correct endpoint when sending DAD messages. - Do not hold the NIC's lock when sending DAD messages. This change does not introduce any behaviour changes. Tests: Existing tests continue to pass. PiperOrigin-RevId: 291036251
2020-01-22Merge pull request #1629 from xiaobo55x:fault_testgVisor bot
PiperOrigin-RevId: 291022423
2020-01-22Merge pull request #1631 from majek:fix-gonet-udp.RemoteAddrgVisor bot
PiperOrigin-RevId: 291019296
2020-01-22Move VFS2 handling of FD readability/writability to vfs.FileDescription.Jamie Liu
PiperOrigin-RevId: 291006713
2020-01-22Toolchain version bumps.Nicolas Lacasse
- bazel_toolchain to 2.0.2 - rules_go to 0.21.0 - Go toolchain to 1.13.6 - Use new proto lib archive. PiperOrigin-RevId: 290999410
2020-01-22Add tools for generating images.Adin Scannell
This formalizes the adhoc scripts previously in kokoro. The image targets can be used by e.g. benchmarks in order to automated image prepation. PiperOrigin-RevId: 290982744
2020-01-22Address GitHub comments.Kevin Krakauer
2020-01-22gonet PacketConn.RemoteAddr() incorrectly returns *net.TCPAddr, should be ↵Marek Majkowski
*net.UDPAddr PacketConn.LocalAddr() already returns *net.UDPAddr correctly.
2020-01-22Enable fault() syscall test on arm64.Haibo Xu
Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I9b2b2e0d84946c10cf136abeef6c60642fa3b6ec
2020-01-21Rename DowngradableRWMutex to RWmutex.Ian Gudger
Also renames TMutex to Mutex. These custom mutexes aren't any worse than the standard library versions (same code), so having both seems redundant. PiperOrigin-RevId: 290873587
2020-01-21Add trylock support to DowngradableRWMutex.Ian Gudger
Updates #231 PiperOrigin-RevId: 290868875
2020-01-21TMutex based on sync.Mutex.Ian Gudger
Updates #231 PiperOrigin-RevId: 290854399
2020-01-21Install Bazel 2.0.0 on kokoro images.Nicolas Lacasse
PiperOrigin-RevId: 290850738
2020-01-21Merge pull request #1609 from xiaobo55x:unamegVisor bot
PiperOrigin-RevId: 290849438
2020-01-21Change to standard types.Adin Scannell
PiperOrigin-RevId: 290846481
2020-01-21Merge pull request #1505 from xiaobo55x:fcntl_flagsgVisor bot
PiperOrigin-RevId: 290840484
2020-01-21Merge pull request #1492 from majek:err_typo_in_netstack_testsgVisor bot
PiperOrigin-RevId: 290840370
2020-01-21Merge pull request #1275 from lubinszARM:pr_ring0_5gVisor bot
PiperOrigin-RevId: 290839263
2020-01-21Add a new TCP stat for current open connections.Mithun Iyer
Such a stat accounts for all connections that are currently established and not yet transitioned to close state. Also fix bug in double increment of CurrentEstablished stat. Fixes #1579 PiperOrigin-RevId: 290827365
2020-01-21Implement sysfs.Rahat Mahmood
PiperOrigin-RevId: 290822487
2020-01-21Add missing verbMichael Pratt
PiperOrigin-RevId: 290821997