ARM kprobes: special hook for the kprobes breakpoint handler

The kprobes code is already able to cope with reentrant probes, so its
handler must be called outside of the region protected by undef_lock.

If ever this lock is released when handlers are called then this commit
could be reverted.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
This commit is contained in:
Nicolas Pitre
2007-12-03 17:22:36 -05:00
committed by Russell King
parent 785d3cd286
commit 796969104c
3 changed files with 20 additions and 7 deletions

View File

@ -26,12 +26,6 @@
#include <asm/traps.h>
#include <asm/cacheflush.h>
/*
* This undefined instruction must be unique and
* reserved solely for kprobes' use.
*/
#define KPROBE_BREAKPOINT_INSTRUCTION 0xe7f001f8
#define MIN_STACK_SIZE(addr) \
min((unsigned long)MAX_STACK_SIZE, \
(unsigned long)current_thread_info() + THREAD_START_SP - (addr))
@ -206,7 +200,7 @@ void __kprobes kprobe_handler(struct pt_regs *regs)
}
}
static int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
{
kprobe_handler(regs);
return 0;