Re: [osol-code] Tracing 32bit sys call in kernel module

2011-10-14 Thread Neo
Hi, thanks for reply. Good news is my problem got solved!!! The code snippet I posted on this thread was correct, no issues with that. But, as I suspected, the issue was with "SYSCALL32_IMPL" flag. This flag need to be added during compilation. So, I just added "-D_SYSCALL32 -D_SYSCALL32_IMPL"

Re: [osol-code] Tracing 32bit sys call in kernel module

2011-10-11 Thread James Carlson
Neo wrote: >> That overwrites (and loses) the pointer assigned to "old_call_c" from >> the sysent[] array. Are you sure you don't want to define an >> "old_call_32_c" variable? > > The "old_call_c" doesn't get overwritten. There are no issues with the given > type of implementation. Writing two

Re: [osol-code] Tracing 32bit sys call in kernel module

2011-10-11 Thread Casper . Dik
>So, tracing 32bit sys calls on 64 bit platform is the basic issue. There are two sysent tables sysent (native, 64 bit) and sysent32(32 bit system calls). You need to modify the 32 bit and the 64 bit entry (and you need to provide a native and a 32 bit implementation but in some cases they can

Re: [osol-code] Tracing 32bit sys call in kernel module

2011-10-11 Thread Neo
Hi carlsonj, thanks for the reply. Sorry I couldn't reply since some days. I tried using dtrace for the 32bit sys call tracing but didn't get much help with my problem. > That overwrites (and loses) the pointer assigned to "old_call_c" from > the sysent[] array. Are you sure you don't want to d

Re: [osol-code] Tracing 32bit sys call in kernel module

2011-09-15 Thread James Carlson
Neo wrote: > I am writing a kernel module to redirect common system calls to my custom > syscalls using "sysent" array. It is working fine for 64bit syscalls. There are some high-level problems with that approach. The main one is that the syscall interface is _intentionally_ undocumented. It ca