Skip to content

Instantly share code, notes, and snippets.

@jarkkojs
Created May 24, 2022 23:20
Show Gist options
  • Save jarkkojs/9d92c5f0d637448843c44668e64a6696 to your computer and use it in GitHub Desktop.
Save jarkkojs/9d92c5f0d637448843c44668e64a6696 to your computer and use it in GitHub Desktop.
#!/bin/bash
cat /proc/kallsyms | \
sed -n '/call_meta__/p' | \
sed 's/.*call_meta__\(.*\)/\1/g; s/\(.*\)/SYS_\1 \1/; 1i #include <sys/syscall.h>' | \
gcc -E -P - | \
grep -v 'SYS_' | \
sort -n | \
uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment