Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AxVisor eBPF 性能追踪 - 技术选型

本文档详细介绍 eBPF 工作原理、VMM 层支持需求,以及技术选型依据。


1. eBPF 技术原理

1.1 什么是 eBPF

eBPF (extended Berkeley Packet Filter) 是一种革命性的内核沙箱技术,允许在内核中安全地运行用户定义的程序,而无需修改内核源码或加载内核模块。

核心价值

特性传统方案eBPF 方案
添加追踪修改源码 → 重编译 → 重启运行时动态加载
安全性可能导致内核崩溃验证器保证安全
性能日志 I/O 开销大内核空间聚合,极低开销
灵活性固定采集逻辑可编程采集策略

1.2 eBPF 执行流程

┌─────────────────────────────────────────────────────────────────────────────┐
│                           eBPF Complete Execution Flow                      │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  ╔═════════════════════════════════════════════════════════════════════╗    │
│  ║                        Compile Phase (Host)                         ║    │
│  ╠═════════════════════════════════════════════════════════════════════╣    │
│  ║                                                                     ║    │
│  ║  ┌────────────────┐    Rust/C      ┌────────────────────────────┐   ║    │
│  ║  │  eBPF Source   │  ──────────►   │  eBPF Bytecode (.bpf ELF)  │   ║    │
│  ║  │  (Rust + Aya)  │   Compiler     │  Platform-independent ISA  │   ║    │
│  ║  └────────────────┘                └────────────────────────────┘   ║    │
│  ║                                                                     ║    │
│  ╚═════════════════════════════════════════════════════════════════════╝    │
│                                    │                                        │
│                                    ▼ Transfer to target system              │
│  ╔═════════════════════════════════════════════════════════════════════╗    │
│  ║                        Load Phase (Kernel)                          ║    │
│  ╠═════════════════════════════════════════════════════════════════════╣    │
│  ║                                                                     ║    │
│  ║  ┌────────────────┐              ┌────────────────────────────┐     ║    │
│  ║  │   ELF Parser   │  ──────────► │   Bytecode + Map Defs      │     ║    │
│  ║  └────────────────┘              └─────────────┬──────────────┘     ║    │
│  ║                                                │                    ║    │
│  ║                                                ▼                    ║    │
│  ║  ┌────────────────┐   Safety      ┌────────────────────────────┐    ║    │
│  ║  │    Verifier    │  ◄──────────  │   Program Bytecode         │    ║    │
│  ║  │                │               │                            │    ║    │
│  ║  └───────┬────────┘               └────────────────────────────┘    ║    │
│  ║          │                                                          ║    │
│  ║          │ Verification passed                                      ║    │
│  ║          ▼                                                          ║    │
│  ║  ┌────────────────┐              ┌────────────────────────────┐     ║    │
│  ║  │ JIT/Interpreter│  ──────────► │   Executable Program       │     ║    │
│  ║  └────────────────┘              └─────────────┬──────────────┘     ║    │
│  ║                                                │                    ║    │
│  ║                                                ▼                    ║    │
│  ║  ┌────────────────────────────────────────────────────────────┐     ║    │
│  ║  │              Attach to Hook Point (Tracepoint/Kprobe)      │     ║    │
│  ║  └────────────────────────────────────────────────────────────┘     ║    │
│  ║                                                                     ║    │
│  ╚═════════════════════════════════════════════════════════════════════╝    │
│                                    │                                        │
│                                    ▼ Event triggered                        │
│  ╔═════════════════════════════════════════════════════════════════════╗    │
│  ║                        Execute Phase (Runtime)                      ║    │
│  ╠═════════════════════════════════════════════════════════════════════╣    │
│  ║                                                                     ║    │
│  ║  ┌──────────────┐          ┌──────────────┐          ┌──────────┐   ║    │
│  ║  │ Hook Trigger │ ───────► │ eBPF Program │ ◄──────► │  Maps    │   ║    │
│  ║  │ (VM Exit etc)│          │   Execute    │  R/W     │ (Data)   │   ║    │
│  ║  └──────────────┘          └──────┬───────┘          └────┬─────┘   ║    │
│  ║                                   │                       │         ║    │
│  ║                                   │ Call                  │ Share   ║    │
│  ║                                   ▼                       ▼         ║    │
│  ║                           ┌──────────────┐          ┌──────────┐    ║    │
│  ║                           │   Helpers    │          │ Userspace│    ║    │
│  ║                           │(Kernel Svc)  │          │   Read   │    ║    │
│  ║                           └──────────────┘          └──────────┘    ║    │
│  ║                                                                     ║    │
│  ╚═════════════════════════════════════════════════════════════════════╝    │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

