* [PATCH 1/3] x86: Move in_kprobes_functions to linux/kprobes.h
@ 2008-01-27 9:09 Abhishek Sagar
0 siblings, 0 replies; only message in thread
From: Abhishek Sagar @ 2008-01-27 9:09 UTC (permalink / raw)
To: LKML; +Cc: jkenisto, ananth, Masami Hiramatsu, Ingo Molnar
Moving in_kprobes_functions to linux/kprobes.h to share it with arch/x86/kerne/kprobes.c.
Signed-off-by: Abhishek Sagar <sagar.abhishek@gmail.com>
---
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
index 6168c0a..2762145 100644
--- a/include/linux/kprobes.h
+++ b/include/linux/kprobes.h
@@ -39,6 +39,7 @@
#ifdef CONFIG_KPROBES
#include <asm/kprobes.h>
+#include <asm-generic/sections.h>
/* kprobe_status settings */
#define KPROBE_HIT_ACTIVE 0x00000001
@@ -182,6 +183,14 @@ static inline void kretprobe_assert(struct kretprobe_instance *ri,
}
}
+static inline int in_kprobes_functions(unsigned long addr)
+{
+ if (addr >= (unsigned long)__kprobes_text_start &&
+ addr < (unsigned long)__kprobes_text_end)
+ return -EINVAL;
+ return 0;
+}
+
#ifdef CONFIG_KPROBES_SANITY_TEST
extern int init_test_probes(void);
#else
diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index d0493ea..0b74dfb 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -490,14 +490,6 @@ static int __kprobes register_aggr_kprobe(struct kprobe *old_p,
return ret;
}
-static int __kprobes in_kprobes_functions(unsigned long addr)
-{
- if (addr >= (unsigned long)__kprobes_text_start &&
- addr < (unsigned long)__kprobes_text_end)
- return -EINVAL;
- return 0;
-}
-
static int __kprobes __register_kprobe(struct kprobe *p,
unsigned long called_from)
{
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-01-27 9:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-27 9:09 [PATCH 1/3] x86: Move in_kprobes_functions to linux/kprobes.h Abhishek Sagar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox