Patchwork [v2,4/4] uprobes/powerpc: remove additional trap instruction check

login
register
mail settings
Submitter Ananth N Mavinakayanahalli
Date March 22, 2013, 3:19 p.m.
Message ID <20130322151946.GE20010@in.ibm.com>
Download mbox | patch
Permalink /patch/230093/
State Awaiting Upstream, archived
Headers show

Comments

Ananth N Mavinakayanahalli - March 22, 2013, 3:19 p.m.
From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

prepare_uprobe() already checks if the underlying unstruction
(on file) is a trap variant. We don't need to check this again.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
---
 arch/powerpc/kernel/uprobes.c |    6 ------
 1 file changed, 6 deletions(-)
tulasidhar Dronamraju - March 26, 2013, 12:07 p.m.
* Ananth N Mavinakayanahalli <ananth@in.ibm.com> [2013-03-22 20:49:46]:

> From: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> 
> prepare_uprobe() already checks if the underlying unstruction
> (on file) is a trap variant. We don't need to check this again.
> 
> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>

Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>

> ---
>  arch/powerpc/kernel/uprobes.c |    6 ------
>  1 file changed, 6 deletions(-)
> 
> Index: linux-3.9-rc3/arch/powerpc/kernel/uprobes.c
> ===================================================================
> --- linux-3.9-rc3.orig/arch/powerpc/kernel/uprobes.c
> +++ linux-3.9-rc3/arch/powerpc/kernel/uprobes.c
> @@ -53,12 +53,6 @@ int arch_uprobe_analyze_insn(struct arch
>  	if (addr & 0x03)
>  		return -EINVAL;
> 
> -	/*
> -	 * We currently don't support a uprobe on an already
> -	 * existing breakpoint instruction underneath
> -	 */
> -	if (is_trap(auprobe->ainsn))
> -		return -ENOTSUPP;
>  	return 0;
>  }
>

Patch

Index: linux-3.9-rc3/arch/powerpc/kernel/uprobes.c
===================================================================
--- linux-3.9-rc3.orig/arch/powerpc/kernel/uprobes.c
+++ linux-3.9-rc3/arch/powerpc/kernel/uprobes.c
@@ -53,12 +53,6 @@  int arch_uprobe_analyze_insn(struct arch
 	if (addr & 0x03)
 		return -EINVAL;
 
-	/*
-	 * We currently don't support a uprobe on an already
-	 * existing breakpoint instruction underneath
-	 */
-	if (is_trap(auprobe->ainsn))
-		return -ENOTSUPP;
 	return 0;
 }