Commit Graph

42 Commits

Author SHA1 Message Date
Dmitry Vyukov
9fa03fa5c9 syz-ci: don't put dynamic data into boot/test errors
We append underlying error to the title of boot/test errors.
The error can come from anywhere and can contain dynamic data,
which can cause duplication of bugs.

Put the underlying error into report body instead.
2018-07-10 10:19:48 +02:00
Dmitry Vyukov
4906b5987e syz-ci: copy akaros object file 2018-07-05 13:11:37 +02:00
Dmitry Vyukov
68ce63c468 pkg/build: support fuchsia builds 2018-06-28 13:42:07 +02:00
Dmitry Vyukov
58e8587f64 pkg/vcs: pave way for multi-vcs support
Wrap current git interface in abstract interface.
Provide constructor that create repo interface for the given os/vm.
2018-06-27 13:57:21 +02:00
Dmitry Vyukov
43da5e3a1b pkg/vcs: move from pkg/git
Rename pkg/git to pkg/vcs because we need to support not only git.
2018-06-27 13:07:03 +02:00
Dmitry Vyukov
802897bc33 pkg/instance: say that gvisor can create instances out of thin air 2018-06-23 10:12:35 +02:00
Dmitry Vyukov
c97f0d7a86 pkg/build: add gvisor support 2018-06-22 16:40:45 +02:00
Dmitry Vyukov
ea804a7120 pkg/build: pave way for multi-OS support
Unify kernel and image build, that distinction is really uninteresting.
Define interface that each OS needs to implement.
Add gvisor stub.
2018-06-22 16:40:45 +02:00
Dmitry Vyukov
94ef62054c pkg/build: move from pkg/kernel
Rename pkg/kernel to pkg/build and prepare for multi-OS support.
2018-06-22 16:40:45 +02:00
Dmitry Vyukov
2a075d57ab pkg/report: allow to specify suppressions per OS
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.
2018-06-22 16:40:45 +02:00
Dmitry Vyukov
6595937c34 tools/create-gce-image.sh: support both nbd and loop
Pass target OS/arch and VM type to kernel.CreateImage.
Use nbd for gce and loop for qemu VM type.
2018-05-17 14:50:18 +02:00
Dmitry Vyukov
477728038c syz-ci: fix manager config creation
SyzFuzzerBin/SyzExecprogBin/SyzExecutorBin are ended up being empty.
Fix this.
2018-05-14 12:17:34 +02:00
Dmitry Vyukov
2407e7407a pkg/instance: add package for testing of images/patches/bisection
Move helper image/patch testing code from syz-ci/testing.go
to a separate package so that it can be reused during bisection.

Update #501
2018-05-14 11:32:56 +02:00
Dmitry Vyukov
2a287a4dfc pkg/kernel: accept kernel config as byte slice
We usually have the config in memory,
so saving it to disk is an unnecessary step.
Accept byte slice directly.

Update #501
2018-05-14 11:17:23 +02:00
Dmitry Vyukov
4fce9bf152 syz-manager: add concept of partial configs
syz-ci uses partial (incomplete) manager config in several places.
Currently it is implemented in some ugly way.
Provide better support and unexport DefaultValues and SplitTarget.

Update #501
2018-05-14 11:16:57 +02:00
Dmitry Vyukov
9e0846e8a4 all: get rid of underscores in identifiers
Underscores are against Go coding style.

Update #538
2018-05-07 17:59:06 +02:00
Dmitry Vyukov
9fe5658a1b gometalinter: check dot imports
Update #538
2018-05-03 14:41:34 +02:00
Dmitry Vyukov
36d1c4540a all: fix gometalinter warnings
Fix typos, non-canonical code, remove dead code, etc.
2018-03-08 18:48:26 +01:00
Dmitry Vyukov
b8970f313e syz-ci: fix log message 2018-01-17 21:09:02 +01:00
Dmitry Vyukov
fbc4659e78 syz-ci: disable fix commit extraction for mmots
mmots contains weird squashed commits titled "linux-next" or "origin",
which contain hundreds of other commits. This makes fix attribution totally broken.
Obviously need something better long term, but also need to fight fire now.
2018-01-17 20:17:23 +01:00
Dmitry Vyukov
d7bc58204e dashboard/app: collect more info for better reports
Collect kernel build commit title/date.
Add support for kernel repo aliases (to be able
to say linux-next instead of full git repo address).
Collect on what managers a bug happened.
Reuse Crash.ReportLen as generic crash reporting priority.
Make it possible to prioritize reporting of particular
kernel repos and arches.

Fixes #473
2018-01-17 19:52:30 +01:00
Dmitry Vyukov
9dd89763a1 syz-ci: don't mark build errors as corrupted
Otherwise they get merged with other corrupted reports.
2017-12-27 14:28:08 +01:00
Dmitry Vyukov
6f03c35620 dashboard/app: extract fixing tags from commits
Support the new scheme of associating fixing commits with bugs.
Now we provide a tag along the lines of:

