Commit Graph

17 Commits

Author SHA1 Message Date
Victor Chibotaru
1336586b42 executor, fuzzer: change the way Syzkaller opens the KCOV device
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.
2017-08-30 18:40:14 +02:00
Dmitry Vyukov
f93be58429 sys: add some known xattr names
Move xattr syscalls to own file and better describe xattr names.
They usually have prefix+name structure and there are some
known values.
2017-08-16 13:42:04 +02:00
Dmitry Vyukov
360f05289f sys: describe clone/execve calls
Update #211
Update #310
2017-08-12 17:45:00 +02:00
Dmitry Vyukov
0c986ae9b8 sys: describe chroot/getcwd/chdir/fchdir
Update #211
2017-08-12 17:45:00 +02:00
Jess Frazelle
5e2dd86080
statx: generate constants for updated flags
Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-06-08 09:59:15 -04:00
Jess Frazelle
b44d379ad7
sys: add statx syscall
The statx syscall was added in Linux 4.11, check out the kernel
documentation[1] for more information.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a528d35e8bfcc521d7cb70aaf03e1bd296c8493f

Signed-off-by: Jess Frazelle <acidburn@google.com>
2017-06-02 18:30:27 -04:00
Andrey Konovalov
45677c26fc sys: refactor and improve SCTP socket descriptions 2017-05-26 16:24:32 +02:00
Dmitry Vyukov
6acb3c802d sys: remove UFFD_FEATURE_EVENT_EXIT const
It is going to be removed from kernel.
2017-03-08 13:43:48 +01:00
Dmitry Vyukov
e7fc37e3cc sys: describe uffd api features 2017-03-02 16:49:31 +01:00
Dmitry Vyukov
91651260a5 sys: add more filesystems and mount flags 2017-02-05 10:03:23 +01:00
Dmitry Vyukov
e9dc5a53e9 sys: minor assorted improvements to descriptions 2017-02-03 23:55:06 +01:00
Dmitry Vyukov
e0e5de91ec sys: move ipc syscalls into separate file 2017-01-28 16:14:01 +01:00
Dmitry Vyukov
d976f51d72 sys: detail kvm syscalls more 2017-01-09 20:20:48 +01:00
Dmitry Vyukov
81efdbb29c sys: describe new pkey_* syscalls 2016-12-16 15:42:11 +01:00
Dmitry Vyukov
4dea52c066 sys: add new bpf descriptions
These were just added to net-next.
2016-11-28 18:29:10 +01:00
Dmitry Vyukov
136250619e sys: resolve some old TODOs in descriptions 2016-09-05 12:49:47 +02:00
Dmitry Vyukov
0d0fbbe73f overhaul syscall description generation process
This splits generation process into two phases:
1. Extract values of constants from linux kernel sources.
2. Generate Go code.

Constant values are checked in.
The advantage is that the second phase is now completely independent
from linux source files, kernel version, presence of headers for
particular drivers, etc. This allows to change what Go code we generate
any time without access to all kernel headers (which in future won't be
limited to only upstream headers).

Constant extraction process does require proper kernel sources,
but this can be done only once by the person who added the driver
and has access to the required sources. Then the constant values
are checked in for others to use.
Consant extraction process is per-file/per-arch. That is,
if I am adding a driver that is not present upstream and that
works only on a single arch, I will check in constants only for
that driver and for that arch.
2016-08-26 07:09:25 +02:00