diff options
author | Ananth N Mavinakayanahalli <ananth@in.ibm.com> | 2013-03-22 16:18:38 +0100 |
---|---|---|
committer | Oleg Nesterov <oleg@redhat.com> | 2013-04-04 13:57:04 +0200 |
commit | ab07e807be533d6317ea0971900bdf547962effd (patch) | |
tree | df6362115a358a9e198e934b4e0bcd98a30265f9 /arch/powerpc/kernel/uprobes.c | |
parent | uprobes: Add trap variant helper (diff) | |
download | linux-ab07e807be533d6317ea0971900bdf547962effd.tar.xz linux-ab07e807be533d6317ea0971900bdf547962effd.zip |
uprobes/powerpc: Teach uprobes to ignore gdb breakpoints
Powerpc has many trap variants that could be used by entities like gdb.
Currently, running gdb on a program being traced by uprobes causes an
endless loop since uprobes doesn't understand that the trap was inserted
by some other entity and a SIGTRAP needs to be delivered.
Teach uprobes to ignore breakpoints that do not belong to it.
Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Diffstat (limited to 'arch/powerpc/kernel/uprobes.c')
-rw-r--r-- | arch/powerpc/kernel/uprobes.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/uprobes.c b/arch/powerpc/kernel/uprobes.c index bc77834dbf43..cb7f63da140c 100644 --- a/arch/powerpc/kernel/uprobes.c +++ b/arch/powerpc/kernel/uprobes.c @@ -31,6 +31,16 @@ #define UPROBE_TRAP_NR UINT_MAX /** + * is_trap_insn - check if the instruction is a trap variant + * @insn: instruction to be checked. + * Returns true if @insn is a trap variant. + */ +bool is_trap_insn(uprobe_opcode_t *insn) +{ + return (is_trap(*insn)); +} + +/** * arch_uprobe_analyze_insn * @mm: the probed address space. * @arch_uprobe: the probepoint information. |