Skip to content

RFC UBP, XOL and Uprobes

Srikar Dronamraju lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 150 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7User Space Breakpoint Assistance Layer (UBP)arch/Kconfig include/linux/ubp.h kernel/Makefile +1 more+774 -078 replies
2/7x86 support for UBParch/x86/Kconfig arch/x86/include/asm/ubp.h arch/x86/kernel/Makefile +1 more+620 -00 replies
3/7Execution out of line (XOL)arch/Kconfig include/linux/ubp_xol.h kernel/Makefile +1 more+705 -05 replies
4/7Uprobes Implementationarch/Kconfig include/linux/uprobes.h kernel/Makefile +1 more+2322 -035 replies
5/7X86 Support for Uprobesarch/x86/Kconfig arch/x86/include/asm/uprobes.h+28 -02 replies
6/7Uprobes DocumentationDocumentation/uprobes.txt+460 -00 replies
7/7Ftrace plugin for UprobesDocumentation/trace/uprobes_trace.txt kernel/trace/Makefile kernel/trace/trace_uprobes.c+735 -020 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC] [PATCH 0/7] UBP, XOL and Uprobes

Hi,

This patchset implements Uprobes which enables you to dynamically break into any routine in a user space application and collect information non-disruptively. Uprobes is based on utrace and uses x86 instruction decoder.

When a uprobe is registered, Uprobes makes a copy of the probed instruction, stops the probed application, replaces the first byte(s) of the probed instruction with a breakpoint instruction and allows the probed application to continue. (Uprobes uses the same copy-on-write mechanism so that the breakpoint affects only that process.)

When a CPU hits the breakpoint instruction, Uprobes intercepts the SIGTRAP and finds the associated uprobe. It then executes the associated handler. Uprobes single-steps its copy of the probed instruction and resumes execution of the probed process at the instruction following the probepoint. Instruction copies to be single-stepped are stored in a per-process "single-step out of line (XOL) area,"

Uprobes can be used to take advantage of static markers available in user space applications.

Advantages of uprobes over conventional debugging include:
1. Non-disruptive.
2. Uses Execution out of line(XOL),
3. Much better handling of multithreaded programs because of XOL.
4. No context switch between tracer, tracee.

Here is the list of TODO Items.

- Provide a perf interface to uprobes.
- Return probes.
- Support for Other Architectures.
- Jump optimization.

This patchset provides
Subject: [RFC] [PATCH 0/7] UBP, XOL and Uprobes
Subject: [RFC] [PATCH 1/7] User Space Breakpoint Assistance Layer (UBP)
Subject: [RFC] [PATCH 2/7] x86 support for UBP
Subject: [RFC] [PATCH 3/7] Execution out of line (XOL)
Subject: [RFC] [PATCH 4/7] Uprobes Implementation
Subject: [RFC] [PATCH 5/7] X86 Support for Uprobes
Subject: [RFC] [PATCH 6/7] Uprobes Documentation
Subject: [RFC] [PATCH 7/7] Ftrace plugin for Uprobes

This patchset is based on
git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace.git

If and when utrace gets accepted into tip tree or Mainline, I will rebase this patchset.

Please do provide your valuable comments.

--
Thanks and Regards
Srikar