Commit 3305a60795442a22fe8e9f5fb93a6f1f8dea6bb2

Authored by Nicolas Pitre
Committed by Russell King
1 parent ac9d7efc7d

[ARM] 5206/1: remove kprobe_trap_handler() hack

As mentioned in commit 796969104cab0d454dbc792ad0d12a4f365a8564,
and because of commit b03a5b7559563dafdbe52f8b5d8e453a914db941,
the direct calling of kprobe_trap_handler() can be removed.

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Showing 3 changed files with 4 additions and 14 deletions Side-by-side Diff

arch/arm/include/asm/kprobes.h
... ... @@ -61,7 +61,6 @@
61 61 void arch_remove_kprobe(struct kprobe *);
62 62 void kretprobe_trampoline(void);
63 63  
64   -int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr);
65 64 int kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr);
66 65 int kprobe_exceptions_notify(struct notifier_block *self,
67 66 unsigned long val, void *data);
arch/arm/kernel/kprobes.c
... ... @@ -200,9 +200,12 @@
200 200 }
201 201 }
202 202  
203   -int kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
  203 +static int __kprobes kprobe_trap_handler(struct pt_regs *regs, unsigned int instr)
204 204 {
  205 + unsigned long flags;
  206 + local_irq_save(flags);
205 207 kprobe_handler(regs);
  208 + local_irq_restore(flags);
206 209 return 0;
207 210 }
208 211  
arch/arm/kernel/traps.c
... ... @@ -19,7 +19,6 @@
19 19 #include <linux/kallsyms.h>
20 20 #include <linux/delay.h>
21 21 #include <linux/init.h>
22   -#include <linux/kprobes.h>
23 22  
24 23 #include <asm/atomic.h>
25 24 #include <asm/cacheflush.h>
... ... @@ -327,17 +326,6 @@
327 326 } else {
328 327 get_user(instr, (u32 __user *)pc);
329 328 }
330   -
331   -#ifdef CONFIG_KPROBES
332   - /*
333   - * It is possible to have recursive kprobes, so we can't call
334   - * the kprobe trap handler with the undef_lock held.
335   - */
336   - if (instr == KPROBE_BREAKPOINT_INSTRUCTION && !user_mode(regs)) {
337   - kprobe_trap_handler(regs, instr);
338   - return;
339   - }
340   -#endif
341 329  
342 330 if (call_undef_hook(regs, instr) == 0)
343 331 return;