aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/build
Commit message (Collapse)AuthorAgeFilesLines
* all: remove unused nolint directivesDmitry Vyukov2026-01-021-1/+0
|
* all: replace egrep with grep -EAndrew Donnellan2025-12-101-1/+1
| | | | | | | | | | The egrep command has been deprecated in GNU Grep since 2007, and nowadays using egrep rather than grep -E will print a warning to the user, which is very annoying. Replace all usages of egrep with grep -E. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
* pkg/build: build starnix in debug modeLaura Peskin2025-11-211-0/+1
| | | | | | | Some debug features, like dynamic mutex cycle detection, are no longer included by the default build config. Add the --debug flag to fx set in order to turn these features back on.
* pkg/build: update fuchsia image type in starnix build scriptglpesk2025-11-201-1/+1
| | | | | | | Fuchsia product bundles have switched to including only sparse fxfs images, and the --image-type flag value that we were previously passing to ffx product get-image-path is now obsolete. Replaced with the name of the new option referring to the sparse image.
* build/gvisor: use make to build runscAndrei Vagin2025-11-061-53/+18
| | | | Signed-off-by: Andrei Vagin <avagin@google.com>
* pkg/build: extract Rust build errorsAleksandr Nogikh2025-11-032-0/+21
| | | | Add a rust error regexp and a test to verify the resulting report.
* pkg/build: disable build profiling for Fuchsia buildsCameron Finucane2025-10-091-0/+9
| | | | | This was recently enabled by default and depends on external tools not present on the syzkaller instances.
* pkg/osutil: make VerboseError nest other errorsAleksandr Nogikh2025-10-011-1/+1
| | | | | After this change it fits more naturally into the Go's error functionality.
* vm: add context to Pool.Create()Aleksandr Nogikh2025-10-011-1/+1
| | | | | | | | | | Enable external abortion of the instance creation process. This is especially useful for the qemu case where we retry the creation/boot up to 1000 times, which can take significant time (e.g. it timeouts syz-cluster pods on unstable kernels). The context can be further propagated to WaitForSSH, but that requires another quite significant vm/ refactoring.
* syz-cluster: consider global/static variable valuesAleksandr Nogikh2025-08-291-22/+46
| | | | | | | | | When determining whether a patch series is worth fuzzing, consider not only the hashes of .text symbols, but also the hashes of the global (static and non-static) variables. As before, calculate the hashes during build and process them at the beginning of the fuzz step.
* vm: extract all the crashes from the logTaras Madan2025-08-281-3/+3
|
* tools/docker: install bazelisk instead of bazelKonstantin Bogomolov2025-08-281-1/+4
| | | | | | | 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.
* pkg/build: move kernel release overrides to make argsAleksandr Nogikh2025-08-181-3/+5
| | | | | When set as env variables, these don't seem to have any effect, but start to work as indended when passed as explicit make arguments.
* all: determine patched symbols for focused fuzzingAleksandr Nogikh2025-07-221-0/+52
| | | | | | | | | Hash the code section of the individual symbols from vmlinux.o and use it to determine the functions that changed their bodies between the base and the patched build. If the number of affected symbols is reasonable (<5%), fuzz it with the highest priority.
* pkg/build: set KERNELRELEASE for more reproducible buildsDmitry Vyukov2025-07-221-0/+1
| | | | Update #2297
* all: apply linter auto fixesTaras Madan2025-07-171-7/+8
| | | | ./tools/syz-env bin/golangci-lint run ./... --fix
* pkg/build: enable BBLog for FreeBSDMichael Tuexen2025-05-251-0/+3
| | | | | This enables BBLog for all TCP endpoints using the CONTINUAL mode. This stores the most recent events at each TCP endpoint.
* vm: func Run accepts contextTaras Madan2025-05-191-1/+4
| | | | It allows to use context as a single termination signal source.
* all: use LLVM=1 for building Linux with clangAleksandr Nogikh2025-04-171-3/+10
| | | | | | | | | | | | This is the standard way now. Since our configuration permits multiple parameter value combinations, explicitly check for the compiler and linker that were to be passed via CC and LD, and replace that with LLVM=1 if they were clang and ld.lld correspondingly. Update syz-kconf to rely on pkg/build's exported functionality for generating Linux kernel build arguments.
* all: remove loop variables scopingTaras Madan2025-02-171-2/+0
|
* syz-cluster: store session test logsAleksandr Nogikh2025-02-041-1/+2
| | | | Record the logs from the build and fuzzing steps.
* all: replace Walk with WalkDir to reduce os.Lstat callsGofastasf2025-01-301-3/+4
| | | | | | | | filepath.Walk calls os.Lstat for every file or directory to retrieve os.FileInfo. filepath.WalkDir avoids unnecessary system calls since it provides a fs.DirEntry, which includes file type information without requiring a stat call. This improves performance by reducing redundant system calls.
* pkg/build: use relative path for fx set directory argLaura Peskin2024-12-091-3/+3
|
* pkg/build: avoid relying on environment file for ffxLaura Peskin2024-12-021-1/+10
|
* pkg/build: add build command for starnixLaura Peskin2024-10-302-0/+118
| | | | Co-authored-by: eep@google.com
* pkg/build/bsd: use the number of CPUs provided in params in cleanFlorent Revest2024-10-152-4/+2
| | | | | | Now that clean functions take a params, like builds, it makes sense to use the BuildCPUs parameter rather than let each OS build implementation extract the number of CPUs.
* pkg/build: share parameters sanitization between builds and cleansFlorent Revest2024-10-151-6/+11
| | | | | | | | | | 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.
* pkg/build: use the build environment in clean() callsFlorent Revest2024-10-1411-33/+28
| | | | | | 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/linux: support building with a custom make binaryFlorent Revest2024-10-142-5/+9
| | | | | | 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.
* pkg/build: handle OOM-killed build errorSabyrzhan Tasbolatov2024-09-232-1/+68
| | | | | | | 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
* vm: make sure vm.Pools are cleaned upCameron Finucane2024-09-191-0/+1
| | | | Add calls to Close() from all locations that call Create().
* pkg/build/cuttlefish: copy module objectsLiz Prucka2024-09-142-2/+5
| | | | | Copy Cuttlefish module objects to be used in coverage report generation.
* all: rename build_jobs to build_cpusAleksandr Nogikh2024-08-225-11/+11
| | | | The latter is a better suitable name.
* pkg/build: introduce the build jobs parameterAleksandr Nogikh2024-08-225-20/+25
| | | | | This parameter defines the number of cores dedicated to the kernel build process. By default, it's equal to the number of available CPUs.
* tools: correct resolv.conf filename for nameserver configurationRichard Smith2024-06-051-1/+1
| | | | Signed-off-by: Richard Smith <happyercat@gmail.com>
* sys/targets: add consts for gvisor/starnixDmitry Vyukov2024-05-271-1/+1
| | | | | Lint started warning about duplicate "gvisor" const in pkg/cover. Add gvisor/starnix consts to sys/targets package to avoid duplication.
* all: go fix everythingDmitry Vyukov2024-04-262-2/+0
|
* tools/syz-linter: check t.Logf/Errorf/Fatalf messagesDmitry Vyukov2024-04-171-1/+1
| | | | | Fix checking of Logf, it has string in 0-th arg. Add checking of t.Errorf/Fatalf.
* all: remove akaros supportDmitry Vyukov2024-04-152-132/+0
| | | | | | | 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.
* vm: combine Run and MonitorExecutionDmitry Vyukov2024-04-111-2/+1
| | | | | | All callers of Run always call MonitorExecution right after it. Combine these 2 methods. This allows to hide some implementation details and simplify users of vm package.
* pkg/build: run NetBSD in qemu emulation modeAleksandr Nogikh2024-04-111-1/+3
| | | | We used to do that before, but somehow we now pass the -enable-kvm flag.
* build/cuttlefish: revert input config supportLiz Prucka2024-03-121-41/+1
| | | | | | | | | Supporting configs from syz-kconf has increased complexity in reproducing builds, and not caused any quantifiable increase in fuzzing efficacy or crashes. Reverting the Cuttlefish build to use upstream build commands to increase ease in reproduction.
* pkg/build: pass additional flags from Android build configKris Alder2024-03-081-28/+22
| | | | | | | | | | | | | | More recent Android kernels may not use the DEFCONFIG_FRAGMENT and BUILD_TARGET environment variables. Instead, they may require passing additional flags the build script. This allows specifying those additional flags and makes the previously-required (and no longer used) configuration fields optional. The older values can now be set via the new EnvVars field when needed. We also need to look for the `autoconf.h` file in a different location. This can now be configured using the `autoconf_path` configuration field.
* pkg/build: copy unstripped module object files for PixelLiz Prucka2024-02-051-0/+29
| | | | | Copy unstripped module files in the output directory to be stored in the object dir, to be used when generating module coverage.
* pkg/build: fix incorrect vm instantiationAleksandr Nogikh2024-02-051-1/+3
| | | | vm now expects SysTarget to be present.
* pkg/build: don't use Fatal() inside goroutinesAleksandr Nogikh2023-11-281-20/+29
| | | | | | | | It's prohibited by the Go testing library. Use T.Error() instead. Cc #4315 Reported-by: Andrew Donnellan
* pkg/build/fuchsia.go: goconst false positiveTaras Madan2023-11-091-0/+1
| | | | It contributes to #4317 unblocking.
* all: use errors.As instead of .(type)Taras Madan2023-07-241-2/+3
|
* all: use special placeholder for errorsTaras Madan2023-07-2410-51/+51
|
* tools/create-gce-image: add rootwait command line option for ppc64leAndrew Donnellan2023-07-241-1/+1
| | | | | | | | | | | Sometimes it can take a while for a root block device to appear when backed by hardware that is slow to initialise, e.g. the ibmvfc Virtual Fibre Channel interface. Use the "rootwait" option to have the kernel wait for a disk to appear rather than panicking immediately. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>