|
|
@ -3,8 +3,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
use aya_ebpf::{
|
|
|
|
use aya_ebpf::{
|
|
|
|
bindings::xdp_action,
|
|
|
|
bindings::xdp_action,
|
|
|
|
macros::{kprobe, tracepoint, uprobe, xdp},
|
|
|
|
macros::{kprobe, kretprobe, tracepoint, uprobe, uretprobe, xdp},
|
|
|
|
programs::{ProbeContext, TracePointContext, XdpContext},
|
|
|
|
programs::{ProbeContext, RetProbeContext, TracePointContext, XdpContext},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#[xdp]
|
|
|
|
#[xdp]
|
|
|
@ -24,6 +24,11 @@ pub fn test_kprobe(_ctx: ProbeContext) -> u32 {
|
|
|
|
0
|
|
|
|
0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[kretprobe]
|
|
|
|
|
|
|
|
pub fn test_kretprobe(_ctx: RetProbeContext) -> u32 {
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[tracepoint]
|
|
|
|
#[tracepoint]
|
|
|
|
pub fn test_tracepoint(_ctx: TracePointContext) -> u32 {
|
|
|
|
pub fn test_tracepoint(_ctx: TracePointContext) -> u32 {
|
|
|
|
0
|
|
|
|
0
|
|
|
@ -34,6 +39,11 @@ pub fn test_uprobe(_ctx: ProbeContext) -> u32 {
|
|
|
|
0
|
|
|
|
0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[uretprobe]
|
|
|
|
|
|
|
|
pub fn test_uretprobe(_ctx: RetProbeContext) -> u32 {
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[cfg(not(test))]
|
|
|
|
#[cfg(not(test))]
|
|
|
|
#[panic_handler]
|
|
|
|
#[panic_handler]
|
|
|
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
|
|
|
fn panic(_info: &core::panic::PanicInfo) -> ! {
|
|
|
|