aboutsummaryrefslogtreecommitdiffstats
path: root/executor/executor_linux.cc
Commit message (Collapse)AuthorAgeFilesLines
* executor: simplify initialize_tunDmitry Vyukov2018-02-261-3/+3
| | | | Remove executor_pid, enable_tun and setup_tun.
* prog: rework address allocationDmitry Vyukov2018-02-191-1/+5
| | | | | | | | | | | | 1. mmap all memory always, without explicit mmap calls in the program. This makes lots of things much easier and removes lots of code. Makes mmap not a special syscall and allows to fuzz without mmap enabled. 2. Change address assignment algorithm. Current algorithm allocates unmapped addresses too frequently and allows collisions between arguments of a single syscall. The new algorithm analyzes actual allocations in the program and places new arguments at unused locations.
* sys/linux: extend netfilter descriptionsDmitry Vyukov2018-01-271-1/+3
|
* executor: introduce uint64/32/16/8 typesDmitry Vyukov2017-12-271-18/+19
| | | | | | | | | | | | | | | The "define uint64_t unsigned long long" were too good to work. With a different toolchain I am getting: cstdint:69:11: error: expected unqualified-id using ::uint64_t; ^ executor/common.h:34:18: note: expanded from macro 'uint64_t' Do it the proper way: introduce uint64/32/16/8 types and use them. pkg/csource then does s/uint64/uint64_t/ to not clutter code with additional typedefs.
* executor: fix reply status on loop killsDmitry Vyukov2017-12-271-1/+2
| | | | | | | We use exitf on loop failures, anbd exitf is retry-able. However, we use different status when replying to ipc, and that different status is what ipc actually uses. Use kRetryStatus status in case on unexpected loop failures.
* executor: check format stringsDmitry Vyukov2017-12-271-2/+2
| | | | | | | | | | | | | | | | | | | I see a crash which says: #0: too much cover 0 (errno 0) while the code is: uint64_t n = ...; if (n >= kCoverSize) fail("#%d: too much cover %u", th->id, n); It seems that the high part of n is set, but we don't see it. Add printf format attribute to fail and friends and fix all similar cases. Caught a bunch of similar cases and a missing argument in: exitf("opendir(%s) failed due to NOFILE, exiting");
* pkg/csource: mimic the way syscalls are scheduled in executorDmitry Vyukov2017-12-221-1/+0
| | | | | | | | Currently csource uses completely different, simpler way of scheduling syscalls onto threads (thread per call with random sleeps). Mimic the way calls are scheduled in executor. Fixes #312
* sys/syz-extract: fix mmap on armDmitry Vyukov2017-11-231-10/+0
| | | | | | | __NR_mmap is missing on arm entirely, so we disable mmap during generate. Patch mmap to mmap2 right in syz-extract, so that mmap is never missing.
* executor: fixup previous commitDmitry Vyukov2017-11-221-223/+223
|
* executor: move arm syscall fixup to syz-extractDmitry Vyukov2017-11-221-243/+222
|
* executor: Modified executor_linux.cc to support ARM32 architectureAtul Prakash2017-11-221-2/+25
| | | | | | executor: changed kOutputDataAddr so that it works on 32-bit kernels executor: simplified ifdefs for arm in executor_linux.cc executor: removed empty lines that were accidentally added.
* executor: prevent executor from messing with output regionDmitry Vyukov2017-10-231-3/+36
| | | | | | | | When comparisons are enabled fuzzer somehow manages to discover the output region and corrupt it. It seems to fetch the address from some memory operations (mmap/munmap). Don't leak the output region address.
* executor: improvements for akarosDmitry Vyukov2017-10-171-1/+1
| | | | | | | 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
* executor, pkg/ipc: unify ipc protocol between linux and other OSesDmitry Vyukov2017-10-161-47/+13
| | | | | | | | | | | | | | | | | 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, sys/windows: initial windows supportDmitry Vyukov2017-09-251-50/+3
|
* all: more assorted fuchsia supportDmitry Vyukov2017-09-221-677/+51
|
* all: initial support for fuchsiaDmitry Vyukov2017-09-201-1/+1
| | | | | | Nothing works, but builds. Update #191
* executor: split source per-OSDmitry Vyukov2017-09-201-0/+1001
Update #191