1.3 eBPF 核心组件详解

1.3.1 eBPF 字节码

eBPF 使用精简的 RISC 风格指令集,运行在虚拟的 64 位寄存器机器上:

组件规格说明
寄存器R0-R10 (64-bit)R0=返回值, R1-R5=参数, R10=帧指针
栈空间512 字节固定大小,编译时确定使用量
指令大小8 字节/指令固定宽度,便于解析
程序大小限制100万指令 (Linux 5.2+)防止无限循环

指令格式

┌──────────┬──────────┬──────────┬──────────┬──────────────────┐
│  opcode  │ dst_reg  │ src_reg  │  offset  │    immediate     │
│  8 bits  │  4 bits  │  4 bits  │ 16 bits  │     32 bits      │
└──────────┴──────────┴──────────┴──────────┴──────────────────┘

1.3.2 eBPF Maps

Maps 是 eBPF 程序与用户态之间共享数据的核心机制:

┌─────────────────────────────────────────────────────────────────┐
│                        eBPF Maps Mechanism                      │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│     Userspace Tool                        Kernel eBPF Program   │
│     (ax-trace)                          (tracepoint handler)    │
│          │                                    │                 │
│          │     ┌────────────────────────┐     │                 │
│          │     │       eBPF Map         │     │                 │
│          │     │  ┌─────────┬─────────┐ │     │                 │
│   Read ──┼────►│  │   Key   │  Value  │ │◄────┼── Write         │
│   Stats  │     │  ├─────────┼─────────┤ │     │   Stats         │
│          │     │  │ exit=1  │  12345  │ │     │                 │
│          │     │  │ exit=2  │   6789  │ │     │                 │
│          │     │  │ exit=3  │    234  │ │     │                 │
│          │     │  └─────────┴─────────┘ │     │                 │
│          │     └────────────────────────┘     │                 │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

支持的 Map 类型(本项目使用):

Map 类型数据结构时间复杂度典型用途
HashMap哈希表O(1)按 exit_reason 统计计数
Array固定数组O(1)延迟直方图桶
PerCPU HashMap每 CPU 哈希表O(1)避免锁竞争的统计

1.3.3 Helper 函数

eBPF 程序通过 Helper 函数访问内核服务,这是沙箱的受控出口:

Helper ID函数名功能安全性
1bpf_map_lookup_elem查找 Map 元素返回指针需边界检查
2bpf_map_update_elem更新 Map 元素原子操作
5bpf_ktime_get_ns获取时间戳只读,无副作用
6bpf_trace_printk调试输出生产环境应禁用

1.3.4 验证器 (Verifier)

验证器是 eBPF 安全性的核心保障,通过静态分析确保程序安全:

验证内容

检查项目的实现方式
程序终止性防止无限循环限制指令数 + 禁止向后跳转
内存安全防止越界访问追踪寄存器类型和范围
类型安全防止类型混淆抽象解释 + 类型推导
栈边界防止栈溢出静态分析栈使用量
          Verification Flow
                │
                ▼
    ┌───────────────────────┐
    │  Build CFG (Control   │
    │     Flow Graph)       │
    └───────────┬───────────┘
                │
                ▼
    ┌───────────────────────┐
    │  Simulate each path   │
    │  Track register state │
    └───────────┬───────────┘
                │
                ▼
    ┌───────────────────────┐      ┌─────────────┐
    │  Unsafe operation?    │─Yes─►│ Reject Load │
    └───────────┬───────────┘      └─────────────┘
                │ No
                ▼
    ┌───────────────────────┐
    │    Allow program      │
    └───────────────────────┘

1.4 eBPF 程序类型

与 Hypervisor 追踪相关的程序类型:

