aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
...
* Makefile: don't reset jobserverDmitry Vyukov2020-06-191-1/+3
| | | | | Re-exporting -j resets make jobserver. Don't do that. Only export -j in top level make invocation.
* Makefile: cosmetic fixesDmitry Vyukov2020-06-191-5/+4
| | | | | | | | | | | | | | | 1. Use --no-print-directory. These "Entering directory"/"Leaving directory" messages are completely useless. 2. Use go build instead of go install. This is just to test build and we don't install anything otherwise. Don't mess with GOAPTH/bin unnecessarily. 3. Don't export MAKEFLAGS. It is exported by default. 4. Suppress descriptions up-to-date check output. It's cryptic and is not particularly useful.
* tools/syz-crush: Add feature to run C-programJukka Kaartinen2020-06-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usage: syz-crush -config=config.json creprog.c Produced output is same as syz-manager produces. New directory called reproduced_with is added that lists all the reproducers that triggered the crash. Example: ~/workdir/crashes $ tree . ├── 2a8fff76c6267ecfeaf3530a602ed48afbc4a151 │   ├── description │   ├── log0 │   ├── log1 │   ├── log2 │   ├── report0 │   ├── report1 │   ├── report2 │   └── reproduced_with │   └── 17a6ed226769660f3e5dad7b22b13466b938e290.c ├── 2b6b921457afe8cebd0a96ca40f8569e6ee95174 │   ├── description │   ├── log0 │   ├── log1 │   ├── log2 │   ├── log3 │   ├── log4 │   ├── log5 │   ├── report0 │   ├── report1 │   ├── report2 │   ├── report3 │   ├── report4 │   ├── report5 │   └── reproduced_with │   ├── 9fb2f5b37bf4428382334e336bbbb201634c7c4c.c │   └── ab27002b46d19cafb1ebb8b040f0a3b0f8f88974.c Signed-off-by: Jukka Kaartinen <jukka.kaartinen@unikie.com>
* all: use more respective languageDmitry Vyukov2020-06-111-2/+5
| | | | | | | | Some terms are normalised on the technical level but may be oppressive on a societal level. Replace them with more technically neutral terms. See the following doc for a longer version: https://tools.ietf.org/id/draft-knodel-terminology-00.html
* tools: add syz-big-envDmitry Vyukov2020-06-021-5/+20
| | | | | | | | On top of syz-env it provides akaros/fuchsia/netbsd toolchains and gcloud sdk. With this it's possible to run dashboard/app tests on CI and locally and test executor build and pkg/{csource,cover} for these OSes. Update #1765
* .github/workflows: add CI workflowDmitry Vyukov2020-05-181-29/+26
| | | | | | | Switch from Travis to Github Actions for testing. This is faster and is better integrated with github. Update #1699
* tools: add syz-envDmitry Vyukov2020-05-181-2/+2
| | | | | | | | | | | 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
* Makefile: fix generate targetDmitry Vyukov2020-05-181-1/+2
| | | | | descriptions target needs to be executed before generate_go, because the latter builds Go code which won't build without descriptions.
* tools/syz-make: rename from syz-envDmitry Vyukov2020-05-181-2/+2
| | | | | | 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.
* Makefile: print errors in standard formatDmitry Vyukov2020-05-181-2/+2
| | | | | | Use the standard "file:line:col: error message" format. Update #1699
* targets: syz-extract: add Clang support for Linux buildsAlexander Potapenko2020-05-151-0/+1
| | | | | | | | | | | | 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>
* Makefile: add target for syz-symbolizeDmitry Vyukov2020-05-131-2/+6
|
* Makefile: fix check_linksDmitry Vyukov2020-05-131-3/+4
| | | | | 1. Disable pager. 2. Actually fail.
* all: replace TRAVIS env var with CIDmitry Vyukov2020-05-071-3/+3
| | | | | | | | In preparation to running some tests as github actions. Both Travis and Github define CI env var, while TRAVIS is, well, too Travis-specific. Update #1699
* Makefile: print what files are not formattedDmitry Vyukov2020-05-061-1/+5
| | | | | | | | | Move this part from .travis.yml to Makefile. It's useful to see it always and we generally don't have lots of logic in the travis file. Also move list of changed files to the bottom (that's what one generally sees at console and at the end of the log).
* tools/codecov.yml: addDmitry Vyukov2020-05-021-1/+1
| | | | Add configuratio file for codecov.io
* Makefile: reduce presubmit sizeDmitry Vyukov2020-05-011-1/+14
| | | | | | | Run fewer builds in presubmit. Also run them sequentially instead of parallel. The current presubmit OOMs on CI every other time, this is not useful. Update #1699
* Makefile: fix use of PWDDmitry Vyukov2020-05-011-1/+1
| | | | | | PWD in Makefile points to the dir from where make is invoked, not the Makefile dir. Moreover, PWD may be overriden in shell. Use "realpath ." instead.
* Makefile: generate descriptions on-the-flyDmitry Vyukov2020-04-301-30/+36
| | | | | | | | | | | | | | | | | | Checking in the generated descriptions files makes few things simpler, but causes pain for pull requests: (1) PRs that touch descriptions _always_ conflict, (2) PRs are large and harder to review, (3) people sometimes forget to add auto-generated files. The proposed way does not require us to hardcode lots of dependencies in the Makefile (which is nice) and seem to work. Let's see how it works. The main contributor-visible consequence is that the auto-generated files do not need to be checked-in now. Credit for figuring the Makefile magic goes to @melver. Fixes #1291
* sys/targets: better detection for missing/broken cross-compilersDmitry Vyukov2020-04-291-3/+9
| | | | | | | | | | | | | | 1. Detect when compiler is present, but is not functioning (can't build a simple program, common for Linux distros). 2. Be more strict with skipping tests due to missing/broken compilers on CI (on CI they should work, so fail loudly if not). 3. Dedup this logic across syz-env and pkg/csource tests. 4. Add better error reporting for syz-env. Fixes #1606
* Makefile: pin golangci-lint versionGreg Steuck2020-04-261-1/+7
| | | | Used the recipe from https://github.com/golangci/golangci-lint
* Makefile: don't do go installDmitry Vyukov2020-04-181-10/+2
| | | | | | | We did it for caching purposes, but now (1) go command caches everything anyway, (2) we use custom tags and flags, so result of go install is not reused anyway.
* executor: minor cleanup of android sandboxDmitry Vyukov2020-03-111-0/+1
| | | | Fix code formatting, clang-tidy warnings, minor style nits.
* prog: dump orig prog if Deserialize panicsDmitry Vyukov2020-02-211-1/+1
| | | | | | | | | | We are seeing some one-off panics during Deserialization and it's unclear if it's machine memory corrpution or an actual bug in prog. I leam towards machine memory corruption but it's impossible to prove without seeing the orig program. Move git revision to prog and it's more base package (sys can import prog, prog can't import sys).
* tools: add script that checks copyright headersDmitry Vyukov2020-02-181-3/+8
| | | | Fixes #1604
* tools/syz-check: inject description compilation warningsDmitry Vyukov2019-12-201-1/+2
| | | | | | | | Currently we print them as part of `make genereate`, but nobody reads them, too much output each time. Don't print them in `make generate` and instead print in syz-check, the warn files are a good mechanism to handle "known warnings".
* Implement basic support for MIPS64LEJouni Hogander2019-12-171-3/+7
| | | | | | | | | Add basic stuff to enable MIPS64ELR2 target: - build - make extract - make generate - qemu execution - system call parsing from /proc/kallsyms
* tools: add fops_probe utilityDmitry Vyukov2019-12-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | fops_probe utility helps to understand what file_operations callbacks are attached to a particular file. Requries KCOV and KALLSYMS. Build with: g++ tools/fops_probe/fops_probe.cc -Wall -static -o fops_probe Then copy the binary to target machine and run as: ./fops_probe /dev/fb0 You should see output similar to: ffffffff81bcccb9 vfs_read ................ ffffffff83af85c3 fb_read ffffffff83b52af5 cirrusfb_sync ffffffff81bcd219 vfs_write ................ ffffffff83af7fe2 fb_write ffffffff83b52af5 cirrusfb_sync ffffffff81c1b745 do_vfs_ioctl ffffffff83af7ea9 fb_ioctl ffffffff81a4ea44 do_mmap ................ ffffffff83af716c fb_mmap which allows to understand what callbacks are associated with /dev/fb0.
* tools/fuchsia: remove custom Go toolchain scriptsMatthew Dempsky2019-11-191-6/+0
| | | | | | | These used to be required to build Fuchsia's Go toolchain to build syz-fuzzer to run on Fuchsia. However, Fuchsia now uses HostFuzzer mode, so only syz-executor (written in C) needs to run on Fuchsia; all Go code runs on the Host OS (currently Linux).
* Makefile: support overriding CGO_ENABLEDDmitry Vyukov2019-10-111-1/+2
| | | | | | | We generally want CGO_ENABLED=0, but cgo is required for odroid. This change makes the following work: make manager CGO_ENABLED=1 GOTAGS=odroid
* tools: add syz-expandAndrey Konovalov2019-09-231-0/+3
| | | | | | | The syz-expand tools allows to parse a program and print it including all the default values. This is mainly useful for debugging, like doing manual program modifications while trying to come up with a reproducer for some particular kernel behavior.
* all: convert Fuchsia to use "host fuzzing" modeMatthew Dempsky2019-08-271-6/+5
| | | | | | | | | Go support is not a priority for Fuchsia at the moment, so it's preferable to use host fuzzing mode for Fuchsia like currently done for Akaros. This commit basically looks for all the places where there was special logic for OS=="akaros" and extends the same logic for OS=="fuchsia".
* travis: add fuzzit.dev supportDmitry Vyukov2019-07-301-2/+3
| | | | | Based on https://github.com/fuzzitdev/example-go Let's see if it works...
* Makefile: build fuchsia go binaries using the sdkMarco Vanotti2019-07-231-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes a dependency on fuchsia's tools/devshell/contrib/go, which was removed recently[0]. Now to build go binaries for fuchsia we are not relying on the fuchsia.git repo at all. The code just needs a copy of the fuchsia //third_party/go repository, the fuchsia sdk and a copy of clang. Users should download the sdk and clang beforehand (see documentation for links), and then run (with the correct environment variables): ``` $ make TARGETOS=fuchsia TARGETARCH=amd64 \ SOURCEDIR=$HOME/fuchsia \ FX_SDK_PATH=${HOME}/sdk/fuchsia-sdk \ CLANG_PATH=${HOME}/sdk/clang \ fuchsia_go ``` After that, they will be able to build the syzkaller go binaries by doing: ``` $ make TARGETOS=fuchsia TARGETARCH=amd64 \ SOURCEDIR=$HOME/fuchsia \ FX_SDK_PATH=${HOME}/sdk/fuchsia-sdk \ CLANG_PATH=${HOME}/sdk/clang ``` This commits adds two scripts to tools/fuchsia, one for building go in fuchsia (just calls the ./make.all script in fuchsia's go repo), and one that replaces the devshell/contrib/go script. Given that go is unsupported in fuchsia, this change might break at any point. [0]: https://fuchsia-review.googlesource.com/c/fuchsia/+/291631
* travis: use cacheDenis Efremov2019-06-251-1/+1
| | | | | | | | | | | | | | | * travis: cache clang-format installation * travis: indent * travis: use user paths for caching * travis: cache go build results * travis: use system clang-format * travis: remove custom libstdc++ installation Fixes #1252
* sys/freebsd: Add support for fuzzing FreeBSD/i386Andrew Turner2019-05-291-2/+7
| | | | Add support to fuzz 32 bit FreeBSD system calls.
* Makefile: switch to golangci-lintDmitry Vyukov2019-05-151-21/+5
| | | | | | | Finally! Fixes #977 Fixes #1108
* Makefile: enable 386 executor build in presubmitDmitry Vyukov2019-05-071-5/+1
| | | | This hacky way to install 386 packages seems to unbreak executor build.
* Makefile: enable arm executor build in presubmitDmitry Vyukov2019-05-071-3/+1
| | | | arm build seems to work now on Travis since we switched to xenial.
* .golangci.yml: updateDmitry Vyukov2019-04-231-0/+6
| | | | | | | | Enable more linters. Tune settings for existings. Fix excludes. Update #977
* Makefile: install gnueabi arm compilerDmitry Vyukov2019-04-121-2/+2
| | | | | | The arm compiler was changed in e5d1b3ac44472b1e7741da6bbcc0e655b931025e from gnueabihf to gnueabi. Install the corresponding packages. @Codysseus
* all: add basic USB fuzzing supportAndrey Konovalov2019-04-111-0/+3
| | | | | | | | | | | | This commits implements 4 syzcalls: syz_usb_connect, syz_usb_io_control, syz_usb_ep_write and syz_usb_disconnect. Those syzcalls are used to emit USB packets through a custom GadgetFS-like interface (currently exposed at /sys/kernel/debug/usb-fuzzer), which requires special kernel patches. USB fuzzing support is quite basic, as it mostly covers only the USB device enumeration process. Even though the syz_usb_ep_write syzcall does allow to communicate with USB endpoints after the device has been enumerated, no coverage is collected from that code yet.
* Makefile: change go binary path for fuchsia. (#1102)Marco Vanotti2019-04-031-1/+1
| | | | | | | | | | | Recently[0][1], fuchsia moved some of the tools out of `//scripts`, into the `//tools` directory. The go script was moved into `//tools/devshell/contrib/go`. This commit modifies the Makefile so that it references to the new go binary. [0]: https://fuchsia-review.googlesource.com/c/fuchsia/+/267708/ [1]: https://fuchsia-review.googlesource.com/c/fuchsia/+/267908/
* dashboard/app: properly handle build failuresDmitry Vyukov2019-03-251-1/+3
| | | | | | | | | Separate kernel and syzkaller build failures. Fix logic to understand when a build is fixed: look if kernel/syzkaller commit changes to understand if it's a new good build or re-upload of an old build. Fixes #1014
* Makefile: fix tidy ruleDmitry Vyukov2019-03-211-1/+3
| | | | Building executor now requires GOOS/GOARCH macros.
* all: switch to Go 1.12Dmitry Vyukov2019-03-141-3/+2
| | | | | | | | Differences in code formatting between Go versions cause constant problems for us (https://github.com/golang/go/issues/25161). Currently we support 1.9 and 1.10. Switch to newer 1.11 and 1.12. Fixes #1013
* pkg/runtest: make tests pass on freebsdDmitry Vyukov2019-03-071-1/+2
| | | | | | The problem is stupid: <endian.h> should be included as <sys/endian.h> on freebsd. Pass actual host OS to executor build as HOSTGOOS and use it to figure out how we should include this header.
* Makefile: don't cross-compile executor if cross-compiler is missingDmitry Vyukov2019-01-241-5/+11
| | | | | | | | We started building netbsd executor on linux. This fails on CI since cross-compiler is missing. But we don't want to exclude netbsd from presubmit entirely. So check if cross-compiler is missing and just produce a warning. This should unbreak CI and humans will see the warning.
* Makefile: enable -Wunused-const-variableDmitry Vyukov2019-01-191-2/+1
| | | | | | | See discussion in PR #942. Extend support for optional flags in sys/targets as this flag is not supported by gcc 5. Make flags consistent across Makefile and pkg/csource.
* Makefile: fix double $(GO) $(GO)Dmitry Vyukov2019-01-141-2/+2
|