Commit Graph

2328 Commits

Author SHA1 Message Date
Dmitry Vyukov
c05b619dab Makefile: print uname in install_prerequisites
Travis is still broken with:

E: Unable to locate package gcc-aarch64-linux-gnu
E: Unable to locate package gcc-arm-linux-gnueabihf
E: Unable to locate package gcc-powerpc64le-linux-gnu

https://travis-ci.org/google/syzkaller/jobs/378034948

Let's at least see what's OS is there and what gcc packages present.
2018-05-13 11:36:13 +02:00
Dmitry Vyukov
e726f42b64 Makefile: don't fail on unknown packages
Travis CI started failing with:

E: Unable to locate package gcc-aarch64-linux-gnu
E: Unable to locate package gcc-arm-linux-gnueabihf
E: Unable to locate package gcc-powerpc64le-linux-gnu
make: *** [install_prerequisites] Error 100

https://travis-ci.org/google/syzkaller/jobs/377740347

Let's try to ignore these packages.
2018-05-12 10:10:02 +02:00
Dmitry Vyukov
63ef537b14 sys/syz-extract: improve compier error messages
Print each constant on separate line.
When compiler prints error messages it prints whole line
containing an error. So currently it prints all constants (thousands).
With this change it prints just the problematic constant.
2018-05-11 15:48:33 +02:00
Dmitry Vyukov
c8229620ff sys/linux: regenerate video4linux consts on the right tree
Now generated on:
https://source.codeaurora.org/quic/la/kernel/msm-4.9 msm-4.9
2018-05-11 15:09:33 +02:00
Dmitry Vyukov
2d35915b13 sys/linux: add missing consts for video4linux.txt
For now other arches are regenerated on upstream tree.
It does not contain a bunch of consts, so we define them to 1 for now.
arm64 consts are left intact.
video4linux.txt is added to "android" files in syz-extract,
so that future make extract runs don't overwrite arm64 consts.

Also fix VIDIOC_G_FBUF argument direction, currently tests crash with:

panic: call ioctl$VIDIOC_G_FBUF: pointer arg 'buffer' has output direction [recovered]
	panic: call ioctl$VIDIOC_G_FBUF: pointer arg 'buffer' has output direction
2018-05-11 14:24:16 +02:00
srikanth007m
ace16942e5 sys/linux: add Video4Linux IOCTL Descriptors
* Adding Video4Linux IOCTL Descriptors

This will cover the ioctl() function used to program V4L2 devices

* Const file for video4linux_arm64.const
2018-05-11 14:11:10 +02:00
Jean-Baptiste Theou
12c7428ad2 docs: add link for PH-1 kernel
Signed-off-by: Jean-Baptiste Theou <jb@essential.com>
2018-05-09 09:31:39 +02:00
Hangbin Liu
b88872ba0e sys/linux: add AF_NETLINK/NETLINK_ROUTE SCHED support
Update #533

As TC(net sched) is a large group, I separate it from socket_netlink_route.txt.
Currently I only implement the framework with two qdisc/tclass/filters.
I will add the others later.

v2: Fix tcm_handle major and minor order. Add tcm_handle_offsets.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2018-05-08 17:15:21 +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
67f2e89e73 gometalinter: increase timeout
Checkers timeout on travis:
https://travis-ci.org/google/syzkaller/jobs/375965899
2018-05-07 18:59:22 +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
b911ff2c90 dashboard/app: split overly long function
Update #538
2018-05-07 16:49:42 +02:00
Dmitry Vyukov
97d2b0e4c4 prog: refactor mutateArg from a big huge function
Update #538
2018-05-07 16:24:03 +02:00
Dmitry Vyukov
3f70522c7e tools/syz-execprog: split overly large function
Update #538
2018-05-07 16:23:18 +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
df6e2fb6df prog: deduplicate minimization test
Update #538
2018-05-07 14:55:53 +02:00
Dmitry Vyukov
8041642739 prog: dedup checksumming code
Update #538
2018-05-07 14:51:28 +02:00
Dmitry Vyukov
23b5913da9 prog: reorder checksum functions
Put the most important function at the top.
2018-05-07 14:46:17 +02:00
Dmitry Vyukov
f914e0a305 sys: dedup sanitization of common unix syscalls
Update #538
2018-05-07 14:42:55 +02:00
Dmitry Vyukov
068da17e1f prog: dedup mutation code
Update #538
2018-05-07 14:42:22 +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
757359b5ea gometalinter: reduce checker timeout
Travis has timeout of 10 minutes, so reduce
our timeout to 8 minutes.
2018-05-07 10:49:27 +02:00
Dmitry Vyukov
a211da1a40 pkg/db: remove code duplication in test
Update #538
2018-05-06 19:47:40 +02:00
Dmitry Vyukov
cda1fcb742 sys: dedup mmap code across OSes
Update #538
2018-05-06 16:58:38 +02:00
Dmitry Vyukov
037b77dc65 vm/{adb,isolated}: dudup common code
Found with gometalinter/dupl.

