[PATCH v2 2/4] uprobes: refuse uprobe on trap variants

From: Ananth N Mavinakayanahalli
Date: Fri Mar 22 2013 - 11:18:28 EST

From: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>

Refuse to place a uprobe if a trap variant already exists in the
file copy at the address.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@xxxxxxxxxx>
kernel/events/uprobes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-3.9-rc3/kernel/events/uprobes.c
--- linux-3.9-rc3.orig/kernel/events/uprobes.c
+++ linux-3.9-rc3/kernel/events/uprobes.c
@@ -573,7 +573,7 @@ static int prepare_uprobe(struct uprobe
goto out;

ret = -ENOTSUPP;
- if (is_swbp_insn((uprobe_opcode_t *)uprobe->arch.insn))
+ if (is_trap_insn((uprobe_opcode_t *)uprobe->arch.insn))
goto out;

ret = arch_uprobe_analyze_insn(&uprobe->arch, mm, vaddr);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/