]> git.karo-electronics.de Git - karo-tx-linux.git/commit
uprobes: slot allocation.
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Wed, 7 Dec 2011 10:15:50 +0000 (15:45 +0530)
committerSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Sun, 18 Dec 2011 06:22:57 +0000 (11:52 +0530)
commit59c919d4345ca8361436fed9c50e9fd6e0c16e4c
treea7bd11ebddca38640e663c332828451e747ae888
parent599b83b592b33388c2d462c9af826a59eb343129
uprobes: slot allocation.

Uprobes executes the original instruction at a probed location out of
line. For this, we allocate a page (per mm) upon the first uprobe hit,
in the process' user address space, divide it into slots that are used
to store the actual instructions to be singlestepped.

Care is taken to ensure that the allocation is in an unmapped area as
close to the top of the user address space as possible, with appropriate
permission settings to keep selinux like frameworks happy.

Upon a uprobe hit, a free slot is acquired, and is released after the
singlestep completes.

[ Folded a fix for build issue on powerpc fixed and reported by Stephen
Rothwell]

Lots of improvements courtesy suggestions/inputs from Peter and Oleg.

Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
include/linux/mm_types.h
include/linux/uprobes.h
kernel/fork.c
kernel/uprobes.c