Skip to content

Commit

Permalink
kprobes: Prohibit to probe native_get_debugreg
Browse files Browse the repository at this point in the history
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@redhat.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
LKML-Reference: <20090827172332.8246.34194.stgit@localhost.localdomain>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
  • Loading branch information
Masami Hiramatsu authored and Frederic Weisbecker committed Aug 30, 2009
1 parent 8222d71 commit 65e234e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions kernel/kprobes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down

0 comments on commit 65e234e

Please sign in to comment.