5100 Commits

Author SHA1 Message Date
Dmitry Vyukov
cecffa2df9 sys/syz-sysgen: don't format descriptions
Formatting takes 10 seconds.
make format will run go fmt anyway.
2020-05-21 16:18:44 +02:00
Dmitry Vyukov
b5c5dd7786 prog: speed up TestPrioDeterminism
Make it faster + disable in race mode (still too slow).
2020-05-21 16:18:44 +02:00
Dmitry Vyukov
4053862c26 prog: fix determinism in choice table
Floats bite.
We interated over uses map non-deterministically,
which would be fine overall except that it may
break floats due to rounding.
2020-05-21 13:56:29 +02:00
Dmitry Vyukov
d06aafeef6 prog: fix determinism in resource creation
We chosen a non-deterministic resource in createResource
due to map iteration order.
This is caught by existing TestDeterminism,
but just very infrequently.
2020-05-21 13:56:29 +02:00
m00nbsd
1f30020f85 executor: fix a USB define on NetBSD 2020-05-21 12:01:24 +02:00
m00nbsd
df09374f0c executor: use the SYZ_USB define for NetBSD 2020-05-21 09:10:30 +02:00
m00nbsd
49c689a527 executor: fix the types used in common_usb_netbsd.h 2020-05-21 09:10:30 +02:00
Dipanjan Das
203d1b0208
vm/isolated: fix hang when target_reboot is not set
* updated the contributor list

* Fixes #1750, syz-manager hangs with "target_reboot:" false in isolated VM mode

If in the isolated VM mode, "target_reboot": false option is set in the
syz-manager's configuration, it hangs forever. syz-manager essentially
keeps on waiting for the VM to reboot, while a reboot is never triggered
due to target_reboot option being set to false. The fix is to perform the
waitRebootAndSSH() check only when target_reboot is set to true.

File(s) changed:

    vm/isolated/isolated.go: Move the waitRebootAndSSH() check inside the correct block
2020-05-21 09:08:32 +02:00
m00nbsd
c61086ab68
dashboard/config: improve the NetBSD configs 2020-05-20 14:58:07 -07:00
Dmitry Vyukov
dd849aa3a2 sys/linux: generate consts on next-20200519 2020-05-20 19:40:08 +02:00
Dmitry Vyukov
204f4fde06 sys/syz-extract: fix for full paths
pkg/ast now uses full paths since 554f8f39c57d91c1be8724cf4054424c9fb5f151.
Fix syz-extract accordingly.
2020-05-20 19:38:14 +02:00
Dmitry Vyukov
4afdfa205b dashboard/config: disable PROVE_RAW_LOCK_NESTING
It does not work yet.
Generated on next-20200519.
2020-05-20 15:39:22 +02:00
m00nbsd
1255f02a3b executor: add support for extra coverage on NetBSD 2020-05-20 10:23:38 +02:00
m00nbsd
67fa1f59b8 executor: add support for USB fuzzing on NetBSD 2020-05-19 23:07:55 +02:00
Dmitry Vyukov
8f2ad84be9 dashboard/config: update main config to next-20200518 2020-05-19 20:25:08 +02:00
Andrey Konovalov
d4bad60bb8
Update setup_ubuntu-host_qemu-vm_x86-64-kernel.md 2020-05-19 18:57:53 +02:00
Dongliang Mu
5d11c3ecfd docs: add the link of manager config file used in the syz-repro 2020-05-19 16:22:52 +02:00
Dmitry Vyukov
6d882fd26c tools/check_links.py: detect absolute links
Detect absolute links to our repo.
These are not checked and long and inconsistent with majority of links.
2020-05-19 12:52:04 +02:00
Dmitry Vyukov
ac61eb2b12 .github/workflows: remove redundant step status check
According to docs, this is the default.
2020-05-19 12:52:04 +02:00
Dmitry Vyukov
684d36068d pkg/vcs: always extract tags from subject 2020-05-18 12:59:59 +02:00
Dmitry Vyukov
24d9114275 .github/workflows: add CI workflow
Switch from Travis to Github Actions for testing.
This is faster and is better integrated with github.

Update #1699
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
37137150cb tools: add syz-env
syz-env provides a canned dev environment with all tools necessary
(Go, gcc, clang-format, etc) for development/testing in a form
of a Docker image. Example use:

$ syz-env make presubmit
$ syz-env make extract SOURCEDIR=~/linux

