Эх сурвалжийг харах

fix: remove useless c code (#1116)

* fix: remove useless c code

remove printk.c file
remove old test_ebpf file
implement `lookup_kallsyms` and `addr_from_symbol` using rust

* fix the weak linkage

* feat(kernel): 添加cfg-if依赖并优化panic模块的条件编译

Signed-off-by: longjin <[email protected]>

---------

Signed-off-by: longjin <[email protected]>
Co-authored-by: longjin <[email protected]>
linfeng 4 өдөр өмнө
parent
commit
3d663af8a2

+ 0 - 80
docs/kernel/core_api/kernel_api.md

@@ -572,86 +572,6 @@
 
 &emsp;&emsp;第二个字符串
 
-#### `printk(const char* fmt, ...)`
-
-##### 描述
-
-&emsp;&emsp;该宏能够在控制台上以黑底白字格式化输出字符串.
-
-##### 参数
-
-**fmt**
-
-&emsp;&emsp;源格式字符串
-
-**...**
-
-&emsp;&emsp;可变参数
-
-#### `printk_color(unsigned int FRcolor, unsigned int BKcolor, const char* fmt, ...)`
-
-##### 描述
-
-&emsp;&emsp;在控制台上以指定前景色和背景色格式化输出字符串.
-
-##### 参数
-
-**FRcolor**
-
-&emsp;&emsp;前景色
-
-**BKcolor**
-
-&emsp;&emsp;背景色
-
-**fmt**
-
-&emsp;&emsp;源格式字符串
-
-**...**
-
-&emsp;&emsp;可变参数
-
-#### `int vsprintf(char *buf, const char *fmt, va_list args)`
-
-##### 描述
-
-&emsp;&emsp;按照fmt格式化字符串,并将结果输出到buf中,返回写入buf的字符数量。
-
-##### 参数
-
-**buf**
-
-&emsp;&emsp;输出缓冲区
-
-**fmt**
-
-&emsp;&emsp;源格式字符串
-
-**args**
-
-&emsp;&emsp;可变参数列表
-
-#### `int sprintk(char *buf, const char *fmt, ...)`
-
-##### 描述
-
-&emsp;&emsp;按照fmt格式化字符串,并将结果输出到buf中,返回写入buf的字符数量。
-
-##### 参数
-
-**buf**
-
-&emsp;&emsp;输出缓冲区
-
-**fmt**
-
-&emsp;&emsp;源格式字符串
-
-**...**
-
-&emsp;&emsp;可变参数
-
 ### 内存操作
 
 #### `void *memcpy(void *dst, const void *src, uint64_t size)`

+ 1 - 0
kernel/Cargo.lock

@@ -449,6 +449,7 @@ dependencies = [
  "bitfield-struct",
  "bitflags 1.3.2",
  "bitmap",
+ "cfg-if",
  "defer",
  "driver_base_macros",
  "elf 0.7.2",

+ 1 - 0
kernel/Cargo.toml

@@ -76,6 +76,7 @@ unwinding = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/unwi
     "personality"
 ]}
 defer = "0.2.1"
+cfg-if = { version = "1.0.0" }
 
 # target为x86_64时,使用下面的依赖
 [target.'cfg(target_arch = "x86_64")'.dependencies]

+ 0 - 65
kernel/src/common/kprint.h

@@ -11,68 +11,3 @@
 #pragma once
 #include "printk.h"
 
-#define ksuccess(...)                          \
-    do                                         \
-    {                                          \
-        printk("[ ");                          \
-        printk_color(GREEN, BLACK, "SUCCESS"); \
-        printk(" ] ");                         \
-        printk(__VA_ARGS__);                   \
-        printk("\n");                          \
-    } while (0)
-
-#define kinfo(...)           \
-    do                       \
-    {                        \
-        printk("[ INFO ] "); \
-        printk(__VA_ARGS__); \
-        printk("\n");        \
-    } while (0)
-
-#define kdebug(...)                                        \
-    do                                                     \
-    {                                                      \
-        printk("[ DEBUG ] (%s:%d)\t", __FILE__, __LINE__); \
-        printk(__VA_ARGS__);                               \
-        printk("\n");                                      \
-    } while (0)
-
-#define kwarn(...)                                 \
-    do                                             \
-    {                                              \
-        printk("[ ");                              \
-        printk_color(YELLOW, BLACK, "WARN");       \
-        printk(" ] "); \
-        printk(__VA_ARGS__);                       \
-        printk("\n");                              \
-    } while (0)
-
-#define kerror(...)                        \
-    do                                     \
-    {                                      \
-        printk("[ ");                      \
-        printk_color(RED, BLACK, "ERROR"); \
-        printk(" ] ");                     \
-        printk(__VA_ARGS__);               \
-        printk("\n");                      \
-    } while (0)
-
-#define kterminated(...)                        \
-    do                                          \
-    {                                           \
-        printk("[ ");                           \
-        printk_color(RED, BLACK, "TERMINATED"); \
-        printk(" ] ");                          \
-        printk(__VA_ARGS__);                    \
-        printk("\n");                           \
-    } while (0)
-
-#define kBUG(...)                                   \
-    do                                              \
-    {                                               \
-        printk("[ ");                               \
-        printk_color(RED, BLACK, "BUG");            \
-        printk(" ] (%s:%d)\t", __FILE__, __LINE__); \
-        printk(__VA_ARGS__);                        \
-        printk("\n");                               \
-    } while (0)

+ 0 - 42
kernel/src/common/printk.h

@@ -34,46 +34,4 @@
 #include "glib.h"
 #include <stdarg.h>
 
-/**
- * @brief 将字符串按照fmt和args中的内容进行格式化,然后保存到buf中
- *
- * @param buf 结果缓冲区
- * @param fmt 格式化字符串
- * @param args 内容
- * @return 最终字符串的长度
- */
-int vsprintf(char *buf, const char *fmt, va_list args);
-
-/**
- * @brief 将字符串按照fmt和args中的内容进行格式化,截取字符串前buf_size-1,保存到buf中
- *
- * @param buf 结果缓冲区,大小为buf_size
- * @param fmt 格式化字符串
- * @param buf_size 缓冲区长度
- * @param args 内容
- * @return 最终字符串的长度
- */
-int vsnprintf(char *buf, const char *fmt, int buf_size, va_list args);
-
-/**
- * @brief 格式化打印字符串
- *
- * @param FRcolor 前景色
- * @param BKcolor 背景色
- * @param ... 格式化字符串
- */
-
-#define printk(...) printk_color(WHITE, BLACK, __VA_ARGS__)
-
-int printk_color(unsigned int FRcolor, unsigned int BKcolor, const char *fmt, ...);
-
-/**
- * @brief 格式化字符串并输出到buf
- *
- * @param buf 输出缓冲区
- * @param fmt 格式
- * @param ... 参数
- * @return int 字符串长度
- */
-int sprintk(char *buf, const char *fmt, ...);
 #pragma GCC pop_options

