fix: Update links in README files for kprobe examples and clarify base program descriptions

This commit is contained in:
LinuxDev9002
2026-03-06 14:47:38 -08:00
parent d06ec2f281
commit f5564cfa77
5 changed files with 6 additions and 9 deletions

View File

@@ -103,7 +103,7 @@ You need:
If your kernel is too old, you have two options:
- Upgrade your kernel to a supported version
- Use the kprobe example instead (see [example 2-kprobe-unlink](../2-kprobe-unlink/))
- Use the kprobe example instead (see [example 2-kprobe-unlink](../2-kprobe-unlink/README.md))
**2. Verify BTF (BPF Type Format) support:**

View File

@@ -111,7 +111,7 @@ $ uname -r
如果您的内核版本过旧,您有两个选择:
- 将内核升级到支持的版本
- 使用 kprobe 示例代替(参见 [示例 2-kprobe-unlink](../2-kprobe-unlink/)
- 使用 kprobe 示例代替(参见 [示例 2-kprobe-unlink](../2-kprobe-unlink/README.zh.md)
**2. 验证 BTFBPF Type Format支持**

View File

@@ -14,7 +14,6 @@ Uprobe is useful for parsing traffic in user space that cannot be parsed by kern
- [eBPF practice tutorial: Use Uprobe to capture plaintext SSL/TLS data from various libraries](../30-sslsniff/README.md)
- [eBPF practice tutorial: Use Uprobe to capture Golang coroutine switching](../31-goroutine/README.md)
- [eBPF practice tutorial: Use Uprobe to capture user space http2 traffic](../32-http2/README.md)
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.

View File

@@ -12,7 +12,6 @@ uprobe 适用于在用户态去解析一些内核态探针无法解析的流量
- [eBPF 实践教程:使用 uprobe 捕获多种库的 SSL/TLS 明文数据](../30-sslsniff/README.md)
- [eBPF 实践教程:使用 uprobe 捕获 Golang 的协程切换](../31-goroutine/README.md)
- [eBPF 实践教程:使用 uprobe 捕获用户态 http2 流量](../32-http2/README.md)
Uprobe 在内核态 eBPF 运行时,也可能产生比较大的性能开销,这时候也可以考虑使用用户态 eBPF 运行时,例如 [bpftime](https://github.com/eunomia-bpf/bpftime)。bpftime 是一个基于 LLVM JIT/AOT 的用户态 eBPF 运行时,它可以在用户态运行 eBPF Uprobe 程序,和内核态的 eBPF 兼容由于避免了内核态和用户态之间的上下文切换bpftime 的 Uprobe 开销比内核少约 10 倍,并且也更容易扩展。

View File

@@ -22,10 +22,10 @@ By reusing the kernel verifier, we can provide:
The BTF format is a binary format that contains the type information of the progam.
The based program can be found in the [examples](../examples) directory, they represent the different version of host userspace applications, include:
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:
- `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).
- `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.
- `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.
- `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.
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
## Verify memory pointer access
See [verify-memory-access](verify-memory-access) directory.
See the `verify-memory-access/` sources in the tutorial tree for the full example.
The data struct is:
@@ -275,7 +275,7 @@ Failed to load and verify BPF skeleton
## Verify resource allocation and deallocation with psudo ufuncs
See [verify-resource-allocation](verify-resource-allocation) directory.
See the `verify-resource-allocation/` sources in the tutorial tree for the full example.
First, give kernel the psudo ufunc information through the kernel module:
@@ -448,4 +448,3 @@ And run the userspace program:
my_alloc_data
my_free_data
```