Skip to content

Instantly share code, notes, and snippets.

@cr0nx
Created January 28, 2025 09:13
Show Gist options
  • Select an option

  • Save cr0nx/9030cc9389c50e0c21b81eb7ded077cd to your computer and use it in GitHub Desktop.

Select an option

Save cr0nx/9030cc9389c50e0c21b81eb7ded077cd to your computer and use it in GitHub Desktop.
bpftrace tracing init_module and finit_module syscalls
#!/usr/bin/env bpftrace
BEGIN {
printf("Tracing init_module and finit_module syscalls... Hit Ctrl+C to stop.\n");
}
tracepoint:syscalls:sys_enter_init_module,
tracepoint:syscalls:sys_enter_finit_module {
printf("Syscall executed: %s (PID: %d, UID: %d, Command: %s)\n", probe, pid, uid, comm);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment