Skip to content

Commit

Permalink
Merge pull request #61 from MarkMrLi/Syz-bisect
Browse files Browse the repository at this point in the history
完成 Syz-bisect 的翻译
  • Loading branch information
mudongliang committed May 3, 2024
2 parents 3c2c260 + afad464 commit 7b8d54e
Showing 1 changed file with 24 additions and 33 deletions.
57 changes: 24 additions & 33 deletions sources/syzkaller/bisect.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
---
status: translating
status: translated
title: "Syz-bisect"
author: Syzkaller Community
collector: mudongliang
collected_date: 20240229
translator: MarkMrLi
translated_date: 20240428
link: https://github.com/google/syzkaller/blob/master/docs/bisect.md
---

# Syz-bisect

`syz-bisect` program can be used to bisect culprit and fix commits for
crashes found by syzkaller. It can also identify configuration options
that are triggers for the crash.
`syz-bisect` 程序可用于对由 syzkaller 发现的崩溃进行查找责任提交和修复提交。
它还可以识别触发崩溃的配置选项。

## Usage
## 使用方法

Build `syz-bisect` with `make bisect`.
使用 `make bisect` 编译 `syz-bisect`

During bisection different compilers depending on kernel revision are
used. These compilers are available
[here](https://storage.googleapis.com/syzkaller/bisect_bin.tar.gz).
在进行二分查找时,根据内核版本的不同,会使用不同的编译器。这些编译器可以在
[这里](https://storage.googleapis.com/syzkaller/bisect_bin.tar.gz)下载。

Install ccache to speed up kernel compilations during bisecton.
安装 ccache 以加速二分查找过程中的内核编译。

Create user-space (chroot) using [create-image.sh](../tools/create-image.sh)
使用 [create-image.sh](../tools/create-image.sh) 创建用户空间 (chroot)。

Create a config file with following lines adjusted for your environment:
根据您的环境调整以下行并创建配置文件:

```
{
Expand Down Expand Up @@ -64,35 +63,27 @@ Create a config file with following lines adjusted for your environment:
}
```

And run bisection with `bin/syz-bisect -config vm_bisect.cfg -crash
/syzkaller/workdir/crashes/03ee30ae11dfd0ddd062af26566c34a8c853698d`.
使用 `bin/syz-bisect -config vm_bisect.cfg -crash /syzkaller/workdir/crashes/03ee30ae11dfd0ddd062af26566c34a8c853698d`进行二分查找。

`Syz-bisect` is expecting finding repro.cprog or repro.prog in given
crash directory. It will also utilize repro.opts, but it's not
mandatory.
`syz-bisect` 需要在指定的崩溃目录中找到 repro.cprog 或 repro.prog 文件。
它也会利用 repro.opts 文件,但这不是必需的。

## Additional Arguments
## 额外参数

`-syzkaller_commit` use this if you want to use specific version of syzkaller
`-syzkaller_commit` 如果您想使用特定版本的 syzkaller,请使用此参数。

`-kernel_commit` kernel commit where crash is known to reproduce. You
want to use this when bisecting fixing commit
`-kernel_commit` 已知可以重现崩溃的内核提交。在查找修复提交时,您会需要使用此参数。

`-fix` use this if you want to bisect a fixing commit.
`-fix` 如果您想对修复提交进行二分查找,请使用此参数。

## Output
## 输出

It takes some time, but after `syz-bisect` completes it dumps out it's
results into console It also stores results into files in given crash
directory:
`syz-bisect` 完成后需要一些时间,它会将结果输出到控制台。它还会将结果存储在指定崩溃目录的文件中:

`cause.commit` commit identified causing the crash or text "the crash
already happened on the oldest tested release"
`cause.commit` 被识别为导致崩溃的提交或文本“该崩溃已在最旧的测试版本上发生”

`fix.commit` commit identified fixing the crash or text "the crash
still happens on HEAD"
`fix.commit` 被识别为修复崩溃的提交或文本“该崩溃仍在 HEAD 上发生”

`cause.config` config options identified working as one trigger for the crash
`cause.config` 被识别为触发崩溃的配置选项

`original.config, baseline.config, minimized.config` config files used
in config bisection
`original.config, baseline.config, minimized.config` 在配置二分查找中使用的配置文件

0 comments on commit 7b8d54e

Please sign in to comment.