summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2021-09-01Cache cpuid.HostFeatureSet().Jamie Liu
PiperOrigin-RevId: 394261815
2021-08-31Remove splice-to/from-weird-files tests.Jamie Liu
These tests are permanently broken on Linux after 36e2c7421f02 "fs: don't allow splice read/write without explicit ops". PiperOrigin-RevId: 394161079
2021-08-31Automated rollback of changelist 390405182gVisor bot
PiperOrigin-RevId: 394004809
2021-08-30[syserr] Fix SIGBUS on syserr.FromErrorZach Koopmans
Fix syzcaller panic SIGBUS on error handling. Done by adding an interface, errors.GuestError, which errors can implement in order to be compared against each other. PiperOrigin-RevId: 393867554
2021-08-30Narrow COW-break on thread stacks.Jamie Liu
PiperOrigin-RevId: 393841270
2021-08-30Use specialFileFD handles in specialFileFD.Stat().Jamie Liu
PiperOrigin-RevId: 393831108
2021-08-30Avoid pseudo endpoint for TSVal generationZeling Feng
PiperOrigin-RevId: 393808461
2021-08-30Internal change.gVisor bot
PiperOrigin-RevId: 393783192
2021-08-27Fix lock order violations: mm.mappingMu > Task.mu.Nicolas Lacasse
Document this ordering in mm/mm.go. PiperOrigin-RevId: 393413203
2021-08-27Merge pull request #6415 from ZachEddy:containerd-runtime-options-v1.5gVisor bot
PiperOrigin-RevId: 393411409
2021-08-27Add LinkEndpoint.WriteRawPacket with stubsGhanan Gowripalan
...returning unsupported errors. PiperOrigin-RevId: 393388991
2021-08-26Add Stack.Seed() backZeling Feng
... because it is still used by fuchsia. PiperOrigin-RevId: 393246904
2021-08-26Merge pull request #6509 from gystemd:fix_test_pty_5357gVisor bot
PiperOrigin-RevId: 393217676
2021-08-26Centralize TCP timestamp logicTamir Duberstein
Remove freestanding functions that convert time values to raw integers; centralize time->uint32 logic in methods on tcp.endpoint. Importantly, the knowledge that TSVal is in milliseconds now lives in adjacent functions rather than being spread around various files. Incidental cleanup: - Remove unused constant - Remove redundant conversion - Remove redundant parentheses - Add missing error check PiperOrigin-RevId: 393184768
2021-08-26fix tests in pty.ccgystemd
fixed and enabled SetForegroundProcessGroup and SetForegroundProcessGroupEmptyProcessGroup.
2021-08-26Avoid unhandled error warningsTamir Duberstein
PiperOrigin-RevId: 393104589
2021-08-26Remove unused argumentTamir Duberstein
PiperOrigin-RevId: 393100095
2021-08-26Pass must-not-be-nil by valueTamir Duberstein
PiperOrigin-RevId: 393095246
2021-08-25Improve TestTimestampSynCookiesZeling Feng
.. by advancing the clock so that NowMonotonic does not return 0. PiperOrigin-RevId: 393005373
2021-08-25Avoid the appearance of allocationTamir Duberstein
PiperOrigin-RevId: 393004533
2021-08-25Remove quotedev deviceChong Cai
PiperOrigin-RevId: 392982220
2021-08-25[bm-dashboard] Add debugging to guitar benchmarks.Zach Koopmans
Add logs to big query for benchmarks. This is to debug the actual sent data from BQ so it can be compared to the data produced by the benchmark run. Current logs end with "Sending benchmarks", which is ambiguous. Log success to make sure they are sent. PiperOrigin-RevId: 392944104
2021-08-24Merge pull request #6438 from gystemd:tcsetpgrp_SIGTTOUgVisor bot
PiperOrigin-RevId: 392774712
2021-08-24Measure RTT during handshake since Linux does the sameZeling Feng
Some tcp unit tests are affected by this change: - Some retransmission tests assumed RTO=1s when connection is established. This is no longer true because minRTO was set to 3s in tests so now RTO becomes 3s after the first updateRTO call. Set minRTO=1s for these tests. - Some RACK enabled tests are affected because now that RTT is initialized, and the estimated RTT is quite small, spurious TLP might be sent out and causing flakes, introduce an artificial delay for these tests so that the estimated RTT is larger. PiperOrigin-RevId: 392768725
2021-08-24Fix uninitialized messages in MsgqueueTestFabricio Voznika
PiperOrigin-RevId: 392760305
2021-08-23Merge pull request #6491 from avagin:kvm-mem-slot-overlapgVisor bot
PiperOrigin-RevId: 392554743
2021-08-23Internal change.Chong Cai
PiperOrigin-RevId: 392523879
2021-08-23Use --output=starlark trick for all build path parsing.Adin Scannell
There is no reason to limit this to debian paths. PiperOrigin-RevId: 392469415
2021-08-21platform/kvm: set physical slots without overlappingAndrei Vagin
Right now, the first slot starts with an address of a memory region and its size is faultBlockSize, but the second slot starts with (physicalStart + faultBlockSize) & faultBlockMask. It means they will overlap if a start address of a memory region are not aligned to faultBlockSize. The kernel doesn't allow to add overlapped regions, but we ignore the EEXIST error. Signed-off-by: Andrei Vagin <avagin@google.com>
2021-08-20Allow gofer.specialFileFDs to be mmapped with a host FD.Jamie Liu
PiperOrigin-RevId: 392102898
2021-08-20[op] Prevent file leak in MultiGetAttr's error path.Ayush Ranjan
The old implementation was mostly correct but error prone - making way for the issue in question here. In its error path, it would leak the intermediate file being walked. Each return/break needed explicit cleanup. This change implements a more clean way to cleaning up intermediate directories. If the code were to evolve to be more complex, it would still work. PiperOrigin-RevId: 392102826
2021-08-20Fix lock ordering violation introduced in cl/347704347.Nicolas Lacasse
We cannot hold mm.aioManager.mu while calling MUnmap, because MUnmap attempts to aquire mm.mappingMu. This violates the lock order as documented in mm/mm.go. PiperOrigin-RevId: 392102472
2021-08-20Remove experimental warning in the VFS2 README.Jamie Liu
PiperOrigin-RevId: 392078690
2021-08-20Merge pull request #6484 from dqminh:fix-go-mod-instructionsgVisor bot
PiperOrigin-RevId: 392036519
2021-08-20Fix instructions refer to `tools/go_mod.sh`Daniel Dao
`tools/go_mod.sh` is not in the repo. In order to update the WORKSPACE dependencies, we can use the same gazelle command in BUILD file. Also changed `go mod get` to `go get`, the former does not exist anymore. Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2021-08-19Cache verity dentriesChong Cai
Add an LRU cache to cache verity dentries when ref count drop to 0. This way we don't need to hash and verify the previous opened files or directories each time. PiperOrigin-RevId: 391880157
2021-08-19Merge Read calls in verity merkle treeChong Cai
Read all data into memory in one Read call and verify them block by block instead of read each block during verification. This is for performance purpose to avoid invoking multiple syscalls. PiperOrigin-RevId: 391877937
2021-08-19Use MM-mapped I/O instead of buffered copies in gofer.specialFileFD.Jamie Liu
The rationale given for using buffered copies is still valid, but it's unclear whether holding MM locks or allocating buffers is better in practice, and the former is at least consistent with gofer.regularFileFD (and VFS1), making performance easier to reason about. PiperOrigin-RevId: 391877913
2021-08-19Add loopback interface as an ethernet-based deviceGhanan Gowripalan
...to match Linux behaviour. We can see evidence of Linux representing loopback as an ethernet-based device below: ``` # EUI-48 based MAC addresses. $ ip link show lo 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 # tcpdump showing ethernet frames when sniffing loopback and logging the # link-type as EN10MB (Ethernet). $ sudo tcpdump -i lo -e -c 2 -n tcpdump: verbose output suppressed, use -v[v]... for full protocol decode listening on lo, link-type EN10MB (Ethernet), snapshot length 262144 bytes 03:09:05.002034 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), length 66: 127.0.0.1.9557 > 127.0.0.1.36828: Flags [.], ack 3562800815, win 15342, options [nop,nop,TS val 843174495 ecr 843159493], length 0 03:09:05.002094 00:00:00:00:00:00 > 00:00:00:00:00:00, ethertype IPv4 (0x0800), length 66: 127.0.0.1.36828 > 127.0.0.1.9557: Flags [.], ack 1, win 6160, options [nop,nop,TS val 843174496 ecr 843159493], length 0 2 packets captured 116 packets received by filter 0 packets dropped by kernel ``` Wireshark shows a similar result as the tcpdump example above. Linux's loopback setup: https://github.com/torvalds/linux/blob/5bfc75d92efd494db37f5c4c173d3639d4772966/drivers/net/loopback.c#L162 PiperOrigin-RevId: 391836719
2021-08-19Use a hash function to generate tcp timestamp offsetZeling Feng
Also fix an option parsing error in checker.TCPTimestampChecker while I am here. PiperOrigin-RevId: 391828329
2021-08-18Split TCP secrets from Stack to tcp.protocolZeling Feng
Use different secrets for different purposes (port picking, ISN generation, tsOffset generation) and moved the secrets from stack.Stack to tcp.protocol. PiperOrigin-RevId: 391641238
2021-08-19Added a system call test for SetForegroundProcessGroupgystemd
-Added a test to check if the process in background is blocking SIGTTOU -Some minor formatting fixes
2021-08-18Add control configsChong Cai
Also plumber the controls through runsc PiperOrigin-RevId: 391594318
2021-08-18Declare default outputs from nogo_stdlibMichael Pratt
nogo_stdlib propogate facts and findings to downstream nogo_aspects via NogoStdlibInfo. This all works fine except one case: directly building a nogo_stdlib. e.g., bazel build //tools/nogo:stdlib. In this case, nothing is requesting the NogoStdlibInfo, and thus the target has nothing to do. This can be rather confusing when trying to debug failures in :stdlib, as building :stdlib does nothing. Fix this by declaring the facts and findings as default outputs from nogo_stdlib. Now direct bazel build will request these outputs and actually trigger the analysis. Standard aspect builds are unaffected. PiperOrigin-RevId: 391580126
2021-08-17[op] Deflake SNMP Metric proc_net tests.Ayush Ranjan
Earlier the tests were checking for equality of system-wide metrics before and after some network related operations. That is inherently racy for native tests because depending on the testing infrastructure, multiple tests might run parallely hence trampling over each other's metrics. Tests should only compare metrics that are increasing in nature. The comparison should not be a hard comparison, instead a less-than/greater-than relation test. I have changed the checks and also removed tests for tcpCurrEstab metric which has "SYNTAX Gauge" and hence can not be tested reliably. PiperOrigin-RevId: 391460081
2021-08-17Merge pull request #6262 from sudo-sturbia:msgqueue/syscalls3gVisor bot
PiperOrigin-RevId: 391416650
2021-08-17Added a SIGTTOU block check in SetForegroundProcessGroupgystemd
2021-08-17added two system call tests for setForegroundProcessGroupgystemd
Test the correct sending of the SIGTTOU in setForegroundProcess
2021-08-17Deflake test/perf:randread_benchmarkAndrei Vagin
The test expects that pread reads the full buffer, it means that the pread offset has to be equal or less than file_size - buffer_size. PiperOrigin-RevId: 391356863
2021-08-17Implement stub for msgctl(2).Zyad A. Ali
Add support for msgctl and enable tests. Fixes #135