lkml.org 
[lkml]   [2018]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v6 22/36] nds32: Debugging support
On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu <green.hu@gmail.com> wrote:
> From: Greentime Hu <greentime@andestech.com>
>
> This patch adds ptrace support.
>
> Signed-off-by: Vincent Chen <vincentc@andestech.com>
> Signed-off-by: Greentime Hu <greentime@andestech.com>

I must have missed this patch earlier, unfortunately I don't think
this is ready:

> +long arch_ptrace(struct task_struct *child, long request, unsigned long addr,
> + unsigned long data)
> +{
> + int ret;
> +
> + switch (request) {
> + case PTRACE_PEEKUSR:
> + ret =
> + ptrace_read_user(child, addr, (unsigned long __user *)data);
> + break;
> +
> + case PTRACE_POKEUSR:
> + ret = ptrace_write_user(child, addr, data);
> + break;
> +
> + case PTRACE_GETREGS:
> + ret = ptrace_getregs(child, (void __user *)data);
> + break;
> +
> + case PTRACE_SETREGS:
> + ret = ptrace_setregs(child, (void __user *)data);
> + break;
> +
> + case PTRACE_GETFPREGS:
> + ret = ptrace_getfpregs(child, (void __user *)data);
> + break;
> +
> + case PTRACE_SETFPREGS:
> + ret = ptrace_setfpregs(child, (void __user *)data);
> + break;
> +
> + default:
> + ret = ptrace_request(child, request, addr, data);
> + break;
> + }
> +
> + return ret;
> +}

It appears that you are implementing the old-style ptrace handling
with architecture specific commands. Please have a look at how
this is done in risc-v or arm64. If this takes more too much time
to address, I'd suggest using an empty stub function for sys_ptrace
and adding it back at a later point, but not send the current version
upstream.

Arnd

\
 
 \ /
  Last update: 2018-01-18 11:38    [W:0.316 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site