From 29a4bd062a45f57b52d3724477af12d964e0c9ef Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sat, 27 Jan 2024 19:05:03 +0100 Subject: Use sharedCpuArray for buf --- fs-tracer-ebpf/src/syscalls/write.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs-tracer-ebpf/src/syscalls/write.rs') diff --git a/fs-tracer-ebpf/src/syscalls/write.rs b/fs-tracer-ebpf/src/syscalls/write.rs index b204b45..28ea858 100644 --- a/fs-tracer-ebpf/src/syscalls/write.rs +++ b/fs-tracer-ebpf/src/syscalls/write.rs @@ -1,13 +1,13 @@ use crate::*; -pub fn handle_sys_write(ctx: TracePointContext, syscall_type: SyscallType) -> Result { +pub fn handle_sys_write(ctx: TracePointContext, syscall_type: SyscallType) -> Result { match syscall_type { SyscallType::Enter => unsafe { handle_sys_write_enter(ctx) }, SyscallType::Exit => unsafe { handle_sys_write_exit(ctx) }, } } -unsafe fn handle_sys_write_enter(ctx: TracePointContext) -> Result { +unsafe fn handle_sys_write_enter(ctx: TracePointContext) -> Result { // info!(&ctx, "handle_sys_write start"); #[derive(Clone, Copy)] struct WriteSyscallArgs { @@ -45,7 +45,7 @@ unsafe fn handle_sys_write_enter(ctx: TracePointContext) -> Result { Ok(0) } -unsafe fn handle_sys_write_exit(ctx: TracePointContext) -> Result { +unsafe fn handle_sys_write_exit(ctx: TracePointContext) -> Result { //info!(&ctx, "handle_sys_write_exit start"); let ret = *ptr_at::(&ctx, 16).unwrap_unchecked(); //TODO: We cant use unwrap, thats why we couldnt use the aya helper fns -- cgit 1.4.1