Commit Graph

15 Commits

Author SHA1 Message Date
Dmitry Vyukov
ff8c0180ab sys, executor: more kvm improvements
1. Basic support for arm64 kvm testing.
2. Fix compiler warnings in x86 kvm code.
3. Test all pseudo syz calls in csource.
4. Fix handling of real code in x86.
2017-01-12 11:57:17 +01:00
Dmitry Vyukov
bbd4840872 sys: extend kvm support
Add new pseudo syscall syz_kvm_setup_cpu that setups VCPU into
interesting states for execution. KVM is too difficult to setup otherwise.
Lots of improvements possible, but this is a starting point.
2017-01-09 20:28:10 +01:00
Dmitry Vyukov
1934b6b757 sys: replace syz_open_dev with openat
In lots of cases we don't need the special syz_open_dev call,
openat will do just fine. Standard syscalls are preferrable, so use them.
2017-01-09 20:20:49 +01:00
Andrey Konovalov
c5707f5e57 executor: emit ethernet traffic 2016-11-29 17:39:38 +01:00
Dmitry Vyukov
588a542b2a sys: add string flags
Allow to define string flags in txt descriptions. E.g.:

  filesystem = "ext2", "ext3", "ext4"

and then use it in string type:

  ptr[in, string[filesystem]]
2016-11-11 14:33:37 -08:00
Dmitry Vyukov
959ec07095 sys: always use pointers to types
Currently we store most types by value in sys.Type.
This is somewhat counter-intuitive for C++ programmers,
because one can't easily update the type object.
Store pointers to type objects for all types.
It also makes it easier to update types, e.g. adding paddings.
2016-11-11 14:25:13 -08:00
Dmitry Vyukov
11a690d275 sys, prog: add tests for description parsing and serialization
Add sys/test.txt file with description of syscalls for tests.
These descriptions can be used to ensure that we can parse everything we clain we can parse.
Use these descriptions to write several tests for exec serialization
(one test shows that alignment handling is currently incorrect).
These test descriptions can also be used to write e.g. mutation tests.

Update #78
2016-09-28 20:06:42 +02:00
Dmitry Vyukov
0bdfe39372 host: detect at least some unsupported syscalls if kallsyms is not available
We know how to detect availability of at least some syscalls without kallsyms. Do it.
2016-08-13 18:15:38 -07:00
Dmitry Vyukov
ba993a55b9 sys: terminate string constants with \x00
C expects string constants to be zero terminated.
It worked to some degree probably because most memory is zeros in executor.
2016-02-05 22:12:15 +01:00
Dmitry Vyukov
efe43dc071 sys: open a bunch of new devices 2016-01-26 16:48:37 +01:00
Dmitry Vyukov
0d4b201150 sys: allow to open all devices as stopgap 2016-01-24 20:28:38 +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
7aee64145f host: detect more unsupported syscalls 2015-12-28 10:45:30 +01:00
Dmitry Vyukov
4d3db6d4c8 host: detect unsupported syscalls
Also detect transitively unsupported syscalls,
that is, syscalls for which all syscalls that can create
input arguments are disabled.
2015-12-27 12:20:00 +01:00