linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Multiple kprobes per address
@ 2002-11-08 21:00 Rusty Lynch
  2002-11-11  8:05 ` Vamsi Krishna S .
  0 siblings, 1 reply; 4+ messages in thread
From: Rusty Lynch @ 2002-11-08 21:00 UTC (permalink / raw)
  To: vamsi; +Cc: linux-kernel

I noticed that kprobes is designed around the idea of only allowing
a single probe point per probe address.  Why not allow multiple probe
points for a given probe address?  Is it a way of limiting complexity?

It looks like it would be fairly straight forward to change get_kprobe(addr)
to be get_kprobes(addr) where it returns a list of probe points associated
with the address, and then tweak do_int3 to work through the entire list.
Would such a change be acceptable?

     -rustyl

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

* Re: Multiple kprobes per address
  2002-11-08 21:00 Multiple kprobes per address Rusty Lynch
@ 2002-11-11  8:05 ` Vamsi Krishna S .
  2002-11-11 18:35   ` Rusty Lynch
  0 siblings, 1 reply; 4+ messages in thread
From: Vamsi Krishna S . @ 2002-11-11  8:05 UTC (permalink / raw)
  To: Rusty Lynch; +Cc: linux-kernel

Hi,

On Fri, Nov 08, 2002 at 01:00:26PM -0800, Rusty Lynch wrote:
> I noticed that kprobes is designed around the idea of only allowing
> a single probe point per probe address.  Why not allow multiple probe
> points for a given probe address?  Is it a way of limiting complexity?
> 
We didn't think it would be useful and conceptually, it is simpler to
think of one probe at an address.

> It looks like it would be fairly straight forward to change get_kprobe(addr)
> to be get_kprobes(addr) where it returns a list of probe points associated
> with the address, and then tweak do_int3 to work through the entire list.
> Would such a change be acceptable?
> 
It will be trivial to add this, but why? Is there a good reason
for wanting to do this (multiple kprobes at same address) as opposed 
to doing all you want done on a probe hit in a single handler?

Regards,
Vamsi.
-- 
Vamsi Krishna S.
Linux Technology Center,
IBM Software Lab, Bangalore.
Ph: +91 80 5044959
Internet: vamsi@in.ibm.com

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

* Re: Multiple kprobes per address
  2002-11-11  8:05 ` Vamsi Krishna S .
@ 2002-11-11 18:35   ` Rusty Lynch
  2002-11-12  8:33     ` Vamsi Krishna S .
  0 siblings, 1 reply; 4+ messages in thread
From: Rusty Lynch @ 2002-11-11 18:35 UTC (permalink / raw)
  To: vamsi; +Cc: linux-kernel

I was really only concerned with multiple consumers of kprobes.  So if
I were to create some tool that used kpobes to hook into the kernel, and
someone else were to create another tool that solved a different problem
but also used kprobes then the two tools wouldn't play nice with each other.

    -rustyl

----- Original Message -----
From: "Vamsi Krishna S ." <vamsi@in.ibm.com>
To: "Rusty Lynch" <rusty@linux.co.intel.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Monday, November 11, 2002 12:05 AM
Subject: Re: Multiple kprobes per address


> Hi,
>
> On Fri, Nov 08, 2002 at 01:00:26PM -0800, Rusty Lynch wrote:
> > I noticed that kprobes is designed around the idea of only allowing
> > a single probe point per probe address.  Why not allow multiple probe
> > points for a given probe address?  Is it a way of limiting complexity?
> >
> We didn't think it would be useful and conceptually, it is simpler to
> think of one probe at an address.
>
> > It looks like it would be fairly straight forward to change
get_kprobe(addr)
> > to be get_kprobes(addr) where it returns a list of probe points
associated
> > with the address, and then tweak do_int3 to work through the entire
list.
> > Would such a change be acceptable?
> >
> It will be trivial to add this, but why? Is there a good reason
> for wanting to do this (multiple kprobes at same address) as opposed
> to doing all you want done on a probe hit in a single handler?
>
> Regards,
> Vamsi.
> --
> Vamsi Krishna S.
> Linux Technology Center,
> IBM Software Lab, Bangalore.
> Ph: +91 80 5044959
> Internet: vamsi@in.ibm.com


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

* Re: Multiple kprobes per address
  2002-11-11 18:35   ` Rusty Lynch
@ 2002-11-12  8:33     ` Vamsi Krishna S .
  0 siblings, 0 replies; 4+ messages in thread
From: Vamsi Krishna S . @ 2002-11-12  8:33 UTC (permalink / raw)
  To: Rusty Lynch; +Cc: linux-kernel, richard

On Mon, Nov 11, 2002 at 10:35:56AM -0800, Rusty Lynch wrote:
> I was really only concerned with multiple consumers of kprobes.  So if
> I were to create some tool that used kpobes to hook into the kernel, and
> someone else were to create another tool that solved a different problem
> but also used kprobes then the two tools wouldn't play nice with each other.

There will be a problem when both the tools (built on top of kprobes) try
to place probes at the same address: only the first probe actually succeds,
the second one gets -EEXIST from register_kprobe.

This could be made to work, but at the moment, it seems unnecessary 
complication to me. Lets reconsider it when it really becomes a problem.

Thanks,
Vamsi. 
-- 
Vamsi Krishna S.
Linux Technology Center,
IBM Software Lab, Bangalore.
Ph: +91 80 5044959
Internet: vamsi@in.ibm.com

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

end of thread, other threads:[~2002-11-12  8:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-08 21:00 Multiple kprobes per address Rusty Lynch
2002-11-11  8:05 ` Vamsi Krishna S .
2002-11-11 18:35   ` Rusty Lynch
2002-11-12  8:33     ` Vamsi Krishna S .

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