From: Guy, Jeffrey R. <JEFFREY.R.GUY@saic.com> - 2003-02-06 16:24:12
Hello. I've been snooping around in arch/um/kernel/syscall_kern.c in the
function execute_syscall. It calls a macro EXECUTE_SYSCALL, which calls a
function listed in sys_call_table (see arch/um/kernel/sys_call_table.c) to
execute the desired system call (the first argument of the macro). I added
a statement right after EXECUTE_SYSCALL statement to print out the value of
the variable syscall, something like this:
if((syscall >= NR_syscalls) || (syscall < 0))
res = -ENOSYS;
else if(honeypot && check_bogosity(regs))
res = -EFAULT;
res = EXECUTE_SYSCALL(syscall, regs);
+ printk("syscall %d called.\n",syscall);
Anyway, a surprisingly large amount (30% or so) of the incoming system calls
had syscall==0. Now, when I looked in sys_call_table.c, I found
[ 0 ] = sys_ni_syscall,
which suggests to me that system call 0 is not implemented. Why, then, is
it being called so often? Does it do something that I'm not seeing?
Needless to say, I'm a bit confused. Any clarification is much appreciated.
Thanks for the help.