| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Add a rust error regexp and a test to verify the resulting report.
|
| |
|
|
|
|
|
| |
The needed Bazel version to build gVisor got bumped. However, instead of
doing the same bump in two places whenever this happens, we can simply
use bazelisk in syzkaller to determine which bazel version to use
automatically.
|
| |
|
|
| |
./tools/syz-env bin/golangci-lint run ./... --fix
|
| |
|
|
| |
Co-authored-by: eep@google.com
|
| |
|
|
|
|
|
|
|
|
| |
When refactoring the Clean() function to share more code with Image(),
there is logic I forgot to replicate, like setting a default number of
CPUs to build/clean with. I imagine that not setting the default tracer
could end up being a subtle issue in the future too.
To avoid missing these cases in the future, refactor the parameters
sanitization into a helper function called by both.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Certain environments might need a specific make command or wrap make
calls with extra logic. This lets users provide a path to a custom make
binary.
|
| |
|
|
|
|
|
| |
Handle SIGKILL (exit code = 137) on osutil.Run() during Linux kernel image
building and return build.InfraError without reporting.
Fixes: https://github.com/google/syzkaller/issues/5317
|
| |
|
|
| |
The latter is a better suitable name.
|
| |
|
|
|
| |
This parameter defines the number of cores dedicated to the kernel build
process. By default, it's equal to the number of available CPUs.
|
| |
|
|
|
| |
Lint started warning about duplicate "gvisor" const in pkg/cover.
Add gvisor/starnix consts to sys/targets package to avoid duplication.
|
| |
|
|
|
|
|
| |
Akaros support is unused, it was shutdown on syzbot for a while,
the akaros development seems to be frozen for years as well.
We have a bunch of hacks for Akaros since it supported
only super old gcc and haven't supported Go. Remove it.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Added config structure in build/Android to allow specifying
specific Android targets.
Build config is optional and extensible for individual build
instances.
|
| |
|
|
|
|
|
|
|
| |
Booting physical Android devices requires building a few artifacts, as described
at https://source.android.com/docs/setup/build/building-kernels.
When a ProxyVM type is used, we need to differentiate whether or not to
use the Android build logic, so we add an additional mapping which uses
a different name but the same VM logic.
|
| |
|
|
|
|
| |
Building images for physical Android devices has different logic and
options and should be in separate files. This makes it less ambiguous
and frees up android.go for Android device code.
|
| |
|
|
|
|
|
| |
When Bazel is released with
https://github.com/bazelbuild/bazel/commit/c9f9b0b84c486
the message on build failures changes. In general,
we advise not to read the output but use the build protocol instead.
|
| |
|
|
|
| |
Add this as an option to syz-ci and syz-build tools.
Otherwise we cannot use clang + ld.lld for kernel builds.
|
| | |
|
| |
|
|
|
|
| |
Add ability to trace build process and save debug artefacts.
Add tracing of ELF signature calculation.
Useful for debugging of #2297.
|
| |
|
|
| |
Currenlty we shadow err variable and return nil if found no builder.
|
| |
|
|
|
|
|
|
|
| |
Android uses some config files (specified with the BUILD_CONFIG
environment variable) to configure kernel builds. KASan configurations
already exist.
We want to mount the image, install a new Cuttlefish emulator binary
(using fetch_cvd) and copy over the kernel that we've built.
|
| |
|
|
|
|
|
| |
With very few exceptions, the building code remains essentially the
same, so there's no need to explicity specify all possible combinations.
Refactor the code.
|
| |
|
|
|
|
|
|
|
| |
We've just got a timeout failure for TestCompilerIdentity test:
--- FAIL: TestCompilerIdentity (0.00s)
--- FAIL: TestCompilerIdentity/bazel (60.19s)
build_test.go:24: failed: timedout ["bazel" ""]
FAIL
|
| |
|
|
|
|
|
|
| |
Currently syzkaller leaves an empty CompilerID, when it has failed to
build a kernel. However, in almost all cases this is possible to do.
Query compiler information irregardless of whether the build process
is successful.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Default compilers are specified in the OS- and platform-dependent logic.
It is more convenient to extract info about them during the kernel build
itself, rather than during the manager object initialization.
Apply the necessary changes throughout the code that is involved in
building the kernels and processing information about this process.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We use strings to identify OS/Arch.
These strings are duplicated throughout the code base massively.
golangci-lint points to possiblity of typos and duplication.
We already had to define these names in pkg/csource
and disable checking for prog package. A future change triggers
such warnings in another package.
Add OS/Arch name consts to sys/targets so that they can be used
to refer to OS/Arch. Use the consts everywhere.
|
| | |
|
| |
|
|
|
|
| |
Add option to use ccache in kernel builds.
Signed-off-by: Jouni Hogander <jouni.hoegander@partner.bmw.de>
|
| |
|
|
| |
Signed-off-by: Alexander Egorenkov <Alexander.Egorenkov@ibm.com>
|
| |
|
|
|
|
| |
Create a struct on pkg/vcs to store data of syzkaller email recipients
and update its users. The struct contains default name, email, and a
label to divide user into To and Cc when sending the emails.
|
| | |
|
| |
|
|
|
| |
ssh is very picky about ssh key permissions.
Let's enforce the right persmissions without bothering user with this.
|
| |
|
|
|
|
|
| |
Extract build error source file and obtain maintainers
so that we can mail the report to the right people.
Update #1667
|
| |
|
|
|
|
|
|
|
| |
1. Extract multiple error lines (up to 10).
Gives more complete picture, maybe the first one
is not the most indicative one.
2. Replace weird unicode quotes with normal quotes.
These may be mishandled by some systems that don't understand utf-8.
|
| |
|
|
|
|
|
| |
Add optional build signature for images, currently only implemented for linux.
This can be used in bisection process to detect changes that does not affect kernel.
Update #1271
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
All callers of EnvForCommit need the compiler path,
so move this logic into EnvForCommit to avoid duplication.
Also simplifies tests because test impl can now return
an empty compiler (which should be unused).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(note: incomplete change)
Refactor existing code as follows:
* Move reusable test utility functions from git_repo_test.go to
pkg/vcs/test_util.go and make them exported.
* Split Run() into Run()+runImpl().
* Change type of bisect.go:env.inst to `instance.BuilderTester`.
Change usage inside syz-testbuild/testbuild.go accordingly.
* Move most of linux.PreviousReleaseTags() into vcs/git.go as
git.previousReleaseTags().
* Allow build.CompilerIdentity to be mocked.
Introduce the following changes:
* instance.BuilderTester is an interface with methods
BuildSyzkaller()
BuildKernel()
Test()
NewEnv() now returns this interface.
* type testEnv implements instance.BuilderTester.
* type testBuilder implements builder interface. Add a entry into table
inside pkg/build/build.go:getBuilder() to return testBuilder object.
|
| |
|
|
|
|
|
|
|
|
|
| |
Enable the Linux builder for ppc64le.
For ppc64le, we use zImage rather than bzImage as our kernel target. Pass
through the target architecture to buildKernel() so we can pick the right
target based on arch.
Closes: #1084 ("pkg/build: Support building Linux on ppc64le")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
|
| |
|
|
| |
This happens when compiler has bad permissions.
|
| |
|
|
|
| |
The first error is usually more informative and significant.
Extract first error instead of last.
|