All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] uretprobes: return probes implementation
@ 2013-03-22 13:08 Anton Arapov
  2013-03-22 13:08 ` [PATCH 1/7] uretprobes: preparation patch Anton Arapov
                   ` (8 more replies)
  0 siblings, 9 replies; 50+ messages in thread
From: Anton Arapov @ 2013-03-22 13:08 UTC (permalink / raw)
  To: Anton Arapov, Oleg Nesterov, Srikar Dronamraju
  Cc: LKML, Josh Stone, Frank Eigler, Peter Zijlstra, Ingo Molnar,
	Ananth N Mavinakayanahalli, adrian.m.negreanu, Torsten.Polle

Hello All,

  this is core implementation of the uretprobes. This enables a breakpoint
on function's return for the tools such as perf.

  Introduce additional handler* for uprobe consumer that makes possible the
distinguish uprobe from uretprobe. Note, behind every uretprobe a regular
uprobe with return probe handler(rp_handler). Once hit the uprobe that has
rp_handler, we hijack the return address of the probed function and replacing
it with the address of trampoline. Trampoline is the preallocated page in
probed task's xol area that filled with breakpoint opcode. In turn, when the
return breakpoint is hit, invoke the rp_handler.

  The patchset shouldn't be difficult to read and hopefully the comments to
commits will help.
  Please, review.


patchset in git:
  http://github.com/arapov/linux-aa/commits/uretprobes_v0

RFC reviews:
  v4: https://lkml.org/lkml/2013/3/4/246
  v3: https://lkml.org/lkml/2013/2/28/148
  v2: https://lkml.org/lkml/2013/1/9/157
  v1: https://lkml.org/lkml/2012/12/21/133

thanks,
Anton.

Anton Arapov (7):
  uretprobes: preparation patch
  uretprobes: extract fill_page() and trampoline implementation
  uretprobes/x86: hijack return address
  uretprobes: return probe entry, prepare_uretprobe()
  uretprobes: return probe exit, invoke handlers
  uretprobes: limit the depth of return probe nestedness
  uretprobes: remove -ENOSYS as return probes implemented

 arch/x86/include/asm/uprobes.h |   1 +
 arch/x86/kernel/uprobes.c      |  29 ++++++
 include/linux/uprobes.h        |   5 +
 kernel/events/uprobes.c        | 205 ++++++++++++++++++++++++++++++++++++++---
 4 files changed, 229 insertions(+), 11 deletions(-)

-- 
1.8.1.4

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

end of thread, other threads:[~2013-03-26 14:38 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 13:08 [PATCH 0/7] uretprobes: return probes implementation Anton Arapov
2013-03-22 13:08 ` [PATCH 1/7] uretprobes: preparation patch Anton Arapov
2013-03-23 17:42   ` Oleg Nesterov
2013-03-22 13:08 ` [PATCH 2/7] uretprobes: extract fill_page() and trampoline implementation Anton Arapov
2013-03-24 14:41   ` Oleg Nesterov
2013-03-24 18:20     ` [PATCH 0/5] kmap cleanups for uretprobes (Was: extract fill_page() and trampoline implementation) Oleg Nesterov
2013-03-24 18:21       ` [PATCH 1/5] uprobes: Turn copy_opcode() into copy_from_page() Oleg Nesterov
2013-03-25 10:30         ` Anton Arapov
2013-03-26 11:59         ` Srikar Dronamraju
2013-03-24 18:21       ` [PATCH 2/5] uprobes: Change __copy_insn() to use copy_from_page() Oleg Nesterov
2013-03-25 10:31         ` Anton Arapov
2013-03-26 12:00         ` Srikar Dronamraju
2013-03-24 18:21       ` [PATCH 3/5] uprobes: Kill the unnecesary filp != NULL check in __copy_insn() Oleg Nesterov
2013-03-25 10:31         ` Anton Arapov
2013-03-26 12:00         ` Srikar Dronamraju
2013-03-24 18:21       ` [PATCH 4/5] uprobes: Introduce copy_to_page() Oleg Nesterov
2013-03-25 10:31         ` Anton Arapov
2013-03-26 12:02         ` Srikar Dronamraju
2013-03-24 18:21       ` [PATCH 5/5] uprobes: Change write_opcode() to use copy_*page() Oleg Nesterov
2013-03-25 10:31         ` Anton Arapov
2013-03-26 11:59         ` Srikar Dronamraju
2013-03-25 10:30       ` [PATCH 0/5] kmap cleanups for uretprobes (Was: extract fill_page() and trampoline implementation) Anton Arapov
2013-03-25 11:58     ` [PATCH 2/7] uretprobes: extract fill_page() and trampoline implementation Oleg Nesterov
2013-03-22 13:09 ` [PATCH 3/7] uretprobes/x86: hijack return address Anton Arapov
2013-03-24 14:59   ` Oleg Nesterov
2013-03-22 13:09 ` [PATCH 4/7] uretprobes: return probe entry, prepare_uretprobe() Anton Arapov
2013-03-22 15:02   ` Oleg Nesterov
2013-03-26 12:26     ` Anton Arapov
2013-03-26 14:34       ` Oleg Nesterov
2013-03-23 17:46   ` Oleg Nesterov
2013-03-24 15:26   ` Oleg Nesterov
2013-03-25 15:51     ` Anton Arapov
2013-03-26  8:45     ` Anton Arapov
2013-03-26  8:50       ` Anton Arapov
2013-03-22 13:09 ` [PATCH 5/7] uretprobes: return probe exit, invoke handlers Anton Arapov
2013-03-24 16:28   ` Oleg Nesterov
2013-03-25 12:31     ` Oleg Nesterov
2013-03-25 15:49     ` Anton Arapov
2013-03-25 16:38       ` Oleg Nesterov
2013-03-26  8:36         ` Anton Arapov
2013-03-22 13:09 ` [PATCH 6/7] uretprobes: limit the depth of return probe nestedness Anton Arapov
2013-03-24 16:54   ` Oleg Nesterov
2013-03-22 13:09 ` [PATCH 7/7] uretprobes: implemented, thus remove -ENOSYS Anton Arapov
2013-03-22 13:13   ` Anton Arapov
2013-03-22 13:09 ` [PATCH 7/7] uretprobes: remove -ENOSYS as return probes implemented Anton Arapov
2013-03-22 15:10 ` [PATCH 0/7] uretprobes: return probes implementation Oleg Nesterov
2013-03-22 21:40   ` Josh Stone
2013-03-23  6:43     ` Anton Arapov
2013-03-23 18:04       ` Oleg Nesterov
2013-03-23 17:56     ` Oleg Nesterov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.