From: Srinivasa Ds <srinivasa@in.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, ananth@in.ibm.com,
Masami Hiramatsu <mhiramat@redhat.com>,
Jim Keniston <jkenisto@us.ibm.com>,
rusty@rustcorp.com.au
Subject: Re: [RFC] [patch 2/2] Refuse kprobe insertion on __init section code
Date: Fri, 14 Dec 2007 15:04:50 +0530 [thread overview]
Message-ID: <200712141504.50479.srinivasa@in.ibm.com> (raw)
In-Reply-To: <20071213230916.cd30de8c.akpm@linux-foundation.org>
This patch makes use of regular_kernel_text_address() to avoid
probing __init functions.
Signed-off-by: Srinivasa DS <srinivasa@in.ibm.com>
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
---
kernel/kprobes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.24-rc5-mm1/kernel/kprobes.c
===================================================================
--- linux-2.6.24-rc5-mm1.orig/kernel/kprobes.c
+++ linux-2.6.24-rc5-mm1/kernel/kprobes.c
@@ -520,7 +520,7 @@ static int __kprobes __register_kprobe(s
return -EINVAL;
p->addr = (kprobe_opcode_t *)(((char *)p->addr)+ p->offset);
- if (!kernel_text_address((unsigned long) p->addr) ||
+ if (!regular_kernel_text_address((unsigned long) p->addr) ||
in_kprobes_functions((unsigned long) p->addr))
return -EINVAL;
@@ -662,7 +662,7 @@ int __kprobes register_jprobe(struct jpr
{
unsigned long addr = arch_deref_entry_point(jp->entry);
- if (!kernel_text_address(addr))
+ if (!regular_kernel_text_address(addr))
return -EINVAL;
/* Todo: Verify probepoint is a function entry point */
prev parent reply other threads:[~2007-12-14 9:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 6:55 [RFC] [patch 1/2] add non_init_kernel_text_address Srinivasa Ds
2007-12-14 6:57 ` [RFC] [patch 2/2] Refuse kprobe insertion on __init section code Srinivasa Ds
2007-12-14 7:09 ` [RFC] [patch 1/2] add non_init_kernel_text_address Andrew Morton
2007-12-14 7:51 ` Ananth N Mavinakayanahalli
2007-12-18 4:57 ` Rusty Russell
2007-12-18 6:46 ` Srinivasa Ds
2007-12-18 7:23 ` Rusty Russell
2007-12-19 5:11 ` Rusty Russell
2008-01-01 6:34 ` Srinivasa Ds
2007-12-14 9:30 ` Srinivasa Ds
2007-12-14 10:17 ` Srinivasa Ds
2007-12-14 12:46 ` Johannes Weiner
2007-12-17 10:15 ` Srinivasa Ds
2007-12-17 10:20 ` [RFC] [patch 2/2] Refuse kprobe insertion on __init section code Srinivasa Ds
2007-12-14 9:34 ` Srinivasa Ds [this message]
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=200712141504.50479.srinivasa@in.ibm.com \
--to=srinivasa@in.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=ananth@in.ibm.com \
--cc=jkenisto@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@redhat.com \
--cc=rusty@rustcorp.com.au \
/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®