aboutsummaryrefslogtreecommitdiffstats
path: root/executor
Commit message (Collapse)AuthorAgeFilesLines
...
* pkg/ipc: move fallback coverage into executorDmitry Vyukov2017-10-182-1/+15
| | | | | It seems to explode linux corpus. So make it freebsd-specific.
* executor: use forkserver for freebsdDmitry Vyukov2017-10-183-4/+136
| | | | | | | Use forkserver and shmem for freebsd. This greatly improves speed. Also introduce fallback coverage signal based on unique (syscall+errno) pairs.
* sys/linux: add MSG_ZEROCOPYWillem de Bruijn2017-10-171-5/+5
|
* sys/freebsd: more syscall descriptionsDmitry Vyukov2017-10-171-2/+254
| | | | | | | This is mostly copied form linux. We probably need better support for sharing descriptions between multiple OSes. But there are lots of differences, so this is not trivial.
* executor: improvements for akarosDmitry Vyukov2017-10-178-36/+38
| | | | | | | 1. remove workaround for pthread attrs (was fixed in akaros) 2. remove workaround for dup2 (was fixed in akaros) 3. check that we receive a program 4. implement timeout for test processes
* sys/fuchsia: more descriptionsDmitry Vyukov2017-10-163-25/+193
|
* sys/fuchsia: minor improvements to syscall descriptionsDmitry Vyukov2017-10-161-6/+6
|
* executor: fix fuchsia syz_mmapDmitry Vyukov2017-10-161-7/+9
|
* executor: repair fuchsia nonfailing modeDmitry Vyukov2017-10-162-25/+67
|
* executor: fix akaros nonfailing modeDmitry Vyukov2017-10-161-3/+9
|
* executor, pkg/ipc: unify ipc protocol between linux and other OSesDmitry Vyukov2017-10-1612-189/+196
| | | | | | | | | | | | | | | | | We currently use more complex and functional protocol on linux, and a simple ad-hoc protocol on other OSes. This leads to code duplication in both ipc and executor. Linux supports coverage, shared memory communication and fork server, which would also be useful for most other OSes. Unify communication protocol and parametrize it by (1) use of shmem or only pipes, (2) use of fork server. This reduces duplication in ipc and executor and will allow to support the useful features for other OSes easily. Finally, this fixes akaros support as it currently uses syz-stress running on host (linux) and executor running on akaros.
* executor: add akaros supportDmitry Vyukov2017-10-162-0/+359
| | | | Does not work yet, also needs ipc changes.
* sys/akaros: add akaros supportDmitry Vyukov2017-10-161-0/+47
|
* sys/linux: fix fcntl signatureDmitry Vyukov2017-10-161-5/+5
|
* executor: pass attr to pthread_mutex/cond_initDmitry Vyukov2017-10-161-2/+9
| | | | | | pthread_mutex/cond_init should accept NULL attr, but Akaros crashes with NULL attr: https://github.com/brho/akaros/issues/40
* executor: write debug output to stderrDmitry Vyukov2017-10-161-2/+2
| | | | | | We print all other output to stderr, write debug output to stderr as well. This does not matter for the main use case of running syz-execprog -debug, but can is helpful if we want to communicate with syz-executor via stdin/stdout.
* executor: add PC to kcov_comparison_tAlexander Potapenko2017-10-161-1/+4
| | | | | | | KCOV comparisons support is in the kernel mm tree already, and the patch contains an additional uint64_t to store PCs of functions calling __sanitizer_cov_trace_XXX(). Change kcov_comparison_t accordingly.
* sys/syz-extract: support freebsdDmitry Vyukov2017-10-121-3/+4
|
* executor: simple freebsd executorDmitry Vyukov2017-10-122-0/+200
|
* executor: include missing headerDmitry Vyukov2017-10-101-0/+1
| | | | writev requires <sys/uio.h>. Include it.
* executor: set own PATH when starting subprocessesDmitry Vyukov2017-10-101-3/+8
| | | | | | Executor process does not have any env, including PATH. On some distributions, system/shell adds a minimal PATH, on some it does not. Set own standard PATH to make it work across distributions.
* all: basic freebsd supportDmitry Vyukov2017-10-021-0/+12
| | | | For now we just make Go part build for freebsd.
* executor: support fragmentation in syz_emit_ethernetDmitry Vyukov2017-10-022-24/+84
| | | | | | A recent linux commit "tun: enable napi_gro_frags() for TUN/TAP driver" added support for fragmentation when emitting packets via tun. Support this feature in syz_emit_ethernet.
* sys/fuchsia: add more descriptionsDmitry Vyukov2017-10-021-4/+56
|
* sys/windows: add more descriptionsDmitry Vyukov2017-09-271-2/+2954
|
* executor: automatically infer base of root vmarDmitry Vyukov2017-09-271-6/+10
|
* executor: fix execution of windows syscallsDmitry Vyukov2017-09-273-7/+13
| | | | | First, they must be called with stdcall convention. Second, wrap them in __try/__except because they can crash.
* Makefile: add fuchsia supportDmitry Vyukov2017-09-251-0/+1
|
* executor, sys/windows: initial windows supportDmitry Vyukov2017-09-2512-196/+514
|
* sys/fuchsia: describe more syscallsDmitry Vyukov2017-09-252-8/+188
|
* sys/syz-extract: support fuchsiaDmitry Vyukov2017-09-251-2/+2
|
* all: more assorted fuchsia supportDmitry Vyukov2017-09-229-2112/+2370
|
* all: initial support for fuchsiaDmitry Vyukov2017-09-207-7/+40
| | | | | | Nothing works, but builds. Update #191
* executor: split source per-OSDmitry Vyukov2017-09-202-0/+9
| | | | Update #191
* executor: remove unused headersDmitry Vyukov2017-09-201-2/+0
|
* sys/linux: improve user_desc descriptionDmitry Vyukov2017-09-201-3/+3
|
* pkg/compiler: don't genererate missing syscallsDmitry Vyukov2017-09-151-281/+5
| | | | | | | | 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.
* syz-manager, syz-fuzzer, executor: ensure that binaries are consistentDmitry Vyukov2017-09-152-0/+19
| | | | | | | Check that manager/fuzzer/executor are build on the same git revision, use the same syscall descriptions and the same target arch. Update #336
* pkg/csource: support archs other than x86_64Dmitry Vyukov2017-09-151-2/+3
|
* sys: consolidate info about various targetsDmitry Vyukov2017-09-151-2988/+2988
| | | | | | | | | | | | 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.
* executor: fix 32-bit modeDmitry Vyukov2017-09-051-5/+1
| | | | | The correct type is kernel long size, not user-space long size. We approximate it with uint64.
* sys: improve timespec/timeval generationDmitry Vyukov2017-09-051-0/+2
|
* pkg/compiler: detect resources without ctorsDmitry Vyukov2017-09-041-0/+5
| | | | Fixes #217
* sys: improve bpf descriptionsDmitry Vyukov2017-09-021-0/+35
|
* pkg/compiler: restore generation of unsupported syscallsDmitry Vyukov2017-09-021-0/+276
| | | | | | Unfortunately this is sitll needed, see the added comment. Update #191
* sys: add AF_PACKET sockets descriptionAndrey Konovalov2017-09-011-0/+99
|
* executor, ipc: modify the IO between KCOV<->executor<->fuzzerVictor Chibotaru2017-08-301-37/+116
| | | | | Now executor is able to read comparisons data from KCOV and write them to fuzzer.
* executor, fuzzer: change the way Syzkaller opens the KCOV deviceVictor Chibotaru2017-08-301-18/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have implemented a new version of KCOV, which is able to dump comparison operands' data, obtained from Clang's instrumentation hooks __sanitizer_cov_trace_cmp[1248], __sanitizer_cov_trace_const_cmp[1248] and __sanitizer_cov_trace_switch. Current KCOV implementation can work in two modes: "Dump only the PCs" or "Dump only comparisons' data". Mode selection is done by the following series of calls: fd = open(KCOV_PATH, ...); // works as previous ioctl(fd, KCOV_INIT_TRACE, ...); // works as previous mmap(fd, ...); // works as previous ioctl(fd, KCOV_ENABLE, mode); // mode = KCOV_MODE_TRACE_CMP or mode = KCOV_MODE_TRACE_PC Note that this new interface is backwards compatible, as old KCOV devices will just return -EINVAL for the last ioctl. This way we can distinguish if the KCOV device is able to dump the comparisons. Main changes in this commit: 1. Fuzzer now checks at startup which type (new/old) of KCOV device is running. 2. Executor now receives an additional flag, which indicates if executor should read the comparisons data from KCOV. The flag works on per-call basis, so executor can collect PCs or Comps for each individual syscall.
* pkg/compiler: move more const-processing code to compilerDmitry Vyukov2017-08-271-519/+555
|
* pkg/compiler, sys/syz-sysgen: move const handling to pkg/compilerDmitry Vyukov2017-08-271-275/+0
| | | | Now pkg/compiler deals with consts.