Commit Graph

4922 Commits

Author SHA1 Message Date
Adin Scannell be2b9d75d7 Drop shutdown in docker run.
This can race and cause issues. Instead, a manual shutdown can be done
via 'bazel-shutdown' if required for specific cases. The ARM64 builds
are now done using cross-compilation, so this hack is not necessary.

PiperOrigin-RevId: 351477908
2021-01-12 17:02:11 -08:00
Ayush Ranjan ad0ac73626 [rack] Set up TLP timer and configure timeout.
This change implements TLP details enumerated in
https://tools.ietf.org/html/draft-ietf-tcpm-rack-08#section-7.5.1.

Fixes #5083

PiperOrigin-RevId: 351467357
2021-01-12 16:00:26 -08:00
Adin Scannell 4e03e87547 Fix simple mistakes identified by goreportcard.
These are primarily simplification and lint mistakes. However, minor
fixes are also included and tests added where appropriate.

PiperOrigin-RevId: 351425971
2021-01-12 12:38:22 -08:00
Adin Scannell a20da70829 Fix Go branch for arm64.
This requires several changes:
* Templates must preserve relevant tags.
* Pagetables templates are split into two targets, each preserving tags.
* The binary VDSO is similarly split into two targets, with some juggling.
* The top level tools/go_branch.sh now does a crossbuild of ARM64 as well,
  and checks and merges the results of the two branches together.

Fixes #5178

PiperOrigin-RevId: 351304330
2021-01-11 22:33:36 -08:00
Adin Scannell e06c2b1264 Make segment range type split safe.
This allows for use in restricted contexts.

Updates #5039

PiperOrigin-RevId: 351265378
2021-01-11 17:00:24 -08:00
Adin Scannell aac477733f Add additional required packages.
PiperOrigin-RevId: 351263241
2021-01-11 16:46:38 -08:00
Fabricio Voznika 7e462a1c7f OCI spec may contain duplicate environment variables
Closes #5226

PiperOrigin-RevId: 351259576
2021-01-11 16:25:50 -08:00
Adin Scannell 4c4de66443 Make ilist split safe.
This allows for use in restricted contexts.

Updates #5039

PiperOrigin-RevId: 351220385
2021-01-11 13:18:01 -08:00
Adin Scannell 321552f0ad Fix rules_go checksums.
The release was changed by bazel ಠ_ಠ:
https://github.com/bazelbuild/rules_go/issues/2779

Updates #5188

PiperOrigin-RevId: 351185440
2021-01-11 10:37:39 -08:00
Adin Scannell 0c99ab7090 Support releasing aarch64 builds.
This change works around an issue in rules_pkg, described here:
  https://github.com/bazelbuild/rules_pkg/pull/263

PiperOrigin-RevId: 350869030
2021-01-08 18:03:17 -08:00
gVisor bot 70de1db82e Merge pull request #4933 from lubinszARM:pr_kvm_el0_exceptions
PiperOrigin-RevId: 350862699
2021-01-08 17:08:36 -08:00
Etienne Perot 11787a601e Create console test library.
This creates a TTY pair and runs `/bin/sh` in interactive mode within it.
It provides useful helper functions to interact with the shell and read the
output of commands run within it.

This is meant to be used for testing upcoming changes allowing `runsc exec` to
work in `-detach=false -tty=true` mode.

PiperOrigin-RevId: 350841006
2021-01-08 14:51:50 -08:00
gVisor bot 5c13c2152e Merge pull request #5228 from avagin:arm-qemu-aarch64
PiperOrigin-RevId: 350823213
2021-01-08 13:17:38 -08:00
Andrei Vagin 52de442ce1 Build the arm-qemu docker image only for x86_64
It isn't used on aarch64.

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2021-01-08 11:39:18 -08:00
Adin Scannell 0538ffa8ba Add prefix helper to link to code search results.
This is extremely convenient similar to being able to link to Go
package documentation via the canonical package names.

PiperOrigin-RevId: 350774913
2021-01-08 09:09:54 -08:00
Adin Scannell df1b23c8de Fix sha256 for github-workflow.json.
This was not being tested as part of the unit test workflows, and thus was
not being hit normally. These tests are also added to the unit tests target.

PiperOrigin-RevId: 350766814
2021-01-08 08:17:41 -08:00
gVisor bot bf343394d4 Merge pull request #5207 from avagin:arm64-cross
PiperOrigin-RevId: 350691246
2021-01-07 20:48:58 -08:00
Andrei Vagin 8de562b799 Add ARM smoke test
make BAZEL_CONFIG=aarch64 arm-qemu-smoke-test

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2021-01-07 17:41:43 -08:00
Adin Scannell 77b340ce82 Require specific buckets for pprof handler.
This further restricts the surface exposed only to artifacts
generated by the continuous integration system.

