1401 Commits

Author SHA1 Message Date
Dmitry Vyukov
0818340e80 syz-manager: don't take mutex when serving static files
Crash log serving does not touch any manager state.
2017-09-20 14:00:20 +02:00
Dmitry Vyukov
aeaa0b58b9 travis: also install 32-bit libstdc++
The build is still broken with missing C++ headers.
Let's see if this helps.
2017-09-20 13:57:36 +02:00
Dmitry Vyukov
d394531e95 dashboard/app, syz-ci: upload target OS/arch to dashboard 2017-09-19 17:00:26 +02:00
Dmitry Vyukov
62114d6064 Makefile: build target binaries into separate dirs
We currently build binaries for all targets into bin.
This makes mess in bin/ and does not allow testing of different archs.
Build target binaries into bin/OS_ARCH/ subdirs.

Host binaries are still built into bin/.

Update #333
Update #324
Update #191
2017-09-19 16:44:54 +02:00
Dmitry Vyukov
5b89a8780f travis: install cross-compilers 2017-09-19 11:34:50 +02:00
Andrey Konovalov
2bab8ad847 Update found_bugs.md 2017-09-18 19:34:56 +02:00
Dmitry Vyukov
da1873aadd sys/targets: move targets from sys package
This breaks circular dependency between:
sysgen -> sys/linux -> sys -> sysgen
With this circular dependency it is very difficult to
update format of generated descriptions because sysgen does not build.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
66393d1884 pkg/compiler: don't genererate missing syscalls
We used to generate them only because manager had no idea
what arch it is testing. So syscalls numbers had to match
between all arches.
This is not needed anymore.
Also don't generate unreferenced structs/resources.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
4f60e46e49 syz-manager: check that files we are using are not changing under us
If kernel or syzkaller binaries are rebuilt when manager uses them,
nothing good will happen. Manager can start mixing coverage from
old and new kernels, or crash on unknown syscalls.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
539e603206 syz-manager, syz-fuzzer, executor: ensure that binaries are consistent
Check that manager/fuzzer/executor are build on the same git revision,
use the same syscall descriptions and the same target arch.

Update #336
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
19f9bc13d3 pkg/csource: support archs other than x86_64 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
52a33fd516 prog: remove default target and all global state
Now each prog function accepts the desired target explicitly.
No global, implicit state involved.
This is much cleaner and allows cross-OS/arch testing, etc.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
25f4fe0662 vm/qemu: tune some qemu arguments based on target arch 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
4503776d2b sys/syz-extract: generate build files out of tree
This does not pollute user kernel dir (we do make mrproper, though)
and enables parallel generation.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
7296cf374d sys/syz-extract: generate multiple arches at once 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
f7eb58493b sys/syz-extract: use consolidated target info
Move knowledge about targets from extract.sh to syz-extract,
and make it use target into from sys.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
75ddf7ab90 sys/syz-extract: switch to consolidated target info in sys package 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
487aa0d537 sys: consolidate info about various targets
Info about targets (like C arch/CFLAGS) is required in multiple places:
extract.sh
syz-extract
syz-sysgen
csource
vm/qemu
...

Consolidate it in one place and use that in syz-sysgen.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
91def5c506 prog: remove special knowledge about "mmap" syscall
Abstract "mmap" away as it can be called differently on another OS.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
c0cabacda7 syz-fuzzer, syz-execprog: add -arch flag
arch flag specifies target arch, which can be different from GOARCH.
For example, 386 executor with amd64 fuzzer.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
c6d248ce95 vm/vmimpl: add target OS/arch to env
Allows future VM tuning based on target OS/arch.
2017-09-15 16:02:37 +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
34bc139642 sys: compile all supported targets into the package
Currently we compile in only GOOS/GOARCH target.
Compile in all targets so that they can be selected at runtime.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
b16ba6390d sys/syz-extract: parallelize over files 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
2119c28968 sys: move extract.sh to sys/linux 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
bd13474175 sys/linux: rename package from sys to linux 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
18e96021ed sys: move linux descriptions to sys/linux 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
4a7f7fab1e prog: allow more than 1 target 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
96b8e39972 sys: regenerate consts with tip linux 2017-09-13 15:39:34 +02:00
Dmitry Vyukov
06091e7473 dashboard/app: fix a bug with bugs with seq>0
See the added test.
2017-09-13 12:05:56 +02:00
Dmitry Vyukov
013a8d4c00 Update syscall_descriptions_syntax.md 2017-09-13 08:51:28 +02:00
Andrey Konovalov
c12eb94a84 Update found_bugs.md 2017-09-12 20:55:22 +02:00
Andrey Konovalov
0bd6a0a57a Update found_bugs.md 2017-09-12 19:10:57 +02:00
Andrey Konovalov
449b6f15c3 Update found_bugs.md 2017-09-11 17:52:44 +02:00
Andrey Konovalov
1ae12bb849 Update found_bugs.md 2017-09-11 17:48:16 +02:00
Andrey Konovalov
d18bfda0d4 Update setup_ubuntu-host_qemu-vm_x86-64-kernel.md 2017-09-08 13:24:54 +02:00
Andrey Konovalov
dffc4ce15b Merge pull request #372 from lwhsu/ubuntu-setup-fix
docs: add more prerequisites on ubuntu
2017-09-08 13:23:47 +02:00
Li-Wen Hsu
22f8272a4b
docs: add more prerequisites on ubuntu 2017-09-08 09:10:02 +08:00
Dmitry Vyukov
0ed1da4a12 prog: remove unused declaration 2017-09-05 19:02:12 +02:00
Dmitry Vyukov
3a866068b3 executor: fix 32-bit mode
The correct type is kernel long size, not user-space long size.
We approximate it with uint64.
2017-09-05 19:02:12 +02:00
Dmitry Vyukov
5060392c49 sys: use correct pointer size 2017-09-05 19:02:12 +02:00
Dmitry Vyukov
19cc67af5b sys: add new perf attribute flag 2017-09-05 19:02:12 +02:00
Dmitry Vyukov
e52bd33700 prog: move resource-related functions to a separate file 2017-09-05 19:02:12 +02:00
Dmitry Vyukov
eb45aa4244 prog, sys: move dictionary of special strings to sys
It is target-specific.
2017-09-05 19:02:12 +02:00
Dmitry Vyukov
58efb7c6a5 sys: improve timespec/timeval generation 2017-09-05 19:02:12 +02:00
Andrey Konovalov
fbc5f27a13 Update found_bugs.md 2017-09-05 16:23:00 +02:00
Dmitry Vyukov
ffe7e17368 prog, sys: move types to prog
Large overhaul moves syscalls and arg types from sys to prog.
Sys package now depends on prog and contains only generated
descriptions of syscalls.
Introduce prog.Target type that encapsulates all targer properties,
like syscall list, ptr/page size, etc. Also moves OS-dependent pieces
like mmap call generation from prog to sys.

Update #191
2017-09-05 15:52:42 +02:00
Dmitry Vyukov
4fc4702694 prog: dot-import sys
In preparation for moving sys types to prog to reduce later diffs.
2017-09-05 10:46:34 +02:00
Dmitry Vyukov
5db39ab953 sys: rename Call to Syscall
In preparation for moving sys types to prog
to avoid confusion between sys.Call and prog.Call.
2017-09-05 10:38:22 +02:00
Dmitry Vyukov
c34180fca0 pkg/compiler: assign Call.ID statically 2017-09-04 21:06:59 +02:00