If you want to contribute to the project, feel free to send a pull request.
Before sending a pull request you need to sign Google CLA (if you don't a bot will ask you to do that) and add yourself to AUTHORS/CONTRIBUTORS files (in case this is your first pull request to syzkaller).
Some guildelines to follow:
dir/path: one-line description <empty line> Extended multi-line description that includes the problem you are solving and how it is solved.
dir/path
is a relative path to the main dir this commit changes (look at examples in the commit history).
Please pay attention to punctuation. In particular:
one-line description
does not start with a Capital letter.one-line description
.Extended multi-line description
is full English sentenses with Capital letters and dots.Also:
Fixes #NNN
line into commit message (where NNN
is issue number). This will auto-close the issue. If you need to mention an issue without closing it, add Update #NNN
.make presubmit
and ensure that it passes before sending a PR. It may require some additional packages to be installed (try sudo make install_prerequisites
).*.const
, *.go
, *.h
) are checked-in with the *.txt
changes in the same commit. Namely, make generate
must not produce any diff in the tree.Extending/improving system call descriptions is always a good idea.
Unassigned issues from the bug tracker are worth doing, but some of them might be complicated.
If you want to work on something non-trivial, please briefly describe it on the syzkaller@googlegroups.com mailing list first, so that there is agreement on high level approach and no duplication of work between contributors.
syzkaller
is written in Go, and a Go 1.11
or Go 1.12
toolchain is required for build. The toolchain can be installed with:
go get golang.org/dl/go1.12 go1.12 download # Default download path is here. ~/sdk/go1.12/bin/go version export GOROOT=$HOME/sdk/go1.12 export PATH=$HOME/sdk/go1.12/bin:$PATH
Then get and build syzkaller
:
go get -u -d github.com/google/syzkaller/... cd $HOME?/go/src/github.com/google/syzkaller/ make
Note: older versions of Go toolchain formatted code in a slightly different way. So if you are seeing unrelated code formatting diffs after running make generate
or make format
, you may be using Go 1.10 or older. In such case update to Go 1.11+.
Fork
button in the top-right corner of the page. This will create https://github.com/YOUR_GITHUB_USERNAME/syzkaller
repository.go
command the checkout must be under $GOPATH
. The simplest way to do it is to run go get github.com/google/syzkaller
, this will checkout the repository in $GOPATH/src/github.com/google/syzkaller
.cd $GOPATH/src/github.com/google/syzkaller git remote add my-origin https://github.com/YOUR_GITHUB_USERNAME/syzkaller.git git fetch my-origin git checkout -b my-branch my-origin/master
This adds git origin my-origin
with your repository and checks out new branch my-branch
based on master
branch.
git add
for all changed files, e.g. git add sys/linux/sys.txt
. You can run git status
to see what files were changed/created. When all files are added (git status
shows no files in Changes not staged for commit
section and no relevant files in Untracked files
section), run git commit
and enter commit description in your editor.make install_prerequisites
followed by make presubmit
).git push my-origin my-branch
.Compare & pull request
button, press it. Then press Create pull request
. Now your pull request should show up on pull requests page.Create pull request
button for any reason, you can create pull request manually. For that nagivate to pull requests page, press New pull request
, then compare across forks
and choose google/syzkaller
/master
as base and YOUR_GITHUB_USERNAME/syzkaller
/my-branch
as compare and press Create pull request
.my-branch
(e.g. to rebase them onto updated master) after you created a pull-request, you will need to do a force push: git push -f my-origin my-branch
.