44 Commits

Author SHA1 Message Date
Dmitry Vyukov
0d4b201150 sys: allow to open all devices as stopgap 2016-01-24 20:28:38 +01:00
Dmitry Vyukov
0a98e8c14a executor: restore nodropprivs mode 2016-01-23 00:04:34 +01:00
Dmitry Vyukov
1e06d2bafc executor: new namespace-based sandbox 2016-01-22 18:09:32 +01:00
Dmitry Vyukov
8cff5843fb vm/adb: use a more reliable way to reboot devices 2016-01-20 13:58:57 +01:00
Dmitry Vyukov
aa1b7fe3a8 executor: start moving sandboxing code into executor 2016-01-20 13:49:06 +01:00
Dmitry Vyukov
d5c2595f05 executor: adopt for new kcov
Now kcov exposes only uintptr-sized PCs.
2016-01-19 15:08:11 +01:00
Dmitry Vyukov
9c277c7974 sys: describe more dri syscalls 2016-01-16 00:23:47 +01:00
Dmitry Vyukov
a670fa2035 executor: reportat after clang-format bug fix
http://reviews.llvm.org/rL257763
2016-01-15 10:33:27 +01:00
Dmitry Vyukov
d399ab9dc9 executor: don't create all threads when spot a root syscall 2016-01-13 20:44:05 +01:00
Dmitry Vyukov
9e2ea41475 executor: don't print all waitpid debug messages 2016-01-13 19:26:51 +01:00
Dmitry Vyukov
a92b8c76c3 sys: introduce a generic syz_open_dev helper syscall 2016-01-13 18:57:12 +01:00
Dmitry Vyukov
91630fe39d sys: add support for /dev/snd/control 2016-01-13 16:54:29 +01:00
Dmitry Vyukov
15128d47bd sys: support /dev/snd/seq 2016-01-11 22:26:09 +01:00
Dmitry Vyukov
46fa57f3b4 executor: use mknodat instead of mknod (the latter is not implemented on android) 2016-01-11 17:30:08 +01:00
Dmitry Vyukov
bb47c6540d sys: add kvm support 2016-01-08 22:41:36 +01:00
Dmitry Vyukov
33950d306a executor: fix some bugs found by clang 2015-12-31 17:52:26 +01:00
Dmitry Vyukov
a9a7744776 executor: get rid of sigtimedwait
Wait with spin loop instead.
See the comment for explanation.
2015-12-24 20:29:48 +01:00
Dmitry Vyukov
d9b493f203 executor: don't use WUNTRACED in wait
WUNTRACED wait returns when child has stopped.
That's not what we want to wait for.
If it's stopped we need to timeout wait and kill
the stopped child.
2015-12-24 19:14:15 +01:00
Dmitry Vyukov
58509c75a2 prog: remove padding checking
So far it has found only false positives.
Let's leave this to KMSAN.
2015-12-23 19:58:15 +01:00
Dmitry Vyukov
2fa51b4807 executor: fix collide mode
Don't wait for every other call.
2015-12-23 13:50:40 +01:00
Dmitry Vyukov
bd75706280 add a flag to disable setpgid syscall
It is broken on some of our test systems.
2015-12-17 17:31:11 +01:00
Dmitry Vyukov
bbf4e35323 executor: export syscall execution results
Errno can be used to guide fuzzing, or detect not implemented syscalls.
2015-12-17 17:31:11 +01:00
Dmitry Vyukov
3d96383e0e executor: allow to wait for child processes without sigtimedwait
We've hit 2 systems that mishandle sigtimedwait.
2015-12-17 14:38:46 +01:00
Dmitry Vyukov
9980a72713 sys: automatically add padding to structs 2015-12-17 14:38:46 +01:00
Dmitry Vyukov
d823a9221a executor: switch to ioctl's instead of writes 2015-12-03 20:30:20 +01:00
Dmitry Vyukov
f881e7de45 executor: execute mount under root 2015-11-30 17:18:12 +01:00
Dmitry Vyukov
d46a9039a5 executor: fix build 2015-11-29 08:38:59 +01:00
Dmitry Vyukov
bb158eaeab executor: switch to new coverage 2015-11-28 19:00:33 +01:00
Dmitry Vyukov
fb92c67d9d executor: prevent programs to mess with fuzzer fds 2015-11-20 15:39:50 +01:00
Dmitry Vyukov
4784f4f6f5 add fuse support 2015-11-19 17:16:36 +01:00
Dmitry Vyukov
93f8cc38aa executor: don't wait for pending calls if there are none 2015-11-19 11:50:04 +01:00
Dmitry Vyukov
6a76998e5e executor: fix detection of last call 2015-11-19 10:29:17 +01:00
Dmitry Vyukov
485651138e executor: fix detection of out of threads 2015-11-19 10:26:37 +01:00
Dmitry Vyukov
f67856dae0 allow executor execute particular syscalls under root
this is required to test e.g. fuse fs (non-root can't mount)
2015-11-18 21:33:15 +01:00
Dmitry Vyukov
495113290e basic support for dri/drm drivers 2015-11-18 21:22:17 +01:00
Dmitry Vyukov
016b19c61c fix waiting for worker processes in executor
+ disable SIGCANCEL/SIGSETXID signal handlers
2015-11-18 15:08:42 +01:00
Dmitry Vyukov
6892001bbc add tty-related ioctl's 2015-11-16 19:14:05 +01:00
Dmitry Vyukov
0165a4b2e4 use fork server in executor
This avoids exec per test.
Also allows to pre-map shared memory regions.
And will allow to pre-map coverage regions, etc.

Seems to work already, but probably there are still some bugs.
2015-11-10 20:30:50 +01:00
Dmitry Vyukov
d3e457e285 use futex instead of spin wait
Spinning is bad. Also pollutes strace output.
2015-11-10 14:32:46 +01:00
Dmitry Vyukov
a44473e4a4 add collide mode to executor
In this mode we execute pairs of syscalls concurrently
to provoke data races in kernel.
2015-11-06 23:15:40 +01:00
Dmitry Vyukov
0750245eea experimental functionality to impersonate nobody user in executor 2015-10-20 17:43:02 +02:00
Dmitry Vyukov
9a3bf1a7c7 open /proc/cover only once in executor
First, it is just not necessary to open it multiple times.
But more importantly a program can close fds that it previosuly used:

r0 = open(...)
close(r0)
close(r0)

and this can close cover fds created in threaded mode.
2015-10-20 15:46:04 +02:00
Dmitry Vyukov
a02244e114 deduplicate coverare in executor
This allows to use larger coverage buffer
and not overflow output at the same time.
2015-10-13 15:29:07 +02:00
Dmitry Vyukov
874c5754bb initial commit 2015-10-12 10:16:57 +02:00