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