summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2021-11-09Merge release-20211101.0-27-g3f5cfe694 (automated)gogVisor bot
2021-11-09Remove Stack.NewJobTamir Duberstein
Use the static method instead; these methods encourage callers to retain a pointer to the entire stack rather than only its clock which they require. PiperOrigin-RevId: 408651956
2021-11-08Merge release-20211101.0-26-g84b38f4c6 (automated)gVisor bot
2021-11-08Add reference counting to packet buffers.Lucas Manning
PiperOrigin-RevId: 408426639
2021-11-08Merge release-20211101.0-25-g49d23beb2 (automated)gVisor bot
2021-11-08Allow array and primitive types with names starting with W.Ayush Ranjan
PiperOrigin-RevId: 408397832
2021-11-08Merge release-20211101.0-24-g55b70552c (automated)gVisor bot
2021-11-08Replace references of ConnectableEndpoint with BoundEndpoint.Ayush Ranjan
PiperOrigin-RevId: 408366542
2021-11-08Merge release-20211101.0-23-g510bad19b (automated)gVisor bot
2021-11-08Use faster marshalling method for non primitive struct fields.Ayush Ranjan
In autogenerating the implementation of Marshallable.MarshalBytes(), we were using the slower MarshalBytes(). Instead use MarshalUnsafe which is faster and falls back to slow MarshalBytes() if the type is not packed. Even if the outer struct is not packed, we can at least do fast marshalling on its packed fields. PiperOrigin-RevId: 408268469
2021-11-08Merge release-20211101.0-22-g4622e17bc (automated)gVisor bot
2021-11-08Simplify {Un}MarshalUnsafeSlice method signatures.Ayush Ranjan
Earlier this function was returning (int, error) much like the Copy{In/Out} methods. The returned error was always nil. The returned int was never used. Instead make it returned the shifted buffer which is more useful. Updates #6450 PiperOrigin-RevId: 408268327
2021-11-05Merge release-20211101.0-21-gce4f4283b (automated)gVisor bot
2021-11-05Make {Un}Marshal{Bytes/Unsafe} return remaining buffer.Ayush Ranjan
Change marshal.Marshallable method signatures to return the remaining buffer. This makes it easier to implement these method manually. Without this, we would have to manually do buffer shifting which is error prone. tools/go_marshal/test:benchmark test does not show change in performance. Additionally fixed some marshalling bugs in fsimpl/fuse. Updated multiple callpoints to get rid of redundant slice indexing work and simplified code using this new signature. Updates #6450 PiperOrigin-RevId: 407857019
2021-11-05Merge release-20211101.0-20-g822a64701 (automated)gVisor bot
2021-11-05Fix unfair comparison to unbuffered channels in sleep_test.go.Jamie Liu
Consider the following benchmark, which is equivalent to BenchmarkSleeperWaitOnSingleSelect with names changed to more closely reflect the behavior of BenchmarkGoWaitOnSingleSelect: var ( empty Sleeper emptyCond Waker full Sleeper fullCond Waker ) empty.AddWaker(&emptyCond) full.AddWaker(&fullCond) go func() { for i := 0; i < b.N; i++ { empty.Fetch(true) fullCond.Assert() } }() for i := 0; i < b.N; i++ { emptyCond.Assert() full.Fetch(true) } The unfairness arises because runtime.chansend and runtime.chanrecv don't actually work this way. If runtime.chansend blocks, it has already enqueued the element to be sent on runtime.hchan.sendq, which runtime.chanrecv dequeues before calling goready(); in sleep-like terms, by the time empty.Fetch() returns, fullCond.Assert() has already happened and been fetched by the other goroutine. The same property applies to runtime.chanrecv/runtime.hchan.recvq. This property has no correspondence to the actual usage of the sleep package, so change the channel benchmarks to explicitly exchange control using buffered channels instead. Also remove some stale comments and align the syncevent benchmarks with the sleep ones. BenchmarkSleeperWaitOnSingleSelect BenchmarkSleeperWaitOnSingleSelect-12 2118603 472.5 ns/op BenchmarkGoWaitOnSingleSelect BenchmarkGoWaitOnSingleSelect-12 2224262 517.7 ns/op BenchmarkSleeperWaitOnMultiSelect BenchmarkSleeperWaitOnMultiSelect-12 2630569 459.8 ns/op BenchmarkGoWaitOnMultiSelect BenchmarkGoWaitOnMultiSelect-12 807918 1312 ns/op BenchmarkWaiterPingPong BenchmarkWaiterPingPong-12 2955579 385.8 ns/op BenchmarkSleeperPingPong BenchmarkSleeperPingPong-12 2454367 474.3 ns/op BenchmarkChannelPingPong BenchmarkChannelPingPong-12 2302662 513.5 ns/op BenchmarkWaiterPingPongMulti BenchmarkWaiterPingPongMulti-12 3023676 388.8 ns/op BenchmarkSleeperPingPongMulti BenchmarkSleeperPingPongMulti-12 2574064 471.5 ns/op BenchmarkChannelPingPongMulti BenchmarkChannelPingPongMulti-12 1000000 1088 ns/op PiperOrigin-RevId: 407760956
2021-11-05Merge release-20211101.0-19-gd80af5f8b (automated)gVisor bot
2021-11-04Remove id from sleep.Sleeper API.Adin Scannell
In a subsequent change, the Sleeper API will be plumbed through and used for arbitrary task wakeups. This requires a non-static association of Wakers and Sleepers, which means that a fixed ID no longer works. This is a relatively simple change that removes the ID from the Waker association, and simply uses the Waker pointer itself. That change also makes minor improvements to the tests to ensure that the benchmarks are more representative by removing goroutine start from the hot path (and uses Wakers for required synchronization), adds assertion checks to AddWaker, and clears relevant fields during Done (to allow assertions to pass). PiperOrigin-RevId: 407719630
2021-11-04Merge release-20211026.0-34-gfe8e48fc6 (automated)gVisor bot
2021-11-04[syserr] Move ConvertIntr function to linuxerr packageZach Koopmans
Move ConverIntr out of syserr package and delete an unused function. PiperOrigin-RevId: 407676258
2021-11-04Merge release-20211026.0-33-g23a115dae (automated)gVisor bot
2021-11-04[syserr] Reverse dependency for tcpip.ErrorZach Koopmans
PiperOrigin-RevId: 407638912
2021-11-04Merge release-20211026.0-32-g80cba65bd (automated)gVisor bot
2021-11-03Add automatic lock inference and globals support.Adin Scannell
Lock inference will apply annotations to all fields that seem to be protected. This is currently disabled for all code by default, but it can be enabled as annotations are applied more broadly. PiperOrigin-RevId: 407501915
2021-11-03Merge release-20211026.0-31-g5185548e1 (automated)gVisor bot
2021-11-03Merge pull request #6499 from dqminh:cgroup-interfacegVisor bot
PiperOrigin-RevId: 407392578
2021-11-03Merge release-20211026.0-29-g7551b0590 (automated)gVisor bot
2021-11-02Minor checklocks improvements.Adin Scannell
* Support sync.Locker. * Prevent runaway recursion when locks are acquired in a loop. * Allowing ignoring of anonymous functions (inherited from parent function). * Add support for aliases. PiperOrigin-RevId: 407221521
2021-11-02Merge release-20211026.0-28-ga8eb1895b (automated)gVisor bot
2021-11-02Merge pull request #6805 from bradfitz:bradfitz/mipslegVisor bot
PiperOrigin-RevId: 407188968
2021-11-02Merge release-20211026.0-26-g88cf2e93e (automated)gVisor bot
2021-11-02Extract tcb & lastUsed to its own lockGhanan Gowripalan
These fields do not need to synchronize reads/writes with the rest of the connection. PiperOrigin-RevId: 407183693
2021-11-02Merge release-20211026.0-25-g3141bf7a2 (automated)gVisor bot
2021-11-02Merge pull request #6803 from pkit:pkit/copy_arpgVisor bot
PiperOrigin-RevId: 407177936
2021-11-02Merge release-20211026.0-23-gea792cb3e (automated)gVisor bot
2021-11-02Properly reap NATed connectionsGhanan Gowripalan
This change fixes a bug when reaping tuples of NAT-ed connections. Previously when reaping a tuple, the other direction's tuple ID was calculated by taking the reaping tuple's ID and inverting it. This works when a connection is not NATed but doesn't work when NAT is performed as the other direction's tuple may use different addresses. PiperOrigin-RevId: 407160930
2021-11-02Merge release-20211026.0-22-g1e1d6b2be (automated)gVisor bot
2021-11-02Allow SetAttr and Allocate for deleted filesFabricio Voznika
It's safe to call SetAttr and Allocate on fsgofer because the file path is not used to open the file, if needed. Fixes #3654 PiperOrigin-RevId: 407149393
2021-11-02copy PERM ARP entries from namespace on bootConstantine Peresypkin
copy and setup PERMANENT (static) ARP entries from CNI namespace to the sandbox Fixes #3301
2021-11-02Merge release-20211026.0-21-g42a08f036 (automated)gVisor bot
2021-11-01Allow partial packets in ICMP errors when NATingGhanan Gowripalan
An ICMP error may not hold the full packet that triggered the ICMP response. As long as the IP header and the transport header is parsable, we should be able to successfully NAT as that is all that we need to identify the connection. PiperOrigin-RevId: 406966048
2021-11-01Merge release-20211026.0-20-g58017e655 (automated)gVisor bot
2021-11-01Handle UMOUNT_NOFOLLOW in VFS2 umount(2).Ayush Ranjan
Reported-by: syzbot+f9ecb181a4b3abdde9b9@syzkaller.appspotmail.com Reported-by: syzbot+8c5cb9d7a044a91a513b@syzkaller.appspotmail.com PiperOrigin-RevId: 406951359
2021-11-01Merge release-20211026.0-19-g9776edb3f (automated)gVisor bot
2021-11-01Move ThreadGroupIDFromContext to kernel/auth.Adin Scannell
This function doesn't belong in the global context package. Move to a more suitable package to break the dependency cycle. PiperOrigin-RevId: 406942122
2021-11-01Merge release-20211026.0-18-gdf6043afa (automated)gVisor bot
2021-11-01Merge pull request #6802 from ajilal95:patch-1gVisor bot
PiperOrigin-RevId: 406938082
2021-11-01pkg/atomicbitops: support 32-bit GOARCH value "mipsle"Brad Fitzpatrick
mips was supported, but mipsle had been forgotten. Fixes google/gvisor#6804
2021-11-01Add common Cgroup interfaceAndrei Vagin
This is part of cgroupv2 patch set. Here we add a Cgroup interface that both v1 and v2 need to conform to, and port cgroupv1 to use that first. Signed-off-by: Daniel Dao <dqminh89@gmail.com>
2021-10-31Update REDME.mdAjilal
Grammar correction.