aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance/execprog.go
Commit message (Collapse)AuthorAgeFilesLines
* pkg/instance: fix 386 repros/jobsDmitry Vyukov2025-12-291-3/+2
| | | | | | | | | | | | All repros and jobs that use syz rerpos are broken for linux/amd64/386 since Mar 2022 with: SYZFAIL: failed to recv rpc aborting RPC server: mismatching manager/executor arches: amd64 vs 386 The problem is that ExecProgInstance.RunSyzProgFile passes sysTarget.Arch (which is VMArch) to syz-execprog, so it expects executor to be amd64. Restore the orignal logic.
* all: use any instead of interface{}Dmitry Vyukov2025-12-221-2/+2
| | | | Any is the preferred over interface{} now in Go.
* 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.
* vm: extract all the crashes from the logTaras Madan2025-08-281-1/+5
|
* vm: refactoringTaras Madan2025-08-071-3/+6
| | | | | 1. func Run optionally accepts the opts. 2. Some refactoring, more comments.
* vm: func Run accepts contextTaras Madan2025-05-191-1/+4
| | | | It allows to use context as a single termination signal source.
* all: delete dead codeTaras Madan2025-02-101-4/+0
| | | | | go install golang.org/x/tools/cmd/deadcode@latest deadcode -test ./...
* all: add support for binaries shipped with targetStefan Wiehler2024-12-171-4/+8
| | | | | | | | | | | In some build environments (notably Yocto), syzkaller host and target binaries end up in separate packages for each built architecture, which are then shipped with the respective image/SDK. Add the "Execprog/ExecutorBinOnTarget" and "StraceBinOnTarget" options to the manager config, which when set expects the respective binaries to be shipped with the target image and does not attempt to copy them from the host.
* pkg/repro: accept a cancellable contextAleksandr Nogikh2024-11-131-9/+24
| | | | | | | | | | Refactor pkg/repro to accept a context.Context object. This will make it look more similar to other package interfaces and will eventually let us abort currently running repro jobs without having to shut down the whole application. Simplify the code by factoring out the parameters common both to RunSyzRepro() and RunCRepro().
* pkg/instance: refactor ExecprogCmdAleksandr Nogikh2024-09-251-6/+1
| | | | Reduce the number of arguments by using a csource.Option value directly.
* tools/syz-execprog: pass the VM type to execprogLaura Peskin2024-09-241-1/+1
| | | | | | This makes it possible to skip certain machine checks depending on the VM type, as syz-manager already does.
* pkg/repro: don't exaggerate timeoutsAleksandr Nogikh2024-08-271-4/+10
| | | | | | | Our largest timeout is 6 minutes, so anything between 1.5 minutes and 6 ended up having a 9 minute timeout. That's too much. Consider the time it actually took to crash the kernel.
* pkg/instance: use execprog to do basic instance testingDmitry Vyukov2024-05-271-5/+5
| | | | | | | | | | | When we accept new kernels for fuzzing we need more extensive testing, but syz-ci switched to using syz-manager for this purpose. Now instance testing is used only for bisection and patch testing, which does not need such extensive image testing (it may even harm). So just run a simple program as a testing. It also uses the same features as the target reproducer, so e.g. if the reproducer does not use wifi, we won't test it, which reduces changes of unrelated kernel bugs.
* pkg/instance: always use default exit conditionsAleksandr Nogikh2024-05-231-8/+12
| | | | | | | We don't really need to overwrite it. For syz programs, don't ignore non-zero exit codes. This should enable syzkaller to find reproducers for "lost connection" bugs.
* vm: combine Run and MonitorExecutionDmitry Vyukov2024-04-111-12/+11
| | | | | | 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.
* all: use special placeholder for errorsTaras Madan2023-07-241-2/+2
|
* pkg/instance: don't fail on symbolization errorAleksandr Nogikh2023-07-101-1/+1
| | | | | | | The test() code is used for reproducer generation and kernel bisections, we don't need symoblized reports there. Instead of retuning an error, just print a log message.
* pkg/repro: factor out an interfaceAleksandr Nogikh2023-05-251-0/+4
| | | | | Interact with a syz-execprog instance via an additional interface. This will simplify testing.
* pkg/csource, pkg/instance, pkg/ipc, pkg/mgrconfig, tools/syz-prog2c, ↵Andrey Artemiev2022-08-061-1/+1
| | | | syz-manager: introduce a new setting 'sandbox_arg' (#3263)
* pkg/instance: don't close vmInst in SetupExecProgAleksandr Nogikh2022-06-201-3/+0
| | | | | | | | That method was not assumed to take ownership of the instance. This can lead to double-closing of it during bisection/patch testing, and therefore to panic(). Closes #3210.
* all: run strace on each found reproducerAleksandr Nogikh2022-04-291-0/+26
| | | | | | | | If `strace_bin` is specified, syzkaller will invoke a reproducer with it and save the output. This should help in debugging. If syz-manager is attached to a dashboard, upload the strace-powered output and report.
* vm: support variable output buffer sizeAleksandr Nogikh2022-04-291-3/+6
| | | | | Also update syz-crush to save RawOutput instead of output from the Report.
* all: use the same prog execution code throughout the projectAleksandr Nogikh2022-04-291-0/+159
Previously it was copypasted in pkg/instance, pkg/repro, tools/syz-crash. Use the single implementation instead. Also, this commit fixes a bug - the previous code always set collide to true while reproducing a bug, which led to an immediate syz-exexprog's exit. As a result, newer bugs with .syz repro only were never actually reproduced on #syz test requests.