From: Abhishek Sagar <sagar.abhishek@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: jkenisto@us.ibm.com, ananth@in.ibm.com,
Masami Hiramatsu <mhiramat@redhat.com>,
Ingo Molnar <mingo@elte.hu>
Subject: [PATCH 1/3] x86: Move in_kprobes_functions to linux/kprobes.h
Date: Sun, 27 Jan 2008 14:39:10 +0530 [thread overview]
Message-ID: <479C4A36.1030300@gmail.com> (raw)
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)
{
reply other threads:[~2008-01-27 9:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=479C4A36.1030300@gmail.com \
--to=sagar.abhishek@gmail.com \
--cc=ananth@in.ibm.com \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=mingo@elte.hu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.