summaryrefslogtreecommitdiffstats
path: root/include/linux/uprobes.h
diff options
context:
space:
mode:
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>2012-02-22 14:46:02 +0530
committerIngo Molnar <mingo@elte.hu>2012-02-22 11:26:09 +0100
commit3ff54efdfaace9e9b2b7c1959a865be6b91de96c (patch)
tree6218c7b40bd80704d059d5f3fa434974e675b070 /include/linux/uprobes.h
parent96379f60075c75b261328aa7830ef8aa158247ac (diff)
downloadtalos-obmc-linux-3ff54efdfaace9e9b2b7c1959a865be6b91de96c.tar.gz
talos-obmc-linux-3ff54efdfaace9e9b2b7c1959a865be6b91de96c.zip
uprobes/core: Move insn to arch specific structure
Few cleanups suggested by Ingo Molnar. - Rename struct uprobe_arch_info to struct arch_uprobe. - Move insn from struct uprobe to struct arch_uprobe. - Make arch specific uprobe functions to accept struct arch_uprobe instead of struct uprobe. - Move struct uprobe to kernel/uprobes.c from include/linux/uprobes.h Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Anton Arapov <anton@redhat.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Jim Keniston <jkenisto@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Josh Stone <jistone@redhat.com> Link: http://lkml.kernel.org/r/20120222091602.15880.40249.sendpatchset@srdronam.in.ibm.com [ Made various small improvements ] Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/uprobes.h')
-rw-r--r--include/linux/uprobes.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h
index fd45b70750d4..9c6be62787ed 100644
--- a/include/linux/uprobes.h
+++ b/include/linux/uprobes.h
@@ -29,12 +29,6 @@
struct vm_area_struct;
#ifdef CONFIG_ARCH_SUPPORTS_UPROBES
#include <asm/uprobes.h>
-#else
-
-typedef u8 uprobe_opcode_t;
-struct uprobe_arch_info {};
-
-#define MAX_UINSN_BYTES 4
#endif
/* flags that denote/change uprobes behaviour */
@@ -56,22 +50,9 @@ struct uprobe_consumer {
struct uprobe_consumer *next;
};
-struct uprobe {
- struct rb_node rb_node; /* node in the rb tree */
- atomic_t ref;
- struct rw_semaphore consumer_rwsem;
- struct list_head pending_list;
- struct uprobe_arch_info arch_info;
- struct uprobe_consumer *consumers;
- struct inode *inode; /* Also hold a ref to inode */
- loff_t offset;
- int flags;
- u8 insn[MAX_UINSN_BYTES];
-};
-
#ifdef CONFIG_UPROBES
-extern int __weak set_bkpt(struct mm_struct *mm, struct uprobe *uprobe, unsigned long vaddr);
-extern int __weak set_orig_insn(struct mm_struct *mm, struct uprobe *uprobe, unsigned long vaddr, bool verify);
+extern int __weak set_bkpt(struct mm_struct *mm, struct arch_uprobe *auprobe, unsigned long vaddr);
+extern int __weak set_orig_insn(struct mm_struct *mm, struct arch_uprobe *auprobe, unsigned long vaddr, bool verify);
extern bool __weak is_bkpt_insn(uprobe_opcode_t *insn);
extern int uprobe_register(struct inode *inode, loff_t offset, struct uprobe_consumer *consumer);
extern void uprobe_unregister(struct inode *inode, loff_t offset, struct uprobe_consumer *consumer);
OpenPOWER on IntegriCloud