/DragonOS/kernel/src/debug/kprobe/ |
H A D | mod.rs | 1 use crate::debug::kprobe::args::KprobeInfo; 7 use kprobe::{Kprobe, KprobeBuilder, KprobeOps, KprobePoint}; 37 pub fn insert_kprobe(&mut self, kprobe: LockKprobe) { in insert_kprobe() 38 let probe_point = kprobe.read().probe_point().clone(); in insert_kprobe() 39 self.insert_break_point(probe_point.break_address(), kprobe.clone()); in insert_kprobe() 40 self.insert_debug_point(probe_point.debug_address(), kprobe); in insert_kprobe() 48 fn insert_break_point(&mut self, address: usize, kprobe: LockKprobe) { in insert_break_point() 50 list.push(kprobe); in insert_break_point() 58 fn insert_debug_point(&mut self, address: usize, kprobe: LockKprobe) { in insert_debug_point() 60 list.push(kprobe); in insert_debug_point() [all …]
|
H A D | test.rs | 2 use crate::debug::kprobe::{register_kprobe, unregister_kprobe, KprobeInfo}; 4 use kprobe::ProbeArgs; 50 let kprobe = register_kprobe(kprobe_info).unwrap(); in kprobe_test() localVariable 76 unregister_kprobe(kprobe); in kprobe_test()
|
H A D | args.rs | 3 use kprobe::{CallBackFunc, KprobeBuilder, ProbeArgs};
|
/DragonOS/docs/kernel/trace/ |
H A D | kprobe.md | 1 # kprobe chapter 15 ## kprobe工作流程 21 1. 注册kprobe后,注册的每一个kprobe对应一个kprobe结构体,该结构中记录着探测点的位置,以及该探测点本来对应的指令。 22 2. 探测点的位置被替换成了一条异常的指令,这样当CPU执行到探测点位置时会陷入到异常态,在x86_64上指令是int3(如果kprobe经过优化后,指令是jmp) 23 3. 当执行到异常指令时,系统换检查是否是kprobe 安装的异常,如果是,就执行kprobe的pre_handler,然后利用CPU提供的单步调试(single-step)功能,设置好相应的寄存器… 25 5. 当卸载kprobe时,探测点原来的指令会被恢复回去。 31 ## kprobe的接口 35 pub fn unregister_kprobe(kprobe: LockKprobe) -> Result<(), SystemError>; 55 - `disable` 和 `enable` 用于动态关闭kprobe,在`disable`调用后,kprobe被触发时不执行回调函数
|
H A D | index.rst | 4 …内核跟踪机制由很多功能构成, 比如kprobe/uprobe/tracepoint/ftrace等, 以及用于扩展内核可观测性的eBPF,内核当前支持kprobe和eBPF, 本章将介绍这两种机制。 11 kprobe
|
H A D | eBPF.md | 31 1. 内核会根据用户请求,将eBPF程序附加到内核的挂载点上(kprobe/uprobe/trace_point) 102 1. kprobe实现:位于目录`kernel/crates/kprobe` 238 联通eBPF和kprobe的系统调用是[`perf_event_open`](https://man7.org/linux/man-pages/man2/perf_event_open.2.html… 245 // See /sys/bus/event_source/devices/kprobe/type 247 let kprobe_event = kprobe::perf_event_open_kprobe(args); 264 - `PERF_TYPE_MAX` 通常指示创建kprobe/uprobe事件,也就是用户程序使用kprobe的途径之一,用户程序可以将eBPF程序绑定在这个事件上
|
/DragonOS/kernel/src/exception/ |
H A D | debug.rs | 2 use crate::arch::kprobe::clear_single_step; 3 use crate::debug::kprobe::KPROBE_MANAGER; 4 use kprobe::{KprobeOps, ProbeArgs}; 19 for kprobe in kprobe_list { in post_kprobe_handler() 20 let guard = kprobe.read(); in post_kprobe_handler()
|
H A D | ebreak.rs | 2 use crate::arch::kprobe::setup_single_step; 3 use crate::debug::kprobe::KPROBE_MANAGER; 5 use kprobe::{KprobeOps, ProbeArgs}; 20 for kprobe in kprobe_list { in kprobe_handler() 21 let guard = kprobe.read(); in kprobe_handler()
|
/DragonOS/kernel/src/perf/ |
H A D | kprobe.rs | 3 use crate::arch::kprobe::KProbeContext; 6 use crate::debug::kprobe::args::KprobeInfo; 7 use crate::debug::kprobe::{register_kprobe, unregister_kprobe, LockKprobe}; 20 use kprobe::{CallBackFunc, ProbeArgs}; 26 kprobe: LockKprobe, field 31 unregister_kprobe(self.kprobe.clone()); in drop() 49 self.kprobe.write().update_event_callback(callback); in do_set_bpf_prog() 128 self.kprobe.write().enable(); in enable() 132 self.kprobe.write().disable(); in disable() 154 let kprobe = register_kprobe(kprobe_info).expect("create kprobe failed"); in perf_event_open_kprobe() localVariable [all …]
|
H A D | mod.rs | 2 mod kprobe; module 284 let kprobe_event = kprobe::perf_event_open_kprobe(args); in perf_event_open()
|
/DragonOS/user/apps/test_ebpf/syscall_ebpf/syscall_ebpf-ebpf/src/ |
H A D | main.rs | 4 use aya_ebpf::{macros::kprobe, programs::ProbeContext}; 9 #[kprobe]
|
/DragonOS/kernel/src/debug/ |
H A D | mod.rs | 2 pub mod kprobe; module
|
/DragonOS/ |
H A D | triagebot.toml | 88 "/kernel/crates/kprobe", 89 "/kernel/src/debug/kprobe", 171 "/kernel/crates/kprobe" = ["sig-obs"] 172 "/kernel/src/debug/kprobe" = ["sig-obs"]
|
/DragonOS/kernel/crates/kprobe/ |
H A D | Cargo.toml | 2 name = "kprobe"
|
/DragonOS/kernel/crates/kprobe/src/arch/loongarch64/ |
H A D | mod.rs | 63 let kprobe = Kprobe { in install() localVariable 67 (kprobe, probe_point) in install()
|
/DragonOS/kernel/src/arch/riscv64/ |
H A D | mod.rs | 8 pub mod kprobe; module
|
/DragonOS/kernel/ |
H A D | Cargo.toml | 28 # kprobe 64 kprobe = { path = "crates/kprobe" }
|
/DragonOS/kernel/crates/kprobe/src/arch/x86/ |
H A D | mod.rs | 75 let kprobe = Kprobe { in install() localVariable 79 (kprobe, probe_point) in install()
|
/DragonOS/kernel/src/arch/x86_64/ |
H A D | mod.rs | 11 pub mod kprobe; module
|
/DragonOS/kernel/crates/kprobe/src/arch/rv64/ |
H A D | mod.rs | 80 let kprobe = Kprobe { in install() localVariable 84 (kprobe, probe_point) in install()
|
/DragonOS/kernel/src/arch/riscv64/interrupt/ |
H A D | mod.rs | 2 use kprobe::ProbeArgs;
|
/DragonOS/kernel/src/arch/x86_64/interrupt/ |
H A D | mod.rs | 12 use kprobe::ProbeArgs;
|
/DragonOS/kernel/src/include/bindings/ |
H A D | linux_bpf.rs | 1203 pub kprobe: bpf_link_info__bindgen_ty_1__bindgen_ty_11__bindgen_ty_1__bindgen_ty_2,
|