Add Makefile

This commit is contained in:
Andrey Konovalov 2015-10-12 17:15:57 +02:00
parent 69de147243
commit 87a42c4dc3
5 changed files with 49 additions and 23 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.swp
*~
bin/

View File

@ -5,4 +5,5 @@
Google Inc.
Dmitry Vyukov
Andrey Konovalov

28
Makefile Normal file
View File

@ -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/

View File

@ -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.

View File

@ -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