Commit Graph

81 Commits

Author SHA1 Message Date
Dmitry Vyukov
7e6402c003 sys: change int range to use ':' instead of '~'
We can't use '-' because '-' can denote negative numbers.
Colon is used is several range notations (e.g. Go, Mathlab, Excel).
2016-08-13 09:10:12 -07:00
Dmitry Vyukov
3b9fe41fe3 reformat sources 2016-08-13 09:02:44 -07:00
Dmitry Vyukov
ae9d77a96b sys: regenerate syscall descriptions with latest linux sources 2016-08-13 09:01:42 -07:00
Baozeng Ding
7db2edcb33 sys/sysgen/prog: support ranged int
This commit supports inclusive ranged int, like foo int32[-10~10], which will
generate random integer between -10 and 10. In future we will support more than
one range, like int32[0, -5~10, 50, 100~200]
2016-08-10 13:43:15 +08:00
Dmitry Vyukov
32061a606f executor: add support for 386 arch (COMPAT syscalls)
This is not fully working now: e.g. prog and sys packages assume
that pointer size is 8. But at least it compiles and works.
2016-06-30 20:11:04 +02:00
Dmitry Vyukov
1816c21f2b sys: fix kvm_pit_channel_state.count_load_time type 2016-06-21 20:12:26 +02:00
Dmitry Vyukov
da7529ea51 sys: update generated files 2016-06-13 12:50:32 +02:00
Baozeng Ding
1dbfdcf757 sys: support kcm and netrom 2016-06-13 09:28:38 +08:00
Baozeng Ding
09a6b9531f sys: support getsockopt for sctp 2016-06-10 21:47:33 +08:00
Lorenzo Stoakes
a420b770de sys: add removed defines to fix generate in linux-next
This patch redefines constants that were removed in patches between 4.4 and
linux-next, so both linux-next and mainline work with make generate.
2016-03-11 21:54:52 +00:00
Lorenzo Stoakes
61f5f870ac sys: add missing include
IOPRIO_WHO_PGRP, IOPRIO_WHO_USER, and IOPRIO_WHO_PROCESS are defined in
linux/ioprio.h.
2016-03-08 09:56:08 +00:00
Dmitry Vyukov
7fe9da14de sys: fix build with Go1.4
It does not know about arm64 arch.

Fixes #17
2016-02-15 21:33:00 +01:00
Dmitry Vyukov
b21bafb97d sys: fix /dev/snd/pcm description 2016-02-05 22:12:15 +01: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
0f6ca04596 sys: slighly improve diagnostics for incorrect syscall descriptions 2016-01-28 08:20:59 +01:00
Dmitry Vyukov
5dfefdb158 sys: fix write$tun description
Also remove \r in files.
2016-01-26 17:48:13 +01:00
Dmitry Vyukov
66b440bd17 sys: regenerate after tun/random support 2016-01-26 16:53:23 +01:00
Dmitry Vyukov
efe43dc071 sys: open a bunch of new devices 2016-01-26 16:48:37 +01:00
Baozeng Ding
4bbea2300f sys: support /dev/random and /dev/net/tun 2016-01-26 00:45:49 +08:00
Dmitry Vyukov
0d4b201150 sys: allow to open all devices as stopgap 2016-01-24 20:28:38 +01:00
Dmitry Vyukov
f5311fac95 sys: add basic netlink support for real 2016-01-23 21:27:57 +01:00
Dmitry Vyukov
7e28ae6b3b sys: fix arg type 2016-01-23 13:17:06 +01:00
Dmitry Vyukov
790b11ac9b sys: add basic netlink support 2016-01-23 13:10:35 +01:00
Dmitry Vyukov
8bdf62d1b7 sys: implement array byte size arguments 2016-01-23 00:37:08 +01:00
Dmitry Vyukov
b06604d52a sys: remove resolved TODO 2016-01-23 00:06:30 +01:00
Dmitry Vyukov
81438c4ddd sys: use kernel headers instead of host headers
This solves several problems:
 - host usually have outdates headers, so previously we need to define missing consts
 - host may not have some headers at all
 - generation depends on linux distribution and version
 - some of the consts cannot be defined at all (e.g. ioctls that use struct arguments)
2016-01-22 21:18:33 +01:00
Dmitry Vyukov
9c277c7974 sys: describe more dri syscalls 2016-01-16 00:23:47 +01:00
Dmitry Vyukov
81dc7f8dc8 sys: support /dev/input/event ioctls 2016-01-15 20:16:02 +01:00
Dmitry Vyukov
b217dcb509 sys: support /dev/input/{mouse,mice,event} 2016-01-13 20:45:35 +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
bca57831a5 sys: add support for /dev/snd/timer 2016-01-12 20:14:56 +01:00
Dmitry Vyukov
15128d47bd sys: support /dev/snd/seq 2016-01-11 22:26:09 +01:00
Dmitry Vyukov
bb47c6540d sys: add kvm support 2016-01-08 22:41:36 +01:00
Dmitry Vyukov
96e9dbd874 sys: update grammar description 2015-12-31 16:03:01 +01:00
Dmitry Vyukov
aa82db2290 sys: implement sockaddr_storage 2015-12-31 16:03:01 +01:00
Dmitry Vyukov
92bcba4b0b sys: implement fixed-size arrays 2015-12-30 19:43:15 +01:00
Dmitry Vyukov
ddcd0929e3 prog: give more priority to generic socket syscalls 2015-12-30 18:24:26 +01:00
Dmitry Vyukov
777beb5076 sys: add packed/aligned struct attributes 2015-12-30 13:53:09 +01:00
Dmitry Vyukov
28b3d1e1ab sys: add sctp support 2015-12-30 13:04:00 +01:00
Dmitry Vyukov
e6529b30ec sys: add union type 2015-12-29 15:00:57 +01:00
Dmitry Vyukov
b17c5726f6 sys: support for AF_UNIX sockets 2015-12-28 19:11:03 +01:00
Dmitry Vyukov
bd768c8f40 sys: move more subsystems into separate files 2015-12-28 16:11:15 +01:00
Dmitry Vyukov
eef80b3d76 sys: split syscall description into several files 2015-12-28 15:53:32 +01:00
Dmitry Vyukov
4eda9b07e5 prog: don't serialize paddings
Paddings in serialized programs are unnecessary and confusing.
Instead restore them implicitly.
Also use [,,,,] for arrays.
2015-12-28 12:58:10 +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
Dmitry Vyukov
524a2ae38f sysgen: fix syscall number assignment for syzkalls 2015-12-24 21:27:21 +01:00
Dmitry Vyukov
af4e0c0b7a sysgen: pull in syscall numbers from kernel headers
Syscall numbers for different architectures are now pulled in
from kernel headers. This solves 2 problems:
 - we don't need to hardcode numbers for new syscalls (that don't present in typical distro headers)
 - we have correct number for different archs (previously hardcoded numbers were for x86_64)
This also makes syscall numbers available for Go code, which can be useful.
2015-12-24 19:13:08 +01:00
Dmitry Vyukov
5c0a662198 sys: fix padding insertion
Padding was not inserted into indirect structs.
2015-12-23 19:10:41 +01:00
Dmitry Vyukov
47e55508d0 sys: sort new syscalls 2015-12-23 19:09:24 +01:00