1386 Commits

Author SHA1 Message Date
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
91def5c506 prog: remove special knowledge about "mmap" syscall
Abstract "mmap" away as it can be called differently on another OS.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
c0cabacda7 syz-fuzzer, syz-execprog: add -arch flag
arch flag specifies target arch, which can be different from GOARCH.
For example, 386 executor with amd64 fuzzer.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
c6d248ce95 vm/vmimpl: add target OS/arch to env
Allows future VM tuning based on target OS/arch.
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
b16ba6390d sys/syz-extract: parallelize over files 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
2119c28968 sys: move extract.sh to sys/linux 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
bd13474175 sys/linux: rename package from sys to linux 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
4a7f7fab1e prog: allow more than 1 target 2017-09-15 16:02:37 +02:00
Dmitry Vyukov
96b8e39972 sys: regenerate consts with tip linux 2017-09-13 15:39:34 +02:00
Dmitry Vyukov
06091e7473 dashboard/app: fix a bug with bugs with seq>0
See the added test.
2017-09-13 12:05:56 +02:00
Dmitry Vyukov
013a8d4c00 Update syscall_descriptions_syntax.md 2017-09-13 08:51:28 +02:00
Andrey Konovalov
c12eb94a84 Update found_bugs.md 2017-09-12 20:55:22 +02:00
Andrey Konovalov
0bd6a0a57a Update found_bugs.md 2017-09-12 19:10:57 +02:00
Andrey Konovalov
449b6f15c3 Update found_bugs.md 2017-09-11 17:52:44 +02:00
Andrey Konovalov
1ae12bb849 Update found_bugs.md 2017-09-11 17:48:16 +02:00
Andrey Konovalov
d18bfda0d4 Update setup_ubuntu-host_qemu-vm_x86-64-kernel.md 2017-09-08 13:24:54 +02:00
Andrey Konovalov
dffc4ce15b Merge pull request #372 from lwhsu/ubuntu-setup-fix
docs: add more prerequisites on ubuntu
2017-09-08 13:23:47 +02:00
Li-Wen Hsu
22f8272a4b
docs: add more prerequisites on ubuntu 2017-09-08 09:10:02 +08:00
Dmitry Vyukov
0ed1da4a12 prog: remove unused declaration 2017-09-05 19:02:12 +02:00
Dmitry Vyukov
3a866068b3 executor: fix 32-bit mode
The correct type is kernel long size, not user-space long size.
We approximate it with uint64.
2017-09-05 19:02:12 +02:00
Dmitry Vyukov
5060392c49 sys: use correct pointer size 2017-09-05 19:02:12 +02:00
Dmitry Vyukov
19cc67af5b sys: add new perf attribute flag 2017-09-05 19:02:12 +02:00
Dmitry Vyukov
e52bd33700 prog: move resource-related functions to a separate file 2017-09-05 19:02:12 +02:00
Dmitry Vyukov
eb45aa4244 prog, sys: move dictionary of special strings to sys
It is target-specific.
2017-09-05 19:02:12 +02:00
Dmitry Vyukov
58efb7c6a5 sys: improve timespec/timeval generation 2017-09-05 19:02:12 +02:00
Andrey Konovalov
fbc5f27a13 Update found_bugs.md 2017-09-05 16:23:00 +02:00
Dmitry Vyukov
ffe7e17368 prog, sys: move types to prog
Large overhaul moves syscalls and arg types from sys to prog.
Sys package now depends on prog and contains only generated
descriptions of syscalls.
Introduce prog.Target type that encapsulates all targer properties,
like syscall list, ptr/page size, etc. Also moves OS-dependent pieces
like mmap call generation from prog to sys.

Update #191
2017-09-05 15:52:42 +02:00
Dmitry Vyukov
4fc4702694 prog: dot-import sys
In preparation for moving sys types to prog to reduce later diffs.
2017-09-05 10:46:34 +02:00
Dmitry Vyukov
5db39ab953 sys: rename Call to Syscall
In preparation for moving sys types to prog
to avoid confusion between sys.Call and prog.Call.
2017-09-05 10:38:22 +02:00
Dmitry Vyukov
c34180fca0 pkg/compiler: assign Call.ID statically 2017-09-04 21:06:59 +02:00
Dmitry Vyukov
a27fcb3079 sys: use ptr64 type instead of ptr where necessary 2017-09-04 21:03:23 +02:00
Dmitry Vyukov
a29e1be6ff pkg/compiler: fix alignment calculation bug 2017-09-04 20:54:29 +02:00
Dmitry Vyukov
1c0d4caf7c sys: change BitfieldLast to BitfieldMiddle
That's the condition we always want.
Currently we always check:
t.BitfieldOffset() == 0 || t.BitfieldLast()
now can check just:
!t.BitfieldMiddle()
2017-09-04 20:51:56 +02:00
Dmitry Vyukov
b6e402dd48 sys: remove IntSignalno 2017-09-04 20:25:23 +02:00
Dmitry Vyukov
399addc875 sys, pkg/compiler: move padding computation to compiler
This makes types constant during execution, everything is precomputed.
2017-09-04 20:25:23 +02:00
Dmitry Vyukov
94e151ceb5 pkg/ast: prohibit empty strings
This is currently unsupported and unused.
2017-09-04 20:25:22 +02:00
Dmitry Vyukov
d878c4ff43 sys: minor fixes for statx and sigevent 2017-09-04 20:25:22 +02:00
Dmitry Vyukov
b5c5217623 pkg/ifuzz: use serializer
Simplifies code and reduces size of generated code from 820K to 310K.
2017-09-04 20:25:22 +02:00
Dmitry Vyukov
dbb49d0211 pkg/compiler: prohibit arrays of size 0
This is pointless and the only case that can yield 0 static type size.
2017-09-04 20:25:22 +02:00
Dmitry Vyukov
622a1ffd72 pkg/compiler: prohibit bitfields of size 0
They don't work the way C bitfields work.
So this will lead to confusion at least.
2017-09-04 20:25:22 +02:00
Dmitry Vyukov
291192c61b pkg/compiler: don't allow bitfields in unions, args and anon types 2017-09-04 20:25:22 +02:00
Dmitry Vyukov
e707c97f9a pkg/compiler: move bitfield marking from sys 2017-09-04 20:25:22 +02:00
Dmitry Vyukov
54a92e90e0 pkg/compiler: prohibit bitfields in syscall args 2017-09-04 20:25:22 +02:00
Dmitry Vyukov
740662e03a pkg/compiler: reserve in/out/inout/opt names 2017-09-04 20:25:22 +02:00
Dmitry Vyukov
a5c115a64b prog: move ptrSize const to test
It is used only by a single test. Remove it from non-test code.
2017-09-04 20:25:22 +02:00