]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/kprobes.h
memcg: add mem_cgroup_disabled()
[linux-2.6-omap-h63xx.git] / include / linux / kprobes.h
index 0be7795655fab4279d3b9b4a6fa110b01a4fc070..d6ea19e314bb2a41d050423da7e9bd1e826812d2 100644 (file)
@@ -29,6 +29,7 @@
  *             <jkenisto@us.ibm.com>  and Prasanna S Panchamukhi
  *             <prasanna@in.ibm.com> added function-return probes.
  */
+#include <linux/linkage.h>
 #include <linux/list.h>
 #include <linux/notifier.h>
 #include <linux/smp.h>
@@ -47,7 +48,7 @@
 #define KPROBE_HIT_SSDONE      0x00000008
 
 /* Attach to insert probes on any functions which should be ignored*/
-#define __kprobes      __attribute__((__section__(".kprobes.text")))
+#define __kprobes      __attribute__((__section__(".kprobes.text"))) notrace
 
 struct kprobe;
 struct pt_regs;
@@ -68,9 +69,6 @@ struct kprobe {
        /* list of kprobes for multi-handler support */
        struct list_head list;
 
-       /* Indicates that the corresponding module has been ref counted */
-       unsigned int mod_refcounted;
-
        /*count the number of times this probe was temporarily disarmed */
        unsigned long nmissed;
 
@@ -102,8 +100,19 @@ struct kprobe {
 
        /* copy of the original instruction */
        struct arch_specific_insn ainsn;
+
+       /* Indicates various status flags.  Protected by kprobe_mutex. */
+       u32 flags;
 };
 
+/* Kprobe status flags */
+#define KPROBE_FLAG_GONE       1 /* breakpoint has already gone */
+
+static inline int kprobe_gone(struct kprobe *p)
+{
+       return p->flags & KPROBE_FLAG_GONE;
+}
+
 /*
  * Special probe type that uses setjmp-longjmp type tricks to resume
  * execution at a specified entry with a matching prototype corresponding
@@ -200,7 +209,6 @@ static inline int init_test_probes(void)
 }
 #endif /* CONFIG_KPROBES_SANITY_TEST */
 
-extern struct mutex kprobe_mutex;
 extern int arch_prepare_kprobe(struct kprobe *p);
 extern void arch_arm_kprobe(struct kprobe *p);
 extern void arch_disarm_kprobe(struct kprobe *p);
@@ -256,7 +264,7 @@ void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head);
 
 #else /* CONFIG_KPROBES */
 
-#define __kprobes      /**/
+#define __kprobes      notrace
 struct jprobe;
 struct kretprobe;