程序类型触发时机上下文数据适用场景
Tracepoint预定义的静态插桩点结构化事件参数VM Exit 统计(核心)
Kprobe任意函数入口寄存器状态动态探测(扩展)
Kretprobe任意函数返回返回值 + 寄存器延迟测量(扩展)

2. VMM 层 eBPF 支持需求分析

2.1 与标准 Linux eBPF 的差异

AxVisor 基于 ArceOS 自定义内核,需要从零实现 eBPF 支持:

组件Linux 实现AxVisor 需求
系统调用bpf() syscall不存在 → 直接 API
符号表/proc/kallsyms不存在 → 编译时生成
Tracepoint内核内置 trace_*不存在 → 移植 Starry-OS
Kprobe内核内置不存在 → 移植 Starry-OS
验证器内核内置可选 → 初期信任程序

2.2 Hypervisor 特权级问题

AxVisor 运行在更高特权级,传统 eBPF 设计需要适配:

┌─────────────────────────────────────────────────────────────────┐
│                 Virtualization Privilege Levels                 │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │  Guest OS (EL1 / Ring 0)                                  │  │
│  │    Traditional Linux eBPF runs here                       │  │
│  │    Tracing targets: syscalls, kernel functions            │  │
│  └───────────────────────────────────────────────────────────┘  │
│                              ▲                                  │
│                              │ VM Exit / VM Entry               │
│                              ▼                                  │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │  AxVisor Hypervisor (EL2 / VMX Root) ◄── Our tracing layer│  │
│  │                                                           │  │
│  │    Tracing targets:                                       │  │
│  │    ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐    │  │
│  │    │  VM Exit    │ │  Hypercall  │ │ Interrupt Inject│    │  │
│  │    │  Latency    │ │  Handling   │ │ Latency         │    │  │
│  │    └─────────────┘ └─────────────┘ └─────────────────┘    │  │
│  │    ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐    │  │
│  │    │EPT Handling │ │MMIO Emulate │ │ vCPU Scheduling │    │  │
│  │    └─────────────┘ └─────────────┘ └─────────────────┘    │  │
│  │                                                           │  │
│  └───────────────────────────────────────────────────────────┘  │
│                              ▲                                  │
│                              │                                  │
│  ┌───────────────────────────────────────────────────────────┐  │
│  │  Hardware                                                 │  │
│  └───────────────────────────────────────────────────────────┘  │
│                                                                 │
└─────────────────────────────────────────────────────────────────┘

2.3 VMM 需要提供的支持

为在 AxVisor 中实现 eBPF 追踪,需要 VMM 层提供以下支持:

2.3.1 追踪点插桩

在 VMM 关键路径插入追踪点宏调用:

位置:modules/axvcpu/src/vcpu.rs

#![allow(unused)]
fn main() {
// AxVCpu::run() 方法中需要添加追踪点
pub fn run(&self) -> AxResult<AxVCpuExitReason> {
    self.transition_state(VCpuState::Ready, VCpuState::Running)?;

    // ▼ 追踪点:VM Entry
    trace_vmm_vcpu_run_enter!(self.vm_id(), self.id());

    let result = self.manipulate_arch_vcpu(VCpuState::Running, VCpuState::Ready, |arch_vcpu| {
        arch_vcpu.run()
    });

    // ▼ 追踪点:VM Exit
    if let Ok(ref exit_reason) = result {
        trace_vmm_vcpu_run_exit!(self.vm_id(), self.id(), exit_reason);
    }

    result
}
}

2.3.2 上下文信息获取

eBPF 程序需要访问当前 VM/vCPU 上下文,VMM 需要提供:

信息来源Helper 函数
当前 VM IDAxVCpu::vm_id()bpf_get_current_vm_id()
当前 vCPU IDAxVCpu::id()bpf_get_current_vcpu_id()
当前时间戳axhal::time::monotonic_time_nanos()bpf_ktime_get_ns()

2.3.3 时间测量基础设施

延迟统计需要高精度时间源,AxVisor 已有基础:

#![allow(unused)]
fn main() {
// 已存在于 ArceOS
pub fn monotonic_time_nanos() -> u64;

// 需要封装为 eBPF Helper
fn bpf_ktime_get_ns() -> u64 {
    axhal::time::monotonic_time_nanos()
}
}

2.3.4 Exit Reason 编码

