aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2015-10-12 17:15:57 +0200
committerAndrey Konovalov <andreyknvl@google.com>2015-10-13 15:31:56 +0200
commit87a42c4dc364d5cf94187b1ff7488b74709372bf (patch)
tree06e2f2c560953e726685d3f6188a5ff3ea815dea
parent69de147243c2575dc297db78f80875bf11dff746 (diff)
Add Makefile
-rw-r--r--.gitignore4
-rw-r--r--CONTRIBUTORS3
-rw-r--r--Makefile28
-rw-r--r--README.md28
-rw-r--r--executor/Makefile9
5 files changed, 49 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..32bc424a1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*.swp
+*~
+
+bin/
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 529799d5b..5563d4131 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -5,4 +5,5 @@
Google Inc.
Dmitry Vyukov
-
+ Andrey Konovalov
+
diff --git a/Makefile b/Makefile
new file mode 100644
index 000000000..54a33bd7f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+# Copyright 2015 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+.PHONY: all bin format clean master manager fuzzer executor
+
+all: master manager fuzzer executor
+
+bin:
+ mkdir -p bin
+
+master: bin
+ go build -o ./bin/master github.com/google/syzkaller/master
+
+manager: bin
+ go build -o ./bin/manager github.com/google/syzkaller/manager
+
+fuzzer: bin
+ go build -o ./bin/fuzzer github.com/google/syzkaller/fuzzer
+
+executor: bin
+ gcc executor/executor.cc -o ./bin/executor -lpthread -static -Wall -O1 -g
+
+format:
+ find . -name "*.go" | xargs -n 1 go fmt
+ clang-format --style=file -i executor/executor.cc
+
+clean:
+ rm -rf ./bin/
diff --git a/README.md b/README.md
index 833d92873..9230a1c3a 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
# syzkaller - linux syscall fuzzer
-```syzkaller``` is a distributed, unsupervised, coverage-guided Linux syscall fuzzer.
-It is meant to be used with [KASAN](https://www.kernel.org/doc/Documentation/kasan.txt) (```CONFIG_KASAN=y```),
-[KTSAN](https://github.com/google/ktsan) (```CONFIG_KTSAN=y```),
+`syzkaller` is a distributed, unsupervised, coverage-guided Linux syscall fuzzer.
+It is meant to be used with [KASAN](https://www.kernel.org/doc/Documentation/kasan.txt) (`CONFIG_KASAN=y`),
+[KTSAN](https://github.com/google/ktsan) (`CONFIG_KTSAN=y`),
or [KUBSAN] (http://developerblog.redhat.com/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan/) ([patch](https://lkml.org/lkml/2014/10/20/181)).
Project [mailing list](https://groups.google.com/forum/#!forum/syzkaller).
@@ -15,23 +15,25 @@ This is work-in-progress, some things may not work yet.
Coverage support is not upstreamed yet, so you need to apply [this patch](https://codereview.appspot.com/267910043)
to gcc (tested on revision 227353) and [this patch](https://github.com/dvyukov/linux/commit/5626fbd654b9f0ce037376bd95bfe8e9530e1313)
-to kernel. Then build kernel with ```CONFIG_KASAN``` or ```CONFIG_KTSAN``` and the new ```CONFIG_SANCOV```.
+to kernel. Then build kernel with `CONFIG_KASAN` or `CONFIG_KTSAN` and the new `CONFIG_SANCOV`.
-Then, build ```syzkaller/master```, ```syzkaller/manager```, ```syzkaller/fuzzer``` and ```syzkaller/executor```.
-The latter is build using ```make``` in the dir, the rest are build using ```go build```.
+Then, build syzkaller with `make`.
+The compiled binaries will be put in the `bin` folder.
-Then, write manager config based on ```manager/example.cfg```.
+Then, write manager config based on `manager/example.cfg`.
Then, start the master process as:
-
-```$ ./master -workdir=./workdir -addr=myhost.com:48342 -http=myhost.com:29855```
+```
+./master -workdir=./workdir -addr=myhost.com:48342 -http=myhost.com:29855
+```
and start the manager process as:
-
-```$ ./manager -config my.cfg```
+```
+./manager -config my.cfg
+```
The manager process will wind up qemu virtual machines and start fuzzing in them.
-If you open the HTTP address (in our case ```http://myhost.com:29855```),
+If you open the HTTP address (in our case `http://myhost.com:29855`),
you will see how corpus collection progresses.
## Process Structure
@@ -68,6 +70,6 @@ close(fd fd)
open_mode = S_IRUSR, S_IWUSR, S_IXUSR, S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH
```
-The description is contained in ```syzkaller/sys/sys.txt``` file.
+The description is contained in `syzkaller/sys/sys.txt` file.
This is not an official Google product.
diff --git a/executor/Makefile b/executor/Makefile
deleted file mode 100644
index a84d06880..000000000
--- a/executor/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-# Copyright 2015 syzkaller project authors. All rights reserved.
-# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
-
-executor: executor.cc syscalls.h
- gcc executor.cc -o executor -lpthread -static -Wall -O1 -g
-
-format: executor.cc
- clang-format --style=file -i executor.cc
-