Update #538
2018-05-06 14:24:42 +02:00
Alex Gaynor
6c18ddb0e6 fixed link to generated file in the docs 2018-05-06 09:28:41 +02:00
Dmitry Vyukov
78b251cbd7 all: fix too long lines
Not sure why I have not seen warnings about
these lines on another machine...
2018-05-05 16:00:01 +02:00
Dmitry Vyukov
31ea20ce83 sys: move generate files to separate packages
Move generated files to gen subdir. This allows to:
1. Rebuild init.go without rebuilding generated code.
2. Excluding generated files from gometalinter checking.
This makes faster and consume less memory.

Update #538
2018-05-05 15:40:10 +02:00
Dmitry Vyukov
08a0ef9cb0 Makefile: fix deps
syz-sysgen depends on prog which depends on pkg/ifuzz.
Currently we concurrently regenerate pkg/ifuzz and build
syz-sysgen, which can cause failures.
Make pkg/ifuzz dependent on syz-sysgen, so that it is
built before we regenerate ifuzz.
2018-05-05 14:27:27 +02:00
Dmitry Vyukov
6a0382b543 prog: rework validation code
The current code is total, unstructured mess.
Since we now have 1:1 type -> arg correspondence,
rework validation around args. This makes code
much cleaner and 30% shorter.
2018-05-05 11:43:00 +02:00
Dmitry Vyukov
afe402d20a prog: make c.Ret optional
No reason to allocate return value if there is no return type.
c.Ret == nil is the reasonable indication that this is a "void" call.
2018-05-05 10:25:45 +02:00
Dmitry Vyukov
9dfb5efa91 prog: simplify code
Now that we don't have ReturnArg and only ResultArg's refer
to other ResultArg's we can remove ArgUser/ArgUsed and
devirtualize lots of code.
2018-05-05 10:13:04 +02:00
Dmitry Vyukov
5ca897bd50 prog: remove ReturnArg
It's not all that needed.
2018-05-05 09:08:48 +02:00
Dmitry Vyukov
b438ff2328 Makefile: parallelize
Use -j by default and parallelize targets as much as possible.
2018-05-04 20:07:51 +02:00
Dmitry Vyukov
9846445c8e prog: parallelize tests
Parallelize more tests and reduce number of iterations
in random tests under race detector.
2018-05-04 20:07:32 +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
0f503c18d9 gometalinter: enable misspell
Update #538
2018-05-03 15:53:13 +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
d169e0f3c4 prog: test TransitivelyEnabledCalls on all targets
Fixes #585
2018-05-03 13:40:21 +02:00
Dmitry Vyukov
8180779d1d dashboard/app: cleanup and tidy email reports
Align all info into nice table.
Shorten links a bit.
Remove some non-strictly-necessary info.
Rework some texts.

Fixes #565
2018-05-03 12:24:38 +02:00
Julia Hansbrough
9ce14f4b01 prog: Fix page fault for syz-stress users.
In resources.go, haveGettime is False when SyscallMap["clock_gettime"]
is nil.

In this code, there's a branch that's entered only if Gettime is False,
which appends SyscallMap["clock_gettime"] to resourceCtors.  That is, it
appends nil to resourceCtors, then iterates through resourceCtors and
tries to dereference the .Name of each time, in this case, nil.Name.

This was causing a page fault on Fuchsia.

I'm not certain how the "standard" flow is supposed to work, since it
seems like any code that enters the `if cantCreate == "" && !haveGettime`
should fail... but, removing that section causes test failures, so let's
just enforce that SyscallMap["clock_gettime"] is non-nil.

If there's a better way to solve this, I'm open to suggestions.
2018-05-03 07:50:03 +02:00
Dmitry Vyukov
d5b114b401 executor: fix read_cover_size signature 2018-04-30 09:23:37 +02:00