Reported-by: <syzbot+a4a91f6fc35e102@syzkaller.appspotmail.com>

The tag is supposed to be added to the commit.
Then we parse commit logs and extract these tags.

The final part on the dashboard is not ready yet,
but syz-ci should already parse and send the tags.
2017-12-27 09:09:18 +01:00
Dmitry Vyukov
528deaed27 syz-ci: combine build.ID from both kernel tag and syzkaller commit
Builds with equal IDs are merged by dashboard,
so if only syzkaller commit has changed
dashboard won't create a new build and the new
syzkaller commit will be lost.
2017-12-06 13:12:38 +01:00
Dmitry Vyukov
2fa91450df dashboard/app: add manager monitoring
Make it possible to monitor health and operation
of all managers from dashboard.
1. Notify dashboard about internal syz-ci errors
   (currently we don't know when/if they happen).
2. Send statistics from managers to dashboard.
2017-12-01 13:58:11 +01:00
Dmitry Vyukov
5153aeaffd syz-ci: test images before using them
Boot and minimally test images before declaring them as good
and switching to using them.

If image build/boot/test fails, upload report about this to dashboard.
2017-11-30 14:50:50 +01:00
Dmitry Vyukov
708390a039 syz-ci: pre-parse and pre-populate manager config
Config is currently parsed in 2 places.
Parse it in constructor once.
2017-11-16 10:15:23 +01:00
Dmitry Vyukov
8f3e774b76 syz-ci: improve commit matching
1. Fetch last 200K commits instead of commits for past year.
For merged commits both author date and commit date can be
arbitrary long in past (e.g. we got a commit dated by 2014).

2. Strip some commit prefixes from commits.
We have some trees where backports are prefixed with "BACKPORT:".
Previously we could no match such commits.
2017-11-07 13:31:00 +01:00
Dmitry Vyukov
d394531e95 dashboard/app, syz-ci: upload target OS/arch to dashboard 2017-09-19 17:00:26 +02:00
Dmitry Vyukov
f7b1163afb syz-manager/mgrconfig: explicitly specify target in config
Add target config parameter (e.g. linux/amd64) which controls target OS/arch.
No more explicit assumptions about target.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
032fb6f70a syz-ci: send commits to dashboard
Dashboard needs to know when bug fixing commits reach
builders in order to fully close bugs.
Send commits that dashboard is interested in to dashboard.
2017-07-28 20:14:24 +02:00
Dmitry Vyukov
0f42bbec24 syz-ci: extend dashboard interface
1. Add manager name to builds.
2. Add centralized logging.
3. Add types for bug reports and bug updates.
2017-07-21 10:06:46 +02:00
Dmitry Vyukov
012622d3c9 syz-ci: fix dashboard settings in manager config 2017-07-18 16:34:33 +02:00
Dmitry Vyukov
cc1c342923 syz-ci: allow to specify cmdline/sysctls
Allow to specify per-kernel command line and sysctl values
to more closely mimic the target kernel.
2017-07-17 12:39:11 +02:00
Dmitry Vyukov
e489b6cafd syz-ci: don't duplicate manager config default values 2017-07-17 12:39:11 +02:00
Dmitry Vyukov
0fd1458dba syz-ci: specify dashboard client per manager
Dashboard will need to distinguish managers
to understand what kernel they are testing.
2017-07-17 12:39:06 +02:00
Dmitry Vyukov
e7b1c55592 syz-ci: fix manager config creation
Don't write hub/dashboard params if they are not enabled
in syz-ci config. Otherwise manager gets name but not addr/key,
and that does not pass config validation.
2017-07-03 14:23:35 +02:00
Dmitry Vyukov
a7b199253f all: use consistent file permissions
Currently we have unix permissions for new files/dirs
hardcoded throughout the code base. Some places use 0644,
some - 0640, some - 0600 and a variety of other constants.

Introduce osutil.MkdirAll/WriteFile that use the default
permissions and use them throughout the code base.

This makes permissions consistent and also allows to easily
change the permissions later if we change our minds.

Also merge pkg/fileutil into pkg/osutil as they become
dependent on each other. The line between them was poorly
defined anyway as both operate on files.
2017-07-03 14:00:47 +02:00
Dmitry Vyukov
a8b32c55ab syz-ci: switch to the new dashboard
Switch to the new dashboard and start uploading build info.
2017-06-30 16:04:30 +02:00
Dmitry Vyukov
cc9db10249 syz-ci: extend build info
We currently store 3 tags (compiler id, kernel commit and config hash).
But we also kernel git report/branch. To not store 2 more tag files,
combine everything into a single json file that holds all info about the build.
Will allow simpler extenstion in future as well.
2017-06-30 15:32:30 +02:00
Dmitry Vyukov
9af3153420 syz-dash/dashboard: move from dashboard
Move the old dashboard API into syz-dash
to get it out of the way of the new dashboard.
2017-06-23 15:22:34 +02:00
Dmitry Vyukov
6573032fff syz-ci: add continuous integration system 2017-06-20 19:59:55 +02:00