为统计分析,需要将 AxVCpuExitReason 编码为数值:

#![allow(unused)]
fn main() {
// 基于 modules/axvcpu/src/exit.rs
impl AxVCpuExitReason {
    pub fn to_trace_code(&self) -> u32 {
        match self {
            Self::Hypercall { .. } => 1,
            Self::MmioRead { .. } => 2,
            Self::MmioWrite { .. } => 3,
            Self::SysRegRead { .. } => 4,
            Self::SysRegWrite { .. } => 5,
            Self::IoRead { .. } => 6,
            Self::IoWrite { .. } => 7,
            Self::ExternalInterrupt { .. } => 8,
            Self::NestedPageFault { .. } => 9,
            Self::Halt => 10,
            Self::CpuUp { .. } => 11,
            Self::CpuDown { .. } => 12,
            Self::SystemDown => 13,
            Self::Nothing => 14,
            Self::FailEntry { .. } => 15,
            Self::SendIPI { .. } => 16,
        }
    }
}
}

3. 技术选型

3.1 选型原则

原则说明权重
ArceOS 兼容必须支持 #![no_std] 环境必须
Rust 优先与 AxVisor 技术栈保持一致
许可证兼容必须与 AxVisor 许可证兼容必须
最小依赖优先选择轻量级组件
可复用性优先复用 Starry-OS 已验证组件

3.2 组件选型结果

功能选择来源复用方式阶段
eBPF 虚拟机rbpf社区适配 no_stdPhase 2
eBPF Mapskbpf-basicStarry-OS直接引用Phase 2
符号表生成ksymStarry-OS直接引用Phase 1
追踪点框架tracepointStarry-OS适配后复用Phase 1
过滤表达式tp-lexerStarry-OS直接引用Phase 3
动态探针kprobeStarry-OS移植适配Phase 4
验证器PREVAIL社区集成或轻量实现Phase 5

3.3 各组件详解

3.3.1 rbpf - eBPF 虚拟机

属性
仓库https://github.com/qmonnet/rbpf
许可证MIT
语言Rust
JIT 支持x86_64

选择理由

  • 纯 Rust 实现,无 C 依赖
  • 支持 #![no_std](需适配)
  • 提供解释器和 JIT 两种执行模式
  • API 简洁,易于集成

VM 类型

类型说明适用场景
EbpfVmRaw接收原始字节缓冲区Tracepoint 事件(采用)
EbpfVmNoData无输入数据简单计算

3.3.2 kbpf-basic - eBPF Maps

属性
仓库https://github.com/Starry-OS/kbpf-basic
许可证MIT/Apache-2.0
no_std

支持的 Map 类型

类型说明
BPF_MAP_TYPE_ARRAY固定大小数组
BPF_MAP_TYPE_HASH动态哈希表
BPF_MAP_TYPE_LRU_HASHLRU 淘汰哈希表

3.3.3 ksym - 内核符号表

属性
仓库https://github.com/Starry-OS/ksym
许可证MIT/Apache-2.0
no_std

功能

  • 编译时从 ELF 生成压缩符号表
  • 运行时零拷贝查找
  • 支持 Rust 符号 demangle

3.3.4 tracepoint - 追踪点框架

属性
仓库https://github.com/Starry-OS/tracepoint
许可证MIT/Apache-2.0
no_std

核心功能

  • define_event_trace! 宏定义追踪点
  • 线程安全的事件管理器
  • 低开销的静态追踪点

3.3.5 kprobe - 动态探针

属性
仓库https://github.com/Starry-OS/kprobe
许可证MIT/Apache-2.0
no_std
架构支持x86_64, aarch64, riscv64, loongarch64

核心功能

  • kprobe: 函数入口探针
  • kretprobe: 函数返回探针
  • 断点机制适配多架构
  • 与 eBPF 程序集成

3.3.6 PREVAIL - eBPF 验证器

属性
仓库https://github.com/vbpf/ebpf-verifier
许可证MIT
语言C++

核心功能

  • 内存边界检查
  • 程序终止性验证
  • 类型安全检查
  • 独立于 Linux 内核

备选方案: 如 PREVAIL 集成困难,可实现轻量级验证器,仅检查关键安全属性。

