aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-19 11:00:40 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-19 16:44:54 +0200
commit62114d6064c895ae34f1ac232b2fdc94e7329dae (patch)
treee309d2fee71f6222cab66783b1498f325c78d5a3 /docs
parent5b89a8780ff6f7e69f82765164cb77da68bb8544 (diff)
Makefile: build target binaries into separate dirs
We currently build binaries for all targets into bin. This makes mess in bin/ and does not allow testing of different archs. Build target binaries into bin/OS_ARCH/ subdirs. Host binaries are still built into bin/. Update #333 Update #324 Update #191
Diffstat (limited to 'docs')
-rw-r--r--docs/setup_generic.md6
-rw-r--r--docs/setup_linux-host_android-device_arm64-kernel.md12
-rw-r--r--docs/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md14
-rw-r--r--docs/troubleshooting.md5
4 files changed, 8 insertions, 29 deletions
diff --git a/docs/setup_generic.md b/docs/setup_generic.md
index 39b77d761..1655c8a63 100644
--- a/docs/setup_generic.md
+++ b/docs/setup_generic.md
@@ -63,8 +63,8 @@ Unpack Go into a directory, say, `$HOME/go`.
Then, set `GOROOT=$HOME/go` env var.
Then, add Go binaries to `PATH`, `PATH=$HOME/go/bin:$PATH`.
Then, set `GOPATH` env var to some empty dir, say `GOPATH=$HOME/gopath`.
-Then, run `go get -u -d github.com/google/syzkaller/...` to checkout syzkaller sources with all dependencies.
+Then, run `go get -u -d github.com/google/syzkaller/...` to checkout syzkaller sources.
Then, `cd $GOPATH/src/github.com/google/syzkaller` and
build with `make`, which generates compiled binaries in the `bin/` folder.
-
-To build additional syzkaller tools run `make all-tools`.
+Note: if you want to do cross-OS/arch testing, you need to specify `TARGETOS`,
+`TARGETVMARCH` and `TARGETARCH` arguments to `make`. See the [Makefile](../Makefile) for details.
diff --git a/docs/setup_linux-host_android-device_arm64-kernel.md b/docs/setup_linux-host_android-device_arm64-kernel.md
index 9b8baa439..e7d6fa744 100644
--- a/docs/setup_linux-host_android-device_arm64-kernel.md
+++ b/docs/setup_linux-host_android-device_arm64-kernel.md
@@ -9,17 +9,7 @@ Prerequisites:
- Build syzkaller
```sh
-$ make android
-```
-
- - Check the output files are correct
-
-```sh
-$ file bin/*
-bin/syz-execprog: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
-bin/syz-executor: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped
-bin/syz-fuzzer: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
-bin/syz-manager: Mach-O 64-bit executable x86_64
+$ NDK=/path/to/android/ndk make TARGETOS=android TARGETARCH=arm64
```
- Create config with `"type": "adb"` and specify adb devices to use. For example:
diff --git a/docs/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md b/docs/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md
index 02e167212..9ab761475 100644
--- a/docs/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md
+++ b/docs/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md
@@ -278,19 +278,9 @@ Now make sure you can ssh with the key:
ssh -i ./ssh/id_rsa root@172.16.0.31
```
-Build syzkaller on you host machine as you do usually.
-
-Build `syz-manager` and `syz-repro` with `odroid` build tag:
-``` bash
-go build -tags odroid -o ./bin/syz-manager ./syz-manager
-go build -tags odroid -o ./bin/syz-repro ./tools/syz-repro
-```
-
-Cross compile `syz-fuzzer`, `syz-execprog` and `syz-executor` binaries for arm64:
+Build syzkaller with `odroid` build tag:
``` bash
-GOARCH=arm64 go build -o bin/syz-fuzzer ./syz-fuzzer
-GOARCH=arm64 go build -o bin/syz-execprog ./tools/syz-execprog
-$PREFIX/bin/aarch64-linux-gcc executor/executor.cc -O1 -g -Wall -static -o bin/syz-executor -lpthread
+make GOTAGS=odroid TARGETARCH=arm64
```
Use the following config:
diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md
index 4e78ceb80..ed6e66186 100644
--- a/docs/troubleshooting.md
+++ b/docs/troubleshooting.md
@@ -36,14 +36,13 @@ Here are some things to check if there are problems running syzkaller.
- If logging indicates problems with the executor program (e.g. `executor failure`),
try manually running a short sequence of system calls:
- - Build additional tools with `make all-tools`
- Copy `syz-executor` and `syz-execprog` into a running VM.
- In the VM run `./syz-execprog -executor ./syz-executor -debug sampleprog` where
sampleprog is a simple system call script (e.g. just containing `getpid()`).
- For example, if this reports that `clone` has failed, this probably indicates
that the test kernel does not include support for all of the required namespaces.
- In this case, running the `syz-execprog` test with the `-nobody=0` option fixes the problem,
- so the main configuration needs to be updated to set `dropprivs` to `false`.
+ In this case, running the `syz-execprog` test with the `-sandbox=setuid` option fixes the problem,
+ so the main configuration needs to be updated to set `sandbox` to `setuid`.
If none of the above helps, file a bug on [the bug tracker](https://github.com/google/syzkaller/issues)
or ask us directly on the syzkaller@googlegroups.com mailing list.