Skip to content

Instantly share code, notes, and snippets.

@wmealing
Created April 18, 2013 02:02
Show Gist options
  • Save wmealing/5409392 to your computer and use it in GitHub Desktop.
Save wmealing/5409392 to your computer and use it in GitHub Desktop.
Quick systemtap to log which processes attempt to load kernel modules.
/* stap -vv log-module-loads.stap */
probe syscall.init_module {
cmdline = cmdline_str()
time = ctime(gettimeofday_s());
printf("%s - Process %s[%d] is loading a module via: '%s'\n", time, pexecname(), ppid(), cmdline );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment