From c776f2ea2e6387b26994601cebde8819ab237a3f Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sun, 9 Jun 2024 23:23:52 +0200 Subject: fs-tracer: Handle open files state --- fs-tracer-ebpf/src/syscalls/open.rs | 18 +++++++++--------- fs-tracer-ebpf/src/syscalls/write.rs | 1 + 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'fs-tracer-ebpf') diff --git a/fs-tracer-ebpf/src/syscalls/open.rs b/fs-tracer-ebpf/src/syscalls/open.rs index 8f48672..9d5280d 100644 --- a/fs-tracer-ebpf/src/syscalls/open.rs +++ b/fs-tracer-ebpf/src/syscalls/open.rs @@ -66,14 +66,14 @@ unsafe fn handle_sys_open_enter(ctx: TracePointContext) -> Result Result Result { //info!(&ctx, "handle_sys_open_exit start"); - let ret = ctx.read_at::(16)?; //TODO: We cant use unwrap, thats why we couldnt use the aya helper fns + let ret = ctx.read_at::(16)?; //TODO: We cant use unwrap, thats why we couldnt use the aya helper fns let tgid = ctx.tgid(); if let Some(syscall) = SYSCALL_ENTERS.get(&tgid) diff --git a/fs-tracer-ebpf/src/syscalls/write.rs b/fs-tracer-ebpf/src/syscalls/write.rs index efad6f8..232dfba 100644 --- a/fs-tracer-ebpf/src/syscalls/write.rs +++ b/fs-tracer-ebpf/src/syscalls/write.rs @@ -39,6 +39,7 @@ unsafe fn handle_sys_write_enter(ctx: TracePointContext) -> Result