diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2025-03-18 03:09:04 +0100 |
|---|---|---|
| committer | Aleksandr Nogikh <nogikh@google.com> | 2025-03-20 04:18:16 +0000 |
| commit | 623305521a130ee29d32df86af67c671c60f61af (patch) | |
| tree | 6afc4548136d4bda57a3039720406d91d5efcb6a | |
| parent | 9209bc22d7f180ccb6aa6e8d45aec4980dceffc7 (diff) | |
pkg/mgrconfig: add a sample syzkaller config
Add a sample syzkaller config with comments so that we could refer to it
in the tutorials.
| -rw-r--r-- | docs/configuration.md | 2 | ||||
| -rw-r--r-- | docs/reproducing_crashes.md | 2 | ||||
| -rw-r--r-- | pkg/mgrconfig/testdata/qemu-example.cfg | 27 |
3 files changed, 29 insertions, 2 deletions
diff --git a/docs/configuration.md b/docs/configuration.md index 7e4dbc302..f2343386c 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -2,5 +2,5 @@ The operation of the syzkaller `syz-manager` process is governed by a configuration file, passed at invocation time with the `-config` option. -This configuration can be based on the [example](/pkg/mgrconfig/testdata/qemu.cfg); +This configuration can be based on the [example](/pkg/mgrconfig/testdata/qemu-example.cfg); the file is in JSON format and contains the the [following parameters](/pkg/mgrconfig/config.go). diff --git a/docs/reproducing_crashes.md b/docs/reproducing_crashes.md index 41156069e..e0fb15ac6 100644 --- a/docs/reproducing_crashes.md +++ b/docs/reproducing_crashes.md @@ -241,7 +241,7 @@ https://groups.google.com/d/msg/syzkaller/fHZ42YrQM-Y/Z4Xf-BbUDgAJ. This process is automated to some degree in the `syz-repro` utility. You need to give it your manager config and a crash report file. And you can refer to the -[example config file](/pkg/mgrconfig/testdata/qemu.cfg). +[example config file](/pkg/mgrconfig/testdata/qemu-example.cfg). ``` ./syz-repro -config my.cfg crash-qemu-1-1455745459265726910 ``` diff --git a/pkg/mgrconfig/testdata/qemu-example.cfg b/pkg/mgrconfig/testdata/qemu-example.cfg new file mode 100644 index 000000000..44d3a322d --- /dev/null +++ b/pkg/mgrconfig/testdata/qemu-example.cfg @@ -0,0 +1,27 @@ +{ + "target": "linux/amd64", + "http": "0.0.0.0:56741", + # !! Replace /syzkaller with the path to the syzkaller checkout. + # Workdir can be in whatever folder, keeping it in the checkout is just most convenient. + "workdir": "./testdata/syzkaller/workdir", + # !! Replace /linux with the path to the kernel checkout. + # !! The kernel must be already built. + # Here are the kernel config options that facilitate fuzzing: https://github.com/google/syzkaller/blob/master/docs/linux/kernel_configs.md + "kernel_obj": "/linux", + # !! Replace with the path to the disk image file. + # The Buildroot image used by syzbot can be downloaded here: https://storage.googleapis.com/syzkaller/images/buildroot_amd64_2024.09.gz + # (Don't forget to uncompress it!). + "image": "./testdata/wheezy.img", + # !! Replace with the path to the syzkaller checkout. + "syzkaller": "./testdata/syzkaller", + "procs": 4, + "type": "qemu", + "vm": { + "count": 4, + # !! Adjust this path accordingly. + "kernel": "/linux/arch/x86/boot/bzImage", + # Note that syzkaller will use `count` * `cpu` CPUs and `count` * `mem` RAM. + "cpu": 2, + "mem": 2048 + } +} |
