aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/events
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2013-01-13 13:03:34 -0500
committerOleg Nesterov <oleg@redhat.com>2013-02-08 11:47:13 -0500
commite8440c1458ba571bc3fac8a6beb53ff604199f5b (patch)
tree59abbd23435cd341250a028b4fa06826b7133fbe /kernel/events
parentaf4355e91f15812df8608925738c91be57c580dd (diff)
uprobes: Add exports for module use
The original pull message for uprobes (commit 654443e2) noted: This tree includes uprobes support in 'perf probe' - but SystemTap (and other tools) can take advantage of user probe points as well. In order to actually be usable in module-based tools like SystemTap, the interface needs to be exported. This patch first adds the obvious exports for uprobe_register and uprobe_unregister. Then it also adds one for task_user_regset_view, which is necessary to get the correct state of userspace registers. Signed-off-by: Josh Stone <jistone@redhat.com> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/uprobes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index f6c7062fb950..221fc58f59e3 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -27,6 +27,7 @@
27#include <linux/pagemap.h> /* read_mapping_page */ 27#include <linux/pagemap.h> /* read_mapping_page */
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/sched.h> 29#include <linux/sched.h>
30#include <linux/export.h>
30#include <linux/rmap.h> /* anon_vma_prepare */ 31#include <linux/rmap.h> /* anon_vma_prepare */
31#include <linux/mmu_notifier.h> /* set_pte_at_notify */ 32#include <linux/mmu_notifier.h> /* set_pte_at_notify */
32#include <linux/swap.h> /* try_to_free_swap */ 33#include <linux/swap.h> /* try_to_free_swap */
@@ -851,6 +852,7 @@ int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *
851 goto retry; 852 goto retry;
852 return ret; 853 return ret;
853} 854}
855EXPORT_SYMBOL_GPL(uprobe_register);
854 856
855/* 857/*
856 * uprobe_unregister - unregister a already registered probe. 858 * uprobe_unregister - unregister a already registered probe.
@@ -871,6 +873,7 @@ void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consume
871 up_write(&uprobe->register_rwsem); 873 up_write(&uprobe->register_rwsem);
872 put_uprobe(uprobe); 874 put_uprobe(uprobe);
873} 875}
876EXPORT_SYMBOL_GPL(uprobe_unregister);
874 877
875static int unapply_uprobe(struct uprobe *uprobe, struct mm_struct *mm) 878static int unapply_uprobe(struct uprobe *uprobe, struct mm_struct *mm)
876{ 879{