docs: add generated tutorial compatibility matrix (#212)

* docs: declare tutorial compatibility requirements

* docs: generate tutorial compatibility matrix

* fix: correct BPF Arena minimum kernel

* refactor: simplify compatibility validation

---------

Co-authored-by: LinuxDev9002 <i@littlefisher.me>
This commit is contained in:
云微
2026-07-14 05:00:48 -07:00
committed by GitHub
parent e08f604769
commit 37375ff87e
78 changed files with 1167 additions and 13 deletions

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=not-applicable
kernel_min_basis=not-applicable
architectures=all
btf=not-required
kernel_config=none
hardware=none
root=not-required
test_status=docs-only

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=4.8
kernel_min_basis=documented
architectures=x86_64,arm64
btf=not-required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=5.5
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_CGROUPS=y,CONFIG_CGROUP_BPF=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_TRACEPOINTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_PERF_EVENTS=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_KPROBE_EVENTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.5
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE=y,CONFIG_TRACEPOINTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_TRACEPOINTS=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_TRACEPOINTS=y
hardware=block-device
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=not-applicable
kernel_min_basis=not-applicable
architectures=all
btf=not-required
kernel_config=none
hardware=none
root=not-required
test_status=docs-only

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.7
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_LSM=y,CONFIG_DEBUG_INFO_BTF=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_KPROBE_EVENTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_NET_CLS_BPF=y|m,CONFIG_NET_SCHED=y
hardware=network-interface
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Advance
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y
hardware=network-interface
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Android
kernel_min=5.15
kernel_min_basis=documented
architectures=x86_64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y
hardware=android-device-or-emulator
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Networking
kernel_min=5.17
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Security
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Security
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Security
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Security
kernel_min=5.17
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Security
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Networking
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_CGROUPS=y,CONFIG_CGROUP_BPF=y,CONFIG_DEBUG_INFO_BTF=y
hardware=network-interface
root=required
test_status=ci-build

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=x86_64:5.5,arm64:6.0
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_BPF_JIT=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Tracing
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Tracing
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1 +1,9 @@
level=Depth
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_PERF_EVENTS=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Tracing
kernel_min=4.8
kernel_min_basis=repository-baseline
architectures=x86_64,arm64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_KPROBE_EVENTS=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Security
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=6.1
kernel_min_basis=documented
architectures=x86_64,arm64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=not-applicable
kernel_min_basis=not-applicable
architectures=all
btf=not-required
kernel_config=none
hardware=none
root=not-required
test_status=docs-only

View File

@@ -1,2 +1,10 @@
level=Depth
type=Tracing
kernel_min=4.8
kernel_min_basis=repository-baseline
architectures=x86_64,arm64
btf=not-required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Tracing
kernel_min=4.8
kernel_min_basis=repository-baseline
architectures=x86_64,arm64
btf=not-required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=4.8
kernel_min_basis=repository-baseline
architectures=x86_64,arm64
btf=not-required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Tracing
kernel_min=4.8
kernel_min_basis=repository-baseline
architectures=x86_64,arm64
btf=not-required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Networking
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y
hardware=network-interface
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Networking
kernel_min=4.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y
hardware=network-interface
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=6.11
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_DEBUG_INFO_BTF_MODULES=y,CONFIG_KPROBE_EVENTS=y,CONFIG_MODULES=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Scheduler
kernel_min=6.12
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_SCHED_CLASS_EXT=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Scheduler
kernel_min=6.12
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_SCHED_CLASS_EXT=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Networking
kernel_min=5.18
kernel_min_basis=documented
architectures=x86_64,arm64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_XDP_SOCKETS=y
hardware=network-interface
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=GPU
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_UPROBE_EVENTS=y
hardware=nvidia-cuda-gpu
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Tracing
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_TRACEPOINTS=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -315,7 +315,7 @@ static void print_stats(struct energy_monitor_bpf *skel)
### Prerequisites
Before building, ensure you have:
- Linux kernel 5.4 or newer with BTF support
- Linux kernel 5.8 or newer with BTF support (the eBPF monitor uses a BPF ring buffer)
- libbpf development files
- clang and llvm for eBPF compilation
- Basic build tools (make, gcc)

View File

@@ -270,7 +270,7 @@ static void print_stats(struct energy_monitor_bpf *skel)
### 先决条件
在构建之前,需要确保系统环境满足几个基本要求。首先需要 Linux 内核 5.4 或更新版本,且支持 BTF(BPF 类型格式)功能。其次要安装 libbpf 开发文件,这是 eBPF 程序开发的基础库。编译 eBPF 程序需要 clang 和 llvm 工具链。最后,还需要安装基本的构建工具,包括 make 和 gcc。
在构建之前,需要确保系统环境满足几个基本要求。首先需要 Linux 内核 5.8 或更新版本(eBPF 监控器使用 BPF ring buffer),且支持 BTF(BPF 类型格式)功能。其次要安装 libbpf 开发文件,这是 eBPF 程序开发的基础库。编译 eBPF 程序需要 clang 和 llvm 工具链。最后,还需要安装基本的构建工具,包括 make 和 gcc。
### 编译
@@ -573,4 +573,4 @@ ls /sys/kernel/btf/vmlinux
eBPF 的内核集成和高效事件处理的结合使其成为生产能源监控的理想选择。无论您是优化数据中心工作负载、延长移动设备的电池寿命,还是只是对应用程序的能源足迹感到好奇,eBPF 都提供了您进行详细分析所需的工具。
随着生态系统的成熟,像 Kepler 这样的项目已经投入生产,cpufreq_ext 正在接近主线包含,我们正在进入一个能源感知计算成为默认而不是事后想法的时代。立即开始监控您的应用程序的能源消耗,为更可持续的计算未来做出贡献!
随着生态系统的成熟,像 Kepler 这样的项目已经投入生产,cpufreq_ext 正在接近主线包含,我们正在进入一个能源感知计算成为默认而不是事后想法的时代。立即开始监控您的应用程序的能源消耗,为更可持续的计算未来做出贡献!

View File

@@ -1,2 +1,10 @@
level=Depth
type=Other
kernel_min=6.3
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_HID_BPF=y,CONFIG_UHID=y|m
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_UPROBE_EVENTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1,2 +1,10 @@
level=Depth
type=Networking
kernel_min=6.6
kernel_min_basis=documented
architectures=x86_64,arm64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_NET_XGRESS=y
hardware=network-interface
root=required
test_status=ci-build

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE_SYSCALLS=y,CONFIG_PERF_EVENTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=5.8
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_TRACEPOINTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -1 +1,9 @@
level=Basic
kernel_min=5.2
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_TRACEPOINTS=y
hardware=none
root=required
test_status=ci-runtime

View File

@@ -8,6 +8,8 @@ For the complete source code of the tutorial, please refer to the repo [https://
## Table of Contents
- [Tutorial compatibility matrix](compatibility.md)
### Getting Started Examples
This section contains simple eBPF program examples and introductions. It primarily utilizes the `eunomia-bpf` framework to simplify development and introduces the basic usage and development process of eBPF.

View File

@@ -8,6 +8,8 @@
## 目录
- [教程兼容性矩阵](compatibility.zh.md)
### 入门示例
这一部分包含简单的 eBPF 程序示例和介绍。主要利用 `eunomia-bpf` 框架简化开发,介绍 eBPF 的基本用法和开发流程。

View File

@@ -1,2 +1,10 @@
level=Depth
type=Other
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_CGROUPS=y,CONFIG_CGROUP_BPF=y,CONFIG_CGROUP_DEVICE=y,CONFIG_DEBUG_INFO_BTF=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -602,4 +602,4 @@ This "policy guard" pattern can be extended to production use cases: container n
- **eBPF docs:** [CGROUP_SYSCTL](https://docs.ebpf.io/linux/program-type/BPF_PROG_TYPE_CGROUP_SYSCTL/) - sysctl access control explained
- **Tutorial repository:** <https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/cgroup>
Full source code is available in the tutorial repository. Requires Linux kernel 4.10+ (cgroup v2) and libbpf.
Full source code is available in the tutorial repository. This implementation requires Linux kernel 5.8+ for BPF ring buffer event reporting, cgroup v2, and libbpf.

View File

@@ -603,4 +603,4 @@ cgroup eBPF 通过将策略与进程组绑定,解决了传统全局策略无
- **eBPF 文档:** [CGROUP_SYSCTL](https://docs.ebpf.io/linux/program-type/BPF_PROG_TYPE_CGROUP_SYSCTL/) - sysctl 访问控制详解
- **教程仓库:** <https://github.com/eunomia-bpf/bpf-developer-tutorial/tree/main/src/cgroup>
完整源代码可在教程仓库中获得。需要 Linux 内核 4.10+(cgroup v2)和 libbpf。
完整源代码可在教程仓库中获得。当前实现使用 BPF ring buffer 上报事件,因此需要 Linux 内核 5.8+、cgroup v2 和 libbpf。

80
src/compatibility.md Normal file
View File

@@ -0,0 +1,80 @@
# Tutorial compatibility matrix
<!-- Generated by scripts/generate_compatibility.py; do not edit directly. -->
This table is generated from each tutorial's `.config` metadata. `Minimum kernel` means the oldest kernel that the tutorial currently declares support for. `Basis` says whether that value comes from the tutorial documentation, the first version of a required feature, or the repository's declared baseline. `Not in CI` does not imply that a manual test was performed. Distribution kernels may disable a listed option, so a version number alone does not guarantee compatibility.
| Tutorial | Minimum kernel | Basis | Architectures | BTF | Core kernel config | Hardware | Root | Test status |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| [eBPF Tutorial by Example 0: Introduction to Core Concepts and Tools](0-introduce/README.md) | N/A | N/A | All | Not required | None | None | Not required | Docs only |
| [eBPF Tutorial by Example 1: Hello World, Framework and Development](1-helloworld/README.md) | 4.8 | Tutorial docs | x86_64, arm64 | Not required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 2: Monitoring unlink System Calls with kprobe](2-kprobe-unlink/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_KPROBE_EVENTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 3: Monitoring unlink System Calls with fentry](3-fentry-unlink/README.md) | x86_64:5.5, arm64:6.0 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_BPF_JIT=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 4: Capturing Opening Files and Filter with Global Variables](4-opensnoop/README.md) | 4.8 | Repository baseline | x86_64, arm64 | Not required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 5: Capturing readline Function Calls with Uprobe](5-uprobe-bashreadline/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 6: Capturing Signal Sending and Store State with Hash Maps](6-sigsnoop/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 7: Capturing Process Execution, Output with perf event array](7-execsnoop/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y, CONFIG_PERF_EVENTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 8: Monitoring Process Exit Events, Output with Ring Buffer](8-exitsnoop/README.md) | 5.8 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 9: Capturing Scheduling Latency and Recording as Histogram](9-runqlat/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 10: Capturing Interrupts with hardirqs or softirqs](10-hardirqs/README.md) | 5.5 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_CGROUPS=y, CONFIG_CGROUP_BPF=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 11: Develop User-Space Programs with libbpf and Trace exec() and exit()](11-bootstrap/README.md) | 5.8 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 12: Using eBPF Program Profile for Performance Analysis](12-profile/README.md) | 5.8 | Required feature | x86_64, arm64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_PERF_EVENTS=y | None | Required | CI build |
| [eBPF Tutorial by Example 13: Statistics of TCP Connection Delay with libbpf](13-tcpconnlat/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_KPROBE_EVENTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 14: Recording TCP Connection Status and TCP RTT](14-tcpstates/README.md) | 5.5 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y, CONFIG_TRACEPOINTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 15: Capturing User-Space Java GC Duration Using USDT](15-javagc/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | None | Required | Not in CI |
| [eBPF Tutorial by Example 16: Monitoring Memory Leaks](16-memleak/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y, CONFIG_UPROBE_EVENTS=y | None | Required | CI runtime |
| [eBPF Tutorial by Example 17: Count Random/Sequential Disk I/O](17-biopattern/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | Block device | Required | CI runtime |
| [More Reference Materials: papers, projects](18-further-reading/README.md) | N/A | N/A | All | Not required | None | None | Not required | Docs only |
| [eBPF Tutorial by Example 19: Security Detection and Defense using LSM](19-lsm-connect/README.md) | 5.7 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_LSM=y, CONFIG_DEBUG_INFO_BTF=y | None | Required | Not in CI |
| [eBPF Tutorial by Example 20: tc Traffic Control](20-tc/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_NET_CLS_BPF=y\|m, CONFIG_NET_SCHED=y | Network interface | Required | CI runtime |
| [eBPF Tutorial by Example 21: Programmable Packet Processing with XDP](21-xdp/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y | Network interface | Required | Not in CI |
| [eBPF Tutorial by Example: Using eBPF Programs on Android](22-android/README.md) | 5.15 | Tutorial docs | x86_64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | Android device or emulator | Required | Not in CI |
| [L7 Tracing with eBPF: HTTP and Beyond via Socket Filters and Syscall Tracepoints](23-http/README.md) | 5.17 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | CI runtime |
| [eBPF Practical Tutorial: Hiding Process or File Information](24-hide/README.md) | 5.8 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | Not in CI |
| [Using bpf_send_signal to Terminate Malicious Processes in eBPF](25-signal/README.md) | 5.8 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | CI runtime |
| [eBPF Tutorial: Privilege Escalation via File Content Manipulation](26-sudo/README.md) | 5.8 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | Not in CI |
| [eBPF Tutorial: Transparent Text Replacement in File Reads](27-replace/README.md) | 5.17 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | Not in CI |
| [Running eBPF After Application Exits: The Lifecycle of eBPF Programs](28-detach/README.md) | 5.8 | Required feature | x86_64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y | None | Required | CI build |
| [eBPF Development Practices: Accelerating Network Request Forwarding with Sockops](29-sockops/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_CGROUPS=y, CONFIG_CGROUP_BPF=y, CONFIG_DEBUG_INFO_BTF=y | Network interface | Required | CI build |
| [eBPF Practical Tutorial: Capturing SSL/TLS Plain Text Data Using uprobe](30-sslsniff/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | None | Required | CI runtime |
| [eBPF Practical Tutorial: Using eBPF to Trace Go Routine States](31-goroutine/README.md) | 5.2 | Required feature | x86_64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | None | Required | CI build |
| [eBPF Tutorial by Example 32: Wall Clock Profiling with Combined On-CPU and Off-CPU Analysis](32-wallclock-profiler/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_PERF_EVENTS=y | None | Required | CI build |
| [Measuring Function Latency with eBPF](33-funclatency/README.md) | 4.8 | Repository baseline | x86_64, arm64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_KPROBE_EVENTS=y, CONFIG_UPROBE_EVENTS=y | None | Required | CI build |
| [eBPF Development Practice: Modifying System Call Arguments with eBPF](34-syscall/README.md) | 5.8 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | CI runtime |
| [eBPF Development Practices: Asynchronously Send to Kernel with User Ring Buffer](35-user-ringbuf/README.md) | 6.1 | Tutorial docs | x86_64, arm64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_FTRACE_SYSCALLS=y | None | Required | CI runtime |
| [Userspace eBPF Runtimes: Overview and Applications](36-userspace-ebpf/README.md) | N/A | N/A | All | Not required | None | None | Not required | Docs only |
| [eBPF Practice: Tracing User Space Rust Applications with Uprobe](37-uprobe-rust/README.md) | 4.8 | Repository baseline | x86_64, arm64 | Not required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_UPROBE_EVENTS=y | None | Required | CI runtime |
| [Expanding eBPF Compile Once, Run Everywhere(CO-RE) to Userspace Compatibility](38-btf-uprobe/README.md) | 5.2 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | None | Required | Not in CI |
| [Using eBPF to Trace Nginx Requests](39-nginx/README.md) | 4.8 | Repository baseline | x86_64, arm64 | Not required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_UPROBE_EVENTS=y | None | Required | Not in CI |
| [Using eBPF to Trace MySQL Queries](40-mysql/README.md) | 4.8 | Repository baseline | x86_64, arm64 | Not required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_UPROBE_EVENTS=y | None | Required | Not in CI |
| [eBPF Tutorial by Example: Capturing TCP Information with XDP](41-xdp-tcpdump/README.md) | 5.8 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y | Network interface | Required | CI build |
| [eBPF Developer Tutorial: XDP Load Balancer](42-xdp-loadbalancer/README.md) | 4.8 | Required feature | x86_64, arm64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y | Network interface | Required | CI build |
| [Extending eBPF Beyond Its Limits: Custom kfuncs in Kernel Modules](43-kfuncs/README.md) | 6.11 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_DEBUG_INFO_BTF_MODULES=y, CONFIG_KPROBE_EVENTS=y, CONFIG_MODULES=y | None | Required | CI build |
| [eBPF Tutorial: Introduction to the BPF Scheduler](44-scx-simple/README.md) | 6.12 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_SCHED_CLASS_EXT=y | None | Required | CI build |
| [eBPF Tutorial by Example: Implementing the `scx_nest` Scheduler](45-scx-nest/README.md) | 6.12 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_SCHED_CLASS_EXT=y | None | Required | CI build |
| [eBPF Tutorial by Example: Building a High-Performance XDP Packet Generator](46-xdp-test/README.md) | 5.18 | Tutorial docs | x86_64, arm64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_XDP_SOCKETS=y | Network interface | Required | CI build |
| [eBPF Tutorial: Tracing CUDA GPU Operations](47-cuda-events/README.md) | 5.8 | Required feature | x86_64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | NVIDIA CUDA GPU | Required | Not in CI |
| [eBPF Tutorial: Energy Monitoring for Process-Level Power Analysis](48-energy/README.md) | 5.8 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | None | Required | Not in CI |
| [eBPF Tutorial: Fixing Broken HID Devices Without Kernel Patches](49-hid/README.md) | 6.3 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_HID_BPF=y, CONFIG_UHID=y\|m | None | Required | Not in CI |
| [eBPF Tutorial by Example 50: Composable Traffic Control with TCX Links](50-tcx/README.md) | 6.6 | Tutorial docs | x86_64, arm64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_NET_XGRESS=y | Network interface | Required | CI build |
| [eBPF Tutorial: cgroup-based Policy Control](cgroup/README.md) | 5.8 | Required feature | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_CGROUPS=y, CONFIG_CGROUP_BPF=y, CONFIG_CGROUP_DEVICE=y, CONFIG_DEBUG_INFO_BTF=y | None | Required | Not in CI |
| [eBPF Tutorial by Example: BPF Arena for Zero-Copy Shared Memory](features/bpf_arena/README.md) | 6.9 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_JIT=y, CONFIG_DEBUG_INFO_BTF=y | None | Required | CI build |
| [eBPF Tutorial: BPF Iterators for Kernel Data Export](features/bpf_iters/README.md) | 5.8 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y | None | Required | CI build |
| [eBPF Tutorial by Example: BPF Token for Delegated Privilege and Secure Program Loading](features/bpf_token/README.md) | 6.9 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_USER_NS=y | None | Required | CI build |
| [eBPF Tutorial: BPF Workqueues for Asynchronous Sleepable Tasks](features/bpf_wq/README.md) | 6.10 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_BPF_JIT=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y | None | Required | CI build |
| [eBPF Tutorial by Example: BPF Dynamic Pointers for Variable-Length Data](features/dynptr/README.md) | 6.4 | Tutorial docs | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_NET_CLS_BPF=y\|m, CONFIG_NET_SCHED=y | Network interface | Required | Not in CI |
| [eBPF Tutorial: Extending Kernel Subsystems with BPF struct_ops](features/struct_ops/README.md) | Unknown | Unverified | x86_64, arm64 | Required | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_JIT=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_DEBUG_INFO_BTF_MODULES=y, CONFIG_MODULES=y | None | Required | Not in CI |
| [eBPF by Example: Building a GPU Flamegraph Profiler with CUPTI](xpu/flamegraph/README.md) | 5.8 | Required feature | x86_64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_PERF_EVENTS=y, CONFIG_UPROBE_EVENTS=y | NVIDIA CUDA GPU | Required | Not in CI |
| [eBPF Tutorial by Example: Monitoring GPU Driver Activity with Kernel Tracepoints](xpu/gpu-kernel-driver/README.md) | 4.8 | Repository baseline | x86_64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y | GPU | Required | Not in CI |
| [eBPF Tutorial by Example: Tracing Intel NPU Kernel Driver Operations](xpu/npu-kernel-driver/README.md) | 6.2 | Tutorial docs | x86_64 | Optional | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DRM_ACCEL=y, CONFIG_DRM_ACCEL_IVPU=y\|m, CONFIG_TRACEPOINTS=y | Intel NPU | Required | Not in CI |
## Metadata fields
- `kernel_min` and `kernel_min_basis`: the declared minimum kernel and its evidence basis; use `architecture:version` when architectures differ.
- `architectures`: architectures the tutorial currently declares support for.
- `btf` and `kernel_config`: the BTF requirement and core kernel options common to the implementation paths; see the tutorial for vendor- or hook-specific conditions. `y|m` means built in or loaded as a module.
- `hardware`: specialized hardware or environment required to run the tutorial; `none` means no specialized hardware.
- `root`: whether running the tutorial requires root privileges.
- `test_status`: `ci-runtime` executes in CI, `ci-build` checks only the build, `not-in-ci` means there is no CI evidence, and `docs-only` is documentation only.
Field definitions and allowed values are validated by `scripts/generate_compatibility.py`. When a tutorial requirement changes, update its `.config` and rerun the generator.

80
src/compatibility.zh.md Normal file
View File

@@ -0,0 +1,80 @@
# 教程兼容性矩阵
<!-- Generated by scripts/generate_compatibility.py; do not edit directly. -->
本表由各教程的 `.config` 元数据生成。`最低内核` 表示教程按当前写法声明支持的最低版本;`依据` 标明该值来自教程文档、必需特性首次出现的版本,还是仓库声明的基线。`未纳入 CI` 不表示已做过手工验证。内核发行版可能禁用所列配置,因此版本号本身并不能保证兼容。
| 教程 | 最低内核 | 依据 | 架构 | BTF | 核心内核配置 | 硬件 | Root | 测试状态 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| [eBPF 示例教程 0:核心概念与工具简介](0-introduce/README.zh.md) | 不适用 | 不适用 | 全部 | 不需要 | 无 | 无 | 不需要 | 仅文档 |
| [eBPF 入门开发实践教程一:Hello World,基本框架和开发流程](1-helloworld/README.zh.md) | 4.8 | 教程文档 | x86_64, arm64 | 不需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程二:在 eBPF 中使用 kprobe 监测捕获 unlink 系统调用](2-kprobe-unlink/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_KPROBE_EVENTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程三:在 eBPF 中使用 fentry 监测捕获 unlink 系统调用](3-fentry-unlink/README.zh.md) | x86_64:5.5, arm64:6.0 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_BPF_JIT=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程四:在 eBPF 中捕获进程打开文件的系统调用集合,使用全局变量过滤进程 pid](4-opensnoop/README.zh.md) | 4.8 | 仓库基线 | x86_64, arm64 | 不需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程五:在 eBPF 中使用 uprobe 捕获 bash 的 readline 函数调用](5-uprobe-bashreadline/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程六:捕获进程发送信号的系统调用集合,使用 hash map 保存状态](6-sigsnoop/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门实践教程七:捕获进程执行事件,通过 perf event array 向用户态打印输出](7-execsnoop/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y, CONFIG_PERF_EVENTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程八:在 eBPF 中使用 exitsnoop 监控进程退出事件,使用 ring buffer 向用户态打印输出](8-exitsnoop/README.zh.md) | 5.8 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程九:捕获进程调度延迟,以直方图方式记录](9-runqlat/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程十:在 eBPF 中使用 hardirqs 或 softirqs 捕获中断事件](10-hardirqs/README.zh.md) | 5.5 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_CGROUPS=y, CONFIG_CGROUP_BPF=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门开发实践教程十一:在 eBPF 中使用 libbpf 开发用户态程序并跟踪 exec() 和 exit() 系统调用](11-bootstrap/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门实践教程十二:使用 eBPF 程序 profile 进行性能分析](12-profile/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_PERF_EVENTS=y | 无 | 需要 | CI 构建测试 |
| [eBPF入门开发实践教程十三:统计 TCP 连接延时,并使用 libbpf 在用户态处理数据](13-tcpconnlat/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_KPROBE_EVENTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF入门实践教程十四:记录 TCP 连接状态与 TCP RTT](14-tcpstates/README.zh.md) | 5.5 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y, CONFIG_TRACEPOINTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门实践教程十五:使用 USDT 捕获用户态 Java GC 事件耗时](15-javagc/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | 未纳入 CI |
| [eBPF 入门实践教程十六:编写 eBPF 程序 Memleak 监控内存泄漏](16-memleak/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 入门实践教程十七:编写 eBPF 程序统计随机/顺序磁盘 I/O](17-biopattern/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | 块设备 | 需要 | CI 运行测试 |
| [更多的参考资料:论文、项目等等](18-further-reading/README.zh.md) | 不适用 | 不适用 | 全部 | 不需要 | 无 | 无 | 不需要 | 仅文档 |
| [eBPF 入门实践教程:使用 LSM 进行安全检测防御](19-lsm-connect/README.zh.md) | 5.7 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_LSM=y, CONFIG_DEBUG_INFO_BTF=y | 无 | 需要 | 未纳入 CI |
| [eBPF 入门实践教程二十:使用 eBPF 进行 tc 流量控制](20-tc/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_NET_CLS_BPF=y\|m, CONFIG_NET_SCHED=y | 网络接口 | 需要 | CI 运行测试 |
| [eBPF 入门实践教程二十一: 使用 XDP 进行可编程数据包处理](21-xdp/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y | 网络接口 | 需要 | 未纳入 CI |
| [在 Android 上使用 eBPF 程序](22-android/README.zh.md) | 5.15 | 教程文档 | x86_64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | Android 设备或模拟器 | 需要 | 未纳入 CI |
| [通过 eBPF socket filter 或 syscall trace 追踪 HTTP 请求等七层协议 - eBPF 实践教程](23-http/README.zh.md) | 5.17 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 开发实践:使用 eBPF 隐藏进程或文件信息](24-hide/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | 未纳入 CI |
| [eBPF 入门实践教程:用 bpf_send_signal 发送信号终止恶意进程](25-signal/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 教程: 文件操纵实现 sudo 权限提升](26-sudo/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | 未纳入 CI |
| [eBPF 教程: 替换任意程序读取或者写入的文本](27-replace/README.zh.md) | 5.17 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | 未纳入 CI |
| [在应用程序退出后运行 eBPF 程序:eBPF 程序的生命周期](28-detach/README.zh.md) | 5.8 | 必需特性 | x86_64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y | 无 | 需要 | CI 构建测试 |
| [eBPF 开发实践:使用 sockops 加速网络请求转发](29-sockops/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_CGROUPS=y, CONFIG_CGROUP_BPF=y, CONFIG_DEBUG_INFO_BTF=y | 网络接口 | 需要 | CI 构建测试 |
| [eBPF 实践教程:使用 uprobe 捕获多种库的 SSL/TLS 明文数据](30-sslsniff/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | CI 运行测试 |
| [eBPF 实践教程:使用 eBPF 跟踪 Go 协程状态](31-goroutine/README.zh.md) | 5.2 | 必需特性 | x86_64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | CI 构建测试 |
| [eBPF 开发实践教程:示例 32 - 结合 On-CPU 和 Off-CPU 分析的挂钟时间分析](32-wallclock-profiler/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_PERF_EVENTS=y | 无 | 需要 | CI 构建测试 |
| [使用 eBPF 测量函数延迟](33-funclatency/README.zh.md) | 4.8 | 仓库基线 | x86_64, arm64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_KPROBE_EVENTS=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | CI 构建测试 |
| [eBPF 开发实践:使用 eBPF 修改系统调用参数](34-syscall/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | CI 运行测试 |
| [eBPF开发实践:使用 user ring buffer 向内核异步发送信息](35-user-ringbuf/README.zh.md) | 6.1 | 教程文档 | x86_64, arm64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_FTRACE_SYSCALLS=y | 无 | 需要 | CI 运行测试 |
| [用户空间 eBPF 运行时:深度解析与应用实践](36-userspace-ebpf/README.zh.md) | 不适用 | 不适用 | 全部 | 不需要 | 无 | 无 | 不需要 | 仅文档 |
| [eBPF 实践:使用 Uprobe 追踪用户态 Rust 应用](37-uprobe-rust/README.zh.md) | 4.8 | 仓库基线 | x86_64, arm64 | 不需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | CI 运行测试 |
| [借助 eBPF 和 BTF,让用户态也能一次编译、到处运行](38-btf-uprobe/README.zh.md) | 5.2 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | 未纳入 CI |
| [使用 eBPF 跟踪 Nginx 请求](39-nginx/README.zh.md) | 4.8 | 仓库基线 | x86_64, arm64 | 不需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | 未纳入 CI |
| [使用 eBPF 跟踪 MySQL 查询](40-mysql/README.zh.md) | 4.8 | 仓库基线 | x86_64, arm64 | 不需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_UPROBE_EVENTS=y | 无 | 需要 | 未纳入 CI |
| [eBPF 示例教程:使用 XDP 捕获 TCP 信息](41-xdp-tcpdump/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y | 网络接口 | 需要 | CI 构建测试 |
| [eBPF 开发者教程: 简单的 XDP 负载均衡器](42-xdp-loadbalancer/README.zh.md) | 4.8 | 必需特性 | x86_64, arm64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y | 网络接口 | 需要 | CI 构建测试 |
| [超越 eBPF 的极限:在内核模块中定义自定义 kfunc](43-kfuncs/README.zh.md) | 6.11 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_DEBUG_INFO_BTF_MODULES=y, CONFIG_KPROBE_EVENTS=y, CONFIG_MODULES=y | 无 | 需要 | CI 构建测试 |
| [eBPF 教程:BPF 调度器入门](44-scx-simple/README.zh.md) | 6.12 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_SCHED_CLASS_EXT=y | 无 | 需要 | CI 构建测试 |
| [eBPF 示例教程:实现 `scx_nest` 调度器](45-scx-nest/README.zh.md) | 6.12 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_SCHED_CLASS_EXT=y | 无 | 需要 | CI 构建测试 |
| [eBPF 实例教程:构建高性能 XDP 数据包生成器](46-xdp-test/README.zh.md) | 5.18 | 教程文档 | x86_64, arm64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_XDP_SOCKETS=y | 网络接口 | 需要 | CI 构建测试 |
| [eBPF 教程:追踪 CUDA GPU 操作](47-cuda-events/README.zh.md) | 5.8 | 必需特性 | x86_64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_UPROBE_EVENTS=y | NVIDIA CUDA GPU | 需要 | 未纳入 CI |
| [eBPF 教程:进程级能源监控与功耗分析](48-energy/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_TRACEPOINTS=y | 无 | 需要 | 未纳入 CI |
| [eBPF 教程:无需内核补丁修复故障的 HID 设备](49-hid/README.zh.md) | 6.3 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_HID_BPF=y, CONFIG_UHID=y\|m | 无 | 需要 | 未纳入 CI |
| [eBPF 入门实践教程第五十篇:使用 TCX Link 实现可组合的流量控制](50-tcx/README.zh.md) | 6.6 | 教程文档 | x86_64, arm64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_NET_XGRESS=y | 网络接口 | 需要 | CI 构建测试 |
| [eBPF 实例教程:基于 cgroup 的策略控制](cgroup/README.zh.md) | 5.8 | 必需特性 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_CGROUPS=y, CONFIG_CGROUP_BPF=y, CONFIG_CGROUP_DEVICE=y, CONFIG_DEBUG_INFO_BTF=y | 无 | 需要 | 未纳入 CI |
| [eBPF 实例教程:BPF Arena 零拷贝共享内存](features/bpf_arena/README.zh.md) | 6.9 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_JIT=y, CONFIG_DEBUG_INFO_BTF=y | 无 | 需要 | CI 构建测试 |
| [eBPF 教程:BPF 迭代器用于内核数据导出](features/bpf_iters/README.zh.md) | 5.8 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y | 无 | 需要 | CI 构建测试 |
| [eBPF 入门实践教程:BPF Token,安全的委托式权限与程序加载](features/bpf_token/README.zh.md) | 6.9 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_USER_NS=y | 无 | 需要 | CI 构建测试 |
| [eBPF 教程:BPF 工作队列用于异步可睡眠任务](features/bpf_wq/README.zh.md) | 6.10 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_BPF_JIT=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_FTRACE=y | 无 | 需要 | CI 构建测试 |
| [eBPF 实例教程:BPF 动态指针处理可变长度数据](features/dynptr/README.zh.md) | 6.4 | 教程文档 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_NET_CLS_BPF=y\|m, CONFIG_NET_SCHED=y | 网络接口 | 需要 | 未纳入 CI |
| [eBPF 教程:使用 BPF struct_ops 扩展内核子系统](features/struct_ops/README.zh.md) | 未知 | 尚未验证 | x86_64, arm64 | 需要 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_JIT=y, CONFIG_DEBUG_INFO_BTF=y, CONFIG_DEBUG_INFO_BTF_MODULES=y, CONFIG_MODULES=y | 无 | 需要 | 未纳入 CI |
| [eBPF 示例:使用 CUPTI 构建 GPU 火焰图分析器](xpu/flamegraph/README.zh.md) | 5.8 | 必需特性 | x86_64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_PERF_EVENTS=y, CONFIG_UPROBE_EVENTS=y | NVIDIA CUDA GPU | 需要 | 未纳入 CI |
| [eBPF 实例教程:使用内核跟踪点监控 GPU 驱动活动](xpu/gpu-kernel-driver/README.zh.md) | 4.8 | 仓库基线 | x86_64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y | GPU | 需要 | 未纳入 CI |
| [eBPF 实例教程:跟踪 Intel NPU 内核驱动操作](xpu/npu-kernel-driver/README.zh.md) | 6.2 | 教程文档 | x86_64 | 可选 | CONFIG_BPF=y, CONFIG_BPF_SYSCALL=y, CONFIG_BPF_EVENTS=y, CONFIG_DRM_ACCEL=y, CONFIG_DRM_ACCEL_IVPU=y\|m, CONFIG_TRACEPOINTS=y | Intel NPU | 需要 | 未纳入 CI |
## 元数据字段
- `kernel_min` 与 `kernel_min_basis`:教程声明的最低内核及其依据;按架构不同时使用 `架构:版本`。
- `architectures`:教程当前声明支持的架构。
- `btf` 与 `kernel_config`:BTF 要求以及各实现路径共有的核心内核选项;供应商或挂载点特有的条件请参阅对应教程。`y|m` 表示内建或模块均可。
- `hardware`:运行教程所需的专用硬件或环境;`none` 表示不需要专用硬件。
- `root`:运行教程是否需要 root 权限。
- `test_status`:`ci-runtime` 会在 CI 中实际运行,`ci-build` 仅验证构建,`not-in-ci` 表示没有 CI 证据,`docs-only` 表示纯文档。
字段定义和允许值由 `scripts/generate_compatibility.py` 校验;修改教程要求时,请更新对应 `.config` 并重新运行生成脚本。

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=6.9
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_JIT=y,CONFIG_DEBUG_INFO_BTF=y
hardware=none
root=required
test_status=ci-build

View File

@@ -359,4 +359,4 @@ Our linked list example demonstrates the core arena concepts: defining an arena
- **Linux Kernel Source:** `kernel/bpf/arena.c` - Arena implementation
- **LLVM Address Spaces:** Documentation on `__arena` compiler support
This example is adapted from Meta's arena_list.c in the Linux kernel samples, with educational enhancements. Requires Linux kernel 6.10+ with `CONFIG_BPF_ARENA=y` enabled. Complete source code available in the tutorial repository.
This example is adapted from Meta's arena_list.c in the Linux kernel samples, with educational enhancements. It requires Linux kernel 6.9+ with BPF JIT support (`CONFIG_BPF_JIT=y`). BPF arena is not controlled by a separate `CONFIG_BPF_ARENA` option. Complete source code is available in the tutorial repository.

View File

@@ -357,4 +357,4 @@ BPF Arena 通过提供稀疏共享内存解决了传统 BPF map 的根本限制
- **Linux 内核源码:** `kernel/bpf/arena.c` - Arena 实现
- **LLVM 地址空间:** 关于 `__arena` 编译器支持的文档
此示例改编自 Linux 内核示例中 Meta 的 arena_list.c,并增加了教育性增强。需要 Linux 内核 6.10+ 并启用 `CONFIG_BPF_ARENA=y`。完整源代码可在教程仓库中获得。
此示例改编自 Linux 内核示例中 Meta 的 arena_list.c,并增加了教育性增强。它需要 Linux 内核 6.9+ 并启用 BPF JIT(`CONFIG_BPF_JIT=y`);BPF arena 并没有独立的 `CONFIG_BPF_ARENA` 选项。完整源代码可在教程仓库中获得。

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=5.8
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=6.9
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_USER_NS=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=6.10
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_BPF_JIT=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_FTRACE=y
hardware=none
root=required
test_status=ci-build

View File

@@ -1,3 +1,11 @@
level=Depth
type=Features
desc=BPF Dynamic Pointers for Variable-Length Data
kernel_min=6.4
kernel_min_basis=documented
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_NET_CLS_BPF=y|m,CONFIG_NET_SCHED=y
hardware=network-interface
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=Features
kernel_min=unknown
kernel_min_basis=unverified
architectures=x86_64,arm64
btf=required
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_JIT=y,CONFIG_DEBUG_INFO_BTF=y,CONFIG_DEBUG_INFO_BTF_MODULES=y,CONFIG_MODULES=y
hardware=none
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=GPU
kernel_min=5.8
kernel_min_basis=required-feature
architectures=x86_64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_PERF_EVENTS=y,CONFIG_UPROBE_EVENTS=y
hardware=nvidia-cuda-gpu
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=GPU
kernel_min=4.8
kernel_min_basis=repository-baseline
architectures=x86_64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y
hardware=gpu
root=required
test_status=not-in-ci

View File

@@ -1,2 +1,10 @@
level=Depth
type=GPU
kernel_min=6.2
kernel_min_basis=documented
architectures=x86_64
btf=optional
kernel_config=CONFIG_BPF=y,CONFIG_BPF_SYSCALL=y,CONFIG_BPF_EVENTS=y,CONFIG_DRM_ACCEL=y,CONFIG_DRM_ACCEL_IVPU=y|m,CONFIG_TRACEPOINTS=y
hardware=intel-npu
root=required
test_status=not-in-ci