From 26be8df8135ecb59e8034967927aa18c26117a3a Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Wed, 22 Feb 2023 16:09:15 +0100 Subject: all: tools/syz-env make generate result --- tools/syz-bisect/bisect.go | 4 ++-- tools/syz-check/check.go | 1 + tools/syz-cover/syz-cover.go | 1 + tools/syz-crush/crush.go | 4 +++- tools/syz-minconfig/minconfig.go | 7 ++++--- tools/syz-trace2syz/proggen/proggen.go | 8 +++++--- tools/syz-trace2syz/trace2syz.go | 2 ++ tools/syz-tty/syz-tty.go | 4 +++- 8 files changed, 21 insertions(+), 10 deletions(-) (limited to 'tools') diff --git a/tools/syz-bisect/bisect.go b/tools/syz-bisect/bisect.go index ba4494d18..00c1afb6e 100644 --- a/tools/syz-bisect/bisect.go +++ b/tools/syz-bisect/bisect.go @@ -12,8 +12,8 @@ // -kernel_commit. HEAD is used if commits are not specified. // // The crash dir should contain the following files: -// - repro.cprog or repro.prog: reproducer for the crash -// - repro.opts: syzkaller reproducer options (e.g. {"procs":1,"sandbox":"none",...}) (optional) +// - repro.cprog or repro.prog: reproducer for the crash +// - repro.opts: syzkaller reproducer options (e.g. {"procs":1,"sandbox":"none",...}) (optional) // // The tool stores bisection result into cause.commit or fix.commit. package main diff --git a/tools/syz-check/check.go b/tools/syz-check/check.go index 714c195cd..7f86c2d41 100644 --- a/tools/syz-check/check.go +++ b/tools/syz-check/check.go @@ -3,6 +3,7 @@ // syz-check does best-effort static correctness checking of the syscall descriptions in sys/os/*.txt. // Use: +// // $ go install ./tools/syz-check // $ syz-check -obj-amd64 /linux_amd64/vmlinux -obj-arm64 /linux_arm64/vmlinux \ // -obj-386 /linux_386/vmlinux -obj-arm /linux_arm/vmlinux diff --git a/tools/syz-cover/syz-cover.go b/tools/syz-cover/syz-cover.go index 1e14a73fa..e161eac07 100644 --- a/tools/syz-cover/syz-cover.go +++ b/tools/syz-cover/syz-cover.go @@ -12,6 +12,7 @@ // or from syz-execprog with -coverfile flag. // // Usage: +// // syz-cover [-os=OS -arch=ARCH -kernel_src=. -kernel_obj=.] rawcover.file* package main diff --git a/tools/syz-crush/crush.go b/tools/syz-crush/crush.go index 8ed076fc8..0ee550e79 100644 --- a/tools/syz-crush/crush.go +++ b/tools/syz-crush/crush.go @@ -2,7 +2,9 @@ // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. // syz-crush replays crash log on multiple VMs. Usage: -// syz-crush -config=config.file execution.log +// +// syz-crush -config=config.file execution.log +// // Intended for reproduction of particularly elusive crashes. package main diff --git a/tools/syz-minconfig/minconfig.go b/tools/syz-minconfig/minconfig.go index a77a8f47f..450968cff 100644 --- a/tools/syz-minconfig/minconfig.go +++ b/tools/syz-minconfig/minconfig.go @@ -3,9 +3,10 @@ // syz-minconfig is a tool for manual checking of config minimization functionality in pkg/kconfig/minimize.go. // Example use: -// $ go run tools/syz-minconfig/minconfig.go -sourcedir /src/linux -configs CAIF_NETDEV,CAIF_USB \ -// -base dashboard/config/linux/upstream-kasan-base.config \ -// -full dashboard/config/linux/upstream-kasan.config \ +// +// $ go run tools/syz-minconfig/minconfig.go -sourcedir /src/linux -configs CAIF_NETDEV,CAIF_USB \ +// -base dashboard/config/linux/upstream-kasan-base.config \ +// -full dashboard/config/linux/upstream-kasan.config \ package main import ( diff --git a/tools/syz-trace2syz/proggen/proggen.go b/tools/syz-trace2syz/proggen/proggen.go index 553274728..eefd47b51 100644 --- a/tools/syz-trace2syz/proggen/proggen.go +++ b/tools/syz-trace2syz/proggen/proggen.go @@ -245,9 +245,11 @@ func (ctx *context) genStruct(syzType *prog.StructType, dir prog.Dir, traceType } // recurseStructs handles cases where syzType corresponds to struct descriptions like -// sockaddr_storage_in6 { -// addr sockaddr_in6 -// } [size[SOCKADDR_STORAGE_SIZE], align_ptr] +// +// sockaddr_storage_in6 { +// addr sockaddr_in6 +// } [size[SOCKADDR_STORAGE_SIZE], align_ptr] +// // which need to be recursively generated. It returns true if we needed to recurse // along with the generated argument and false otherwise. func (ctx *context) recurseStructs(syzType *prog.StructType, dir prog.Dir, traceType *parser.GroupType) (prog.Arg, bool) { diff --git a/tools/syz-trace2syz/trace2syz.go b/tools/syz-trace2syz/trace2syz.go index b30cc471c..318603129 100644 --- a/tools/syz-trace2syz/trace2syz.go +++ b/tools/syz-trace2syz/trace2syz.go @@ -7,8 +7,10 @@ // syz-trace2syz converts strace traces to syzkaller programs. // // Simple usage: +// // strace -o trace -a 1 -s 65500 -v -xx -f -Xraw ./a.out // syz-trace2syz -file trace +// // Intended for seed selection or debugging package main diff --git a/tools/syz-tty/syz-tty.go b/tools/syz-tty/syz-tty.go index 8d51dd8ef..01788259e 100644 --- a/tools/syz-tty/syz-tty.go +++ b/tools/syz-tty/syz-tty.go @@ -2,7 +2,9 @@ // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. // syz-tty is utility for testing of usb console reading code. Usage: -// $ syz-tty /dev/ttyUSBx +// +// $ syz-tty /dev/ttyUSBx +// // This should dump device console output. package main -- cgit mrf-deployment