+ 0 - 4
kernel/src/common/stdio.h

@@ -7,7 +7,3 @@
 #define	SEEK_END	2	/* Seek relative to end-of-file */
 
 #define SEEK_MAX	3
-
-extern int vsprintf(char *buf, const char *fmt, va_list args);
-
-extern int sprintk(char *buf, const char *fmt, ...);

+ 0 - 4
kernel/src/debug/Makefile

@@ -9,10 +9,6 @@ kallsyms.o: kallsyms.c
 	gcc -o kallsyms kallsyms.c
 	rm -rf kallsyms.o
 
-traceback.o: traceback/traceback.c
-	$(CC) $(CFLAGS) -c traceback/traceback.c -o traceback/traceback.o
-
-
 # 生成内核栈符号表的汇编文件
 generate_kallsyms: kallsyms.o 
 	echo "Generating kallsyms..."

+ 4 - 12
kernel/src/debug/kprobe/args.rs

@@ -1,3 +1,4 @@
+use crate::debug::traceback::addr_from_symbol;
 use alloc::boxed::Box;
 use alloc::string::String;
 use kprobe::{CallBackFunc, KprobeBuilder, ProbeArgs};
@@ -15,10 +16,6 @@ pub struct KprobeInfo {
     pub enable: bool,
 }
 
