Understanding the Linux kernel source
I want to modify some system calls for tracing purposes. To be specific, whenever a system call
open is made, I want to print some messages.
I have been looking into the internet and the code and I found
kernel/goldfish/fs/ directory. And there are many functions in this file. How would I know which function is being called exactly. I could have written some
printk call in all these functions to find it but I have to do it for other system calls also.
So, I have a few questions,
1) What is the best way to find implementation details of system calls?
2) I am using Kernel 2.6.29 (goldfish-Android). Are system calls implementation different in different kernel versions?
strace tells me that
msgrecv and 'SYS_24' system calls are being made. I look into
Android/bionic/libc/SYSCALLS.txt file and msgget is not there.
But when I look into
android/bionic/libc/kernel/arch-arm/asm/unistd.h file, I can find
msgget there. I can't understand what's going on and then how can I find implementation for