Re: where is the code for read system call?

2007-07-23 Thread Randy Dunlap
On Mon, 23 Jul 2007 18:01:32 +0200 Karsten Wiese wrote:

> Am Montag, 23. Juli 2007 schrieb Agarwal, Lomesh:
> > For future how do I trace a system call to a function in a kernel?
> 
> strace. i.e:
>   $ strace ls

I thought (maybe I misunderstood) that Lomesh wanted to know
which kernel function (by name) is called for specific syscalls...
and strace will tell the syscall by name, but not the kernel
function names.

If Lomesh wants what I described, then the answer is more like
"see the syscall tables in each $ARCH".

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: where is the code for read system call?

2007-07-23 Thread Karsten Wiese
Am Montag, 23. Juli 2007 schrieb Agarwal, Lomesh:
> For future how do I trace a system call to a function in a kernel?

strace. i.e:
$ strace ls
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: where is the code for read system call?

2007-07-23 Thread Agarwal, Lomesh
For future how do I trace a system call to a function in a kernel?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Karsten Wiese
Sent: Friday, July 20, 2007 5:09 PM
To: Agarwal, Lomesh
Cc: linux-kernel@vger.kernel.org
Subject: Re: where is the code for read system call?

Am Samstag, 21. Juli 2007 schrieb Agarwal, Lomesh:
> My application reads from socket. I need to change the behavior of
read
> system call for an experiment. Can someone point me to code?

fs/read_write.c: line 356
asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t
count)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel"
in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


RE: where is the code for read system call?

2007-07-23 Thread Agarwal, Lomesh
For future how do I trace a system call to a function in a kernel?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Karsten Wiese
Sent: Friday, July 20, 2007 5:09 PM
To: Agarwal, Lomesh
Cc: linux-kernel@vger.kernel.org
Subject: Re: where is the code for read system call?

Am Samstag, 21. Juli 2007 schrieb Agarwal, Lomesh:
 My application reads from socket. I need to change the behavior of
read
 system call for an experiment. Can someone point me to code?

fs/read_write.c: line 356
asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t
count)
-
To unsubscribe from this list: send the line unsubscribe linux-kernel
in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: where is the code for read system call?

2007-07-23 Thread Karsten Wiese
Am Montag, 23. Juli 2007 schrieb Agarwal, Lomesh:
 For future how do I trace a system call to a function in a kernel?

strace. i.e:
$ strace ls
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: where is the code for read system call?

2007-07-23 Thread Randy Dunlap
On Mon, 23 Jul 2007 18:01:32 +0200 Karsten Wiese wrote:

 Am Montag, 23. Juli 2007 schrieb Agarwal, Lomesh:
  For future how do I trace a system call to a function in a kernel?
 
 strace. i.e:
   $ strace ls

I thought (maybe I misunderstood) that Lomesh wanted to know
which kernel function (by name) is called for specific syscalls...
and strace will tell the syscall by name, but not the kernel
function names.

If Lomesh wants what I described, then the answer is more like
see the syscall tables in each $ARCH.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: where is the code for read system call?

2007-07-21 Thread Jan Engelhardt

On Jul 21 2007 07:05, Folkert van Heusden wrote:
>
>> My application reads from socket. I need to change the behavior of read
>> system call for an experiment. Can someone point me to code?
>
>Wouldn't it be easier to create a preload-library-wrapper around glibc?
>
Does not work with statically compiled binaries.
But in an experiment, you are likely to have source and/or dynamically linked
programs.


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


Re: where is the code for read system call?

2007-07-21 Thread Jan Engelhardt

On Jul 21 2007 07:05, Folkert van Heusden wrote:

 My application reads from socket. I need to change the behavior of read
 system call for an experiment. Can someone point me to code?

Wouldn't it be easier to create a preload-library-wrapper around glibc?

Does not work with statically compiled binaries.
But in an experiment, you are likely to have source and/or dynamically linked
programs.


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


Re: where is the code for read system call?

2007-07-20 Thread Folkert van Heusden
> My application reads from socket. I need to change the behavior of read
> system call for an experiment. Can someone point me to code?

Wouldn't it be easier to create a preload-library-wrapper around glibc?


Folkert van Heusden

-- 
MultiTail is a versatile tool for watching logfiles and output of
commands. Filtering, coloring, merging, diff-view, etc.
http://www.vanheusden.com/multitail/
--
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: where is the code for read system call?

2007-07-20 Thread Karsten Wiese
Am Samstag, 21. Juli 2007 schrieb Agarwal, Lomesh:
> My application reads from socket. I need to change the behavior of read
> system call for an experiment. Can someone point me to code?

fs/read_write.c: line 356
asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


where is the code for read system call?

2007-07-20 Thread Agarwal, Lomesh
My application reads from socket. I need to change the behavior of read
system call for an experiment. Can someone point me to code?

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


where is the code for read system call?

2007-07-20 Thread Agarwal, Lomesh
My application reads from socket. I need to change the behavior of read
system call for an experiment. Can someone point me to code?

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


Re: where is the code for read system call?

2007-07-20 Thread Karsten Wiese
Am Samstag, 21. Juli 2007 schrieb Agarwal, Lomesh:
 My application reads from socket. I need to change the behavior of read
 system call for an experiment. Can someone point me to code?

fs/read_write.c: line 356
asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: where is the code for read system call?

2007-07-20 Thread Folkert van Heusden
 My application reads from socket. I need to change the behavior of read
 system call for an experiment. Can someone point me to code?

Wouldn't it be easier to create a preload-library-wrapper around glibc?


Folkert van Heusden

-- 
MultiTail is a versatile tool for watching logfiles and output of
commands. Filtering, coloring, merging, diff-view, etc.
http://www.vanheusden.com/multitail/
--
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/