Skip to content

Commit 2b74656

Browse files
committed
update link to source code
1 parent 4671af2 commit 2b74656

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/38-btf-uprobe/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ eBPF 中的 “co-re” 代表“一次编译、到处运行”。这是其关
88

99
为了在用户空间应用程序中实现eBPF的“一次编译、到处运行”(Co-RE)特性,我们需要利用BPF类型格式(BTF)来克服传统eBPF程序的一些限制。这种方法的关键在于为用户空间程序提供与内核类似的类型信息和兼容性支持,从而使得eBPF程序能够更灵活地应对不同版本的用户空间应用和库。
1010

11-
本文是eBPF开发者教程的一部分,详细内容可访问[这里](https://eunomia.dev/tutorials/)源代码在[GitHub库](https://github.com/eunomia-bpf/bpf-developer-tutorial)中可用
11+
本文是eBPF开发者教程的一部分,详细内容可访问[https://eunomia.dev/tutorials/](https://eunomia.dev/tutorials/)本文完整的代码请查看 <https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/38-btf-uprobe>
1212

1313
## 为什么我们需要CO-RE?
1414

@@ -255,6 +255,8 @@ $ sudo cat /sys/kernel/debug/tracing/trace_pipe
255255
<...>-26740 [001] ...11 28180.156220: bpf_trace_printk: add_test(&d) 1 + 3 = 4
256256
```
257257

258+
本文的工具和完整的代码在 <https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/38-btf-uprobe> 开源。
259+
258260
## 结论
259261

260262
- **灵活性和兼容性**:在用户空间eBPF程序中使用BTF大大增强了它们在不同版本的用户空间应用程序和库之间的灵活性和兼容性。
@@ -263,4 +265,4 @@ $ sudo cat /sys/kernel/debug/tracing/trace_pipe
263265

264266
这个示例展示了eBPF在实践中的重要进步,将其强大的功能扩展到更动态地处理用户空间应用程序在Linux环境中。对于处理现代Linux系统复杂性的软件工程师和系统管理员来说,这是一个引人注目的解决方案。
265267

266-
如果你想了解更多关于eBPF知识和实践,你可以访问我们的教程代码库<https://github.com/eunomia-bpf/bpf-developer-tutorial>或者网站<https://eunomia.dev/tutorials/>获得更多示例和完整教程。
268+
如果你想了解更多关于eBPF知识和实践,你可以访问我们的教程代码库<https://github.com/eunomia-bpf/bpf-developer-tutorial>或者网站<https://eunomia.dev/tutorials/>获得更多示例和完整教程。

src/38-btf-uprobe/README_en.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ The term "co-re" in the context of eBPF stands for "Compile Once, Run Everywhere
66

77
With eBPF Uprobe, you can also trace userspace applications and access their internal data structures. However, there is no CO-RE practice for userspace. This blog introduces a new approach to leverage CO-RE for user-space applications, ensuring eBPF programs remain compatible across different application versions without the need for multiple compilations. For example, you may not need to maintain a separate eBPF program for each version of OpenSSL when capturing SSL/TLS plaintext data from encrypted traffic.
88

9-
This article is part of the eBPF Developer Tutorial, and for more detailed content, you can visit [here](https://eunomia.dev/tutorials/). The source code is available on the [GitHub repository](https://github.com/eunomia-bpf/bpf-developer-tutorial).
9+
To implement the "Compile Once, Run Everywhere" (Co-RE) feature of eBPF in user-space applications, we need to utilize the BPF Type Format (BTF) to overcome some of the limitations of traditional eBPF programs. The key to this approach lies in providing user-space programs with similar type information and compatibility support as the kernel, thereby enabling eBPF programs to more flexibly handle different versions of user-space applications and libraries.
10+
11+
This article is part of the eBPF Developer Tutorial, and for more detailed content, you can visit [https://eunomia.dev/tutorials/](https://eunomia.dev/tutorials/). The source code is available on the [https://github.com/eunomia-bpf/bpf-developer-tutorial](https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/38-btf-uprobe).
1012

1113
## Why we need CO-RE?
1214

@@ -256,6 +258,8 @@ $ sudo cat /sys/kernel/debug/tracing/trace_pipe
256258
<...>-26740 [001] ...11 28180.156220: bpf_trace_printk: add_test(&d) 1 + 3 = 4
257259
```
258260

261+
For complete source code, you can visit [https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/38-btf-uprobe](https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/38-btf-uprobe) for more details.
262+
259263
## Conclusion
260264

261265
- **Flexibility and Compatibility**: The use of BTF in user-space eBPF programs greatly enhances their flexibility and compatibility across different versions of user-space applications and libraries.

0 commit comments

Comments
 (0)