diff options
| author | Baitinq <[email protected]> | 2024-02-05 00:02:52 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2024-02-05 00:02:52 +0100 |
| commit | 99be7e2e6964bae3335fd414f755c80769d46608 (patch) | |
| tree | 72aa3415138cf3f591874e97509d80dc4b3b0bd1 /fs-tracer-ebpf/src/syscalls/write.rs | |
| parent | start traversing pwd path (diff) | |
| download | fs-tracer-99be7e2e6964bae3335fd414f755c80769d46608.tar.gz fs-tracer-99be7e2e6964bae3335fd414f755c80769d46608.tar.bz2 fs-tracer-99be7e2e6964bae3335fd414f755c80769d46608.zip | |
TODO bpf_tail_call
Diffstat (limited to '')
| -rw-r--r-- | fs-tracer-ebpf/src/syscalls/write.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs-tracer-ebpf/src/syscalls/write.rs b/fs-tracer-ebpf/src/syscalls/write.rs index d9745a4..44a13a5 100644 --- a/fs-tracer-ebpf/src/syscalls/write.rs +++ b/fs-tracer-ebpf/src/syscalls/write.rs @@ -1,9 +1,15 @@ +use aya_bpf::{ + cty::{c_char, c_uint}, + helpers::{bpf_probe_read_kernel_str_bytes, bpf_probe_read_user_str_bytes}, +}; use core::ffi::c_size_t; -use aya_bpf::{cty::{c_char, c_uint}, helpers::{bpf_probe_read_kernel_str_bytes, bpf_probe_read_user_str_bytes}}; use crate::*; -pub fn handle_sys_write(ctx: TracePointContext, syscall_type: SyscallType) -> Result<c_long, c_long> { +pub fn handle_sys_write( + ctx: TracePointContext, + syscall_type: SyscallType, +) -> Result<c_long, c_long> { match syscall_type { SyscallType::Enter => unsafe { handle_sys_write_enter(ctx) }, SyscallType::Exit => unsafe { handle_sys_write_exit(ctx) }, |