lkmpg
lkmpg copied to clipboard
Add system call "stealing" sample using kprobe handler
The syscall-steal example does't work on my x84 Laptops with kernel 6.1 on Debian and 5.15 on Ubuntu. As mentioned in this answer on stack overflow, syscall table is no longer used to invoke system call on x86 arch after this commit, which is backed-ported to many LTS kernel versions. So maybe an extra example without using syscall table can make it easy to understand the situation for beginners like me .
Reported by CI:
examples/syscall-steal2.c:35:15: warning: symbol 'syscall_kprobe' was not declared. Should it be static?
Thank @haodongnj for contributing!