mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 03:19:51 +00:00
Add Makefile
This commit is contained in:
parent
69de147243
commit
87a42c4dc3
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
*.swp
|
||||
*~
|
||||
|
||||
bin/
|
@ -5,4 +5,5 @@
|
||||
|
||||
Google Inc.
|
||||
Dmitry Vyukov
|
||||
|
||||
Andrey Konovalov
|
||||
|
||||
|
28
Makefile
Normal file
28
Makefile
Normal 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/
|
28
README.md
28
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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user