Update #1699
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
848ec2e87b tools/codecov.yml: fix format
Merge 2 coverage sections.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
70100a5440 Makefile: fix generate target
descriptions target needs to be executed before generate_go,
because the latter builds Go code which won't build without descriptions.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
ec15ba17be .github/workflows: rename oss-fuzz workflow 2020-05-18 11:34:42 +02:00
Dmitry Vyukov
4836c13c61 tools/syz-make: rename from syz-env
syz-env will be a good, short name for the planned
docker-ized build environment. So rename syz-env to syz-make.
Maybe not the best name, but it's not visible basically anywhere.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
910f427fd9 executor: exclude syz_kvm_setup_cpu on arm
KVM was removed for ARM.
Improved CI finally allows to catch this.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
ba2826f39e prog: reduce number of allocations in Mutate
Don't allocate 3 parallel slices.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
17b3eb97de prog: speed up foreachArgImpl
Don't generate garbage for ctx.
This speeds up mutation tests by 20%.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
9d7b583eae prog: reduce size of -short tests
Reduce size of tests that run for more than 1s in short mode.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
b6fa239fd5 pkg/csource: speed up tests
Tests run for too long.
1. Check only 1 arch per OS in short mode.
2. Dedup options. Turns out we generated 2x duplicates in allOptionsSingle.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
04875dc644 pkg/bisect: speed up tests
Creating new repos takes majority of test time.
Reuse them across tests.
With GOMAXPROCS=2 (CI) this speeds up tests from 33 sec to 7 secs.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
0ee915a4b7 pkg/runtest: disable broken test combinations
Amusingly this was always broken but nobody was ever able to compile
32-bit binaries on Linux since the addition of the tests.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
67206203d3 pkg/runtest: enable 32-bit tests
32-bit tests should work on CI now.
But don't run them in -short mode,
otherwise it takes too long.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
672c10ad7c all: add missing copyright statements 2020-05-18 11:34:42 +02:00
Dmitry Vyukov
554f8f39c5 pkg/ast: print full file name in errors
Print full names so that github annotations work.
I.e. sys/linux/sys.txt instead of just sys.txt.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
2d4efabd02 Makefile: print errors in standard format
Use the standard "file:line:col: error message" format.

Update #1699
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
fc28aeb6b9 tools/check_links.py: print errors in standard format
Use the standard "file:line:col: error message" format.

Update #1699
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
51c18193d3 tools/check-copyright.sh: print errors in standard format
Use the standard "file:line:col: error message" format.

Update #1699
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
bb26bde008 tools/check-copyright.sh: check py and yml files
Update #1699
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
58d6f672b9 sys/targets: check that <dirent.h> works in compilation test
Without linux-libc-dev:i386 installed the test passes,
but executor compilation fails because <dirent.h> is broken.
2020-05-18 11:34:42 +02:00
Dmitry Vyukov
1eaedf0fea pkg/osutil: don't sandbox on CI
CI does not have syzkaller user, but may run under root.

Update #1699
2020-05-18 11:34:42 +02:00
Ayushi Sharma
37bccd4ed9 sys/netbsd: increase syscall support 2020-05-15 13:43:55 -07:00
Andrey Konovalov
8a9f1e7dbd executor, sys/linux: syz_usb_ep_read/write accept endpoint address
This patch changes syz_usb_ep_read/write pseudo-syscalls to accept endpoint
address as specified in its endpoint descriptor, instead of endpoint index.
2020-05-15 16:30:32 +02:00
Andrey Konovalov
55efafca37 executor: stall unknown usb requests
Also don't fail(), leave that to USB_DEBUG and analyze_control_request().
2020-05-15 16:30:32 +02:00
Alexander Potapenko
d7f9fffab3 targets: syz-extract: add Clang support for Linux builds
Allow targets.go use Clang instead of the default Linux compiler by
setting the SYZ_CLANG=1 env var. Doing so changes the compiler to
"clang" and the linker to "ld.ldd", assuming they are in $PATH, and adds
the --target and -ferror-limit CFLAGS.

Target also exports KernelCompiler and KernelLinker fields now, which allows
overriding the compiler and linker in the kernel make invocation.

Signed-off-by: Alexander Potapenko <glider@google.com>
2020-05-15 14:08:01 +02:00
Alexander Potapenko
4da021feb0 targets.go: append flags in a more readable way
As suggested by Dmitry Vyukov

Signed-off-by: Alexander Potapenko <glider@google.com>
2020-05-15 14:08:01 +02:00
Alexander Potapenko
e2993cfc13 targets: replace target.CCompilerPrefix with target.Triple
This field will soon be used in Clang builds. Also, we'd better
encapsulate compiler name generation in targets.go

Signed-off-by: Alexander Potapenko <glider@google.com>
2020-05-15 14:08:01 +02:00
Michael Tuexen
2d572622ca sys/targets: fix typo 2020-05-14 11:06:41 +02:00
Michael Tuexen
4dcd09e8cb sys/targets: add -lc++ when building for test os on FreeBSD
This unbreaks gmake presubmit on FreeBSD.
2020-05-14 11:06:41 +02:00