diff options
author | Masami Hiramatsu <mhiramat@redhat.com> | 2009-08-27 13:23:04 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-29 21:08:26 -0400 |
commit | f5ad31158d60946b9fd18c8a79c283a6bc432430 (patch) | |
tree | 6276ab1eff3f88ec318c5f9346a3e37c5002b2d0 /arch/x86/kernel/kprobes.c | |
parent | e9afe9e1b3fdbd56cca53959a2519e70db9c8095 (diff) |
kprobes/x86-64: Allow to reenter probe on post_handler
Allow to reenter probe on the post_handler of another probe on x86-64,
because x86-64 already allows reentering int3.
In that case, reentered probe just increases kp.nmissed and returns.
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: <20090827172304.8246.4822.stgit@localhost.localdomain>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'arch/x86/kernel/kprobes.c')
-rw-r--r-- | arch/x86/kernel/kprobes.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index e0fb615ba1e9..c5f1f117e0c0 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c | |||
@@ -463,17 +463,6 @@ static int __kprobes reenter_kprobe(struct kprobe *p, struct pt_regs *regs, | |||
463 | { | 463 | { |
464 | switch (kcb->kprobe_status) { | 464 | switch (kcb->kprobe_status) { |
465 | case KPROBE_HIT_SSDONE: | 465 | case KPROBE_HIT_SSDONE: |
466 | #ifdef CONFIG_X86_64 | ||
467 | /* TODO: Provide re-entrancy from post_kprobes_handler() and | ||
468 | * avoid exception stack corruption while single-stepping on | ||
469 | * the instruction of the new probe. | ||
470 | */ | ||
471 | arch_disarm_kprobe(p); | ||
472 | regs->ip = (unsigned long)p->addr; | ||
473 | reset_current_kprobe(); | ||
474 | preempt_enable_no_resched(); | ||
475 | break; | ||
476 | #endif | ||
477 | case KPROBE_HIT_ACTIVE: | 466 | case KPROBE_HIT_ACTIVE: |
478 | save_previous_kprobe(kcb); | 467 | save_previous_kprobe(kcb); |
479 | set_current_kprobe(p, regs, kcb); | 468 | set_current_kprobe(p, regs, kcb); |