Dmitry Vyukov
9c84f7c395
pkg/osutil: allow disabling sandboxing with env var
...
If SYZ_DISABLE_SANDBOXING=yes is set, don't do user sandboxing.
Will be usefule for bisection tool which runs locally,
but needs to build kernel.
Update #501
2018-05-17 14:03:46 +02:00
Dmitry Vyukov
031c7941d7
pkg/compiler: add optional builtin template
...
type optional[T] [
val T
void void
] [varlen]
2018-05-17 12:02:30 +02:00
Dmitry Vyukov
90c54c496b
pkg/compiler: detect duplicate fields in template structs
2018-05-17 11:46:45 +02:00
Dmitry Vyukov
a367c1d7a8
tools/create-gce-image.sh: support MKE2FS_CONFIG
2018-05-16 17:21:29 +02:00
Dmitry Vyukov
86ea19e4c2
tools/create-gce-image.sh: revert loop to nbd
...
loop devices are nice, but unfortunately this creates images
that does not boot on GCE. Reason is unclear.
Revert back to nbd for now.
2018-05-14 19:32:39 +02:00
Dmitry Vyukov
d131f1b9fc
pkg/instance: relax syzkaller path check
...
Only check that syzkaller path is in GOPATH if we are going to build it.
syz-ci image testing does not have syzkaller path in GOPATH,
but it also does not build syzkaller.
2018-05-14 13:47:44 +02:00
Dmitry Vyukov
2407e7407a
pkg/instance: add package for testing of images/patches/bisection
...
Move helper image/patch testing code from syz-ci/testing.go
to a separate package so that it can be reused during bisection.
Update #501
2018-05-14 11:32:56 +02:00
Dmitry Vyukov
9fb3ae4dfd
pkg/osutil: introduce TempFile helper
...
Introduce TempFile helper and use it in several packages.
2018-05-14 11:17:23 +02:00
Dmitry Vyukov
acfd774f46
pkg/git: add bisection functionality
...
Bisect bisects good..bad commit range against the provided predicate (wrapper around git bisect).
The predicate should return an error only if there is no way to proceed
(it will abort the process), if possible it should prefer to return BisectSkip.
Progress of the process is streamed to the provided trace.
Returns the first commit on which the predicate returns BisectBad.
Update #501
2018-05-14 11:17:23 +02:00
Dmitry Vyukov
b4df103f78
pkg/git: add PreviousReleaseTags
...
PreviousReleaseTags returns list of preceding release tags
that are reachable from the given commit.
Update #501
2018-05-14 11:17:23 +02:00
Dmitry Vyukov
5060be1a90
pkg/git: add SwitchCommit and GetCommit
...
Will be useful for bisection logic.
Update #501
2018-05-14 11:17:23 +02:00
Dmitry Vyukov
d39e52252c
pkg/kernel: use oldconfig instead of olddefconfig
...
See the added comment for motivation.
Update #501
2018-05-14 11:17:23 +02:00
Dmitry Vyukov
2a287a4dfc
pkg/kernel: accept kernel config as byte slice
...
We usually have the config in memory,
so saving it to disk is an unnecessary step.
Accept byte slice directly.
Update #501
2018-05-14 11:17:23 +02:00
Dmitry Vyukov
1944eeb95d
pkg/kernel: run distclean with -jNCPU
2018-05-14 11:17:18 +02:00
Dmitry Vyukov
ea9496cdbd
tools/create-gce-image.sh: use loop instead of nbd
...
loop is much more standard than nbd and does not require additional modules.
nbd broke on Debian rolling.
loop also allows parallel execution thanks to losetup -f.
Use loop instead of nbd.
Also improve cleanup logic and add one missing sudo.
Update #501
2018-05-14 11:16:36 +02:00
Ioana Ciornei
481f030ccd
executor: fix strncpy compile error
...
gcc8 is stricter when dealing with strings and strncpy and demands that
the size of the actual string to be copied to be explicitly smaller than
the size of the destination, just to make sure the NULL terminator is
taken into considerantion. This patch fixes the issue.
Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com>
2018-05-13 16:27:22 +02:00
Dmitry Vyukov
045bbd4afb
pkg/csource: fix test exit code
2018-05-07 20:40:44 +02:00
Dmitry Vyukov
02e3401638
pkg/csource: skip tests under race detector
...
csource tests consume too much memory under race detector (>1GB),
and periodically timeout on Travis. So we skip them.
2018-05-07 20:27:06 +02:00
Dmitry Vyukov
bdff58b1a1
pkg/csource: reduce test size
...
The test times out on travis:
https://travis-ci.org/google/syzkaller/jobs/375965899
https://travis-ci.org/google/syzkaller/jobs/375965900
2018-05-07 19:24:46 +02:00
Dmitry Vyukov
9e0846e8a4
all: get rid of underscores in identifiers
...
Underscores are against Go coding style.
Update #538
2018-05-07 17:59:06 +02:00
Dmitry Vyukov
99c1f48659
sys/syz-extract: split overly long function
...
Update #538
2018-05-07 16:50:19 +02:00
Dmitry Vyukov
55a5e98a0a
pkg/ifuzz: move generated code to a separate package
...
This helps to ignore generated code with gometalinter.
There is currently no other way:
https://github.com/alecthomas/gometalinter/issues/270
Update #538
2018-05-07 15:42:28 +02:00
Dmitry Vyukov
5f9dcfdadb
pkg/git: remove duplicated code in tests
...
Update #538
2018-05-07 13:16:29 +02:00
Dmitry Vyukov
b9fea20df7
pkg/report: remove duplicated stub code
...
Update #538
2018-05-07 13:05:41 +02:00
Dmitry Vyukov
a211da1a40
pkg/db: remove code duplication in test
...
Update #538
2018-05-06 19:47:40 +02:00
Dmitry Vyukov
2c7e14a847
gometalinter: enable cyclomatic complexity checking
...
Refactor some functions to be simpler.
Update #538
2018-05-04 18:03:46 +02:00
Dmitry Vyukov
08141db61a
gometalinter: enable line length checking
...
120 columns looks like a reasonable limit
and requires few changes to existing code.
Update #538
2018-05-04 14:24:51 +02:00
Dmitry Vyukov
a630fd8b41
gometalinter: some fixes for unparam
...
But we still can't enable it as there are more [uninteresting] warnings.
Update #538
2018-05-03 15:48:26 +02:00
Dmitry Vyukov
9fe5658a1b
gometalinter: check dot imports
...
Update #538
2018-05-03 14:41:34 +02:00
Dmitry Vyukov
39302300d9
gometalinter: check unkeyed composite literals
...
Update #538
2018-05-03 14:01:48 +02:00
Dmitry Vyukov
4c24e4a467
gometalinter: enable package comment checking
...
Update #538
2018-05-03 13:53:01 +02:00
Dmitry Vyukov
6e2ce6613b
pkg/host: fix syz_mount_image detection
...
Only init admin can mount filesystems with images.
2018-04-29 18:45:45 +02:00
Dmitry Vyukov
1e85f7b9af
pkg/ast: support char constants
...
Frequently it's useful to do something like:
int8['a':'z']
punctuation = ',', '-', ':'
2018-04-29 12:04:22 +02:00
Dmitry Vyukov
c7f6891ca7
pkg/report: reformat code
...
There is some regression in Go formatting on tip.
I am constantly getting diffs after formatting.
Filed: https://github.com/golang/go/issues/25161
2018-04-29 12:04:22 +02:00
Dmitry Vyukov
190d92e056
sys/linux: extend namespace desciptions
...
Slightly extend namespace descriptions and move
them to a separate file.
2018-04-27 18:47:58 +02:00
Dmitry Vyukov
0008f52678
pkg/report: fix remaining lockdep report formats
...
We fixed only 1, but new format affects all lockdep reports.
Fix all of them.
2018-04-27 15:44:47 +02:00
Dmitry Vyukov
3c7caf1d6e
pkg/host: enable more fault injection
2018-04-27 15:43:29 +02:00
Dmitry Vyukov
d0b7645387
pkg/report: few report parsing fixes for linux
2018-04-26 14:46:16 +02:00
Dmitry Vyukov
37e76fe20b
pkg/scource: rename compiled binary to syz-executor
...
We call the binary syz-executor because it sometimes shows in bug titles,
and we don't want 2 different bugs for when a crash is triggered during
fuzzing and during repro.
2018-04-24 19:17:07 +02:00
Dmitry Vyukov
fd5157bebf
pkg/report: sanitize titles better
...
Strip non-printable characters from titles.
Trim whitespaces on both ends.
Replace tabs with spaces.
Remove duplicate spaces.
Reduce max title length.
2018-04-24 19:17:07 +02:00
Dmitry Vyukov
98e363b852
pkg/git: don't create shallow repos
...
Shallow repos created by CheckoutBranch conflict with
what CheckoutCommit tries to do.
Fetch of a shallow repo does not unshallow it.
And then checkout of a non-head commit fails.
2018-04-24 19:17:07 +02:00
Dmitry Vyukov
9366d03f00
dashboard/app: allow testing fixes on exact commit and without patch
...
This implements 2 features:
1. It's now possible to specify exact commit when testing as:
2. It's possible to test without patch attached
assuming the patch is already committed to the tested tree.
Fixes #558
2018-04-24 13:23:01 +02:00
Dmitry Vyukov
e2f4bf8f38
pkg/gce: improve API rate limit logic
...
Sometimes we see rate limiting errors.
This is especially bad for e.g. patch testing requests.
Increase default API delay and add backoff logic.
2018-04-24 13:23:01 +02:00
Dmitry Vyukov
33424b08c3
pkg/report: more corrupted report detection
2018-04-24 13:23:01 +02:00
Dmitry Vyukov
e7e85d3609
pkg/kernel: fix gometalinter warning
2018-04-23 16:50:25 +02:00
Dmitry Vyukov
8b5dcf17b0
syz-ci: clean kernel dir before patch test build
...
This leads to false errors when we are switching between gcc and clang:
kernel build failed: failed to run /usr/bin/make [make bzImage -j 32 CC=/syzkaller/clang-kmsan/bin/clang]: exit status 2
arch/x86/Makefile:184: *** Compiler lacks asm-goto support.. Stop.
Fixes #568
2018-04-23 16:26:26 +02:00
Dmitry Vyukov
ff12bea91c
pkg/ipc: fix data race on config.Timeout
2018-04-23 16:26:26 +02:00
Dmitry Vyukov
8b9a3f2c76
pkg/report: add some example arm crashes
2018-04-20 20:14:10 +02:00
Dmitry Vyukov
bf2018dd07
executor: don't fail when ipv6 is not enabled
...
Check in checkpoint_iptables is not enough as
reset_iptables will fail even if no tables enabled.
Add similar check to reset_iptables.
2018-04-20 20:14:10 +02:00
Dmitry Vyukov
e5453dd396
executor: increase max image size to 128MB
...
Images of some filesystems need to be that large (xfs, btrfs, f2fs).
2018-04-19 16:59:49 +02:00