3.4 许可证兼容性

组件许可证与 AxVisor 兼容
rbpfMIT
kbpf-basicMIT/Apache-2.0
ksymMIT/Apache-2.0
tracepointMIT/Apache-2.0
tp-lexerMIT/Apache-2.0
kprobeMIT/Apache-2.0
PREVAILMIT

AxVisor 许可证: GPL-3.0-or-later OR Apache-2.0 OR MulanPubL-2.0


4. 架构设计

4.1 模块层次结构

架构决策: 统一在 modules/axebpf 内实现所有功能,不创建独立的 axksym/axtracepoint 模块。

┌─────────────────────────────────────────────────────────────────────────────┐
│                     AxVisor eBPF Tracing Architecture                       │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │                        Shell Command Layer                            │  │
│  │   kernel/src/shell/commands/trace.rs                                  │  │
│  │   ┌─────────────────────────────────────────────────────────────┐     │  │
│  │   │  trace list | enable | disable | stat | load | unload       │     │  │
│  │   └─────────────────────────────────────────────────────────────┘     │  │
│  └───────────────────────────────────┬───────────────────────────────────┘  │
│                                      │                                      │
│  ┌───────────────────────────────────▼───────────────────────────────────┐  │
│  │                        axebpf Module (Unified)                        │  │
│  │   modules/axebpf/                                                     │  │
│  │   ┌──────────────────────────────────────────────────────────────┐    │  │
│  │   │ symbols.rs    │ 符号表管理 (封装 ksym)                       │    │  │
│  │   ├──────────────────────────────────────────────────────────────┤    │  │
│  │   │ tracepoint.rs │ 追踪点框架 (封装 tracepoint/ktracepoint)     │    │  │
│  │   ├──────────────────────────────────────────────────────────────┤    │  │
│  │   │ runtime.rs    │ eBPF 运行时 (封装 rbpf VM)                   │    │  │
│  │   ├──────────────────────────────────────────────────────────────┤    │  │
│  │   │ helpers.rs    │ Helper 函数 (ktime, trace_printk, vm_id...)  │    │  │
│  │   ├──────────────────────────────────────────────────────────────┤    │  │
│  │   │ maps.rs       │ Map 数据结构 (封装 kbpf-basic)               │    │  │
│  │   └──────────────────────────────────────────────────────────────┘    │  │
│  └───────────────────────────────────┬───────────────────────────────────┘  │
│                                      │ Tracepoint Trigger                   │
│  ┌───────────────────────────────────▼───────────────────────────────────┐  │
│  │                      VMM Tracepoint Calls                             │  │
│  │   modules/axvcpu/, modules/axvm/, kernel/src/vmm/                     │  │
│  │   ┌────────────┐  ┌────────────┐  ┌────────────┐  ┌────────────┐      │  │
│  │   │vcpu_run_*  │  │ hypercall  │  │ mmio_*     │  │ ept_viol   │      │  │
│  │   └────────────┘  └────────────┘  └────────────┘  └────────────┘      │  │
│  └───────────────────────────────────────────────────────────────────────┘  │
│                                                                             │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │                  xtask Symbol Generation (Compile-time)               │  │
│  │   xtask/src/symbols.rs                                                │  │
│  │   ┌─────────────────────────────────────────────────────────────┐     │  │
│  │   │  cargo xtask symbols → 从 ELF 生成 kallsyms.bin             │     │  │
│  │   └─────────────────────────────────────────────────────────────┘     │  │
│  └───────────────────────────────────────────────────────────────────────┘  │
│                                                                             │
│  ┌───────────────────────────────────────────────────────────────────────┐  │
│  │                  Starry-OS Dependencies (Direct Reference)            │  │
│  │   ┌────────┐  ┌────────────┐  ┌──────────┐  ┌──────┐  ┌───────────┐   │  │
│  │   │  ksym  │  │ tracepoint │  │ tp-lexer │  │ rbpf │  │kbpf-basic │   │  │
│  │   └────────┘  └────────────┘  └──────────┘  └──────┘  └───────────┘   │  │
│  └───────────────────────────────────────────────────────────────────────┘  │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

4.2 数据流

