[tip:perf/probes] kprobes: Prohibit to probe native_get_debugreg

From: tip-bot for Masami Hiramatsu
Date: Sat Oct 17 2009 - 05:58:45 EST


Commit-ID: 65e234ec2c4a0659ca22531dc1372a185f088517
Gitweb: http://git.kernel.org/tip/65e234ec2c4a0659ca22531dc1372a185f088517
Author: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
AuthorDate: Thu, 27 Aug 2009 13:23:32 -0400
Committer: Frederic Weisbecker <fweisbec@xxxxxxxxx>
CommitDate: Sun, 30 Aug 2009 03:15:55 +0200

kprobes: Prohibit to probe native_get_debugreg

Since do_debug() calls get_debugreg(), native_get_debugreg() will be
called from singlestepping. This can cause an int3 infinite loop.

We can't put it in the .text.kprobes section because it is inlined,
then we blacklist its name.

Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Acked-by: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxx>
LKML-Reference: <20090827172332.8246.34194.stgit@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
---
kernel/kprobes.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/kprobes.c b/kernel/kprobes.c
index f72e96c..3267d90 100644
--- a/kernel/kprobes.c
+++ b/kernel/kprobes.c
@@ -90,6 +90,7 @@ static spinlock_t *kretprobe_table_lock_ptr(unsigned long hash)
*/
static struct kprobe_blackpoint kprobe_blacklist[] = {
{"preempt_schedule",},
+ {"native_get_debugreg",},
{NULL} /* Terminator */
};

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/