lkml.org 
[lkml]   [2004]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Intercepting system calls
From
Date
On Mon, 2004-12-20 at 20:22 -0800, selvakumar nagendran wrote:
> I want to intercept system calls that are provided
> for IPC in Linux. I have to determine whether a
> process blocks while executing a system call and I
> must save the arguments passed to that system call.
> Can I modify the system call source code directly
> for this? or if I want the system calls to refer my
> module, how should I do that? can anyone explain for
> this, if possible with some code?..

Do you have to do this in the kernel? Have you taken a look at ptrace?
Especially PTRACE_SYSCALL (man ptrace). Although it may be trickier to
know if it blocked or not, but it should still be possible to do
entirely from user land, and thus easier to write/debug.

-- Steve


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.132 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site