Skip to content

Commit

Permalink
申领 syzkaller/strace.md 的翻译 (#249)
Browse files Browse the repository at this point in the history
* 申领 syzkaller/strace.md 的翻译

* 申领 syzkaller/strace.md 的翻译
  • Loading branch information
CAICAIIs authored Feb 17, 2025
1 parent 3a98716 commit 0a68112
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions sources/syzkaller/strace.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
---
status: collected
status: translated
title: "Strace"
author: Syzkaller Community
collector: jxlpzqc
translator: CAICAIIs
collected_date: 20240314
translated_date: 20250217
priority: 10
link: https://github.com/google/syzkaller/blob/master/docs/strace.md
---

# Strace

Syzkaller can be instructed to execute programs under
[strace](https://strace.io/) and capture the output.
Syzkaller 可以配置为在 [strace](https://strace.io/) 下执行程序并捕获输出。

If the `strace_bin` is set to an `strace` binary, syzkaller will automatically
run each reproducer it managed to find under the `strace` binary.
* If a syz-manager is attached to a `dashboard`, syzkaller will upload the
resulting output as a normal log file if the generated reproducer still
managed to produce the same crash.
* Otherwise, the output of strace will be saved to a separate file and will be
accessible through the syz-manager's web interface.
若将 `strace_bin` 设置为某个 `strace` 二进制文件,syzkaller 将自动使用该 `strace` 二进制文件运行所有成功获取的重现用例。
* 若 syz-manager 已关联至某个「信息中心」,当生成的重现用例仍能触发相同崩溃时,syzkaller 会将 strace 输出作为普通日志文件上传。
* 若未关联信息中心,strace 的输出将被保存至独立文件,并可通过 syz-manager 的网页界面访问。

## How to compile the strace binary
## 如何编译 strace 二进制文件

It is safer to compile `strace` as a statically linked binary in order to
prevent problems with mismatching libc versions on the kernel image used for
fuzzing.
为避免因模糊测试所用内核镜像中的 libc 版本不匹配导致问题,建议将 `strace` 编译为静态链接二进制文件。

```
git clone https://github.com/strace/strace.git
Expand All @@ -35,16 +30,14 @@ cd strace
make -j`nproc`
```

The resulting binary can be found at `src/strace`.
编译生成的二进制文件位于 `src/strace` 路径下。

## syz-crush

It's possible to instruct `syz-crush` to run the attached repro under strace. In
order to do so, make sure `strace_bin` is specified in the syz-manager config
file and pass an extra `-strace` argument to the command arguments.
可配置 `syz-crush` 在 strace 下运行关联的重现用例。具体操作时,
请确保 syz-manager 配置文件中已指定 `strace_bin` 参数,并在命令行参数中额外添加 `-strace` 参数。

## syz-repro

If `-strace file-name.log` is appended to the `syz-repro`'s arguments, the tool
will run the resulting repro (if it managed to generate one) under strace and
save its output.
若在 `syz-repro` 的参数后追加 `-strace file-name.log`,该工具将在 strace 下运行生成的重现用例(若成功生成),并保存其输出。

0 comments on commit 0a68112

Please sign in to comment.