summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2020-12-03Merge release-20201130.0-27-gf559db569 (automated)gVisor bot
2020-12-02Do not unconditionally allocate in kernel.FDTable.setAll().Jamie Liu
`slice := *(*[]unsafe.Pointer)(...)` makes a copy of the slice header, which then escapes because of the conditional `atomic.StorePointer(&f.slice, &slice)` from table expansion. This occurs even when the table doesn't expand, and when it can't (e.g. `close()` => `f.setAll(nil)`). Fix this by avoiding the copy until after table expansion. Before this CL: ``` TEXT pkg/sentry/kernel/kernel.(*FDTable).setAll(SB) pkg/sentry/kernel/fd_table_unsafe.go fd_table_unsafe.go:119 0x7f00005f50e0 64488b0c25f8ffffff MOVQ FS:0xfffffff8, CX fd_table_unsafe.go:119 0x7f00005f50e9 483b6110 CMPQ 0x10(CX), SP fd_table_unsafe.go:119 0x7f00005f50ed 0f864d040000 JBE 0x7f00005f5540 fd_table_unsafe.go:119 0x7f00005f50f3 4883c480 ADDQ $-0x80, SP fd_table_unsafe.go:119 0x7f00005f50f7 48896c2478 MOVQ BP, 0x78(SP) fd_table_unsafe.go:119 0x7f00005f50fc 488d6c2478 LEAQ 0x78(SP), BP fd_table_unsafe.go:120 0x7f00005f5101 488b8424a8000000 MOVQ 0xa8(SP), AX fd_table_unsafe.go:120 0x7f00005f5109 4885c0 TESTQ AX, AX fd_table_unsafe.go:120 0x7f00005f510c 7411 JE 0x7f00005f511f fd_table_unsafe.go:120 0x7f00005f510e 488b8c24b0000000 MOVQ 0xb0(SP), CX fd_table_unsafe.go:120 0x7f00005f5116 4885c9 TESTQ CX, CX fd_table_unsafe.go:120 0x7f00005f5119 0f8500040000 JNE 0x7f00005f551f fd_table_unsafe.go:124 0x7f00005f511f 488d05da115700 LEAQ 0x5711da(IP), AX fd_table_unsafe.go:124 0x7f00005f5126 48890424 MOVQ AX, 0(SP) fd_table_unsafe.go:124 0x7f00005f512a e8d19fa1ff CALL runtime.newobject(SB) fd_table_unsafe.go:124 0x7f00005f512f 488b7c2408 MOVQ 0x8(SP), DI fd_table_unsafe.go:124 0x7f00005f5134 488b842488000000 MOVQ 0x88(SP), AX fd_table_unsafe.go:124 0x7f00005f513c 488b4820 MOVQ 0x20(AX), CX fd_table_unsafe.go:124 0x7f00005f5140 488b5108 MOVQ 0x8(CX), DX fd_table_unsafe.go:124 0x7f00005f5144 488b19 MOVQ 0(CX), BX fd_table_unsafe.go:124 0x7f00005f5147 488b4910 MOVQ 0x10(CX), CX fd_table_unsafe.go:124 0x7f00005f514b 48895708 MOVQ DX, 0x8(DI) fd_table_unsafe.go:124 0x7f00005f514f 48894f10 MOVQ CX, 0x10(DI) fd_table_unsafe.go:124 0x7f00005f5153 833df6e1120100 CMPL $0x0, runtime.writeBarrier(SB) fd_table_unsafe.go:124 0x7f00005f515a 660f1f440000 NOPW 0(AX)(AX*1) fd_table_unsafe.go:124 0x7f00005f5160 0f8589030000 JNE 0x7f00005f54ef fd_table_unsafe.go:124 0x7f00005f5166 48891f MOVQ BX, 0(DI) fd_table_unsafe.go:124 0x7f00005f5169 48897c2470 MOVQ DI, 0x70(SP) fd_table_unsafe.go:127 0x7f00005f516e 8bb424a0000000 MOVL 0xa0(SP), SI fd_table_unsafe.go:127 0x7f00005f5175 39d6 CMPL DX, SI fd_table_unsafe.go:127 0x7f00005f5177 0f8c5f030000 JL 0x7f00005f54dc ... ``` After this CL: ``` TEXT pkg/sentry/kernel/kernel.(*FDTable).setAll(SB) pkg/sentry/kernel/fd_table_unsafe.go fd_table_unsafe.go:119 0x7f00005f50e0 64488b0c25f8ffffff MOVQ FS:0xfffffff8, CX fd_table_unsafe.go:119 0x7f00005f50e9 488d4424e8 LEAQ -0x18(SP), AX fd_table_unsafe.go:119 0x7f00005f50ee 483b4110 CMPQ 0x10(CX), AX fd_table_unsafe.go:119 0x7f00005f50f2 0f868e040000 JBE 0x7f00005f5586 fd_table_unsafe.go:119 0x7f00005f50f8 4881ec98000000 SUBQ $0x98, SP fd_table_unsafe.go:119 0x7f00005f50ff 4889ac2490000000 MOVQ BP, 0x90(SP) fd_table_unsafe.go:119 0x7f00005f5107 488dac2490000000 LEAQ 0x90(SP), BP fd_table_unsafe.go:120 0x7f00005f510f 488b9424c0000000 MOVQ 0xc0(SP), DX fd_table_unsafe.go:120 0x7f00005f5117 660f1f840000000000 NOPW 0(AX)(AX*1) fd_table_unsafe.go:120 0x7f00005f5120 4885d2 TESTQ DX, DX fd_table_unsafe.go:120 0x7f00005f5123 0f8406040000 JE 0x7f00005f552f fd_table_unsafe.go:120 0x7f00005f5129 488b9c24c8000000 MOVQ 0xc8(SP), BX fd_table_unsafe.go:120 0x7f00005f5131 4885db TESTQ BX, BX fd_table_unsafe.go:120 0x7f00005f5134 0f852b040000 JNE 0x7f00005f5565 fd_table_unsafe.go:124 0x7f00005f513a 488bb424a0000000 MOVQ 0xa0(SP), SI fd_table_unsafe.go:124 0x7f00005f5142 488b7e20 MOVQ 0x20(SI), DI fd_table_unsafe.go:127 0x7f00005f5146 4c8b4708 MOVQ 0x8(DI), R8 fd_table_unsafe.go:127 0x7f00005f514a 448b8c24b8000000 MOVL 0xb8(SP), R9 fd_table_unsafe.go:127 0x7f00005f5152 4539c1 CMPL R8, R9 fd_table_unsafe.go:127 0x7f00005f5155 0f8d4a020000 JGE 0x7f00005f53a5 ... ``` PiperOrigin-RevId: 345363242
2020-12-03Merge release-20201130.0-26-g8b692f593 (automated)gVisor bot
2020-12-02Make testutil.RandomID safe for concurrent usesZeling Feng
testutil.RandomID was using Rand.Read which is not safe for concurrent use. It caused name conflicts in packetimpact tests when they are run in parallel. Adding a mutex to protect the Rand.Read operation. PiperOrigin-RevId: 345360062
2020-12-03Merge release-20201130.0-25-ged8bdf461 (automated)gVisor bot
2020-12-02Consolidate most synchronization primitive linknames in the sync package.Jamie Liu
PiperOrigin-RevId: 345359823
2020-12-02Merge release-20201117.0-100-gbdaae08ee (automated)gVisor bot
2020-12-02Extract ICMPv4/v6 specific stats to their own typesArthur Sfez
This change lets us split the v4 stats from the v6 stats, which will be useful when adding stats for each network endpoint. PiperOrigin-RevId: 345322615
2020-12-02Merge release-20201117.0-99-g6a26930ee (automated)gVisor bot
2020-12-02Abandon reassembly of a packet if fragments overlapArthur Sfez
However, receiving duplicated fragments will not cause reassembly to fail. This is what Linux does too: https://github.com/torvalds/linux/blob/38525c6/net/ipv4/inet_fragment.c#L355 PiperOrigin-RevId: 345309546
2020-12-02Merge release-20201117.0-98-g24d6eb58e (automated)gVisor bot
2020-12-02Skip generating an empty (broken) test case.Adin Scannell
It's possible that all the cases in a given batch are excluded if the offsets line up just right, which will cause the test to fail. Don't generate an invalid test in this case. PiperOrigin-RevId: 345276588
2020-12-02Merge release-20201117.0-97-g1375a87a2 (automated)gVisor bot
2020-12-02[netstack] Refactor common utils out of netstack to socket package.Ayush Ranjan
Moved AddressAndFamily() and ConvertAddress() to socket package from netstack. This helps because these utilities are used by sibling netstack packages. Such sibling dependencies can later cause circular dependencies. Common utils shared between siblings should be moved up to the parent. PiperOrigin-RevId: 345275571
2020-12-02Merge release-20201117.0-96-gdbd4a6e3e (automated)gVisor bot
2020-12-02Add BuildKite agent.Adin Scannell
This has no effect on the continuous integration system, and simply publishes a cached container image containing the agent and metrics agent with known provenance. PiperOrigin-RevId: 345274375
2020-12-02Merge release-20201117.0-95-g7ccb0b6a7 (automated)gVisor bot
2020-12-02Fix chown test.Adin Scannell
PiperOrigin-RevId: 345265342
2020-12-02Merge release-20201117.0-94-gb11f40db1 (automated)gVisor bot
2020-12-02Clean up verity tests.Dean Deng
Refactor some utilities and rename some others for clarity. PiperOrigin-RevId: 345247836
2020-12-02Merge release-20201117.0-93-g496851d27 (automated)gVisor bot
2020-12-02Skip CanKillAllPIDs when running natively.Adin Scannell
This is quite disruptive to run in some environments. PiperOrigin-RevId: 345247206
2020-12-02Merge release-20201117.0-92-gf156fb653 (automated)gVisor bot
2020-12-02[netstack] Add back EndpointInfo struct in tcp.Ayush Ranjan
This was removed in an earlier commit. This should remain as it allows to add tcp-only state to be exposed. PiperOrigin-RevId: 345246155
2020-12-02Merge release-20201117.0-91-g9f02d2653 (automated)gVisor bot
2020-12-02Fix containerd.sh for later Ubuntu and Debian-based distributions.Adin Scannell
PiperOrigin-RevId: 345245285
2020-12-02Merge release-20201117.0-90-gb26dd6d9b (automated)gVisor bot
2020-12-02Add /proc/sys/kernel/sem.Jing Chen
PiperOrigin-RevId: 345178956
2020-12-02Merge release-20201117.0-89-g41675ebc6 (automated)gVisor bot
2020-12-01Deflake stack_test.TestRouterSolicitationGhanan Gowripalan
...by using the fake clock. TestRouterSolicitation no longer runs its sub-tests in parallel now that the sub-tests are not long-running - the fake clock simulates time moving forward. PiperOrigin-RevId: 345165794
2020-12-02Merge release-20201117.0-88-g0c4973942 (automated)gVisor bot
2020-12-01Correctly lock when listing neighbor entriesGhanan Gowripalan
PiperOrigin-RevId: 345162450
2020-12-02Merge release-20201117.0-87-g93d29719c (automated)gVisor bot
2020-12-01Drop jobs for bazel remote execution.Adin Scannell
PiperOrigin-RevId: 345147980
2020-12-02Merge release-20201117.0-86-gaa419cef4 (automated)gVisor bot
2020-12-01Avoid wrong error messagesZeling Feng
Stop showing wrong timeout values in packetimpact test error messages. e.g. "got frames ... want ... during -123ms" PiperOrigin-RevId: 345144938
2020-12-01Merge release-20201117.0-85-gc140b0c49 (automated)gVisor bot
2020-12-01Typo fix.Etienne Perot
PiperOrigin-RevId: 345062676
2020-12-01Merge release-20201117.0-84-g25570ac4f (automated)gVisor bot
2020-12-01Track join count in multicast group protocol stateGhanan Gowripalan
Before this change, the join count and the state for IGMP/MLD was held across different types which required multiple locks to be held when accessing a multicast group's state. Bug #4682, #4861 Fixes #4916 PiperOrigin-RevId: 345019091
2020-12-01Merge release-20201117.0-83-g6b1dbbbdc (automated)gVisor bot
2020-11-30Fix typo in ptrace documentation.Dean Deng
PiperOrigin-RevId: 344958513
2020-12-01Merge release-20201117.0-82-g59a2c785b (automated)gVisor bot
2020-11-30Do not start a ContainerExec twiceZeling Feng
ContainerExecStart and ContainerExecAttach both call the /exec/id/start API endpoint. PiperOrigin-RevId: 344946627
2020-12-01Merge release-20201117.0-81-g79e236493 (automated)gVisor bot
2020-11-30Fix deadlock in UDP handleControlPacket path.Bhasker Hariharan
Fixing the sendto deadlock exposed yet another deadlock where a lock inversion occurs on the handleControlPacket path where e.mu and demuxer.epsByNIC.mu are acquired in reverse order from say when RegisterTransportEndpoint is called in endpoint.Connect(). This fix sidesteps the issue by just making endpoint.state an atomic and gets rid of the need to acquire e.mu in e.HandleControlPacket. PiperOrigin-RevId: 344939895
2020-12-01Merge release-20201117.0-80-g54ad145f2 (automated)gVisor bot
2020-11-30Add more fragment reassembly testsToshi Kikuchi
These tests check if a maximum-sized (64k) packet is reassembled without receiving a fragment with MF flag set to zero. PiperOrigin-RevId: 344913172
2020-11-30Merge release-20201117.0-79-g786f32c2b (automated)gVisor bot
2020-11-30Do not os.Exit() from test/benchmarks/harness.Harness.Init with no args.Jamie Liu
PiperOrigin-RevId: 344896991