summaryrefslogtreecommitdiffhomepage
path: root/tools
AgeCommit message (Collapse)Author
2020-04-23Simplify Docker test infrastructure.Adin Scannell
This change adds a layer of abstraction around the internal Docker APIs, and eliminates all direct dependencies on Dockerfiles in the infrastructure. A subsequent change will automated the generation of local images (with efficient caching). Note that this change drops the use of bazel container rules, as that experiment does not seem to be viable. PiperOrigin-RevId: 308095430
2020-04-23Disable nogo because it breaks Go 1.13Fabricio Voznika
Even though the default build option is to use 1.14, we want to be want to keep the ability to target different Go versions for testing and in case the new release has bugs. PiperOrigin-RevId: 308078876
2020-04-22Specify a memory file in platform.New().Andrei Vagin
PiperOrigin-RevId: 307941984
2020-04-20Add internal nogo analysis & checkescape tool.Adin Scannell
See tools/nogo/README.md. The checkescape tool is able to perform recursive escape analysis, using the actual generated binary to confirm the results produced by the compiler itself. As an initial use case, this replaces the manual escape analysis tests used for go_marshal, and validates that the CopyIn and CopyOut paths will not require any allocation or stack splits. Updates #2243 PiperOrigin-RevId: 307532986
2020-04-20Add a functional vm_test for root_test.Adin Scannell
This change renames the tools/images directory to tools/vm for clarity, and adds a functional vm_test. Sharding is also added to the same test, and some documentation added around key flags & variables to describe how they work. Subsequent changes will add vm_tests for other cases, such as the runtime tests. PiperOrigin-RevId: 307492245
2020-04-13Merge pull request #2321 from lubinszARM:pr_nogogVisor bot
PiperOrigin-RevId: 306300032
2020-04-13Fix build.sh and VM targets.Adin Scannell
PiperOrigin-RevId: 306289643
2020-04-10Automated rollback of changelist 305940483Nicolas Lacasse
PiperOrigin-RevId: 305944892
2020-04-10Upgrade Kokoro and RBE to bazel 3.0.0Nicolas Lacasse
PiperOrigin-RevId: 305940483
2020-04-10Automated rollback of changelist 305922105Nicolas Lacasse
PiperOrigin-RevId: 305927989
2020-04-10Install Bazel 3.0.0 on Kokoro image.Nicolas Lacasse
PiperOrigin-RevId: 305922105
2020-04-09Merge pull request #2253 from amscanne:nogogVisor bot
PiperOrigin-RevId: 305807868
2020-04-09Remove "no-sandbox" tag.Nicolas Lacasse
It seems no longer necessary. PiperOrigin-RevId: 305758572
2020-04-09remove nogo exemption for machine_arm64_unsafe.goBin Lu
Minimize the use of unsafe. Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-04-08Clean up TODOsFabricio Voznika
PiperOrigin-RevId: 305592245
2020-04-08Remove lostcancel warnings.Adin Scannell
Updates #2243
2020-04-08Fix unused result errors.Adin Scannell
This fixes a bug in the proc net directory. Updates #2243
2020-04-08Fix all printf formatting errors.Adin Scannell
Updates #2243
2020-04-08Fix all copy locks violations.Adin Scannell
This required minor restructuring of how system call tables were saved and restored, but it makes way more sense this way. Updates #2243
2020-04-01go-marshal: Allow array lens to be consts and simple expressions.Rahat Mahmood
Previously, go-marshal only allowed literals for array lengths. However, it's very common for ABI structs to have a fix-sized array whose length is defined by a constant; for example PATH_MAX. Having to convert all such arrays to have literal lengths is too awkward. PiperOrigin-RevId: 304289345
2020-04-01go-marshal: Improve collision detection of import statments.Rahat Mahmood
Previously, the import statement collision detection mechanism aborted go-marshal whenever it detected two imports in any package that has the same local name. Consider this trivial package, defined by the the following two source files: file1.go: package example import ( path/a/to/foo ) ... file2.go: package example import ( another/package/with/final/component/foo ) ... Go-marshal previously couldn't handle generating code for the the above package, even if none of the types marked for marshalling used either of the imported foo packages. This turns out to be too restrictive as we run into this a lot in practice. Examples include "encoding/binary" vs "gvisor/pkg/binary/binary", and "sync" vs "gvisor/pkg/sync/sync". This change allows go-marshal to proceed with marshalling, and only abort if the code generated by go-marshal references any such ambiguous import names. PiperOrigin-RevId: 304131190
2020-03-31Implement automated marshalling for slices of Marshallable types.Rahat Mahmood
PiperOrigin-RevId: 304119255
2020-03-30BigQuery schema for benchmark-tools dashboard.Zach Koopmans
PiperOrigin-RevId: 303805784
2020-03-30Internal change.Zach Koopmans
PiperOrigin-RevId: 303773475
2020-03-26Add nogo exemption for machine_arm64_unsafe.goAdin Scannell
2020-03-25nogo: enable sanitizers.Adin Scannell
This enables all relevant santizers (though most analyzers will not find much, it will prevent instances from creeping in), and codifies existing exceptions in tools/nogo.js to be fixed.
2020-03-25Fix go_marshal Example name.Adin Scannell
There is a canonical naming convention for Examples, which are checked by analyzers. This must be fixed since adding exceptions for generated code will be more challenging.
2020-03-20Statically link libpthread for static c++ binaries.Eyal Soha
The posix_server works fine when run in locally or in docker but fails in the kokoro GCP build environment. Linking libpthread statically fixes it. PiperOrigin-RevId: 302139082
2020-03-19Fix bm-tools to run on bazel.Zach Koopmans
Fixes random stuff that is broken on bazel/kokoro. - random output coming back as "bytes" object instead of str - missed syntax error in bazel - a flag is missing in the version of gcloud on kokoro PiperOrigin-RevId: 301915289
2020-03-17Packetimpact in Go with c++ stubEyal Soha
PiperOrigin-RevId: 301382690
2020-02-28Add ability to execute go.mod in gopath context.Adin Scannell
2020-02-27Fix apt-get reliability issues.Adin Scannell
This is frequently causing the core build scripts to fail. The core ubuntu distribution will perform an auto-update at first start, which may cause the lock file to be held. All apt-get commands may be done in a loop in order to retry to avoid this issue. We may want to consider retrying other pieces, but for now this should avoid the most frequent cause of build flakes. PiperOrigin-RevId: 297704789
2020-02-27Implement automated marshalling for newtypes on arrays.Rahat Mahmood
PiperOrigin-RevId: 297693838
2020-02-27Use automated release notes, if available.Adin Scannell
PiperOrigin-RevId: 297628615
2020-02-21Factor platform tags.Adin Scannell
PiperOrigin-RevId: 296519566
2020-02-21Fix master installer.Zach Koopmans
Sometimes, when we start a new instance, the file lock on "apt" is locked. Add a loop to the master installer. In addition, the "apt-get install" fails to register runsc in docker, so run the appropriate scripts to get that to happen. Also, add some helpful log messages. PiperOrigin-RevId: 296497357
2020-02-20Implement automated marshalling for newtypes on primitives.gVisor bot
PiperOrigin-RevId: 296322954
2020-02-20Remove bytes read/written from marshal.Marshallable API.gVisor bot
Users of the API only care about whether the copy in/out succeeds in their entirety, which is already signalled by the returned error. PiperOrigin-RevId: 296297843
2020-02-20Import tags.bzl directly from tools/defs.bzl.Adin Scannell
This simplifies the script slightly. PiperOrigin-RevId: 296272077
2020-02-19Add basic microbenchmarks.Adin Scannell
PiperOrigin-RevId: 296104390
2020-02-19Handle situations where go-marshal generates an empty test file.gVisor bot
This can happen due to conditional compilation, where a subset of the source files contain no marshallable types. go-marshal is still required to write an output file in these cases, since bazel defines the output package before calling go-marshal. PiperOrigin-RevId: 296074321
2020-02-18go-marshal: Stop complaining about files with no +marshal types.gVisor bot
Since we tag entire packages as marshallable, due to conditional compiling for different architectures we can end up with sets of source files that don't contain any marshallable types. It's safe to silently ignore this scenario. PiperOrigin-RevId: 295831871
2020-02-15Ensure Marshallable.SizeBytes() always works on a typed nil pointer.gVisor bot
This lets go-marshal replace various calls to binary.Size() throughout the sentry without requiring concrete objects. PiperOrigin-RevId: 295299965
2020-02-14Generate implementation of io.WriterTo via go-marshal.gVisor bot
PiperOrigin-RevId: 295269654
2020-02-14Add a minimal binary target for escape analysis on go-marshal.gVisor bot
Note that this is not an automated test. PiperOrigin-RevId: 295238672
2020-02-14Fix various issues related to enabling go-marshal.gVisor bot
- Add missing build tags to files in the abi package. - Add the marshal package as a sentry dependency, allowed by deps_test. - Fix an issue with our top-level go_library BUILD rule, which incorrectly shadows the variable containing the input set of source files. This caused the expansion for the go_marshal clause to silently omit input files. - Fix formatting when copying build tags to gomarshal-generated files. - Fix a bug with import statement collision detection in go-marshal. PiperOrigin-RevId: 295112284
2020-02-13Ensure the marshalled object doesn't escape.gVisor bot
Add new Marshallable interface methods CopyIn/CopyOut, which can be directly called on the marshalled object, avoiding an interface indirection. Such indirections are problematic because they always cause the marshalled object to escape. PiperOrigin-RevId: 295028010
2020-02-13Call py_requirement with named argument for optional kwarg.gVisor bot
PiperOrigin-RevId: 294930818
2020-02-11Stateify: register types with full package namesgVisor bot
This is to avoid conflicts with types that share the same [short] package and type names, e.g. proc.smapsData exist in pkg/sentry/fs/proc and pkg/sentry/fsimpl/proc. Updates #1663 PiperOrigin-RevId: 294485146
2020-02-10Rename build to builddefs and minor build clean-up.Adin Scannell
The name 'bazel' also doesn't work because bazel will treat it specially. Fixes #1807 PiperOrigin-RevId: 294321221