This change also installs appropriate root certificates, so
that objects can be fetched from https://storage.googleapis.com.

PiperOrigin-RevId: 350650197
2021-01-07 15:30:37 -08:00
Mithun Iyer 04b37c8220 Fix tuntap_test to cleanup after CreateInterfaceNoCap
PiperOrigin-RevId: 350646249
2021-01-07 15:08:27 -08:00
Ting-Yu Wang b1de1da318 netstack: Refactor tcpip.Endpoint.Read
Read now takes a destination io.Writer, count, options. Keeping the method name
Read, in contrast to the Write method.

This enables:
* direct transfer of views under VV
* zero copy

It also eliminates the need for sentry to keep a slice of view because
userspace had requested a read that is smaller than the view returned, removing
the complexity there.

Read/Peek/ReadPacket are now consolidated together and some duplicate code is
removed.

PiperOrigin-RevId: 350636322
2021-01-07 14:17:18 -08:00
Zach Koopmans f4b4ed666d Add runsc build job to BuildKite.
PiperOrigin-RevId: 350619346
2021-01-07 12:49:07 -08:00
gVisor bot c8d0fd7094 Merge pull request #5213 from prattmic:pkg.go.dev
PiperOrigin-RevId: 350614888
2021-01-07 12:25:43 -08:00
Andrei Vagin 599a3d0fb4 Implement the semtimedop syscall
Signed-off-by: Andrei Vagin <avagin@gmail.com>
2021-01-07 11:49:40 -08:00
Fabricio Voznika 4c5f36e7bd Update link to benchmarks
Closes #5192

PiperOrigin-RevId: 350578130
2021-01-07 09:32:16 -08:00
Michael Pratt a0037b8976 website: redirect module to pkg.go.dev
Add redirects from any module package path to its corressponding
pkg.go.dev documentation. e.g., gvisor.dev/gvisor/pkg/sentry/kernel ->
https://pkg.go.dev/gvisor.dev/gvisor/pkg/sentry/kernel.

This is a handy way to get to documentation, also used by other vanity
domains, like golang.org/x/tools.
2021-01-07 09:53:33 -05:00
Adin Scannell 776016ac64 Fix native benchmarks.
PiperOrigin-RevId: 350509137
2021-01-07 01:17:10 -08:00
Adin Scannell fa8682da0f Export a pprof visualization endpoint.
This allows us to link directly to profiling results from
the build results. The code uses the standard pprof http
server, exported from the Cloud Run instance.

PiperOrigin-RevId: 350440910
2021-01-06 15:44:07 -08:00
Adin Scannell f89af8b504 Don't canonicalize cache directory.
... Otherwise it will be mounted in via some other path, and will
not be available inside the container at all.

PiperOrigin-RevId: 350440843
2021-01-06 15:37:54 -08:00
Kevin Krakauer 084ad58210 Run external networking test
PiperOrigin-RevId: 350438564
2021-01-06 15:25:35 -08:00
Ghanan Gowripalan 7817e3b5e4 Do not filter frames in ethernet link endpoint
Ethernet frames are usually filtered at the hardware-level so there is
no need to filter the frames in software.

For test purposes, a new link endpoint was introduced to filter frames
based on their destination.

PiperOrigin-RevId: 350422941
2021-01-06 14:02:45 -08:00
Ghanan Gowripalan abe9d9f67f Support add/remove IPv6 multicast group sock opt
IPv4 was always supported but UDP never supported joining/leaving IPv6
multicast groups via socket options.

Add: IPPROTO_IPV6, IPV6_JOIN_GROUP/IPV6_ADD_MEMBERSHIP
Remove: IPPROTO_IPV6, IPV6_LEAVE_GROUP/IPV6_DROP_MEMBERSHIP

Test: integration_test.TestUDPAddRemoveMembershipSocketOption
PiperOrigin-RevId: 350396072
2021-01-06 11:41:42 -08:00
gVisor bot 0c4118d5b8 Merge pull request #5177 from lubinszARM:pr_kernel_global
PiperOrigin-RevId: 350375461
2021-01-06 10:05:31 -08:00
Michael Pratt 23f94cee67 Include objdump failures in test output.
We log a warning if objdump fails, but this appears in the build log, not test
log, which can make it hard to notice.

Include it with the actual escape output as context on "(possible)" to make it
more clear when something is wrong.

