aboutsummaryrefslogtreecommitdiffstats
path: root/sys/sys.go
Commit message (Collapse)AuthorAgeFilesLines
* sys/syz-sysgen: serialize descriptions as gob and embedDmitry Vyukov2025-01-231-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of generating Go files with descriptions serialize them as gob and compress with flate. This significantly reduces build time, go vet time, and solves scalability problems with some static analysis tools. Reference times (all after rm -rf ~/.cache/go-build) before: TIME="%e %P %M" time go install ./syz-manager 48.29 577% 4824820 TIME="%e %P %M" time go test -c ./prog 56.28 380% 6973292 After: TIME="%e %P %M" time go install ./syz-manager 22.81 865% 859788 TIME="%e %P %M" time go test -c ./prog 12.74 565% 267760 syz-manager size before/after: 194712597 -> 83418407 -57% even provided we now embed all descriptions instead of just a single arch. Deflate/decoding time for a single Linux arch is ~330ms. Fixes #5542
* all: remove akaros supportDmitry Vyukov2024-04-151-1/+0
| | | | | | | Akaros support is unused, it was shutdown on syzbot for a while, the akaros development seems to be frozen for years as well. We have a bunch of hacks for Akaros since it supported only super old gcc and haven't supported Go. Remove it.
* sys/trusty/gen: add empty.goDmitry Vyukov2021-06-151-0/+1
| | | | It was missing and we forgot to import it in sys.
* sys/syz-extract: initial darwin supportPatrick Meyer2021-05-201-0/+1
|
* prog: dump orig prog if Deserialize panicsDmitry Vyukov2020-02-211-20/+0
| | | | | | | | | | We are seeing some one-off panics during Deserialization and it's unclear if it's machine memory corrpution or an actual bug in prog. I leam towards machine memory corruption but it's impossible to prove without seeing the orig program. Move git revision to prog and it's more base package (sys can import prog, prog can't import sys).
* dashboard/app: properly handle build failuresDmitry Vyukov2019-03-251-2/+19
| | | | | | | | | 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
* sys: disable trusty for nowDmitry Vyukov2018-11-081-1/+0
| | | | | It crashes pkg/csource tests because it does not have syz_mmap syscall but tries to use it.
* sys: initial trusty supportDmitry Vyukov2018-11-071-0/+1
| | | | | | | | | 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.
* Add mandatory OpenBSD bits (#689)Anton Lindqvist2018-08-281-0/+1
| | | | | | | | | | | | | | | | | | 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
* Makefile: don't compile all targets into target binariesDmitry Vyukov2018-08-021-7/+7
| | | | | | | | | | 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.
* all: fix gometalinter warningsDmitry Vyukov2018-03-081-0/+1
| | | | Fix typos, non-canonical code, remove dead code, etc.
* sys: move test syscalls to a separate targetDmitry Vyukov2017-12-171-0/+1
| | | | | | We have them in linux solely for historical reasons. Fixes #462
* Lots of changes to sys/netbsd (#397)Utkarsh Anand2017-10-251-0/+1
| | | | | | | | | | | | | | | | * 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
* sys/akaros: add akaros supportDmitry Vyukov2017-10-161-0/+1
|
* all: basic freebsd supportDmitry Vyukov2017-10-021-0/+1
| | | | For now we just make Go part build for freebsd.
* executor, sys/windows: initial windows supportDmitry Vyukov2017-09-251-0/+1
|
* all: more assorted fuchsia supportDmitry Vyukov2017-09-221-0/+1
|
* sys/targets: move targets from sys packageDmitry Vyukov2017-09-151-70/+0
| | | | | | | 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.
* pkg/compiler: don't genererate missing syscallsDmitry Vyukov2017-09-151-3/+5
| | | | | | | | 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.
* syz-manager, syz-fuzzer, executor: ensure that binaries are consistentDmitry Vyukov2017-09-151-0/+3
| | | | | | | Check that manager/fuzzer/executor are build on the same git revision, use the same syscall descriptions and the same target arch. Update #336
* pkg/csource: support archs other than x86_64Dmitry Vyukov2017-09-151-1/+1
|
* sys/syz-extract: use consolidated target infoDmitry Vyukov2017-09-151-0/+1
| | | | | Move knowledge about targets from extract.sh to syz-extract, and make it use target into from sys.
* sys/syz-extract: switch to consolidated target info in sys packageDmitry Vyukov2017-09-151-8/+20
|
* sys: consolidate info about various targetsDmitry Vyukov2017-09-151-0/+55
| | | | | | | | | | | | 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.
* syz-manager/mgrconfig: explicitly specify target in configDmitry Vyukov2017-09-151-9/+0
| | | | | Add target config parameter (e.g. linux/amd64) which controls target OS/arch. No more explicit assumptions about target.
* sys: compile all supported targets into the packageDmitry Vyukov2017-09-151-0/+9
| | | | | Currently we compile in only GOOS/GOARCH target. Compile in all targets so that they can be selected at runtime.
* sys: move linux descriptions to sys/linuxDmitry Vyukov2017-09-151-0/+8
|
* overhaul syscall description generation processDmitry Vyukov2016-08-261-3324/+0
| | | | | | | | | | | | | | | | | | | | | | 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.
* sys: use ranged int in few syscalls so that it is testedDmitry Vyukov2016-08-131-2/+2
|
* sys: regenerate syscall descriptions with latest linux sourcesDmitry Vyukov2016-08-131-2/+2
|
* sys: fix kvm_pit_channel_state.count_load_time typeDmitry Vyukov2016-06-211-2/+2
|
* sys: update generated filesDmitry Vyukov2016-06-131-244/+451
|
* sys: fix /dev/snd/pcm descriptionDmitry Vyukov2016-02-051-676/+679
|
* sys: terminate string constants with \x00Dmitry Vyukov2016-02-051-64/+64
| | | | | C expects string constants to be zero terminated. It worked to some degree probably because most memory is zeros in executor.
* sys: fix write$tun descriptionDmitry Vyukov2016-01-261-1/+1
| | | | Also remove \r in files.
* sys: regenerate after tun/random supportDmitry Vyukov2016-01-261-0/+87
|
* sys: open a bunch of new devicesDmitry Vyukov2016-01-261-646/+790
|
* sys: add basic netlink support for realDmitry Vyukov2016-01-231-1/+49
|
* sys: add basic netlink supportDmitry Vyukov2016-01-231-4/+4
|
* sys: implement array byte size argumentsDmitry Vyukov2016-01-231-332/+332
|
* sys: use kernel headers instead of host headersDmitry Vyukov2016-01-221-37/+37
| | | | | | | | 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)
* sys: describe more dri syscallsDmitry Vyukov2016-01-161-272/+410
|
* sys: support /dev/input/event ioctlsDmitry Vyukov2016-01-151-0/+108
|
* sys: support /dev/input/{mouse,mice,event}Dmitry Vyukov2016-01-131-0/+3
|
* sys: introduce a generic syz_open_dev helper syscallDmitry Vyukov2016-01-131-9/+18
|
* sys: add support for /dev/snd/controlDmitry Vyukov2016-01-131-0/+75
|
* sys: add support for /dev/snd/timerDmitry Vyukov2016-01-121-0/+45
|
* sys: support /dev/snd/seqDmitry Vyukov2016-01-111-30/+129
|
* sys: add kvm supportDmitry Vyukov2016-01-081-0/+258
|
* sys: implement sockaddr_storageDmitry Vyukov2015-12-311-4/+4
|