┌─────────────────────────────────────────────────────────────────────────────┐
│                           Tracing Data Flow                                 │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   VMM Event                  eBPF Process                 User Query        │
│                                                                             │
│   ┌─────────┐               ┌─────────┐               ┌─────────┐           │
│   │ VM Exit │               │ eBPF    │               │ trace   │           │
│   │ Occurs  │ ─────────────►│ Program │               │ stat    │           │
│   └─────────┘ Trigger TP    │ Execute │               └────┬────┘           │
│                             └────┬────┘                    │                │
│                                  │                         │                │
│                                  ▼ Write                   │ Read           │
│                             ┌─────────┐                    │                │
│                             │  Maps   │ ◄──────────────────┘                │
│                             │ (Stats) │                                     │
│                             └─────────┘                                     │
│                                                                             │
│   Example: VM Exit Statistics                                               │
│                                                                             │
│   ┌──────────────────────────────────────────────────────────────────┐      │
│   │  HashMap<VmExitKey, VmExitStats>                                 │      │
│   │  ┌─────────────────────┬─────────────────────────────────┐       │      │
│   │  │ Key                 │ Value                           │       │      │
│   │  │ (vm=1, exit=Hyper)  │ {count=12345, avg=1.2μs, ...}   │       │      │
│   │  │ (vm=1, exit=MMIO)   │ {count=6789, avg=2.3μs, ...}    │       │      │
│   │  │ (vm=2, exit=Hyper)  │ {count=4567, avg=1.5μs, ...}    │       │      │
│   │  └─────────────────────┴─────────────────────────────────┘       │      │
│   └──────────────────────────────────────────────────────────────────┘      │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

4.3 依赖关系

架构决策: 所有功能统一在 modules/axebpf 模块内实现,不创建独立的 axksym/axtracepoint 模块。 这样更简洁,减少模块间耦合。

modules/axebpf/
├── Cargo.toml
├── src/
│   ├── lib.rs           # 模块入口
│   ├── symbols.rs       # 符号表管理 (封装 ksym)
│   ├── tracepoint.rs    # 追踪点框架 (封装 tracepoint)
│   ├── runtime.rs       # eBPF 运行时 (封装 rbpf)
│   ├── helpers.rs       # Helper 函数
│   └── maps.rs          # Map 数据结构 (封装 kbpf-basic)
│
└── 依赖:
    ├── ksym (Starry-OS: 符号表生成与查找)
    ├── tracepoint (Starry-OS: 追踪点核心,package = "ktracepoint")
    ├── tp-lexer (Starry-OS: 过滤表达式)
    ├── rbpf (社区: eBPF VM)
    └── kbpf-basic (Starry-OS: Maps)

xtask/
└── src/symbols.rs       # 编译时符号表生成 (使用 ksym)

kernel (使用 ebpf feature)
└── axebpf              # 单一依赖入口

5. 风险识别与缓解

风险可能性影响缓解策略
rbpf no_std 适配困难优先评估,必要时 fork
追踪点开销过高设计时考虑禁用路径优化
多架构支持复杂先完成 x86_64,再扩展 AArch64
Starry-OS 组件不兼容组件独立性高,可单独适配

6. 参考资源

6.1 Starry-OS 组件

组件链接
ksymhttps://github.com/Starry-OS/ksym
kbpf-basichttps://github.com/Starry-OS/kbpf-basic
tp-lexerhttps://github.com/Starry-OS/tp-lexer
tracepointhttps://github.com/Starry-OS/tracepoint
kprobehttps://github.com/Starry-OS/kprobe
eBPF Discussionhttps://github.com/orgs/Starry-OS/discussions/4

6.2 eBPF 参考

资源链接
rbpfhttps://github.com/qmonnet/rbpf
Aya (Rust eBPF)https://aya-rs.dev/
Linux eBPF 文档https://docs.kernel.org/bpf/
eBPF 指令集规范https://www.ietf.org/archive/id/draft-thaler-bpf-isa-00.html
PREVAIL 验证器https://github.com/vbpf/ebpf-verifier

6.3 非 Linux eBPF 实现参考

项目说明
eBPF for Windowshttps://github.com/microsoft/ebpf-for-windows
Femto-Containershttps://github.com/future-proof-iot/Femto-Container
uBPFhttps://github.com/iovisor/ubpf