aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/instance
Commit message (Collapse)AuthorAgeFilesLines
* pkg/instance: extend debug output on syzkaller make errorDmitry Vyukov2020-05-251-1/+7
| | | | | For debugging of: https://groups.google.com/forum/#!topic/syzkaller-bugs/2lgvlHd8t1c
* pkg/report: add Report.SkipPosDmitry Vyukov2020-05-131-6/+1
| | | | | SkipPos is what pkg/instance needs, but also will be needed for ParseAll.
* pkg/instance: Use syz or c source file when testingJouni Hogander2020-04-291-37/+39
| | | | | | Currenlty only syz file is taken into account when testing. Use also c source file if available. Still use syz as a "main" reproducer.
* syz/targets: add SyzExecutorCmd flagMarco Vanotti2019-12-091-8/+20
| | | | | | | | | | | | | This commit adds a new attribute to syzkaller targets that tells syzkaller how to invoke the syz-executor command. Some systems, like Fuchsia, are now building syz-executor as part of the build, and there is no need to copy it over, or to run it from `/tmp`. In fact, that might stop working at some time in the future in Fuchsia. All places that used to copy syz-executor into the target machine will now check for the SyzExecutorCmd flag, and won't copy it if the flag is set.
* sys/targets: add HostFuzzer flagDmitry Vyukov2019-11-161-5/+4
| | | | | | | Move HostFuzzer from vm/qemu. It's needed in a number of other packages and strictly saying is not specific to qemu (it just happened that both fuchsia and akaros only support qemu).
* pkg/bisect: detect wrong bisectionsDmitry Vyukov2019-11-071-8/+9
| | | | | | | | Detect bisection to merge commits and to commits that don't affect kernel binary (comments, other arches, whitespaces, etc). Such bisections are not reported in emails (but shown on web). Update #1271
* pkg/build: add build signaturesDmitry Vyukov2019-11-061-1/+1
| | | | | | | 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
* pkg/build: refactor Image function argumentsDmitry Vyukov2019-11-061-8/+17
| | | | | | | 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/bisect: add initial testing support for cause bisectionZubin Mithra2019-10-221-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | (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.
* all: convert Fuchsia to use "host fuzzing" modeMatthew Dempsky2019-08-272-3/+5
| | | | | | | | | Go support is not a priority for Fuchsia at the moment, so it's preferable to use host fuzzing mode for Fuchsia like currently done for Akaros. This commit basically looks for all the places where there was special logic for OS=="akaros" and extends the same logic for OS=="fuchsia".
* pkg/log: rename -v to -vvDmitry Vyukov2019-07-162-8/+16
| | | | | To avoid conflicts with programs that import both syzkaller packages and github.com/golang/glog which also defines -v flag.
* pkg/report: add Type/Frame to ReportDmitry Vyukov2019-05-201-1/+1
| | | | | | In several places we do special handling for some crash types. Currently we compare report title with magic strings, which is error-prone. Add explicit Type to reports.
* pkg/instance: fix types in OverrideVMCountDmitry Vyukov2019-05-181-2/+2
| | | | | vmConfig value is interface{}, not string. So compare with nil and assign int.
* pkg/instance: break the line to appease linter (#1173)Greg Steuck2019-05-121-1/+2
| | | | | | * pkg/instance: break the line to appease linter * fix up format
* syz-ci: don't assume kernel config is called .configDmitry Vyukov2019-05-121-3/+10
| | | | | .config is linux-ism. We have a convention that kernel config is copied to kernel.config file. Use it.
* syz-ci: always use 10 VMs for bisectionDmitry Vyukov2019-05-101-0/+17
| | | | | If a manager has less then 10 VMs override it to 10 for bisection. If a manager has only 1 VM, bisection won't end well.
* vm/gce: allow non-preemptible VMsDmitry Vyukov2019-03-281-25/+19
| | | | | | | | | We are seeing some flakes during bisection and image testing. Hard to tell what's the root cause because they are episodic. But using non-preemptible VMs for bisection and image testing looks good on all fronts. Update #501
* pkg/csource: allow to ignore warnings during buildDmitry Vyukov2019-03-211-1/+1
| | | | | | | | | | | | | | | Running bisection using an older repro failed with: <stdin>: In function ‘syz_mount_image.constprop’: <stdin>:298:3: error: argument 1 null where non-null expected [-Werror=nonnull] In file included from <stdin>:26:0: /usr/include/x86_64-linux-gnu/sys/stat.h:320:12: note: in a call to function ‘mkdir’ declared here extern int mkdir (const char *__path, __mode_t __mode) Let's be safe and ignore warnings during repro/bisect. Everything that runs during tests still has all warnings. Update #501
* pkg/instance: fix boot error detectionDmitry Vyukov2019-03-171-1/+6
| | | | | | | Currently we truncate output up to rep.EndPos after unexpected reboot. But report sets EndPos to the _last_ report in output, so if there are any other errors they are all skipped after truncation to EndPos. Truncate just one line instead.
* pkg/instance: clean up temp fileDmitry Vyukov2019-03-171-0/+1
|
* pkg/instance: use -fpermissive -w when building old syzkallerDmitry Vyukov2019-03-171-0/+5
| | | | | | | | | Since we can be building very old revisions for bisection here, make the build as permissive as possible. Newer compilers tend to produce more warnings also kernel headers may be broken, e.g.: ebtables.h:197:19: error: invalid conversion from ‘void*’ to ‘ebt_entry_target*’ Update #501
* pkg/instance: use gmake on FreeBSD as on OpenBSDEd Maste2019-02-261-1/+1
|
* pkg/instance: test coverage during instance testingDmitry Vyukov2019-02-131-1/+1
| | | | | | Currently we always pass cover=false during instance testing and as the result covereage is not tested. This can result in broken images. Pass the actual value of coverage for testing.
* vm: allow fine-grained control over program exit conditionsDmitry Vyukov2018-12-241-3/+4
| | | | | | | | | Currently we only support canExit flag. However there are actually 3 separate conditions: - program can exit normally - program can timeout (e.g. fuzzer test or runtest can't) - program can exit with error (e.g. C test can) Allow to specify these 3 conditions separately.
* pkg/instance: make kernel reboot detection portableDmitry Vyukov2018-12-161-11/+9
| | | | The current code is linux specific, generalize it to other OSes.
* syz-ci: use gmake instead of make on openbsdDmitry Vyukov2018-09-131-1/+9
| | | | Update #712
* pkg/instance: support injected boot for vmmDmitry Vyukov2018-09-111-8/+8
| | | | | | | If pkg/build produces a kernel, inject it into vmm config too. This will allow continuous build with vmm VM type. Update #712
* syz-ci: de-hardcode list of VMs that support overcommitDmitry Vyukov2018-09-111-4/+2
| | | | | | | | We currently have this list in multiple places (somewhat diverged). Specify this "overcommit" property in VM implementations. In particular, we also want to allow overcommit for "vmm" type. Update #712
* pkg/instance: fix gometalinter warningsDmitry Vyukov2018-08-291-8/+9
|
* pkg/instance: fix job testingDmitry Vyukov2018-08-292-2/+140
| | | | | New FuzzerCmd generates flags that can't be parsed by an old fuzzer. Fix that and add a test.
* tools/syz-runtest: add tool for program unit testingDmitry Vyukov2018-08-031-4/+4
| | | | | | | | | | | The tool is run as: $ syz-runtest -config manager.config This runs all programs from sys/*/test/* in different modes on actual VMs and checks results. Fixes #603
* pkg/mgrconfig: move from syz-manager/mgrconfigDmitry Vyukov2018-08-021-1/+1
| | | | | | | | mgrconfig was used only by syz-manager initially, but now it's used by a dozen of packages and it's weird to import from under a binary dir. pkg/ is much more reasonable dir for a widely used helper package.
* pkg/instance: pass -os to execprog/fuzzer only for akarosDmitry Vyukov2018-07-061-6/+38
| | | | | | Only akaros needs OS, because the rest assume host OS. But speciying OS for all OSes breaks patch testing on syzbot because old execprog does not have os flag.
* pkg/instance: pass os flag to execprog/fuzzerDmitry Vyukov2018-07-051-4/+4
|
* pkg/instance: fix Accept error checkDmitry Vyukov2018-06-291-1/+1
|
* pkg/build: support fuchsia buildsDmitry Vyukov2018-06-281-1/+35
|
* pkg/vcs: pave way for multi-vcs supportDmitry Vyukov2018-06-271-1/+1
| | | | | Wrap current git interface in abstract interface. Provide constructor that create repo interface for the given os/vm.
* pkg/vcs: move from pkg/gitDmitry Vyukov2018-06-271-2/+2
| | | | Rename pkg/git to pkg/vcs because we need to support not only git.
* syz-fuzzer: partially revert "syz-fuzzer: fix gvisor testing"Dmitry Vyukov2018-06-261-14/+2
| | | | This breaks patch testing on syz-ci as it can use older version of syz-fuzzer.
* syz-fuzzer: fix gvisor testingDmitry Vyukov2018-06-261-3/+15
| | | | | | Testing code wasn't ready to dial stdin. Make it use the same logic rpc package uses to connecto to host.
* pkg/instance: say that gvisor can create instances out of thin airDmitry Vyukov2018-06-231-1/+1
|
* pkg/build: pave way for multi-OS supportDmitry Vyukov2018-06-221-9/+8
| | | | | | Unify kernel and image build, that distinction is really uninteresting. Define interface that each OS needs to implement. Add gvisor stub.
* pkg/build: move from pkg/kernelDmitry Vyukov2018-06-221-3/+3
| | | | Rename pkg/kernel to pkg/build and prepare for multi-OS support.
* pkg/report: allow to specify suppressions per OSDmitry Vyukov2018-06-221-5/+3
| | | | | | | | | | | | | Currently all (linux-specific) suppressions are hardcoded in mgrconfig. This is very wrong. Move them to pkg/report and allow to specify per OS. Add gvisor-specific suppressions. This required a bit of refactoring. Introduce mgrconfig.KernelObj finally. Make report.NewReporter and vm.Create accept mgrconfig directly instead of passing it as multiple scattered args. Remove tools/syz-parse and it always did the same as tools/syz-symbolize. Simplify global vars in syz-manager/cover.go. Create reporter eagerly in manager. Use sort.Slice more. Overall -90 lines removed.
* pkg/report: pass vm type to NewReporterDmitry Vyukov2018-06-221-2/+2
| | | | | For the case when VM type affects output. Will be needed for gvisor. It is kinda linux, but kinda not.
* vm: pass instance to MonitorExecutionDmitry Vyukov2018-06-221-2/+2
| | | | | It may need it later to try to obtain additional diagnostic from hanged instances.
* pkg/instance: more robust instance testingDmitry Vyukov2018-06-111-5/+6
| | | | | | | Strictly saying, we may not get the connection when the fuzzer process exits. The accepting goroutine may have not been scheduled yet. For the connection for up to 10 seconds.
* pkg/csource: allow to build source fom memoryDmitry Vyukov2018-06-061-5/+1
| | | | | | In most cases we have source in memory, so provide a function to build right from memory without creating temp files.
* pkg/kernel: allow to split full make outputDmitry Vyukov2018-05-171-2/+2
| | | | | | | | | | | Currently kernel build failures are insanely verbose (contain full kernel build output) and there is no way to separate short descriptions from full output. Make it possible. Also try to extract failure root cause froom build log. Use this in pkg/bisect to not pollute log on build failures. Update #501
* tools/create-gce-image.sh: support both nbd and loopDmitry Vyukov2018-05-171-6/+7
| | | | | Pass target OS/arch and VM type to kernel.CreateImage. Use nbd for gce and loop for qemu VM type.