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

Russell King - ARM Linux <[email protected]>
Newsgroups gmane.linux.ports.arm.general
Message-ID <[email protected]>
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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.