[bug 20412] PTRACE_SINGLESTEP'ing an instruction that calls user helpers never stops the child on ARM

Russell King - ARM Linux linux at arm.linux.org.uk
Sun Nov 7 13:05:23 EST 2010


You're posting to the wrong list.  linux-arm-KERNEL covers kernel stuff,
not linux-arm.

On Sun, Oct 17, 2010 at 11:07:55PM +0300, Timo Juhani Lindfors wrote:
> diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
> index 3f562a7..5877c0e 100644
> --- a/arch/arm/kernel/ptrace.c
> +++ b/arch/arm/kernel/ptrace.c
> @@ -26,6 +26,7 @@
>  
>  #include "ptrace.h"
>  
> +#define REG_LR	14
>  #define REG_PC	15
>  #define REG_PSR	16
>  /*
> @@ -329,6 +330,9 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
>  	    break;
>  	}
>  
> +	if (alt >= (void*)CONFIG_VECTORS_BASE && alt < (void*)CONFIG_VECTORS_BASE + PAGE_SIZE)
> +		alt = get_user_reg(child, REG_LR);
> +

I'm not sure why you're casing to (void *) here - alt is a u32, so it's
an integer.  Apart from that, the patch looks fine.  Could you fix that
and re-post to linux-arm-kernel please?



More information about the linux-arm mailing list