Commit Graph

4913 Commits

Author SHA1 Message Date
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
Michael Tuexen
e36b2ae53d sys/targets: fix tests when building on FreeBSD
gmake test is failing on FreeBSD since switching to clang.

To address this:
* use g++ as the C preprocessor for now.
* use a C compiler for compiling C sources and add -lc++ when
  compiling executor.cc. Without this, clang warns about
  using a C++ compiler for compiling C code.
* some test configs add -no-pie, which is not used by clang.
  Add -Wno-unused-command-line-argument to silence a warning
2020-05-14 11:06:41 +02:00
Michael Tuexen
a885920d00 executor: don't build gen.go on FreeBSD 2020-05-13 21:50:15 +02:00
Michael Tuexen
d9fecf2516 executor: don't build gen.go on OpenBSD or NetBSD
Use (NOT openbsd) AND (NOT netbsd) instead of (NOT openbsd) OR (NOT netbsd).
2020-05-13 21:50:15 +02:00
Dmitry Vyukov
50749f54cd pkg/report: add ParseAll
ParseAll returns all reports in output.
Use it in syz-symbolize.
2020-05-13 20:49:07 +02:00
Dmitry Vyukov
1e61c8bc14 Makefile: add target for syz-symbolize 2020-05-13 20:48:47 +02:00
Dmitry Vyukov
3d789641a3 pkg/report: add Report.SkipPos
SkipPos is what pkg/instance needs,
but also will be needed for ParseAll.
2020-05-13 20:37:26 +02:00
Michael Tüxen
b3fe7470a4
executor: fix typo (#1737) 2020-05-13 17:50:20 +02:00
Michael Tuexen
c7875f08e1 executor: fix #ifdef condition for remove_dir() 2020-05-13 15:56:14 +02:00
Dmitry Vyukov
08381b1a9a
docs: add articles by Collabora 2020-05-13 13:12:07 +02:00
Alexander Potapenko
a99fd8b014 targets: introduce osCommon.cflags, make -static a common flag on Linux
Signed-off-by: Alexander Potapenko <glider@google.com>
2020-05-13 13:05:41 +02:00
Alexander Potapenko
88a97d1a7a Get rid of "Cross" in variable names
Renamed Target.BrokenCrossCompiler to Target.BrokenCompiler and
Target.CrossCFlags to Target.CFlags

"Everything in Target is about Cross now."

Signed-off-by: Alexander Potapenko <glider@google.com>
2020-05-13 13:05:41 +02:00
Alexander Potapenko
ad606d93b2 targets: delete CFlags
According to
https://github.com/google/syzkaller/pull/1732#issuecomment-627809865,
they have been unused since 3aa3800.

Signed-off-by: Alexander Potapenko <glider@google.com>
2020-05-13 13:05:41 +02:00
Dmitry Vyukov
9a6d42fb40 Makefile: fix check_links
1. Disable pager.
2. Actually fail.
2020-05-13 11:42:59 +02:00
Dmitry Vyukov
a44eb8f7ea syz-manager: more consistently check disabled syscalls
We have program "validity" check duplicated 4 times
(initially it was just "does it deserialize?").
Then we added program length and disabled syscall.
But some of the sites have only a subset of checks.
Factor out program checking procedure into a separate function
and use it at all sites.
2020-05-12 15:26:07 +02:00
Dmitry Vyukov
9cea41ad33 sys/syz-sysgen: fix up linux/arm/kvm hack
We have some private files that need to be excluded as well... oh, hacks.
2020-05-12 11:58:00 +02:00
Michael Tuexen
64d61b4117 vm/vmimpl: Don't show ktr, but uma on FreeBSD
Right now, kernels are not build with KTR support, so don't
run show ktr. Add showing information about zones like vmstat -z
would show.
2020-05-12 11:25:51 +02:00
Dmitry Vyukov
160c769827 pkg/mgrconfig: fix errors reported by linter
pkg/mgrconfig/load.go:78:1: cyclomatic complexity 26 of func `Complete` is high (> 24)
sys/targets/targets.go:217: File is not `gofmt`-ed with `-s`
2020-05-12 09:15:58 +02:00
Michael Tuexen
a497a5b4b9 sys/targets: don't remove CrossCFlags 2020-05-12 08:46:41 +02:00
Michael Tuexen
1670262071 sys/targets: use clang on FreeBSD 2020-05-12 08:46:41 +02:00
Ayushi Sharma
44aa83104c
sys/netbsd: add access(2) 2020-05-11 23:18:48 -07:00
Dmitry Vyukov
9eb09c4009 pkg/mgrconfig: convert all paths to absolute
Qemu can use ssh key after chdir to workdir.
Consistently apply Abs to all paths.
2020-05-11 17:03:56 +02:00
Dmitry Vyukov
b026d481be pkg/report: skip "rwsem" frames in task hung reports 2020-05-11 16:54:55 +02:00
Dmitry Vyukov
f4bf31dc3c sys/syz-extract: use -nostdinc on linux
This makes the build completely hermetic.
2020-05-11 16:54:44 +02:00
Dmitry Vyukov
b17a8c4474 sys/linux: extract consts on next-20200511 2020-05-11 16:54:44 +02:00
Dmitry Vyukov
7711af6356 sys/syz-extract: don't warn about unsupported consts for 1 arch
Only warn about unsupported consts when generating consts for all arches.
2020-05-11 16:54:44 +02:00
Dmitry Vyukov
d44f7473de sys/syz-extract: add another compiler message about missing const
New message from clang.
2020-05-11 16:54:44 +02:00
Ayushi Sharma
3b3a2b78da
sys/netbsd: add __getcwd(2) (#1725) 2020-05-11 00:03:33 -07:00
Andrey Konovalov
f8f57555cd docs/contributing.md: updates 2020-05-11 08:29:31 +02:00
Dmitry Vyukov
8742a2b9db sys/syz-extract: run mrproper for all linux arches
We only run for the current arch, but it's not enough
to clean a build for another arch.
Run mrproper for all non-clean arches.
2020-05-09 16:08:22 +02:00
Dmitry Vyukov
88cb3e92ba dashboard/app: add notion of per-repo build maintainers
For context see:
https://groups.google.com/d/msg/syzkaller/9HxkC_hRP4M/MzFl4laADgAJ

Now if, say, linux-next, is build/boot-broken we can CC maintainers of the tree.

Fixes #1667
2020-05-09 15:40:30 +02:00
Dmitry Vyukov
65a44e22ba pkg/build: find maintainers for build errors
Extract build error source file and obtain maintainers
so that we can mail the report to the right people.

Update #1667
2020-05-09 09:57:51 +02:00
Dmitry Vyukov
e8d62d0c21 pkg/build: parallelize a test
Significanlty reduces execution time as it
runs lots of subprocesses.
2020-05-09 08:42:01 +02:00
Dmitry Vyukov
e97b06d3ce dashboard/app: show patch testing requests on bug page
Fixes #1547
2020-05-08 15:48:07 +02:00
Dmitry Vyukov
a788005625 dashboard/app: collect BB coverage stats from managers
Fixes #1698
2020-05-08 14:09:35 +02:00
Dmitry Vyukov
f40567d255 all: reformat code 2020-05-08 14:02:16 +02:00
Dmitry Vyukov
2b98fdbcbc dashboard/app: fix send of replies for patch testing
We used to send replies even if bug has fixing commits.
Was broken in f8368f999a
and we did not have a test. Add a test and restore old
behavior.
2020-05-08 12:29:00 +02:00
Andrey Konovalov
fe4122c3bf docs: various updates all over 2020-05-08 11:26:51 +02:00