diff options
| -rw-r--r-- | docs/configuration.md | 2 | ||||
| -rw-r--r-- | docs/fuchsia.md | 2 | ||||
| -rw-r--r-- | docs/gvisor.md | 1 | ||||
| -rw-r--r-- | docs/linux/setup_linux-host_isolated.md | 4 | ||||
| -rw-r--r-- | docs/linux/setup_linux-host_qemu-vm_arm-kernel.md | 2 | ||||
| -rw-r--r-- | docs/linux/setup_linux-host_qemu-vm_arm64-kernel.md | 2 | ||||
| -rw-r--r-- | docs/linux/setup_ubuntu-host_android-device_arm32-kernel.md | 4 | ||||
| -rw-r--r-- | docs/linux/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md | 4 | ||||
| -rw-r--r-- | docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md | 2 | ||||
| -rw-r--r-- | docs/linux/troubleshooting.md | 6 | ||||
| -rw-r--r-- | syz-manager/mgrconfig/mgrconfig.go | 4 |
11 files changed, 18 insertions, 15 deletions
diff --git a/docs/configuration.md b/docs/configuration.md index c53074444..522b1f85d 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -15,7 +15,7 @@ following keys in its top-level object: - `syzkaller`: Location of the `syzkaller` checkout, `syz-manager` will look for binaries in `bin` subdir (does not have to be `syzkaller` checkout as long as it preserves `bin` dir structure) - - `vmlinux`: Location of the `vmlinux` file that corresponds to the kernel being tested + - `kernel_obj`: Directory with object files (e.g. `vmlinux` for linux) (used for report symbolization and coverage reports, optional). - `procs`: Number of parallel test processes in each VM (4 or 8 would be a reasonable number). - `image`: Location of the disk image file for the QEMU instance; a copy of this file is passed as the diff --git a/docs/fuchsia.md b/docs/fuchsia.md index 19c3ad269..69f106070 100644 --- a/docs/fuchsia.md +++ b/docs/fuchsia.md @@ -27,7 +27,7 @@ Run `syz-manager` with a config along the lines of: "target": "fuchsia/amd64", "http": ":12345", "workdir": "/workdir.fuchsia", - "vmlinux": "/fuchsia/out/build-zircon/build-x64/zircon.elf", + "kernel_obj": "/fuchsia/out/build-zircon/build-x64", "syzkaller": "/syzkaller", "image": "/fuchsia/out/x64/images/fvm.blk", "sshkey": "/fuchsia/out/x64/ssh-keys/id_ed25519", diff --git a/docs/gvisor.md b/docs/gvisor.md index be399b107..0bbdd7ae6 100644 --- a/docs/gvisor.md +++ b/docs/gvisor.md @@ -13,7 +13,6 @@ special regarding `gVisor` besides that. Here is an example manager config: "http": ":12345", "workdir": "/workdir", "image": "/usr/local/bin/runsc", - "vmlinux": "/usr/local/bin/runsc", "syzkaller": "/gopath/src/github.com/google/syzkaller", "cover": false, "procs": 8, diff --git a/docs/linux/setup_linux-host_isolated.md b/docs/linux/setup_linux-host_isolated.md index 1a2368336..0ee3beab5 100644 --- a/docs/linux/setup_linux-host_isolated.md +++ b/docs/linux/setup_linux-host_isolated.md @@ -83,7 +83,7 @@ Use the following config: "rpc": "127.0.0.1:0", "sshkey" : "/path/to/optional/sshkey", "workdir": "/syzkaller/workdir", - "vmlinux": "/linux-next/vmlinux", + "kernel_obj": "/linux-next", "syzkaller": "/go/src/github.com/google/syzkaller", "sandbox": "setuid", "type": "isolated", @@ -98,7 +98,7 @@ Use the following config: Don't forget to update: - `target` (target OS/arch) - `workdir` (path to the workdir) - - `vmlinux` (path to the `vmlinux` binary) + - `kernel_obj` (path to kernel build directory) - `sshkey` You can setup an sshkey (optional) - `vm.targets` List of hosts to use for fufzzing - `vm.target_dir` Working directory on the target host diff --git a/docs/linux/setup_linux-host_qemu-vm_arm-kernel.md b/docs/linux/setup_linux-host_qemu-vm_arm-kernel.md index 0bc3675c8..315c2240d 100644 --- a/docs/linux/setup_linux-host_qemu-vm_arm-kernel.md +++ b/docs/linux/setup_linux-host_qemu-vm_arm-kernel.md @@ -113,7 +113,7 @@ similar to the following one (changing paths as necessary): "target": "linux/arm", "http": ":12345", "workdir": "/workdir", - "vmlinux": "/linux/vmlinux", + "kernel_obj": "/linux", "syzkaller": "/gopath/src/github.com/google/syzkaller", "image": "/buildroot/output/images/rootfs.ext2", "sandbox": "none", diff --git a/docs/linux/setup_linux-host_qemu-vm_arm64-kernel.md b/docs/linux/setup_linux-host_qemu-vm_arm64-kernel.md index ae7dd8dcc..0199e8d97 100644 --- a/docs/linux/setup_linux-host_qemu-vm_arm64-kernel.md +++ b/docs/linux/setup_linux-host_qemu-vm_arm64-kernel.md @@ -132,7 +132,7 @@ A sample config file that exercises the required options are shown below. Modify "target": "linux/arm64", "http": ":56700", "workdir": "/path/to/a/dir/to/store/syzkaller/corpus”, - "vmlinux": “/path/to/vmlinux", + "kernel_obj": “/path/to/linux/build/dir", "syzkaller": "/path/to/syzkaller/arm64/", "image": "/path/to/rootfs.ext3", "sshkey": "/path/to/ida_rsa", diff --git a/docs/linux/setup_ubuntu-host_android-device_arm32-kernel.md b/docs/linux/setup_ubuntu-host_android-device_arm32-kernel.md index 8ff301c26..8f1618e68 100644 --- a/docs/linux/setup_ubuntu-host_android-device_arm32-kernel.md +++ b/docs/linux/setup_ubuntu-host_android-device_arm32-kernel.md @@ -48,13 +48,13 @@ make TARGETOS=linux TARGETARCH=arm ### Create a manager configuration file Create a manager config myboard.cfg, replacing the environment -variables `$GOPATH`, `$VMLINUX` (path to vmlinux for the ARM32 board), and `$DEVICES` (the device ID for your board as reported by adb devices) with their actual values. Change any other flags as needed for your ARM board. +variables `$GOPATH`, `$KERNEL` (path to kernel build dir for the ARM32 board), and `$DEVICES` (the device ID for your board as reported by adb devices) with their actual values. Change any other flags as needed for your ARM board. ``` { "target": "linux/arm", "http": "127.0.0.1:56741", "workdir": "$GOPATH/src/github.com/google/syzkaller/workdir", - "vmlinux": "$KERNEL/vmlinux", + "kernel_obj": "$KERNEL", "syzkaller": "$GOPATH/src/github.com/google/syzkaller", "sandbox": none, "procs": 1, diff --git a/docs/linux/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md b/docs/linux/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md index efb07a771..86d35cfd9 100644 --- a/docs/linux/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md +++ b/docs/linux/setup_ubuntu-host_odroid-c2-board_arm64-kernel.md @@ -289,7 +289,7 @@ Use the following config: "target": "linux/arm64", "http": "127.0.0.1:56741", "workdir": "/syzkaller/workdir", - "vmlinux": "/linux-next/vmlinux", + "kernel_obj": "/linux-next", "syzkaller": "/go/src/github.com/google/syzkaller", "sshkey": "/odroid/ssh/id_rsa", "rpc": "172.16.0.30:0", @@ -310,7 +310,7 @@ Use the following config: Don't forget to update: - `workdir` (path to the workdir) - - `vmlinux` (path to the `vmlinux` binary) + - `kernel_obj` (path to kernel build directory) - `sshkey` (path to the generated ssh private key) - `vm.console` (serial device you used in `minicom`) - `vm.hub_bus` (number of the bus to which USB hub is connected, view with `lsusb`) diff --git a/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md b/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md index 067d2776b..f19872383 100644 --- a/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md +++ b/docs/linux/setup_ubuntu-host_qemu-vm_x86-64-kernel.md @@ -216,7 +216,7 @@ variables `$GOPATH`, `$KERNEL` and `$IMAGE` with their actual values. "target": "linux/amd64", "http": "127.0.0.1:56741", "workdir": "$GOPATH/src/github.com/google/syzkaller/workdir", - "vmlinux": "$KERNEL/vmlinux", + "kernel_obj": "$KERNEL", "image": "$IMAGE/wheezy.img", "sshkey": "$IMAGE/ssh/id_rsa", "syzkaller": "$GOPATH/src/github.com/google/syzkaller", diff --git a/docs/linux/troubleshooting.md b/docs/linux/troubleshooting.md index 7f172304f..76f780fa4 100644 --- a/docs/linux/troubleshooting.md +++ b/docs/linux/troubleshooting.md @@ -7,7 +7,7 @@ Here are some things to check if there are problems running syzkaller. and `KERNEL` is set to the test kernel (as per the `kernel` config value) then something like the following command should start the VM successfully: - ```shell + ```shell qemu-system-x86_64 -hda $IMAGE -m 256 -net nic -net user,host=10.0.2.10,hostfwd=tcp::23505-:22 -enable-kvm -kernel $KERNEL -append root=/dev/sda ``` @@ -15,7 +15,7 @@ Here are some things to check if there are problems running syzkaller. a VM running and with `SSHKEY` set to the SSH identity (as per the `sshkey` config value) the following command should connect: - ```shell + ```shell ssh -i $SSHKEY -p 23505 root@localhost ``` @@ -35,7 +35,7 @@ Here are some things to check if there are problems running syzkaller. - Check that debug information (from the `CONFIG_DEBUG_INFO` option) is available - Pass the hex output from the kcov test program to `addr2line -a -i -f -e $VMLINUX` (where - `VMLINUX` is the vmlinux file, as per the `vmlinux` config value), to confirm + `VMLINUX` is the vmlinux file, as per the `kernel_obj` config value), to confirm that symbols for the kernel are available. Also see [this](/docs/troubleshooting.md) for generic troubleshooting advice. diff --git a/syz-manager/mgrconfig/mgrconfig.go b/syz-manager/mgrconfig/mgrconfig.go index c70572465..d6e708e01 100644 --- a/syz-manager/mgrconfig/mgrconfig.go +++ b/syz-manager/mgrconfig/mgrconfig.go @@ -209,6 +209,10 @@ func Complete(cfg *Config) error { } } + if cfg.VmlinuxUnused != "" { + fmt.Printf("WARNING: vmlinux config parameter is deprecated and will be removed soon.\n" + + "Use kernel_obj to specify vmlinux dir instead.\n") + } cfg.VmlinuxUnused = osutil.Abs(cfg.VmlinuxUnused) if cfg.KernelObj == "" { cfg.KernelObj = filepath.Dir(cfg.VmlinuxUnused) // assume in-tree build by default |
