From: Josh Stone <jistone@redhat.com>
To: oleg@redhat.com, srikar@linux.vnet.ibm.com
Cc: mingo@kernel.org, peterz@infradead.org, anton@redhat.com,
linux-kernel@vger.kernel.org, Josh Stone <jistone@redhat.com>
Subject: [PATCH] uprobes: Add exports for module use
Date: Thu, 10 Jan 2013 15:01:46 -0800 [thread overview]
Message-ID: <1357858906-9711-1-git-send-email-jistone@redhat.com> (raw)
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>
---
kernel/events/uprobes.c | 3 +++
kernel/ptrace.c | 7 +++++++
2 files changed, 10 insertions(+)
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c
index dea7acf..1db8cb6 100644
--- a/kernel/events/uprobes.c
+++ b/kernel/events/uprobes.c
@@ -27,6 +27,7 @@
#include <linux/pagemap.h> /* read_mapping_page */
#include <linux/slab.h>
#include <linux/sched.h>
+#include <linux/export.h>
#include <linux/rmap.h> /* anon_vma_prepare */
#include <linux/mmu_notifier.h> /* set_pte_at_notify */
#include <linux/swap.h> /* try_to_free_swap */
@@ -873,6 +874,7 @@ int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *
return ret;
}
+EXPORT_SYMBOL_GPL(uprobe_register);
/*
* uprobe_unregister - unregister a already registered probe.
@@ -904,6 +906,7 @@ void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consume
if (uprobe)
put_uprobe(uprobe);
}
+EXPORT_SYMBOL_GPL(uprobe_unregister);
static struct rb_node *
find_node_in_range(struct inode *inode, loff_t min, loff_t max)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index 1599157..24eee5d 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -673,6 +673,13 @@ static int ptrace_regset(struct task_struct *task, int req, unsigned int type,
kiov->iov_len, kiov->iov_base);
}
+/*
+ * This is declared in linux/regset.h and defined in machine-dependent
+ * code. We put the export here, near the primary machine-neutral use,
+ * to ensure no machine forgets it.
+ */
+EXPORT_SYMBOL_GPL(task_user_regset_view);
+
#endif
int ptrace_request(struct task_struct *child, long request,
--
1.7.11.7
next reply other threads:[~2013-01-10 23:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 23:01 Josh Stone [this message]
2013-01-11 9:32 ` Christoph Hellwig
2013-01-11 21:42 ` Josh Stone
2013-01-12 16:38 ` Oleg Nesterov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1357858906-9711-1-git-send-email-jistone@redhat.com \
--to=jistone@redhat.com \
--cc=anton@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=srikar@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®