-extern "C" {
-    fn addr_from_symbol(symbol: *const u8) -> usize;
-}
-
 impl TryFrom<KprobeInfo> for KprobeBuilder {
     type Error = SystemError;
     fn try_from(kprobe_info: KprobeInfo) -> Result<Self, Self::Error> {
@@ -30,20 +27,15 @@ impl TryFrom<KprobeInfo> for KprobeBuilder {
             return Err(SystemError::EINVAL);
         }
         let func_addr = if let Some(symbol) = kprobe_info.symbol.clone() {
-            let mut symbol_sting = symbol;
-            if !symbol_sting.ends_with("\0") {
-                symbol_sting.push('\0');
-            }
-            let symbol = symbol_sting.as_ptr();
-            let func_addr = unsafe { addr_from_symbol(symbol) };
-            if func_addr == 0 {
+            let func_addr = unsafe { addr_from_symbol(symbol.as_str()) };
+            if func_addr.is_none() {
                 warn!(
                     "register_kprobe: the symbol: {:?} not found",
                     kprobe_info.symbol
                 );
                 return Err(SystemError::ENXIO);
             }
-            func_addr
+            func_addr.unwrap() as usize
         } else {
             kprobe_info.addr.unwrap()
         };

+ 1 - 0
kernel/src/debug/mod.rs

@@ -2,3 +2,4 @@ pub mod jump_label;
 pub mod klog;
 pub mod kprobe;
 pub mod panic;
+pub mod traceback;

+ 1 - 4
kernel/src/debug/panic/hook.rs

@@ -1,10 +1,7 @@
+use crate::debug::traceback::lookup_kallsyms;
 use unwinding::abi::{UnwindContext, UnwindReasonCode, _Unwind_GetIP};
 use unwinding::panic::UserUnwindTrace;
 
-extern "C" {
-    fn lookup_kallsyms(addr: u64, level: i32) -> i32;
-}
-
 /// User hook for unwinding
 ///
 /// During stack backtrace, the user can print the function location of the current stack frame.

+ 17 - 2
kernel/src/debug/panic/mod.rs

@@ -1,7 +1,15 @@
 #[cfg(feature = "backtrace")]
 mod hook;
-use core::panic::PanicInfo;
+use cfg_if::cfg_if;
 
+cfg_if! {
+    if #[cfg(target_os = "none")] {
+        use core::panic::PanicInfo;
+        use core::sync::atomic::AtomicU8;
+
+        static PANIC_COUNTER: AtomicU8 = AtomicU8::new(0);
+    }
+}
 /// 全局的panic处理函数
 ///
 #[cfg(target_os = "none")]
@@ -11,7 +19,7 @@ pub fn panic(info: &PanicInfo) -> ! {
     use log::error;
 
     use crate::process;
-
+    PANIC_COUNTER.fetch_add(1, core::sync::atomic::Ordering::Relaxed);
     error!("Kernel Panic Occurred.");
 
     match info.location() {
@@ -28,6 +36,13 @@ pub fn panic(info: &PanicInfo) -> ! {
         }
     }
     println!("Message:\n\t{}", info.message());
+    if PANIC_COUNTER.load(core::sync::atomic::Ordering::Relaxed) > 8 {
+        println!(
+            "Panic Counter: {}, too many panics, halt.",
+            PANIC_COUNTER.load(core::sync::atomic::Ordering::Relaxed)
+        );
+        loop {}
+    }
     #[cfg(feature = "backtrace")]
     {
         let mut data = hook::CallbackData { counter: 0 };

+ 62 - 0
kernel/src/debug/traceback/mod.rs

@@ -0,0 +1,62 @@
+use core::ffi::CStr;
+
+#[linkage = "weak"]
+#[no_mangle]
+fn kallsyms_address() {}
+#[linkage = "weak"]
+#[no_mangle]
+fn kallsyms_num() {}
+#[linkage = "weak"]
+#[no_mangle]
+fn kallsyms_names_index() {}
+#[linkage = "weak"]
+#[no_mangle]
+fn kallsyms_names() {}
+
+pub unsafe fn lookup_kallsyms(addr: u64, level: i32) -> Option<()> {
+    let sym_names = kallsyms_names as *const u8;
+    // 由于符号表使用nm -n生成,因此是按照地址升序排列的,因此可以二分
+    let sym_num = kallsyms_num as usize;
+    let kallsyms_address_list =
+        core::slice::from_raw_parts(kallsyms_address as *const u64, sym_num);
+    let sym_names_index = kallsyms_names_index as *const u64;
+    let sym_names_index = core::slice::from_raw_parts(sym_names_index, sym_num);
+    let mut index = usize::MAX;
+    for i in 0..sym_num - 1 {
+        if addr > kallsyms_address_list[i] && addr <= kallsyms_address_list[i + 1] {
+            index = i;
+            break;
+        }
+    }
+    return if index < sym_num {
+        let sym_name = CStr::from_ptr(sym_names.add(sym_names_index[index] as usize) as _)
+            .to_str()
+            .unwrap();
+        println!(
+            "[{}] function:{}() \t(+) {:04} address:{:#018x}",
+            level,
+            sym_name,
+            addr - kallsyms_address_list[index],
+            addr
+        );
+        Some(())
+    } else {
+        None
+    };
+}
+pub unsafe fn addr_from_symbol(symbol: &str) -> Option<u64> {
+    let sym_num = kallsyms_num as usize;
+    let sym_names = kallsyms_names as *const u8;
+    let kallsyms_address_list =
+        core::slice::from_raw_parts(kallsyms_address as *const u64, sym_num);
+    let sym_names_index = kallsyms_names_index as *const u64;
+    let sym_names_index_list = core::slice::from_raw_parts(sym_names_index, sym_num);
+    for i in 0..sym_num {
+        let sym_name_cstr = CStr::from_ptr(sym_names.add(sym_names_index_list[i] as usize) as _);
+        let sym_name = sym_name_cstr.to_str().unwrap();
+        if sym_name == symbol {
+            return Some(kallsyms_address_list[i]);
+        }
+    }
+    None
+}

+ 0 - 84
kernel/src/debug/traceback/traceback.c

@@ -1,84 +0,0 @@
-#include "traceback.h"
-#include <common/printk.h>
-#include <common/string.h>
-#include <process/process.h>
-
-int lookup_kallsyms(uint64_t addr, int level)
-{
-    const char *str = (const char *)&kallsyms_names;
-
-    // 暴力查找符合要求的symbol
-    // todo: 改用二分搜索。
-    // 由于符号表使用nm -n生成,因此是按照地址升序排列的,因此可以二分
-    uint64_t index = 0;
-    for (index = 0; index < kallsyms_num - 1; ++index)
-    {
-        if (addr > kallsyms_address[index] && addr <= kallsyms_address[index + 1])
-            break;
-    }
-
-    if (index < kallsyms_num) // 找到对应的函数
-    {
-        // 依次输出函数名称、rip离函数起始处的偏移量、函数执行的rip
-        printk("function:%s() \t(+) %04d address:%#018lx\n", &str[kallsyms_names_index[index]], addr - kallsyms_address[index], addr);
-        return 0;
-    }
-    else
-        return -1;
-}
-
-uint64_t addr_from_symbol(const char *symbol)
-{
-    const char *str = (const char *)&kallsyms_names;
-    for (uint64_t i = 0; i < kallsyms_num; ++i)
-    {
-        if (strcmp(&str[kallsyms_names_index[i]], symbol) == 0)
-            return kallsyms_address[i];
-    }
-    return 0;
-
-}
-
-/**
- * @brief 追溯内核栈调用情况
- *
- * @param regs 内核栈结构体
- */
-void traceback(struct pt_regs *regs)
-{
-    // 先检验是否为用户态出错,若为用户态出错,则直接返回
-    if (verify_area(regs->rbp, 0))
-    {
-        printk_color(YELLOW, BLACK, "Kernel traceback: Fault in userland. pid=%ld, rbp=%#018lx\n", rs_current_pcb_pid(), regs->rbp);
-        return;
-    }
-
-    uint64_t *rbp = (uint64_t *)regs->rbp;
-    printk_color(YELLOW, BLACK, "======== Kernel traceback =======\n");
-    // printk("&kallsyms_address:%#018lx,kallsyms_address:%#018lx\n", &kallsyms_address, kallsyms_address);
-    // printk("&kallsyms_syms_num:%#018lx,kallsyms_syms_num:%d\n", &kallsyms_num, kallsyms_num);
-    // printk("&kallsyms_index:%#018lx\n", &kallsyms_names_index);
-    // printk("&kallsyms_names:%#018lx,kallsyms_names:%s\n", &kallsyms_names, &kallsyms_names);
-
-    uint64_t ret_addr = regs->rip;
-    // 最大追踪10层调用栈
-    for (int i = 0; i < 10; ++i)
-    {
-        if (lookup_kallsyms(ret_addr, i) != 0)
-            break;
-
-        // 当前栈帧的rbp的地址大于等于内核栈的rbp的时候,表明调用栈已经到头了,追踪结束。
-        // 当前rbp的地址为用户空间时,直接退出
-        if ((uint64_t)(rbp) >= rs_current_pcb_thread_rbp() || ((uint64_t)rbp < regs->rsp))
-            break;
-
-        printk_color(ORANGE, BLACK, "rbp:%#018lx,*rbp:%#018lx\n", rbp, *rbp);
-
-        // 由于x86处理器在执行call指令时,先将调用返回地址压入栈中,然后再把函数的rbp入栈,最后将rsp设为新的rbp。
-        // 因此,此处的rbp就是上一层的rsp,那么,*(rbp+1)得到的就是上一层函数的返回地址
-        ret_addr = *(rbp + 1);
-        rbp = (uint64_t *)(*rbp);
-        printk("\n");
-    }
-    printk_color(YELLOW, BLACK, "======== Kernel traceback end =======\n");
-}

+ 0 - 18
kernel/src/debug/traceback/traceback.h

@@ -1,18 +0,0 @@
-#pragma once
-#include <common/glib.h>
-#include <process/ptrace.h>
-
-// 使用弱引用属性导出kallsyms中的符号表。
-// 采用weak属性是由于第一次编译时,kallsyms还未链接进来,若不使用weak属性则会报错
-extern const uint64_t kallsyms_address[] __attribute__((weak));
-extern const uint64_t kallsyms_num __attribute__((weak));
-extern const uint64_t kallsyms_names_index[] __attribute__((weak));
-extern const char *kallsyms_names __attribute__((weak));
-
-/**
- * @brief 追溯内核栈调用情况
- *
- * @param regs 内核栈结构体
- */
-void traceback(struct pt_regs *regs);
-uint64_t addr_from_symbol(const char *symbol);

+ 1 - 0
kernel/src/lib.rs

@@ -19,6 +19,7 @@
 #![feature(vec_into_raw_parts)]
 #![feature(c_variadic)]
 #![feature(asm_goto)]
+#![feature(linkage)]
 #![cfg_attr(target_os = "none", no_std)]
 #![allow(static_mut_refs, non_local_definitions, internal_features)]
 // clippy的配置

+ 0 - 631
kernel/src/libs/printk.c

@@ -1,631 +0,0 @@
-//
-// Created by longjin on 2022/1/22.
-//
-#include <common/kprint.h>
-#include <common/printk.h>
-
-#include <common/spinlock.h>
-#include <libs/lib_ui/textui.h>
-#include <mm/mm.h>
-
-#include <common/math.h>
-#include <common/string.h>
-
-static spinlock_t __printk_lock = {1};
-/**
- * @brief 将数字按照指定的要求转换成对应的字符串(2~36进制)
- *
- * @param str 要返回的字符串
- * @param num 要打印的数值
- * @param base 基数
- * @param field_width 区域宽度
- * @param precision 精度
- * @param flags 标志位
- */
-static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags);
-
-static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags);
-
-static int skip_and_atoi(const char **s)
-{
-    /**
-     * @brief 获取连续的一段字符对应整数的值
-     * @param:**s 指向 指向字符串的指针 的指针
-     */
-    int ans = 0;
-    while (is_digit(**s))
-    {
-        ans = ans * 10 + (**s) - '0';
-        ++(*s);
-    }
-    return ans;
-}
-
-/**
- * @brief 将字符串按照fmt和args中的内容进行格式化,当buf_size为-1时,字符串直接保存到buf中
- * 否则将字符串前buf_size-1个字符放入,大小为buf_size的buf数组中
- *
- * @param buf 结果缓冲区
- * @param fmt 格式化字符串
- * @param args 内容
- * @param buf_size buf_size为-1时,不指定buf的大小,否则buf大小为buf_size
- * @return 最终字符串的长度
- */
-static int __do_vsprintf(char *buf, const char *fmt, int buf_size, va_list args)
-{
-
-    // 当需要输出的字符串的指针为空时,使用该字符填充目标字符串的指针
-    static const char __end_zero_char = '\0';
-
-    char *str = NULL, *s = NULL, *end = NULL;
-
-    str = buf;
-
-    int flags;       // 用来存储格式信息的bitmap
-    int field_width; //区域宽度
-    int precision;   //精度
-    int qualifier;   //数据显示的类型
-    int len;
-
-    if (buf_size != -1)
-    {
-        end = buf + buf_size;
-    }
-    //开始解析字符串
-    for (; *fmt; ++fmt)
-    {
-        //内容不涉及到格式化,直接输出
-        if (*fmt != '%')
-        {
-            *str = *fmt;
-            ++str;
-            continue;
-        }
-
-        //开始格式化字符串
-
-        //清空标志位和field宽度
-        field_width = flags = 0;
-
-        bool flag_tmp = true;
-        bool flag_break = false;
-
-        ++fmt;
-        while (flag_tmp)
-        {
-            switch (*fmt)
-            {
-            case '\0':
-                //结束解析
-                flag_break = true;
-                flag_tmp = false;
-                break;
-
-            case '-':
-                // 左对齐
-                flags |= LEFT;
-                ++fmt;
-                break;
-            case '+':
-                //在正数前面显示加号
-                flags |= PLUS;
-                ++fmt;
-                break;
-            case ' ':
-                flags |= SPACE;
-                ++fmt;
-                break;
-            case '#':
-                //在八进制数前面显示 '0o',在十六进制数前面显示 '0x' 或 '0X'
-                flags |= SPECIAL;
-                ++fmt;
-                break;
-            case '0':
-                //显示的数字之前填充‘0’来取代空格
-                flags |= PAD_ZERO;
-                ++fmt;
-                break;
-            default:
-                flag_tmp = false;
-                break;
-            }
-        }
-        if (flag_break)
-            break;
-
-        //获取区域宽度
-        field_width = -1;
-        if (*fmt == '*')
-        {
-            field_width = va_arg(args, int);
-            ++fmt;
-        }
-        else if (is_digit(*fmt))
-        {
-            field_width = skip_and_atoi(&fmt);
-            if (field_width < 0)
-            {
-                field_width = -field_width;
-                flags |= LEFT;
-            }
-        }
-
-        //获取小数精度
-        precision = -1;
-        if (*fmt == '.')
-        {
-            ++fmt;
-            if (*fmt == '*')
-            {
-                precision = va_arg(args, int);
-                ++fmt;
-            }
-            else if (is_digit(*fmt))
-            {
-                precision = skip_and_atoi(&fmt);
-            }
-        }
-
-        //获取要显示的数据的类型
-        if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' || *fmt == 'Z')
-        {
-            qualifier = *fmt;
-            ++fmt;
-        }
-        //为了支持lld
-        if (qualifier == 'l' && *fmt == 'l', *(fmt + 1) == 'd')
-            ++fmt;
-
-        //转化成字符串
-        long long *ip;
-        switch (*fmt)
-        {
-        //输出 %
-        case '%':
-            *str++ = '%';
-
-            break;
-        // 显示一个字符
-        case 'c':
-            //靠右对齐
-            if (!(flags & LEFT))
-            {
-                while (--field_width > 0)
-                {
-                    *str = ' ';
-                    ++str;
-                }
-            }
-
-            *str++ = (unsigned char)va_arg(args, int);
-
-            while (--field_width > 0)
-            {
-                *str = ' ';
-                ++str;
-            }
-
-            break;
-
-        //显示一个字符串
-        case 's':
-            s = va_arg(args, char *);
-            if (!s)
-                s = &__end_zero_char;
-            len = strlen(s);
-            if (precision < 0)
-            {
-                //未指定精度
-                precision = len;
-            }
-
-            else if (len > precision)
-            {
-                len = precision;
-            }
-
-            //靠右对齐
-            if (!(flags & LEFT))
-                while (len < field_width--)
-                {
-                    *str = ' ';
-                    ++str;
-                }
-
-            for (int i = 0; i < len; i++)
-            {
-                *str = *s;
-                ++s;
-                ++str;
-            }
-
-            while (len < field_width--)
-            {
-                *str = ' ';
-                ++str;
-            }
-
-            break;
-        //以八进制显示字符串
-        case 'o':
-            flags |= SMALL;
-        case 'O':
-            flags |= SPECIAL;
-            if (qualifier == 'l')
-                str = write_num(str, va_arg(args, long long), 8, field_width, precision, flags);
-            else
-                str = write_num(str, va_arg(args, int), 8, field_width, precision, flags);
-            break;
-
-        //打印指针指向的地址
-        case 'p':
-            if (field_width == 0)
-            {
-                field_width = 2 * sizeof(void *);
-                flags |= PAD_ZERO;
-            }
-
-            str = write_num(str, (unsigned long)va_arg(args, void *), 16, field_width, precision, flags);
-
-            break;
-
-        //打印十六进制
-        case 'x':
-            flags |= SMALL;
-        case 'X':
-            // flags |= SPECIAL;
-            if (qualifier == 'l')
-                str = write_num(str, va_arg(args, ll), 16, field_width, precision, flags);
-            else
-                str = write_num(str, va_arg(args, int), 16, field_width, precision, flags);
-            break;
-
-        //打印十进制有符号整数
-        case 'i':
-        case 'd':
-
-            flags |= SIGN;
-            if (qualifier == 'l')
-                str = write_num(str, va_arg(args, long long), 10, field_width, precision, flags);
-            else
-                str = write_num(str, va_arg(args, int), 10, field_width, precision, flags);
-            break;
-
-        //打印十进制无符号整数
-        case 'u':
-            if (qualifier == 'l')
-                str = write_num(str, va_arg(args, unsigned long long), 10, field_width, precision, flags);
-            else
-                str = write_num(str, va_arg(args, unsigned int), 10, field_width, precision, flags);
-            break;
-
-        //输出有效字符数量到*ip对应的变量
-        case 'n':
-
-            if (qualifier == 'l')
-                ip = va_arg(args, long long *);
-            else
-                ip = (ll *)va_arg(args, int *);
-
-            *ip = str - buf;
-            break;
-        case 'f':
-            // 默认精度为3
-            // printk("1111\n");
-            // va_arg(args, double);
-            // printk("222\n");
-
-            if (precision < 0)
-                precision = 3;
-
-            str = write_float_point_num(str, va_arg(args, double), field_width, precision, flags);
-
-            break;
-
-        //对于不识别的控制符,直接输出
-        default:
-            *str++ = '%';
-            if (*fmt)
-                *str++ = *fmt;
-            else
-                --fmt;
-            break;
-        }
-    }
-    //实现vsnprintf 的功能
-    if (buf_size > 0)
-    {
-        if (str < end)
-        {
-            *str = '\0';
-        }
-        else
-        {
-            *(end-1) = '\0';
-        }
-        return buf_size;
-    }
-    else
-    {
-        *str = '\0';
-    }
-
-    //返回缓冲区已有字符串的长度。
-    return str - buf;
-}
-
-/**
- * 将字符串按照fmt和args中的内容进行格式化,然后保存到buf中
- * @param buf 结果缓冲区
- * @param fmt 格式化字符串
- * @param args 内容
- * @return 最终字符串的长度
- */
-int vsprintf(char *buf, const char *fmt, va_list args)
-{
-    return __do_vsprintf(buf, fmt, -1, args);
-}
-
-/**
- * @brief 将字符串按照fmt和args中的内容进行格式化,截取字符串前buf_size-1,保存到buf中
- *
- * @param buf 结果缓冲区,大小为buf_size
- * @param fmt 格式化字符串
- * @param buf_size 缓冲区长度
- * @param args 内容
- * @return 最终字符串的长度
- */
-int vsnprintf(char *buf, const char *fmt, int buf_size, va_list args)
-{
-    return __do_vsprintf(buf, fmt, buf_size, args);
-}
-
-static char *write_num(char *str, ul num, int base, int field_width, int precision, int flags)
-{
-    /**
-     * @brief 将数字按照指定的要求转换成对应的字符串
-     *
-     * @param str 要返回的字符串
-     * @param num 要打印的数值
-     * @param base 基数
-     * @param field_width 区域宽度
-     * @param precision 精度
-     * @param flags 标志位
-     */
-
-    // 首先判断是否支持该进制
-    if (base < 2 || base > 36)
-        return 0;
-    char pad, sign, tmp_num[100];
-
-    const char *digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-    // 显示小写字母
-    if (flags & SMALL)
-        digits = "0123456789abcdefghijklmnopqrstuvwxyz";
-
-    if (flags & LEFT)
-        flags &= ~PAD_ZERO;
-    // 设置填充元素
-    pad = (flags & PAD_ZERO) ? '0' : ' ';
-
-    sign = 0;
-
-    if (flags & SIGN)
-    {
-        int64_t signed_num = (int64_t)num;
-        if (signed_num < 0)
-        {
-            sign = '-';
-            num = -signed_num;
-        }
-        else
-            num = signed_num;
-    }
-    else
-    {
-        // 设置符号
-        sign = (flags & PLUS) ? '+' : ((flags & SPACE) ? ' ' : 0);
-    }
-
-    // sign占用了一个宽度
-    if (sign)
-        --field_width;
-
-    if (flags & SPECIAL)
-        if (base == 16) // 0x占用2个位置
-            field_width -= 2;
-        else if (base == 8) // O占用一个位置
-            --field_width;
-
-    int js_num = 0; // 临时数字字符串tmp_num的长度
-
-    if (num == 0)
-        tmp_num[js_num++] = '0';
-    else
-    {
-        num = ABS(num);
-        //进制转换
-        while (num > 0)
-        {
-            tmp_num[js_num++] = digits[num % base]; // 注意这里,输出的数字,是小端对齐的。低位存低位
-            num /= base;
-        }
-    }
-
-    if (js_num > precision)
-        precision = js_num;
-
-    field_width -= precision;
-
-    // 靠右对齐
-    if (!(flags & (LEFT + PAD_ZERO)))
-        while (field_width-- > 0)
-            *str++ = ' ';
-
-    if (sign)
-        *str++ = sign;
-    if (flags & SPECIAL)
-        if (base == 16)
-        {
-            *str++ = '0';
-            *str++ = digits[33];
-        }
-        else if (base == 8)
-            *str++ = digits[24]; //注意这里是英文字母O或者o
-    if (!(flags & LEFT))
-        while (field_width-- > 0)
-            *str++ = pad;
-    while (js_num < precision)
-    {
-        --precision;
-        *str++ = '0';
-    }
-
-    while (js_num-- > 0)
-        *str++ = tmp_num[js_num];
-
-    while (field_width-- > 0)
-        *str++ = ' ';
-
-    return str;
-}
-
-static char *write_float_point_num(char *str, double num, int field_width, int precision, int flags)
-{
-    /**
-     * @brief 将浮点数按照指定的要求转换成对应的字符串
-     *
-     * @param str 要返回的字符串
-     * @param num 要打印的数值
-     * @param field_width 区域宽度
-     * @param precision 精度
-     * @param flags 标志位
-     */
-
-    char pad, sign, tmp_num_z[100], tmp_num_d[350];
-
-    const char *digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-    // 显示小写字母
-    if (flags & SMALL)
-        digits = "0123456789abcdefghijklmnopqrstuvwxyz";
-
-    // 设置填充元素
-    pad = (flags & PAD_ZERO) ? '0' : ' ';
-    sign = 0;
-    if (flags & SIGN && num < 0)
-    {
-        sign = '-';
-        num = -num;
-    }
-    else
-    {
-        // 设置符号
-        sign = (flags & PLUS) ? '+' : ((flags & SPACE) ? ' ' : 0);
-    }
-
-    // sign占用了一个宽度
-    if (sign)
-        --field_width;
-
-    int js_num_z = 0, js_num_d = 0;                                                     // 临时数字字符串tmp_num_z tmp_num_d的长度
-    uint64_t num_z = (uint64_t)(num);                                                   // 获取整数部分
-    uint64_t num_decimal = (uint64_t)(round(1.0 * (num - num_z) * pow(10, precision))); // 获取小数部分
-
-    if (num == 0 || num_z == 0)
-        tmp_num_z[js_num_z++] = '0';
-    else
-    {
-        //存储整数部分
-        while (num_z > 0)
-        {
-            tmp_num_z[js_num_z++] = digits[num_z % 10]; // 注意这里,输出的数字,是小端对齐的。低位存低位
-            num_z /= 10;
-        }
-    }
-
-    while (num_decimal > 0)
-    {
-        tmp_num_d[js_num_d++] = digits[num_decimal % 10];
-        num_decimal /= 10;
-    }
-
-    field_width -= (precision + 1 + js_num_z);
-
-    // 靠右对齐
-    if (!(flags & LEFT))
-        while (field_width-- > 0)
-            *str++ = pad;
-
-    if (sign)
-        *str++ = sign;
-
-    // 输出整数部分
-    while (js_num_z > 0)
-    {
-        *str++ = tmp_num_z[js_num_z - 1];
-        --js_num_z;
-    }
-    *str++ = '.';
-
-    // 输出小数部分
-    int total_dec_count = js_num_d;
-    for (int i = 0; i < precision && js_num_d-- > 0; ++i)
-        *str++ = tmp_num_d[js_num_d];
-
-    while (total_dec_count < precision)
-    {
-        ++total_dec_count;
-        *str++ = '0';
-    }
-
-    while (field_width-- > 0)
-        *str++ = ' ';
-
-    return str;
-}
-
-/**
- * @brief 格式化打印字符串
- *
- * @param FRcolor 前景色
- * @param BKcolor 背景色
- * @param ... 格式化字符串
- */
-int printk_color(unsigned int FRcolor, unsigned int BKcolor, const char *fmt, ...)
-{
-    uint64_t rflags;
-    io_mfence();
-    spin_lock_irqsave(&__printk_lock, rflags);
-    io_mfence();
-    va_list args;
-    va_start(args, fmt);
-    static char buf[4096]; // vsprintf()的缓冲区
-    int len = vsprintf(buf, fmt, args);
-
-    va_end(args);
-    unsigned char current;
-
-    int i; // 总共输出的字符数
-    for (i = 0; i < len; ++i)
-    {
-        current = *(buf + i);
-        // 输出
-        rs_textui_putchar(current, FRcolor, BKcolor);
-    }
-    io_mfence();
-    spin_unlock_irqrestore(&__printk_lock, rflags);
-    io_mfence();
-    return i;
-}
-
-int sprintk(char *buf, const char *fmt, ...)
-{
-    int count = 0;
-    va_list args;
-
-    va_start(args, fmt);
-    count = vsprintf(buf, fmt, args);
-    va_end(args);
-
-    return count;
-}

+ 0 - 652
user/apps/test_ebpf/Cargo.lock

@@ -1,652 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 4
-
-[[package]]
-name = "addr2line"
-version = "0.24.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
-dependencies = [
- "gimli",
-]
-
-[[package]]
-name = "adler2"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
-
-[[package]]
-name = "ahash"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
-dependencies = [
- "cfg-if",
- "once_cell",
- "version_check",
- "zerocopy",
-]
-
-[[package]]
-name = "aho-corasick"
-version = "1.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
-dependencies = [
- "memchr",
-]
-
-[[package]]
-name = "allocator-api2"
-version = "0.2.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9"
-
-[[package]]
-name = "anstream"
-version = "0.6.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b"
-dependencies = [
- "anstyle",
- "anstyle-parse",
- "anstyle-query",
- "anstyle-wincon",
- "colorchoice",
- "is_terminal_polyfill",
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle"
-version = "1.0.10"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9"
-
-[[package]]
-name = "anstyle-parse"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9"
-dependencies = [
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle-query"
-version = "1.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c"
-dependencies = [
- "windows-sys 0.59.0",
-]
-
-[[package]]
-name = "anstyle-wincon"
-version = "3.0.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125"
-dependencies = [
- "anstyle",
- "windows-sys 0.59.0",
-]
-
-[[package]]
-name = "assert_matches"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
-
-[[package]]
-name = "aya"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/tiny-aya.git?rev=0689f13#0689f13a7be0d822b3194227c6bee4cb5b0c9bfa"
-dependencies = [
- "assert_matches",
- "aya-obj",
- "bitflags",
- "bytes",
- "lazy_static",
- "libc",
- "log",
- "object",
- "thiserror",
- "tokio",
-]
-
-[[package]]
-name = "aya-log"
-version = "0.2.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/tiny-aya.git?rev=0689f13#0689f13a7be0d822b3194227c6bee4cb5b0c9bfa"
-dependencies = [
- "aya",
- "aya-log-common",
- "bytes",
- "log",
- "thiserror",
- "tokio",
-]
-
-[[package]]
-name = "aya-log-common"
-version = "0.1.14"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "num_enum",
-]
-
-[[package]]
-name = "aya-obj"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "bytes",
- "core-error",
- "hashbrown 0.14.5",
- "log",
- "object",
- "thiserror",
-]
-
-[[package]]
-name = "backtrace"
-version = "0.3.74"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
-dependencies = [
- "addr2line",
- "cfg-if",
- "libc",
- "miniz_oxide",
- "object",
- "rustc-demangle",
- "windows-targets",
-]
-
-[[package]]
-name = "bitflags"
-version = "2.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
-
-[[package]]
-name = "bytes"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
-
-[[package]]
-name = "cfg-if"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
-
-[[package]]
-name = "colorchoice"
-version = "1.0.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
-
-[[package]]
-name = "core-error"
-version = "0.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efcdb2972eb64230b4c50646d8498ff73f5128d196a90c7236eec4cbe8619b8f"
-dependencies = [
- "version_check",
-]
-
-[[package]]
-name = "crc32fast"
-version = "1.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "env_filter"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab"
-dependencies = [
- "log",
- "regex",
-]
-
-[[package]]
-name = "env_logger"
-version = "0.11.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d"
-dependencies = [
- "anstream",
- "anstyle",
- "env_filter",
- "humantime",
- "log",
-]
-
-[[package]]
-name = "equivalent"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
-
-[[package]]
-name = "foldhash"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
-
-[[package]]
-name = "gimli"
-version = "0.31.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
-
-[[package]]
-name = "hashbrown"
-version = "0.14.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
-dependencies = [
- "ahash",
- "allocator-api2",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.15.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
-dependencies = [
- "foldhash",
-]
-
-[[package]]
-name = "hermit-abi"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
-
-[[package]]
-name = "humantime"
-version = "2.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4"
-
-[[package]]
-name = "indexmap"
-version = "2.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
-dependencies = [
- "equivalent",
- "hashbrown 0.15.2",
-]
-
-[[package]]
-name = "is_terminal_polyfill"
-version = "1.70.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
-
-[[package]]
-name = "lazy_static"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
-
-[[package]]
-name = "libc"
-version = "0.2.166"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36"
-
-[[package]]
-name = "log"
-version = "0.4.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
-
-[[package]]
-name = "memchr"
-version = "2.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
-
-[[package]]
-name = "miniz_oxide"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
-dependencies = [
- "adler2",
-]
-
-[[package]]
-name = "mio"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
-dependencies = [
- "hermit-abi",
- "libc",
- "wasi",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "num_enum"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
-dependencies = [
- "num_enum_derive",
-]
-
-[[package]]
-name = "num_enum_derive"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "object"
-version = "0.36.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
-dependencies = [
- "crc32fast",
- "hashbrown 0.15.2",
- "indexmap",
- "memchr",
-]
-
-[[package]]
-name = "once_cell"
-version = "1.20.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
-
-[[package]]
-name = "pin-project-lite"
-version = "0.2.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.92"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.37"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
-dependencies = [
- "proc-macro2",
-]
-
-[[package]]
-name = "regex"
-version = "1.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-automata",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-automata"
-version = "0.4.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
-dependencies = [
- "aho-corasick",
- "memchr",
- "regex-syntax",
-]
-
-[[package]]
-name = "regex-syntax"
-version = "0.8.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
-
-[[package]]
-name = "rustc-demangle"
-version = "0.1.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
-
-[[package]]
-name = "signal-hook-registry"
-version = "1.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
-dependencies = [
- "libc",
-]
-
-[[package]]
-name = "socket2"
-version = "0.5.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
-dependencies = [
- "libc",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "syn"
-version = "2.0.89"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "test_ebpf"
-version = "0.1.0"
-dependencies = [
- "aya",
- "aya-log",
- "env_logger",
- "log",
- "tokio",
-]
-
-[[package]]
-name = "thiserror"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
-dependencies = [
- "thiserror-impl",
-]
-
-[[package]]
-name = "thiserror-impl"
-version = "1.0.69"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "tokio"
-version = "1.41.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33"
-dependencies = [
- "backtrace",
- "libc",
- "mio",
- "pin-project-lite",
- "signal-hook-registry",
- "socket2",
- "tokio-macros",
- "windows-sys 0.52.0",
-]
-
-[[package]]
-name = "tokio-macros"
-version = "2.4.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "unicode-ident"
-version = "1.0.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
-
-[[package]]
-name = "utf8parse"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
-
-[[package]]
-name = "version_check"
-version = "0.9.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
-
-[[package]]
-name = "wasi"
-version = "0.11.0+wasi-snapshot-preview1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
-
-[[package]]
-name = "windows-sys"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
-dependencies = [
- "windows-targets",
-]
-
-[[package]]
-name = "windows-sys"
-version = "0.59.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
-dependencies = [
- "windows-targets",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
-dependencies = [
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_gnullvm",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc",
-]
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
-
-[[package]]
-name = "windows_i686_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-
-[[package]]
-name = "zerocopy"
-version = "0.7.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
-dependencies = [
- "zerocopy-derive",
-]
-
-[[package]]
-name = "zerocopy-derive"
-version = "0.7.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]

+ 0 - 575
user/apps/test_ebpf/syscall_ebpf/Cargo.lock

@@ -1,575 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 3
-
-[[package]]
-name = "addr2line"
-version = "0.24.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
-dependencies = [
- "gimli",
-]
-
-[[package]]
-name = "adler2"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627"
-
-[[package]]
-name = "ahash"
-version = "0.8.11"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
-dependencies = [
- "cfg-if",
- "once_cell",
- "version_check",
- "zerocopy",
-]
-
-[[package]]
-name = "allocator-api2"
-version = "0.2.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f"
-
-[[package]]
-name = "anstream"
-version = "0.6.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
-dependencies = [
- "anstyle",
- "anstyle-parse",
- "anstyle-query",
- "anstyle-wincon",
- "colorchoice",
- "is_terminal_polyfill",
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle"
-version = "1.0.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
-
-[[package]]
-name = "anstyle-parse"
-version = "0.2.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
-dependencies = [
- "utf8parse",
-]
-
-[[package]]
-name = "anstyle-query"
-version = "1.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
-dependencies = [
- "windows-sys",
-]
-
-[[package]]
-name = "anstyle-wincon"
-version = "3.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
-dependencies = [
- "anstyle",
- "windows-sys",
-]
-
-[[package]]
-name = "anyhow"
-version = "1.0.91"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8"
-
-[[package]]
-name = "assert_matches"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
-
-[[package]]
-name = "aya"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/tiny-aya.git?rev=0689f13#0689f13a7be0d822b3194227c6bee4cb5b0c9bfa"
-dependencies = [
- "assert_matches",
- "aya-obj",
- "bitflags",
- "bytes",
- "lazy_static",
- "libc",
- "log",
- "object",
- "thiserror",
- "tokio",
-]
-
-[[package]]
-name = "aya-obj"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "bytes",
- "core-error",
- "hashbrown 0.14.5",
- "log",
- "object",
- "thiserror",
-]
-
-[[package]]
-name = "backtrace"
-version = "0.3.74"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a"
-dependencies = [
- "addr2line",
- "cfg-if",
- "libc",
- "miniz_oxide",
- "object",
- "rustc-demangle",
- "windows-targets",
-]
-
-[[package]]
-name = "bitflags"
-version = "2.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
-
-[[package]]
-name = "bytes"
-version = "1.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
-
-[[package]]
-name = "cfg-if"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
-
-[[package]]
-name = "clap"
-version = "4.5.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97f376d85a664d5837dbae44bf546e6477a679ff6610010f17276f686d867e8"
-dependencies = [
- "clap_builder",
- "clap_derive",
-]
-
-[[package]]
-name = "clap_builder"
-version = "4.5.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19bc80abd44e4bed93ca373a0704ccbd1b710dc5749406201bb018272808dc54"
-dependencies = [
- "anstream",
- "anstyle",
- "clap_lex",
- "strsim",
-]
-
-[[package]]
-name = "clap_derive"
-version = "4.5.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab"
-dependencies = [
- "heck",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "clap_lex"
-version = "0.7.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
-
-[[package]]
-name = "colorchoice"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
-
-[[package]]
-name = "core-error"
-version = "0.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "efcdb2972eb64230b4c50646d8498ff73f5128d196a90c7236eec4cbe8619b8f"
-dependencies = [
- "version_check",
-]
-
-[[package]]
-name = "crc32fast"
-version = "1.4.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
-dependencies = [
- "cfg-if",
-]
-
-[[package]]
-name = "equivalent"
-version = "1.0.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
-
-[[package]]
-name = "foldhash"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2"
-
-[[package]]
-name = "gimli"
-version = "0.31.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
-
-[[package]]
-name = "hashbrown"
-version = "0.14.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
-dependencies = [
- "ahash",
- "allocator-api2",
-]
-
-[[package]]
-name = "hashbrown"
-version = "0.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb"
-dependencies = [
- "foldhash",
-]
-
-[[package]]
-name = "heck"
-version = "0.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
-
-[[package]]
-name = "hermit-abi"
-version = "0.3.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
-
-[[package]]
-name = "indexmap"
-version = "2.6.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da"
-dependencies = [
- "equivalent",
- "hashbrown 0.15.0",
-]
-
-[[package]]
-name = "is_terminal_polyfill"
-version = "1.70.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
-
-[[package]]
-name = "lazy_static"
-version = "1.5.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
-
-[[package]]
-name = "libc"
-version = "0.2.161"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
-
-[[package]]
-name = "log"
-version = "0.4.22"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
-
-[[package]]
-name = "memchr"
-version = "2.7.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
-
-[[package]]
-name = "miniz_oxide"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1"
-dependencies = [
- "adler2",
-]
-
-[[package]]
-name = "mio"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec"
-dependencies = [
- "hermit-abi",
- "libc",
- "wasi",
- "windows-sys",
-]
-
-[[package]]
-name = "object"
-version = "0.36.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e"
-dependencies = [
- "crc32fast",
- "hashbrown 0.15.0",
- "indexmap",
- "memchr",
-]
-
-[[package]]
-name = "once_cell"
-version = "1.20.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
-
-[[package]]
-name = "pin-project-lite"
-version = "0.2.15"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff"
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.89"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.37"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
-dependencies = [
- "proc-macro2",
-]
-
-[[package]]
-name = "rustc-demangle"
-version = "0.1.24"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
-
-[[package]]
-name = "socket2"
-version = "0.5.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
-dependencies = [
- "libc",
- "windows-sys",
-]
-
-[[package]]
-name = "strsim"
-version = "0.11.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
-
-[[package]]
-name = "syn"
-version = "2.0.85"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "syscall_ebpf-common"
-version = "0.1.0"
-dependencies = [
- "aya",
-]
-
-[[package]]
-name = "thiserror"
-version = "1.0.65"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5"
-dependencies = [
- "thiserror-impl",
-]
-
-[[package]]
-name = "thiserror-impl"
-version = "1.0.65"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "tokio"
-version = "1.41.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb"
-dependencies = [
- "backtrace",
- "libc",
- "mio",
- "pin-project-lite",
- "socket2",
- "windows-sys",
-]
-
-[[package]]
-name = "unicode-ident"
-version = "1.0.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
-
-[[package]]
-name = "utf8parse"
-version = "0.2.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
-
-[[package]]
-name = "version_check"
-version = "0.9.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
-
-[[package]]
-name = "wasi"
-version = "0.11.0+wasi-snapshot-preview1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
-
-[[package]]
-name = "windows-sys"
-version = "0.52.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
-dependencies = [
- "windows-targets",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
-dependencies = [
- "windows_aarch64_gnullvm",
- "windows_aarch64_msvc",
- "windows_i686_gnu",
- "windows_i686_gnullvm",
- "windows_i686_msvc",
- "windows_x86_64_gnu",
- "windows_x86_64_gnullvm",
- "windows_x86_64_msvc",
-]
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
-
-[[package]]
-name = "windows_i686_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
-
-[[package]]
-name = "windows_i686_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
-
-[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
-
-[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
-
-[[package]]
-name = "xtask"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "clap",
-]
-
-[[package]]
-name = "zerocopy"
-version = "0.7.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
-dependencies = [
- "zerocopy-derive",
-]
-
-[[package]]
-name = "zerocopy-derive"
-version = "0.7.35"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]

+ 0 - 179
user/apps/test_ebpf/syscall_ebpf/syscall_ebpf-ebpf/Cargo.lock

@@ -1,179 +0,0 @@
-# This file is automatically @generated by Cargo.
-# It is not intended for manual editing.
-version = 3
-
-[[package]]
-name = "aya-ebpf"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "aya-ebpf-bindings",
- "aya-ebpf-cty",
- "aya-ebpf-macros",
- "rustversion",
-]
-
-[[package]]
-name = "aya-ebpf-bindings"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "aya-ebpf-cty",
-]
-
-[[package]]
-name = "aya-ebpf-cty"
-version = "0.2.1"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-
-[[package]]
-name = "aya-ebpf-macros"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "proc-macro-error",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "aya-log-common"
-version = "0.1.14"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "num_enum",
-]
-
-[[package]]
-name = "aya-log-ebpf"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "aya-ebpf",
- "aya-log-common",
- "aya-log-ebpf-macros",
-]
-
-[[package]]
-name = "aya-log-ebpf-macros"
-version = "0.1.0"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "aya-log-common",
- "aya-log-parser",
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "aya-log-parser"
-version = "0.1.13"
-source = "git+https://git.mirrors.dragonos.org.cn/DragonOS-Community/aya.git?rev=3d57d35#3d57d358e40591acf23dfde740697fbfff026410"
-dependencies = [
- "aya-log-common",
-]
-
-[[package]]
-name = "num_enum"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179"
-dependencies = [
- "num_enum_derive",
-]
-
-[[package]]
-name = "num_enum_derive"
-version = "0.7.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
-]
-
-[[package]]
-name = "proc-macro-error"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
-dependencies = [
- "proc-macro-error-attr",
- "proc-macro2",
- "quote",
- "version_check",
-]
-
-[[package]]
-name = "proc-macro-error-attr"
-version = "1.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
-dependencies = [
- "proc-macro2",
- "quote",
- "version_check",
-]
-
-[[package]]
-name = "proc-macro2"
-version = "1.0.89"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e"
-dependencies = [
- "unicode-ident",
-]
-
-[[package]]
-name = "quote"
-version = "1.0.37"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
-dependencies = [
- "proc-macro2",
-]
-
-[[package]]
-name = "rustversion"
-version = "1.0.18"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
-
-[[package]]
-name = "syn"
-version = "2.0.85"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5023162dfcd14ef8f32034d8bcd4cc5ddc61ef7a247c024a33e24e1f24d21b56"
-dependencies = [
- "proc-macro2",
- "quote",
- "unicode-ident",
-]
-
-[[package]]
-name = "syscall_ebpf-common"
-version = "0.1.0"
-
-[[package]]
-name = "syscall_ebpf-ebpf"
-version = "0.1.0"
-dependencies = [
- "aya-ebpf",
- "aya-log-ebpf",
- "syscall_ebpf-common",
-]
-
-[[package]]
-name = "unicode-ident"
-version = "1.0.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe"
-
-[[package]]
-name = "version_check"
-version = "0.9.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"