Skip to contentSkip to conversation

Unable to find syscall number for some system calls

DISCUSSION selvakumar nagendran 2 participants 2 messages Dec 30, 2004

lore
Share & tools
lore
#0 lore raw

Hello,
I am intercepting system calls in 2.4.28 kernel
for my project work. While I was looking for syscall numbers for system calls related to semaphores like semop,semget..the appropriate numbers were missing in the asm/unistd.h file. For other system calls like sys_pipe numbers are present in the above file. What should I do to intercept these system calls? Where should I look for the related syscall numbers?

Thanks,
selva

__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com

#1 lore raw
Quoted 6 lines · selvakumar nagendran

I am intercepting system calls in 2.4.28 kernel
for my project work. While I was looking for syscall numbers for system calls related to semaphores like semop,semget..the appropriate numbers were missing in the asm/unistd.h file. For other system calls like sys_pipe numbers are present in the above file. What

Well, you also won't find sys_connect as these are all wrapped in sys_socketcall. For intel, it turns out that it has been decided to wrap all sem*() calls in sys_ipc().

./asm-i386/unistd.h:#define __NR_ipc 117

The 'royal way' to figure these things out is to trace the path from semget() in libc to the kernel. You can download glibc from the GNU site I think.

Good luck!

Signature · 2 lines
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO