summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-08-18Add more information to panic when device ID don't matchFabricio Voznika
PiperOrigin-RevId: 327351357
2020-08-18Fix return value in shm_test for opensourceZach Koopmans
Some machines return 128 + signal for failures. Accept that as a valid result. PiperOrigin-RevId: 327326113
2020-08-18RACK: Create a new list for segments.Nayana Bidari
RACK requires the segments to be in the order of their transmission or retransmission times. This cl creates a new list and moves the retransmitted segments to the end of the list. PiperOrigin-RevId: 327325153
2020-08-18Avoid holding locks when opening files in VFS2.Jamie Liu
Fixes #3243, #3521 PiperOrigin-RevId: 327308890
2020-08-18Return EROFS if mount is read-onlyFabricio Voznika
PiperOrigin-RevId: 327300635
2020-08-18Fix timeval for Socket testZach Koopmans
tv_usec field should be a multiple of 4K to pass in open source on linux/native, so make it one. PiperOrigin-RevId: 327288405
2020-08-18Wait for all p9 handlers to complete before server shutdown.Jamie Liu
... including those invoked via flipcall. PiperOrigin-RevId: 327283194
2020-08-18[vfs2] Implement /proc/sys/net/ipv4/tcp_rmem and /proc/sys/net/ipv4/tcp_wmem.Ayush Ranjan
Updates #1035 PiperOrigin-RevId: 327253907
2020-08-18Fix readahead test for opensource.Zach Koopmans
Skip InvalidOffset and InvalidLength for Linux as the test is invalid for later Kernel versions. Add UnsupportedFile test as this check is in all kernel versions. PiperOrigin-RevId: 327248035
2020-08-18Fix return value for MMap Tests in OpenSourceZach Koopmans
Some systems return 128 + errno instead of just errno, which is the case here. PiperOrigin-RevId: 327247836
2020-08-17Add a skeleton for verity file systemgVisor bot
PiperOrigin-RevId: 327123477
2020-08-17Stop masking the IO error in handleIOError.Nicolas Lacasse
PiperOrigin-RevId: 327123331
2020-08-17Add Verify in merkle tree librarygVisor bot
Verify checks input data against the merkle tree, and compares the root hash with expectation. PiperOrigin-RevId: 327116711
2020-08-17Fix AllSocketPairTest for open source.Zach Koopmans
Setting timeouts for sockets on GCP images (debian) for usecs only respects multiples of 4K. Set the test with a multiple of 4K with a comment. PiperOrigin-RevId: 327093848
2020-08-17[vfs] Do O_DIRECTORY check after resolving symlinks.Ayush Ranjan
Fixes python runtime test test_glob. Updates #3515 We were checking is the to-be-opened dentry is a dir or not before resolving symlinks. We should check that after resolving symlinks. This was preventing us from opening a symlink which pointed to a directory with O_DIRECTORY. Also added this check in tmpfs and removed a duplicate check. PiperOrigin-RevId: 327085895
2020-08-17Remove address range functionsGhanan Gowripalan
Should have been removed in cl/326791119 https://github.com/google/gvisor/commit/9a7b5830aa063895f67ca0fdf653a46906374613 PiperOrigin-RevId: 327074156
2020-08-17Remove weak references from unix sockets.Dean Deng
The abstract socket namespace no longer holds any references on sockets. Instead, TryIncRef() is used when a socket is being retrieved in BoundEndpoint(). Abstract sockets are now responsible for removing themselves from the namespace they are in, when they are destroyed. Updates #1486. PiperOrigin-RevId: 327064173
2020-08-17Add a unit test for out of order IP reassemblyArthur Sfez
PiperOrigin-RevId: 327042869
2020-08-17[vfs] Return EIO when opening /dev/tty.Ayush Ranjan
This is in compliance with VFS1. See pkg/sentry/fs/dev/tty.go in the struct ttyInodeOperations. Fixes the failure of python runtime test_ioctl. Updates #3515 PiperOrigin-RevId: 327042758
2020-08-15Don't support address rangesGhanan Gowripalan
Previously the netstack supported assignment of a range of addresses. This feature is not used so remove it. PiperOrigin-RevId: 326791119
2020-08-14Use a single NetworkEndpoint per NIC per protocolGhanan Gowripalan
The NetworkEndpoint does not need to be created for each address. Most of the work the NetworkEndpoint does is address agnostic. PiperOrigin-RevId: 326759605
2020-08-14Handle URLs better in issue reviverIan Lewis
- Handle urls ending in / - Add some url parsing tests PiperOrigin-RevId: 326750183
2020-08-14Update README for packetimpactNayana Bidari
PiperOrigin-RevId: 326733912
2020-08-14Merge pull request #3375 from kevinGC:ipt-test-early-returngVisor bot
PiperOrigin-RevId: 326693922
2020-08-14Skip UDPMulticast Tests when net interfaces aren't found.Zach Koopmans
PiperOrigin-RevId: 326686761
2020-08-14Give the ICMP Code its own typeJulian Elischer
This is a preparatory commit for a larger commit working on ICMP generation in error cases. This is removal of technical debt and cleanup in the gvisor code as part of gvisor issue 2211. Updates #2211. PiperOrigin-RevId: 326615389
2020-08-13[vfs2][gofer] Fix file creation flags sent to gofer.Ayush Ranjan
Fixes php runtime test ext/standard/tests/file/readfile_basic.phpt Fixes #3516 fsgofers only want the access mode in the OpenFlags passed to Create(). If more flags are supplied (like O_APPEND in this case), read/write from that fd will fail with EBADF. See runsc/fsgofer/fsgofer.go:WriteAt() VFS2 was providing more than just access modes. So filtering the flags using p9.OpenFlagsModeMask == linux.O_ACCMODE fixes the issue. Gofer in VFS1 also only extracts the access mode flags while making the create RPC. See pkg/sentry/fs/gofer/path.go:Create() Even in VFS2, when we open a handle, we extract out only the access mode flags + O_TRUNC. See third_party/gvisor/pkg/sentry/fsimpl/gofer/handle.go:openHandle() Added a test for this. PiperOrigin-RevId: 326574829
2020-08-13Use the user supplied MSS for accepted connectionsGhanan Gowripalan
This change supports using the user supplied MSS (TCP_MAXSEG socket option) for new socket connections created from a listening TCP socket. Note that the user supplied MSS will only be used if it is not greater than the maximum possible MSS for a TCP connection's route. If it is greater than the maximum possible MSS, the MSS will be capped at that maximum value. Test: tcp_test.TestUserSuppliedMSSOnListenAccept PiperOrigin-RevId: 326567442
2020-08-13Merge pull request #3476 from zhlhahaha:1930gVisor bot
PiperOrigin-RevId: 326563255
2020-08-13Disable vfs2 for socket_stress_test.Ayush Ranjan
PiperOrigin-RevId: 326553620
2020-08-13Migrate to PacketHeader API for PacketBuffer.Ting-Yu Wang
Formerly, when a packet is constructed or parsed, all headers are set by the client code. This almost always involved prepending to pk.Header buffer or trimming pk.Data portion. This is known to prone to bugs, due to the complexity and number of the invariants assumed across netstack to maintain. In the new PacketHeader API, client will call Push()/Consume() method to construct/parse an outgoing/incoming packet. All invariants, such as slicing and trimming, are maintained by the API itself. NewPacketBuffer() is introduced to create new PacketBuffer. Zero value is no longer valid. PacketBuffer now assumes the packet is a concatenation of following portions: * LinkHeader * NetworkHeader * TransportHeader * Data Any of them could be empty, or zero-length. PiperOrigin-RevId: 326507688
2020-08-13Ensure TCP TIME-WAIT is not terminated prematurely.Bhasker Hariharan
Netstack's TIME-WAIT state for a TCP socket could be terminated prematurely if the socket entered TIME-WAIT using shutdown(..., SHUT_RDWR) and then was closed using close(). This fixes that bug and updates the tests to verify that Netstack correctly honors TIME-WAIT under such conditions. Fixes #3106 PiperOrigin-RevId: 326456443
2020-08-12Add reference leak checking to vfs2 tmpfs.inode.Dean Deng
Updates #1486. PiperOrigin-RevId: 326354750
2020-08-12[vfs2][gofer] Return appropriate errors when opening and creating files.Ayush Ranjan
Fixes php test ext/standard/tests/file/touch_variation5.phpt on vfs2. Updates #3516 Also spotted a bug with O_EXCL, where we did not return EEXIST when we tried to open the root of the filesystem with O_EXCL | O_CREAT. Added some more tests for open() corner cases. PiperOrigin-RevId: 326346863
2020-08-12ip6tables: ABI structs and constantsKevin Krakauer
Part of #3549. PiperOrigin-RevId: 326329028
2020-08-12Merge pull request #3605 from lubinszARM:pr_helloworld_thunderx2gVisor bot
PiperOrigin-RevId: 326326710
2020-08-12Merge pull request #3250 from craig08:fuse-getattrgVisor bot
PiperOrigin-RevId: 326313858
2020-08-12Limit the scope when deleting test log directory on successFabricio Voznika
The code was deleting logs for all tests when a single test passed. Change it to delete only the logs relevant to the test at hand. Also fixed the benchmark lookup code, which was always generating a single empty benchmark entry if there were not benchmarks. PiperOrigin-RevId: 326311477
2020-08-12Redirect TODOFabricio Voznika
Fixes #2923 PiperOrigin-RevId: 326296589
2020-08-12Release fd references on aio callback cancellation.Dean Deng
Discovered by reference leak checker on tmpfs.inode. PiperOrigin-RevId: 326294755
2020-08-12Fix race in vfs.FileDescription.statusFlagFabricio Voznika
PiperOrigin-RevId: 326270643
2020-08-12Running hello-world on Thunderx2 with kvmBin Lu
Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-08-12enable seccomp test on arm64Howard Zhang
syscalls in ARM64 is different from that in X86_64, use differen syscallrules for each arch. The auditnumber are also different for different arch. Use LINUX_AUDIT_ARCH to get correct auditnumber. Signed-off-by: Howard Zhang <howard.zhang@arm.com>
2020-08-11Fix-up issue comment.Adin Scannell
PiperOrigin-RevId: 326129258
2020-08-11Eliminate one allocation per send/recv for non-flipcall transport.Fazlul Shahriar
Ported from https://github.com/hugelgupf/p9/pull/44. name old time/op new time/op delta SendRecvLegacy-6 61.5µs ± 6% 60.1µs ±11% ~ (p=0.063 n=9+9) SendRecv-6 40.7µs ± 2% 39.8µs ± 5% -2.27% (p=0.035 n=10+10) name old alloc/op new alloc/op delta SendRecvLegacy-6 769B ± 0% 705B ± 0% -8.37% (p=0.000 n=8+10) SendRecv-6 320B ± 0% 256B ± 0% -20.00% (p=0.000 n=10+10) name old allocs/op new allocs/op delta SendRecvLegacy-6 25.0 ± 0% 23.0 ± 0% -8.00% (p=0.000 n=10+10) SendRecv-6 14.0 ± 0% 12.0 ± 0% -14.29% (p=0.000 n=10+10) PiperOrigin-RevId: 326127979
2020-08-11Mark integration tests as passing in VFS2 except CheckpointRestore.Zach Koopmans
Mark all tests passing for VFS2 in: image_test integration_test There's no way to do negative look ahead/behind in golang test regex, so check if the tests uses VFS2 and skip CheckPointRestore if it does. PiperOrigin-RevId: 326050915
2020-08-10Set the NetworkProtocolNumber of all PacketBuffers.Kevin Krakauer
NetworkEndpoints set the number on outgoing packets in Write() and NetworkProtocols set them on incoming packets in Parse(). Needed for #3549. PiperOrigin-RevId: 325938745
2020-08-10Implement FUSE_GETATTRCraig Chi
FUSE_GETATTR is called when a stat(2), fstat(2), or lstat(2) is issued from VFS2 layer to a FUSE filesystem. Fixes #3175
2020-08-10Speed up iptables testsKevin Krakauer
//test/iptables:iptables_test runs 30 seconds faster on my machine. * Using contexts instead of many smaller timeouts makes the tests less likely to flake and removes unnecessary complexity. * We also use context to properly shut down concurrent goroutines and the test container. * Container logs are always logged.
2020-08-10Populate IPPacketInfo with destination addressGhanan Gowripalan
IPPacketInfo.DestinationAddr should hold the destination of the IP packet, not the source. This change fixes that bug. PiperOrigin-RevId: 325910766