Commit Graph

81 Commits

Author SHA1 Message Date
Dmitry Vyukov
52a20ba400 dashboard/app: properly handle build failures
Separate kernel and syzkaller build failures.
Fix logic to understand when a build is fixed:
look if kernel/syzkaller commit changes to understand
if it's a new good build or re-upload of an old build.

Fixes #1014
2019-03-25 17:00:25 +01:00
Dmitry Vyukov
89a1588519 sys: disable trusty for now
It crashes pkg/csource tests because
it does not have syz_mmap syscall but tries to use it.
2018-11-08 20:14:05 -08:00
Dmitry Vyukov
0d872150de sys: initial trusty support
Trusty is a set of software components supporting
a Trusted Execution Environment (TEE) on mobile devices.

https://source.android.com/security/trusty

Add syscall descriptions and some boilerplate.
2018-11-07 17:52:06 -08:00
Anton Lindqvist
b771b17ec9 Add mandatory OpenBSD bits (#689)
all: add openbsd support

squash of the following commits:

* openbsd: add mandatory bits
* report: add OpenBSD support
* executor: skip building kvm on OpenBSD
* executor: add OpenBSD support
Linking against libutil is necessary due to usage of openpty(3).
* executor: fix typo in fail() message
* fixup! report: add OpenBSD support
* fixup! openbsd: add mandatory bits
* fixup! openbsd: add mandatory bits
* fixup! openbsd: add mandatory bits
* fixup! report: add OpenBSD support
* gometalinter: skip sys/openbsd
2018-08-28 10:07:26 -07:00
Dmitry Vyukov
d9a893a554 Makefile: don't compile all targets into target binaries
Currently target binaries contain support for all OS/arch combinations.
However, obviously a fuchsia target binary won't test windows.
For target binaries we need support only for a single target
(with the exception of 386/arm target in amd64/arm64 binaries).
So compile in only _the_ target into target binaries.
This reduces akaros/amd64 fuzzer binary from 33 to 7 MB
and execprog from 28 to 2 MB.
2018-08-02 19:07:22 +02:00
Dmitry Vyukov
36d1c4540a all: fix gometalinter warnings
Fix typos, non-canonical code, remove dead code, etc.
2018-03-08 18:48:26 +01:00
Dmitry Vyukov
019cf5f235 sys: move test syscalls to a separate target
We have them in linux solely for historical reasons.

Fixes #462
2017-12-17 11:39:14 +01:00
Utkarsh Anand
3f955eba7f Lots of changes to sys/netbsd (#397)
* Lots of changes to sys/netbsd:
- Removed a few syscalls that did not have proper constants defined.
- Autogenerated *.const files.
- Removed a few types like uid and gid, that were not available.
- Ran make generate

* Few changes for NetBSD support:
- Added sys/netbsd/init.go
- Added netbsd to sys/sys.go

* Fix order in sys/sys.go

* Update documentation for NetBSD
2017-10-25 09:27:47 +02:00
Dmitry Vyukov
2647772874 sys/akaros: add akaros support 2017-10-16 14:21:54 +02:00
Dmitry Vyukov
179a860885 all: basic freebsd support
For now we just make Go part build for freebsd.
2017-10-02 14:17:32 +02:00
Dmitry Vyukov
af442a22d9 executor, sys/windows: initial windows support 2017-09-25 15:19:06 +02:00
Dmitry Vyukov
913d592f97 all: more assorted fuchsia support 2017-09-22 13:10:55 +02:00
Dmitry Vyukov
da1873aadd sys/targets: move targets from sys package
This breaks circular dependency between:
sysgen -> sys/linux -> sys -> sysgen
With this circular dependency it is very difficult to
update format of generated descriptions because sysgen does not build.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
66393d1884 pkg/compiler: don't genererate missing syscalls
We used to generate them only because manager had no idea
what arch it is testing. So syscalls numbers had to match
between all arches.
This is not needed anymore.
Also don't generate unreferenced structs/resources.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
539e603206 syz-manager, syz-fuzzer, executor: ensure that binaries are consistent
Check that manager/fuzzer/executor are build on the same git revision,
use the same syscall descriptions and the same target arch.

Update #336
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
19f9bc13d3 pkg/csource: support archs other than x86_64 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
f7eb58493b sys/syz-extract: use consolidated target info
Move knowledge about targets from extract.sh to syz-extract,
and make it use target into from sys.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
75ddf7ab90 sys/syz-extract: switch to consolidated target info in sys package 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
487aa0d537 sys: consolidate info about various targets
Info about targets (like C arch/CFLAGS) is required in multiple places:
extract.sh
syz-extract
syz-sysgen
csource
vm/qemu
...

Consolidate it in one place and use that in syz-sysgen.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
f7b1163afb syz-manager/mgrconfig: explicitly specify target in config
Add target config parameter (e.g. linux/amd64) which controls target OS/arch.
No more explicit assumptions about target.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
34bc139642 sys: compile all supported targets into the package
Currently we compile in only GOOS/GOARCH target.
Compile in all targets so that they can be selected at runtime.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
18e96021ed sys: move linux descriptions to sys/linux 2017-09-15 16:02:37 +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
Dmitry Vyukov
1e22c7aefa sys: use ranged int in few syscalls so that it is tested 2016-08-13 09:16:28 -07:00
Dmitry Vyukov
ae9d77a96b sys: regenerate syscall descriptions with latest linux sources 2016-08-13 09:01:42 -07: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
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
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
Dmitry Vyukov
f5311fac95 sys: add basic netlink support for real 2016-01-23 21:27:57 +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
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
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
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