aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/generated.go
Commit message (Collapse)AuthorAgeFilesLines
...
* executor: clean up immutable dirsDmitry Vyukov2018-08-091-0/+10
| | | | | | Turns out dirs can be immutable too. Update #650
* executor: remove unnecessary hooks on fuchsiaDmitry Vyukov2018-08-091-5/+0
| | | | These are not needed now.
* sys/fuchsia: add syscall description for binding channels to LauncherDokyung Song2018-08-081-0/+1
|
* executor: manually define struct fsxattrDmitry Vyukov2018-08-081-1/+11
| | | | | | | | | | | | | | | | | | It should be in <linux/fs.h> but is not there on some distros/arches as expected. Travis build fails with: <stdin>: In function ‘remove_dir’: <stdin>:152:13: error: variable ‘attr’ has initializer but incomplete type <stdin>:152:13: error: excess elements in struct initializer [-Werror] <stdin>:152:13: error: (near initialization for ‘attr’) [-Werror] <stdin>:152:21: error: storage size of ‘attr’ isn’t known <stdin>:153:20: error: ‘FS_IOC_FSSETXATTR’ undeclared (first use in this function) <stdin>:153:20: note: each undeclared identifier is reported only once for each function it appears in <stdin>:152:21: error: unused variable ‘attr’ [-Werror=unused-variable] cc1: all warnings being treated as errors https://travis-ci.org/google/syzkaller/jobs/413574080
* executor: clean up immutable filesDmitry Vyukov2018-08-081-0/+11
| | | | Fixes #650
* executor: don't checkpoint/reset net namespace with setuid sandboxDmitry Vyukov2018-08-081-0/+8
| | | | | | After setuid the process won't have rights to reset net namespace, but it should not be able to change it during fuzzing too. So just skip that part.
* executor: checkpoint net namespace in the right namespaceDan Austin2018-08-081-4/+4
| | | | | | | With checkpoint_net_namespace moved to setup_common, and Android fuzzing session terminates prematurely due to ipv4_tables not being initialized at this time. Moving the call back to loop fixes this behavior.
* executor: check write return valueDmitry Vyukov2018-08-051-2/+10
| | | | | | | | gcc complains: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result] Also fix includes.
* executor: abort fuse connectionDmitry Vyukov2018-08-041-6/+65
| | | | | | | If the test process is not dying after 100ms, abort all fuse connections in the system. This gets rid at least of simple fuse deadlocks, let's see how well this works in all cases.
* sys/test: add more testsDmitry Vyukov2018-08-031-0/+58
| | | | | | | | | | | | | | Add syz_errno syscall which sets errno to the argument, and add a test with different errno values. This mostly tests the testing infrastructure itself. Add syz_compare syscall which compare two blobs, this can be used for testing of argument memory layout. Implement syz_mmap and fix Makefile to allow building syz-execprog for test OS. Useful for debugging. Update #603
* executor: extend logging in netfilter codeDmitry Vyukov2018-08-021-32/+46
| | | | | We see some failures there, extend logging so that it's least possible to understand what exactly call has failed.
* executor: make current_time_ms/sleep_msDmitry Vyukov2018-07-301-7/+6
| | | | | Fix conditions for when current_time_ms/sleep_ms are used and make them static.
* executor: disable clang-format for some partsDmitry Vyukov2018-07-271-9/+5
| | | | | clang-format badly mishandles this part, moreover different versions mishandle it differently.
* pkg/csource: rewrite gen.sh in GoDmitry Vyukov2018-07-271-34/+10
| | | | | | | | | | Shell files cause portability problems. On Linux it's hard to install /bin/sh, /bin/bash is not present on *BSD. Any solution is hard to test on Darwin. Don't even want to mention Windows. Just do it in Go.
* pkg/csource: add option to trace syscall resultsDmitry Vyukov2018-07-271-0/+11
| | | | This will be needed for testing of generated programs.
* pkg/csource: tidy generated codeDmitry Vyukov2018-07-271-36/+136
| | | | | | | | | | | 1. Remove unnecessary includes. 2. Remove thunk function in threaded mode. 3. Inline syscalls into main for the simplest case. 4. Define main in common.h rather than form with printfs. 5. Fix generation for repeat mode (we had 2 infinite loops: in main and in loop). 6. Remove unused functions (setup/reset_loop, setup/reset_test, sandbox_namespace, etc).
* executor: simplify event_timedwaitDmitry Vyukov2018-07-271-30/+19
| | | | | | We always have current_time_ms in event_timedwait so use it instead of manual clock_gettime calls which tend to be bulkier.
* executor: ignore unshare errors in setuid sandboxDmitry Vyukov2018-07-271-4/+8
| | | | We already do this in sandbox=none, but forgot about setuid.
* executor: overhaulDmitry Vyukov2018-07-241-0/+3756
Make as much code as possible shared between all OSes. In particular main is now common across all OSes. Make more code shared between executor and csource (in particular, loop function and threaded execution logic). Also make loop and threaded logic shared across all OSes. Make more posix/unix code shared across OSes (e.g. signal handling, pthread creation, etc). Plus other changes along similar lines. Also support test OS in executor (based on portable posix) and add 4 arches that cover all execution modes (fork server/no fork server, shmem/no shmem). This change paves way for testing of executor code and allows to preserve consistency across OSes and executor/csource.