Skip to content

Commit 6233055

Browse files
committed
pkg/mgrconfig: add a sample syzkaller config
Add a sample syzkaller config with comments so that we could refer to it in the tutorials.
1 parent 9209bc2 commit 6233055

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
The operation of the syzkaller `syz-manager` process is governed by a
44
configuration file, passed at invocation time with the `-config` option.
5-
This configuration can be based on the [example](/pkg/mgrconfig/testdata/qemu.cfg);
5+
This configuration can be based on the [example](/pkg/mgrconfig/testdata/qemu-example.cfg);
66
the file is in JSON format and contains the the [following parameters](/pkg/mgrconfig/config.go).

docs/reproducing_crashes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ https://groups.google.com/d/msg/syzkaller/fHZ42YrQM-Y/Z4Xf-BbUDgAJ.
241241

242242
This process is automated to some degree in the `syz-repro` utility. You need to
243243
give it your manager config and a crash report file. And you can refer to the
244-
[example config file](/pkg/mgrconfig/testdata/qemu.cfg).
244+
[example config file](/pkg/mgrconfig/testdata/qemu-example.cfg).
245245
```
246246
./syz-repro -config my.cfg crash-qemu-1-1455745459265726910
247247
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"target": "linux/amd64",
3+
"http": "0.0.0.0:56741",
4+
# !! Replace /syzkaller with the path to the syzkaller checkout.
5+
# Workdir can be in whatever folder, keeping it in the checkout is just most convenient.
6+
"workdir": "./testdata/syzkaller/workdir",
7+
# !! Replace /linux with the path to the kernel checkout.
8+
# !! The kernel must be already built.
9+
# Here are the kernel config options that facilitate fuzzing: https://github.com/google/syzkaller/blob/master/docs/linux/kernel_configs.md
10+
"kernel_obj": "/linux",
11+
# !! Replace with the path to the disk image file.
12+
# The Buildroot image used by syzbot can be downloaded here: https://storage.googleapis.com/syzkaller/images/buildroot_amd64_2024.09.gz
13+
# (Don't forget to uncompress it!).
14+
"image": "./testdata/wheezy.img",
15+
# !! Replace with the path to the syzkaller checkout.
16+
"syzkaller": "./testdata/syzkaller",
17+
"procs": 4,
18+
"type": "qemu",
19+
"vm": {
20+
"count": 4,
21+
# !! Adjust this path accordingly.
22+
"kernel": "/linux/arch/x86/boot/bzImage",
23+
# Note that syzkaller will use `count` * `cpu` CPUs and `count` * `mem` RAM.
24+
"cpu": 2,
25+
"mem": 2048
26+
}
27+
}

0 commit comments

Comments
 (0)