I’m looking for the implementations of open(), close(), write() and unlink(), but I can’t find them anywhere! Every function I find is like sys_open, do_open, etc_open… but nothing with the interface we use. Can you help me?
I need to discover what kind of security checks they make
You need to look for
SYSCALL_DEFINEmacro in kernel sources. For example, grepping forunlinkat/fsgives the following:$ grep -r -n SYSCALL_DEFINE *.c | grep unlinkNote that the number after
SYSCALL_DEFINEis the syscall argument count.