aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/build/gvisor.go
Commit message (Collapse)AuthorAgeFilesLines
* build/gvisor: use make to build runscAndrei Vagin2025-11-061-53/+18
| | | | Signed-off-by: Andrei Vagin <avagin@google.com>
* pkg/build: use the build environment in clean() callsFlorent Revest2024-10-141-1/+1
| | | | | | This unifies the build() and clean() interfaces such that if a custom compiler or make binary is provided in the manager or bisection config, they can be taken into account by the clean() interface.
* pkg/build: don't coverage-instrument gVisor sync package in race buildsJamie Liu2023-07-141-0/+1
| | | | sync.gateCommit() is also a go:norace function called during runtime.gopark().
* gvisor: fix race builds (#3704)Andrei Vagin2023-02-171-1/+1
| | | | Now we need to use the race config to compile gVisor with the race detector.
* pkg/build/gvisor: make gVisor configuration parsing stricter (#3617)Etienne Perot2023-01-201-17/+32
| | | | | This enforces that the configuration string passed to gVisor is only made up of known flags. Prior to this change, it was possible to pass any arbitrary flags as configuration, which would be silently ignored.
* pkg/build: increase bazel aquery timeoutDmitry Vyukov2021-12-131-1/+1
| | | | | | We've got a timeout of "bazel aquery". It's currently set to 1 minute. On an overloaded machine it can fire falsely, I guess bazel can start only for 1 minute. Increase to 10 minutes.
* pkg/build: modify builder interfaceAleksandr Nogikh2021-07-201-6/+6
| | | | | | | | | Modify the `builder` interface in such a way that build method also returns a struct containing extra information about the build process. This allows to fetch compiler ID from individual builders. Also, this makes the `signer` interface obsolete, as this information can also go into that structure.
* all: remove pointers to pkg.build.ParamsAleksandr Nogikh2021-07-201-1/+1
| | | | | | | | | | The struct pkg.build.Params is currently primarily passed on as a pointer, which leads make it hard to see the places, where it can (and should) actually be modified. Make it all more explicit by only passing pointer references to objects of this type when the object is expected to be modified by the function. In fact, at this moment there are no such situations.
* pkg/build: exclude gvisor pkg/ring0 from coverage instrumentation (#2436)Andrei Vagin2021-02-101-1/+1
| | | | | It was a part of the pkg/sentry/platform, but recently it was moved out. Signed-off-by: Andrei Vagin <avagin@google.com>
* build/gvisor: run aquery with all build optionsAndrei Vagin2021-02-071-5/+12
| | | | | | Build options can affect a path where runsc will be saved. Signed-off-by: Andrei Vagin <avagin@google.com>
* build/gvisor: fix compile time warning (#2426)Andrei Vagin2021-02-041-1/+1
| | | | | | $ bazel build --features=race //runsc:runsc-race ... WARNING: --features=race is no longer supported. Use --@io_bazel_rules_go//go/config:race instead.
* pkg/build: use system bazel by defaultDmitry Vyukov2021-02-011-0/+4
|
* pkg/build: exclude gvisor pkg/coverage from coverage instrumentationDean Deng2021-01-221-1/+2
| | | | | | | Instrumenting this package is too slow--every time the Sentry switches to the application, task work will iterate through all of the coverage counters. Instrumenting this code path will add many atomic operations on race builds, drastically degrading performance.
* build/gvisor: don't instrument the platform code (#2363)Andrei Vagin2020-12-291-1/+1
| | | | | | The instrumentation filter has to match all sub-packges of //pkg/sentry/platform. Signed-off-by: Andrei Vagin <avagin@google.com>
* pkg/cover: fix location of gvisor object fileDmitry Vyukov2020-12-131-3/+4
| | | | | | | | When running under syz-ci gvisor image is called 'image', but it's not in objDir. pkg/build/gvisor.go doesn't copy anything into obj/. Copy runsc into obj/vmlinux (as expected for linux target) and open it in pkg/cover.
* pkg/build: fix gvisor instrumentation filtersDean Deng2020-12-081-6/+6
|
* pkg/build: skip coverage instrumentation on gVisor norace filesDean Deng2020-12-051-5/+23
| | | | | | | These cannot be instrumented with regular atomic operations (e.g., sync/atomic.AddInt32), which will happen if -race is enabled. We may be able to re-enable coverage on them when https://golang.org/issue/43007 is resolved.
* pkg/build: fix config parsing for gVisorDean Deng2020-12-031-4/+22
| | | | | In the previous method, string comparisons did not work properly for the last flag because it is followed by a newline character.
* build/gvisor: get a path to the runsc binary from bazelAndrei Vagin2020-11-131-7/+23
| | | | | | | Right now, we use a hard-coded path, but Dmirty found that it is wrong for the current versions of bazel and gvisor. Signed-off-by: Andrei Vagin <avagin@google.com>
* pkg/build: omit gvisor platform code from coverage instrumentationDean Deng2020-10-191-1/+3
| | | | | | Collecting coverage in platform/ring0 code causes the kvm platform to crash, possibly due torestrictions on the address space that coverage data is violating.
* gvisor: add build option for collecting code coverageDean Deng2020-10-131-2/+7
|
* pkg/build: refactor Image function argumentsDmitry Vyukov2019-11-061-7/+6
| | | | | | | Image takes too many arguments, so we need to do lots of forwarding, adding new argumnets is painful and most OSes are not interested in lots of arguments. Combine all arguments into a params struct.
* pkg/build: increase gvosir build timeoutDmitry Vyukov2019-04-011-1/+4
| | | | | | The 1 hour timeout is quite high. But we've seen false positives with 20 mins on the first build after bazel/deps update. Also other gvisor instances running on the same machine contribute to longer build times.
* pkg/build: shutdown bazel in case of errors tooDmitry Vyukov2019-03-291-1/+2
|
* pkg/build: netbsd build improvementsDmitry Vyukov2019-02-231-1/+1
| | | | | | | 1. Implement clean since we do incremental build we actually need no-op clean. 2. Don't copy netbsd to output dir, we don't need it there (we create full-fledged image). 3. Copy netbsd.gdb to obj/ dir, that's where it is expected. 4. Fix boot disk name for gce (it's sd0 instead of wd0).
* pkg/build: update gvisor race build processDmitry Vyukov2018-08-181-25/+8
| | | | Use separate target as this is something that can be upstreamed.
* pkg/build: support fuchsia buildsDmitry Vyukov2018-06-281-3/+0
|
* pkg/build: better support for gvisor race buildDmitry Vyukov2018-06-261-9/+26
| | | | | Explicitly pass --features=race. Expect linux_amd64_static_stripped as a potential output.
* pkg/build: support gvisor race binariesDmitry Vyukov2018-06-231-1/+5
|
* pkg/build: save kernel config for gvisorDmitry Vyukov2018-06-221-1/+7
| | | | | gvisor does not use it, but save it verbatim. This can be useful to keep some additional description of the build.
* pkg/build: add gvisor supportDmitry Vyukov2018-06-221-0/+19
|
* pkg/build: pave way for multi-OS supportDmitry Vyukov2018-06-221-0/+15
Unify kernel and image build, that distinction is really uninteresting. Define interface that each OS needs to implement. Add gvisor stub.