Dmitry Vyukov
b24fab5550
dashboard/app: refactor incomingCommandTx
...
Factor out actual command handling out of incomingCommandTx.
Update #538
2018-08-02 16:57:31 +02:00
Dmitry Vyukov
9b488fad5e
dashboard/app: refactor addTestJob
...
Factor request checking from addTestJob into checkTestJob.
Update #538
2018-08-02 16:57:31 +02:00
Dmitry Vyukov
906c09c71a
dashboard/app: simplify reportCrash
...
Factor crash saving out of reportCrash into saveCrash.
Update #538
2018-08-02 16:57:31 +02:00
Dmitry Vyukov
af15ef43a8
pkg/compiler: refactor checkNames
...
Too complex. Split into 2 functions.
Update #538
2018-08-02 16:57:31 +02:00
Dmitry Vyukov
3a4641d90c
pkg/compiler: refactor structGen
...
Still too complex. Split more.
Update #538
2018-08-02 16:57:31 +02:00
Dmitry Vyukov
2e17e2c0ad
vm: refactor MonitorExecution
...
Too complex. Split into several functions.
Update #538
2018-08-02 16:57:31 +02:00
Dmitry Vyukov
c67a9331a4
gometalinter: clean up some errcheck warnings
...
Check some errors where relevant.
Unfortunately enabling errcheck does not look feasible, too many warnings.
Update #538
2018-08-02 16:57:31 +02:00
Zach Riggle
0a7cf4ec63
manager: Fix default value for 'sandbox' ( #666 )
...
docs: fix default sandbox value
The docs and code comments state in several places that 'setuid'
is the default sandbox value. However, the default is actually
'none'. Fix docs.
2018-08-01 19:42:07 +02:00
Dmitry Vyukov
1477993e1b
pkg/compiler: work around vet crash
...
vetshadow not works, so enable it.
Update https://github.com/golang/go/issues/26725
Update #538
2018-07-31 20:47:36 +02:00
Dmitry Vyukov
8ef497b652
gometalinter: clean up vetshadow
...
This just cleans up existing warnings.
vetshadow is not enabled yet because it crashes.
Update #538
2018-07-31 20:38:33 +02:00
Dmitry Vyukov
ba6c552acd
syz-manager: refactor vmLoop
...
Slightly reduce cyclomatic complexity.
Update #538
2018-07-31 18:43:50 +02:00
Dmitry Vyukov
97bce4e2ce
prog: refactor program serialization
...
Make argument serialization Arg method.
This eliminates a very long function
that serializes all arguments.
Update #538
2018-07-31 18:43:50 +02:00
Dmitry Vyukov
91154fa55c
dashboard/app: refactor config checking
...
Split a very long function into several smaller functions.
Update #538
2018-07-31 18:43:50 +02:00
Dmitry Vyukov
efc2683657
pkg/csource: rafactor option checking
...
Update #538
2018-07-31 18:43:45 +02:00
Dmitry Vyukov
46bad78542
pkg/report: refactor linux report parsing
...
Split a very long function into 2.
Update #538
2018-07-31 18:38:54 +02:00
Dmitry Vyukov
46b824df22
prog: refactor SerializeForExec
...
Reduce cyclomatic complexity.
Update #538
2018-07-31 18:38:54 +02:00
Dmitry Vyukov
8d7727990b
pkg/csource: refactor call generation
...
Slightly reduce cyclomatic complexity.
Update #538
2018-07-31 17:05:09 +02:00
Dmitry Vyukov
69eaab186d
pkg/compiler: refactor genStructDescs
...
Reduce cyclomatic complexity of genStructDescs.
Update #538
2018-07-31 17:04:29 +02:00
Dmitry Vyukov
0e9b376bc3
prog: refactor Minimize
...
Reduce cyclomatic complexity of argument minimization
by moving type-specific logic into separate functions.
Fix few bugs along the way.
Update #538
2018-07-31 16:06:21 +02:00
Dmitry Vyukov
531d157044
tools/syz-execprog: refactor
...
Reduce cyclomatic complexity of the main function.
It's too huge.
Update #538
2018-07-31 16:05:03 +02:00
Dmitry Vyukov
50c3709eb0
.gometalinter: reduce dupl threshold
...
Reduce dupl threshold from 63 to 60 and fix violations.
Update #538
2018-07-31 12:42:52 +02:00
Dmitry Vyukov
31549f438f
README.md: add go report card and license icons
2018-07-31 12:22:54 +02:00
Dmitry Vyukov
f5d67fbd9c
.gometalinter.json: enable gofmt
...
The part that we want from gofmt is simplify (-s).
Fix all code that needs fixing.
Update #538
2018-07-31 12:16:54 +02:00
Dmitry Vyukov
b8bd991ee2
executor: make current_time_ms/sleep_ms
...
Fix conditions for when current_time_ms/sleep_ms are used
and make them static.
2018-07-30 11:17:44 +02:00
Dmitry Vyukov
1a381291a3
executor: collect coverage from unfinished syscalls
...
Write coverage from unfinished syscalls.
Also detect when a syscall was blocked during execution,
even if it finished. Helpful for fallback coverage.
Fixes #580
2018-07-29 19:46:05 +02:00
Dmitry Vyukov
0824d7a1bf
vm/gce: fix build
...
fail
2018-07-29 10:16:20 +02:00
Dmitry Vyukov
419000cc0a
vm: fix "kill fuzzer on first kernel bug"
...
The problem with that commit is that for GCE implementation
we immidiately kill console connection too when receive diagnose signal.
This leads to truncated output.
2018-07-29 10:07:30 +02:00
Dmitry Vyukov
ebf656d79b
syz-fuzzer: generate programs more frequently if no coverage
...
Generating every other time should be good,
because fallback signal is really weak.
2018-07-27 21:13:10 +02:00
Dmitry Vyukov
3abee99f46
dashboard/app: fix crash selection for reporting
...
See the issue for the problem description.
Include repro level into reporting priority,
so that we can order by just it during selection
and ignore ReproC/ReproSyz.
Fixes #634
2018-07-27 21:10:01 +02:00
Dmitry Vyukov
a43c5ed638
pkg/csource: turn off 32-bit tests
...
Test OS fails the same was as linux on travis.
2018-07-27 13:48:44 +02:00
Dmitry Vyukov
9faf980ad5
executor: disable clang-format for some parts
...
clang-format badly mishandles this part,
moreover different versions mishandle it differently.
2018-07-27 13:48:44 +02:00
Dmitry Vyukov
ca3f673ab4
.travis.yml: use clang-format 6.0.1
2018-07-27 13:48:44 +02:00
Dmitry Vyukov
788351b1b0
pkg/csource: rewrite gen.sh in Go
...
Shell files cause portability problems.
On Linux it's hard to install /bin/sh,
/bin/bash is not present on *BSD.
Any solution is hard to test on Darwin.
Don't even want to mention Windows.
Just do it in Go.
2018-07-27 10:22:23 +02:00
Dmitry Vyukov
b25fc7b831
pkg/csource: add option to trace syscall results
...
This will be needed for testing of generated programs.
2018-07-27 10:22:23 +02:00
Dmitry Vyukov
9d92841b4e
pkg/csource: tidy generated code
...
1. Remove unnecessary includes.
2. Remove thunk function in threaded mode.
3. Inline syscalls into main for the simplest case.
4. Define main in common.h rather than form with printfs.
5. Fix generation for repeat mode
(we had 2 infinite loops: in main and in loop).
6. Remove unused functions (setup/reset_loop, setup/reset_test,
sandbox_namespace, etc).
2018-07-27 10:22:23 +02:00
Dmitry Vyukov
c3da5dc5e0
executor: simplify event_timedwait
...
We always have current_time_ms in event_timedwait
so use it instead of manual clock_gettime calls
which tend to be bulkier.
2018-07-27 10:22:23 +02:00
Dmitry Vyukov
4dcfea28eb
pkg/host: support test OS
...
test OS parasitizeson other OSes just as akaros,
and there is nothing to detect as well.
So use the same stub for test as for akaros.
2018-07-27 10:22:23 +02:00
Dmitry Vyukov
22105302cc
executor: ignore unshare errors in setuid sandbox
...
We already do this in sandbox=none, but forgot about setuid.
2018-07-27 10:22:23 +02:00
Dmitry Vyukov
c7725f52b1
syz-execprog: initialize net devices
2018-07-27 10:22:23 +02:00
Dmitry Vyukov
68faa52582
prog: parse comments in serialized programs
...
Remember per-call comments, will be useful for annotating tests.
Also support this form:
call() # comment
2018-07-27 10:22:23 +02:00
Zach Riggle
0889ba7a79
adb: Add console logic for ttyUSB.serial
...
By using UDEV rules, we can create device nodes which exist at
/dev/ttyUSB.{android device serial}
Which makes it easier to determine which console belongs to a device.
While this is non-standard behavior, it's an inexpensive path check
and makes the lookup faster and deterministic.
2018-07-26 20:13:37 +02:00
Dmitry Vyukov
ad155aa428
pkg/csource: say what compiler is missing
2018-07-25 10:44:45 +02:00
Dmitry Vyukov
e0c1bcbabc
prog: move MaxPids const to prog
...
The const may be needed by other packages.
E.g. when checking manager config.
2018-07-25 10:39:29 +02:00
Dmitry Vyukov
3cbc0ac516
pkg/csource: tun/cgroups are linux-specific
2018-07-25 10:39:29 +02:00
Dmitry Vyukov
5164d966fd
executor: remove unused file
...
Leftover after "executor: overhaul".
2018-07-25 10:39:29 +02:00
Dmitry Vyukov
1ca246b8b2
Makefile: fix build
2018-07-25 08:39:05 +02:00
Dmitry Vyukov
da1670a69d
Makefile: install /bin/sh
...
Installs /bin/sh required for pkg/csource/gen.sh
2018-07-25 08:36:42 +02:00
Anton Lindqvist
9182049979
pkg/csource: remove /bin/bash assumption
...
OpenBSD and probably other BSDs does not ship with /bin/bash. This particular
script runs fine with regular /bin/sh.
2018-07-25 08:30:07 +02:00
Julia Hansbrough
a922a2e809
[manager] Fix typo.
...
s/cash/crash/
2018-07-25 08:28:36 +02:00
Dokyung Song
6982d892b6
sys/targets: fix Fuchsia lib directory
...
to fix linking error when building syz-executor for Fuchsia.
2018-07-25 08:26:57 +02:00