about summary refs log tree commit diff
path: root/fs-tracer-ebpf
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-01-15 00:16:16 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-01-15 00:16:16 +0100
commit518f5a51e39b4762be84d757bc080c50a027f364 (patch)
tree7a98ea61fcdf846d71c260dd32d6990c2e7cd80c /fs-tracer-ebpf
parentSend write_syscall events to userspace (diff)
downloadfs-tracer-518f5a51e39b4762be84d757bc080c50a027f364.tar.gz
fs-tracer-518f5a51e39b4762be84d757bc080c50a027f364.tar.bz2
fs-tracer-518f5a51e39b4762be84d757bc080c50a027f364.zip
Add comments
Diffstat (limited to 'fs-tracer-ebpf')
-rw-r--r--fs-tracer-ebpf/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs-tracer-ebpf/src/main.rs b/fs-tracer-ebpf/src/main.rs
index b14154d..d2cae0f 100644
--- a/fs-tracer-ebpf/src/main.rs
+++ b/fs-tracer-ebpf/src/main.rs
@@ -109,7 +109,8 @@ fn handle_sys_write(ctx: TracePointContext) -> Result<u32, u32> {
 }
 
 //TODO: How are we going to correlate. We have open of a filename, we need to insert that into (pid, fd) -> filename. on close we remove from map. we need some timeout to remove stale entries
-//TODO: to get the fd from open, we need to know the return value of the syscall. for that we need a tracepoint on end and keep a map of (tgid, pid) -> WriteSyscallBPF)
+//TODO: to get the fd from open, we need to know the return value of the syscall. for that we need a tracepoint on end and keep a map of (tgid, pid) -> WriteSyscallBPF). we need to differenciate the syscalls by id
+//TODO: Maybe we can use git itself for the diffs etc.
 
 fn get_string_from_userspace(ptr: *const u8, buf: &mut [u8]) {
     unsafe { gen::bpf_probe_read_user_str( buf.as_mut_ptr() as *mut c_void, buf.len() as u32, ptr as *const c_void) };