PiperOrigin-RevId: 350355759
2021-01-06 08:17:30 -08:00
Adin Scannell a1e3845b65 Make build command more robust.
This returns all targets, and handles no targets.

PiperOrigin-RevId: 350263578
2021-01-05 18:55:05 -08:00
Adin Scannell ab32fa2481 Make type sanity checking happen only in race builds.
This adds significant costs to startup, since it is done for
every type in the system. Since the state package already saves
sanity checks for race builds, use this for type registration.

PiperOrigin-RevId: 350259336
2021-01-05 18:15:27 -08:00
Andrei Vagin b9b99d3d26 Don't check that msg_flags contains MSG_ERRQUEUE on gvisor platforms.
PiperOrigin-RevId: 350246333
2021-01-05 16:47:39 -08:00
Kevin Krakauer ce7a4440ca Fix panic when parsing SO_TIMESTAMP cmsg
PiperOrigin-RevId: 350223482
2021-01-05 14:45:47 -08:00
Adin Scannell b06e5bc5b0 Add benchmarks targets to BuildKite.
This includes minor fix-ups:

* Handle SIGTERM in runsc debug, to exit gracefully.
* Fix cmd.debug.go opening all profiles as RDONLY.
* Fix the test name in fio_test.go, and encode the block size in the test.

PiperOrigin-RevId: 350205718
2021-01-05 13:21:54 -08:00
gVisor bot 93b38bddba Merge pull request #5169 from laijs:fix-typo-whicy
PiperOrigin-RevId: 350200437
2021-01-05 12:54:23 -08:00
Adin Scannell 33d59811fc Change the build badge to point to BuildKite.
PiperOrigin-RevId: 350197814
2021-01-05 12:40:22 -08:00
Adin Scannell 2a5d3c248f Add YAML validation for configuration files.
For validation, the "on" key in existing YAML files is changed to a literal
string. In the YAML spec, on is a keyword which encodes a boolean value, so
without relying on a specific implementation the YAML files are technically
not encoding an object that complies with the specification.

PiperOrigin-RevId: 350172147
2021-01-05 10:43:04 -08:00
Andrei Vagin 622db84e4b Internal changes.
PiperOrigin-RevId: 350159657
2021-01-05 09:53:42 -08:00
Andrei Vagin 2a200811d4 fs/fuse: check that a task has a specified file descriptor
Reported-by: syzbot+814105309d2ae8651084@syzkaller.appspotmail.com
PiperOrigin-RevId: 350159452
2021-01-05 09:47:30 -08:00
Dean Deng 807a080d95 Add missing error checks for FileDescription.Init.
Syzkaller discovered this bug in pipefs by doing something quite strange:
creat(&(0x7f0000002a00)='./file1\x00', 0x0)
mount(&(0x7f0000000440)=ANY=[], &(0x7f00000002c0)='./file1\x00', &(0x7f0000000300)='devtmpfs\x00', 0x20000d, 0x0)
creat(&(0x7f0000000000)='./file1/file0\x00', 0x0)

This can be reproduced with:
touch mymount
mkfifo /dev/mypipe
mount -o ro -t devtmpfs devtmpfs mymount
echo 123 > mymount/mypipe

PiperOrigin-RevId: 349687714
2020-12-31 09:51:01 -08:00
Adin Scannell 3b1d37f6ab Remove remote execution support.
PiperOrigin-RevId: 349616845
2020-12-30 16:54:16 -08:00
Dean Deng 4691a81253 Add test for open(2) with O_WRONLY|O_RDWR.
PiperOrigin-RevId: 349607959
2020-12-30 15:22:35 -08:00
Adin Scannell 899b9ba46a Add BuildKite annotations for failures and profiles.
This change cleans up some minor Makefile issues, and adds support for
BuildKite annotations on failure and on profiles being generated. These
annotations will make failures very clear and link to the artifacts.

This change is a stepping stone for aggregating coverage data from all
individual test jobs, as this will also happen in .buildkite/annotate.sh.

PiperOrigin-RevId: 349606598
2020-12-30 15:09:12 -08:00
Adin Scannell 0fb5de1154 Use a stable ordering for generated types.
Otherwise this pollutes the 'go' branch and doesn't conform to standards
for generate bazel files.

PiperOrigin-RevId: 349605037
2020-12-30 14:53:03 -08:00
Fabricio Voznika 1b66bad7c4 Fix condition checking in `runsc debug`
Closes #5052

PiperOrigin-RevId: 349579814
2020-12-30 11:18:36 -08:00