Skip to content

Commit f5564cf

Browse files
author
LinuxDev9002
committed
fix: Update links in README files for kprobe examples and clarify base program descriptions
1 parent d06ec2f commit f5564cf

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

src/3-fentry-unlink/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ You need:
103103

104104
If your kernel is too old, you have two options:
105105
- Upgrade your kernel to a supported version
106-
- Use the kprobe example instead (see [example 2-kprobe-unlink](../2-kprobe-unlink/))
106+
- Use the kprobe example instead (see [example 2-kprobe-unlink](../2-kprobe-unlink/README.md))
107107

108108
**2. Verify BTF (BPF Type Format) support:**
109109

src/3-fentry-unlink/README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ $ uname -r
111111

112112
如果您的内核版本过旧,您有两个选择:
113113
- 将内核升级到支持的版本
114-
- 使用 kprobe 示例代替(参见 [示例 2-kprobe-unlink](../2-kprobe-unlink/)
114+
- 使用 kprobe 示例代替(参见 [示例 2-kprobe-unlink](../2-kprobe-unlink/README.zh.md)
115115

116116
**2. 验证 BTF(BPF Type Format)支持:**
117117

src/37-uprobe-rust/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Uprobe is useful for parsing traffic in user space that cannot be parsed by kern
1414

1515
- [eBPF practice tutorial: Use Uprobe to capture plaintext SSL/TLS data from various libraries](../30-sslsniff/README.md)
1616
- [eBPF practice tutorial: Use Uprobe to capture Golang coroutine switching](../31-goroutine/README.md)
17-
- [eBPF practice tutorial: Use Uprobe to capture user space http2 traffic](../32-http2/README.md)
1817

1918
Running Uprobe in kernel mode eBPF might also produce significant performance overhead, in which case you might consider using user space eBPF runtime, such as [bpftime](https://github.com/eunomia-bpf/bpftime). bpftime is a user-space eBPF runtime based on LLVM JIT/AOT. It can run eBPF Uprobe programs in user mode and is compatible with kernel mode eBPF. Because it avoids context switching between user and kernel modes, bpftime's Uprobe overheads are about 10 times less than the kernel's, and it also more easy to extend.
2019

src/37-uprobe-rust/README.zh.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ uprobe 适用于在用户态去解析一些内核态探针无法解析的流量
1212

1313
- [eBPF 实践教程:使用 uprobe 捕获多种库的 SSL/TLS 明文数据](../30-sslsniff/README.md)
1414
- [eBPF 实践教程:使用 uprobe 捕获 Golang 的协程切换](../31-goroutine/README.md)
15-
- [eBPF 实践教程:使用 uprobe 捕获用户态 http2 流量](../32-http2/README.md)
1615

1716
Uprobe 在内核态 eBPF 运行时,也可能产生比较大的性能开销,这时候也可以考虑使用用户态 eBPF 运行时,例如 [bpftime](https://github.com/eunomia-bpf/bpftime)。bpftime 是一个基于 LLVM JIT/AOT 的用户态 eBPF 运行时,它可以在用户态运行 eBPF Uprobe 程序,和内核态的 eBPF 兼容,由于避免了内核态和用户态之间的上下文切换,bpftime 的 Uprobe 开销比内核少约 10 倍,并且也更容易扩展。
1817

src/38-btf-uprobe/test-verify/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ By reusing the kernel verifier, we can provide:
2222

2323
The BTF format is a binary format that contains the type information of the progam.
2424

25-
The based program can be found in the [examples](../examples) directory, they represent the different version of host userspace applications, include:
25+
The base programs live in the tutorial source tree under [src/38-btf-uprobe/examples](https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/38-btf-uprobe/examples). They represent different versions of the host userspace application and include:
2626

2727
- `btf-base`: the base version of `btf-base-complete`, which contain the type information of `struct data` the same as [verify-failed-no-btf/uprobe.bpf.c](verify-failed-no-btf/uprobe.bpf.c).
28-
- `btf-base-new`: the new version of `btf-base`, which contains the type information of `struct data` different from `btf-base` and [verify-failed-btf/uprobe.bpf.c](verify-failed-btf/uprobe.bpf.c). We can use it to test CO-RE relocation.
28+
- `btf-base-new`: the new version of `btf-base`, which contains the type information of `struct data` different from `btf-base` and [verify-failed-no-btf/uprobe_failed.bpf.c](verify-failed-no-btf/uprobe_failed.bpf.c). We can use it to test CO-RE relocation.
2929
- `btf-base-complete`: the complete version of `btf-base`, which contains all the types that are used in the eBPF program, and a resource allocation and deallocation function.
3030

3131
run `make -C ../` in this directory to generate the BTF files.
@@ -153,7 +153,7 @@ If the extension (BPF program) access the invalid userspace struct variable, the
153153
154154
## Verify memory pointer access
155155
156-
See [verify-memory-access](verify-memory-access) directory.
156+
See the `verify-memory-access/` sources in the tutorial tree for the full example.
157157
158158
The data struct is:
159159
@@ -275,7 +275,7 @@ Failed to load and verify BPF skeleton
275275

276276
## Verify resource allocation and deallocation with psudo ufuncs
277277

278-
See [verify-resource-allocation](verify-resource-allocation) directory.
278+
See the `verify-resource-allocation/` sources in the tutorial tree for the full example.
279279

280280
First, give kernel the psudo ufunc information through the kernel module:
281281

@@ -448,4 +448,3 @@ And run the userspace program:
448448
my_alloc_data
449449
my_free_data
450450
```
451-

0 commit comments

Comments
 (0)