linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* where is the code for read system call?
@ 2007-07-20 23:41 Agarwal, Lomesh
  2007-07-21  0:08 ` Karsten Wiese
  2007-07-21  5:05 ` Folkert van Heusden
  0 siblings, 2 replies; 7+ messages in thread
From: Agarwal, Lomesh @ 2007-07-20 23:41 UTC (permalink / raw)
  To: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: where is the code for read system call?
  2007-07-20 23:41 where is the code for read system call? Agarwal, Lomesh
@ 2007-07-21  0:08 ` Karsten Wiese
  2007-07-23 14:43   ` Agarwal, Lomesh
  2007-07-21  5:05 ` Folkert van Heusden
  1 sibling, 1 reply; 7+ messages in thread
From: Karsten Wiese @ 2007-07-21  0:08 UTC (permalink / raw)
  To: Agarwal, Lomesh; +Cc: linux-kernel

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)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: where is the code for read system call?
  2007-07-20 23:41 where is the code for read system call? Agarwal, Lomesh
  2007-07-21  0:08 ` Karsten Wiese
@ 2007-07-21  5:05 ` Folkert van Heusden
  2007-07-21  8:40   ` Jan Engelhardt
  1 sibling, 1 reply; 7+ messages in thread
From: Folkert van Heusden @ 2007-07-21  5:05 UTC (permalink / raw)
  To: Agarwal, Lomesh; +Cc: linux-kernel

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: where is the code for read system call?
  2007-07-21  5:05 ` Folkert van Heusden
@ 2007-07-21  8:40   ` Jan Engelhardt
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Engelhardt @ 2007-07-21  8:40 UTC (permalink / raw)
  To: Folkert van Heusden; +Cc: Agarwal, Lomesh, linux-kernel


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
-- 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: where is the code for read system call?
  2007-07-21  0:08 ` Karsten Wiese
@ 2007-07-23 14:43   ` Agarwal, Lomesh
  2007-07-23 16:01     ` Karsten Wiese
  0 siblings, 1 reply; 7+ messages in thread
From: Agarwal, Lomesh @ 2007-07-23 14:43 UTC (permalink / raw)
  To: Karsten Wiese; +Cc: linux-kernel

For future how do I trace a system call to a function in a kernel?

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] 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 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/

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: where is the code for read system call?
  2007-07-23 14:43   ` Agarwal, Lomesh
@ 2007-07-23 16:01     ` Karsten Wiese
  2007-07-23 16:35       ` Randy Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: Karsten Wiese @ 2007-07-23 16:01 UTC (permalink / raw)
  To: Agarwal, Lomesh; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: where is the code for read system call?
  2007-07-23 16:01     ` Karsten Wiese
@ 2007-07-23 16:35       ` Randy Dunlap
  0 siblings, 0 replies; 7+ messages in thread
From: Randy Dunlap @ 2007-07-23 16:35 UTC (permalink / raw)
  To: Karsten Wiese; +Cc: Agarwal, Lomesh, linux-kernel

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 ***

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-07-23 16:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-20 23:41 where is the code for read system call? Agarwal, Lomesh
2007-07-21  0:08 ` Karsten Wiese
2007-07-23 14:43   ` Agarwal, Lomesh
2007-07-23 16:01     ` Karsten Wiese
2007-07-23 16:35       ` Randy Dunlap
2007-07-21  5:05 ` Folkert van Heusden
2007-07-21  8:40   ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).