Received: by 10.223.148.5 with SMTP id 5csp7224775wrq; Thu, 18 Jan 2018 02:37:45 -0800 (PST) X-Google-Smtp-Source: ACJfBotsEn+1AABjzp2siT059xFw5gwGtJ+Hd0ku1h1D2HYRh3ozau8C8NKdlBvQEkmi2CYpwb4L X-Received: by 10.99.123.87 with SMTP id k23mr25072294pgn.228.1516271865791; Thu, 18 Jan 2018 02:37:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516271865; cv=none; d=google.com; s=arc-20160816; b=rN+Q9wTfxjmXkWGAnH16mAk9p2dS1Taa9LkWmYcADj/zSaC2L97UDx5HySXCmYaduA X7pThjXI35GzIVmCDJxIpRUyOzWLh3dwcwfwkCc3+enU0aYJJj7xpeDDeeXRYdgAAG9N itvlJZ0vmN0aeGFO/3ICGCZJPOJ/zLYSpEiYrM8Sz1WO5OS20FosUwFu+aPacOsp+gYd A/swcECl1xoZnsaYCuuKephE96ojVXydsE+LWVXnFiFzGh/QQEpFtRnuxPK/t/9YnGEb nC972oZk2hpOTjhGuImHhGC4hAyF5Pw3rpWFRKGLG5P9rncHG/9nKV+0FdzBBzsSFh5g rJng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ckMFSb7Skcy9erpjBYnxsoYCdyTvLlsLpK1Y39iIm8g=; b=A8LaZqu/V0OqgJGcI3A8b4RqdO8/uV88fAm3qo2qwd9VXBuopaw6x75yi3DZQ++D0V BxlZvjBDe9rNY5ISCuRpG51rz2BmPbcT7LBrM/IofbLWX7yAtFpDzgVuZxXA0o1j0cAi 46MXpgkiFRLxvQxYoaOdVc/Sxibt7oVGNGOU5H+vomY2bK2PlasTUtGx0vSxNdp62Glm 4/6gog6OMtdInZqTc+CENTWcazuOm8oFf7bxgEuonNiTjNGUFuusIf77GTjlUJVmibBt dXNBJ4vCYXtw5zcBjA3XH+z3EL9MEkXyjCFV6DqxZEXxh7NPcyRXRtkDR4lL/hBaGGLd yZoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bjkfO61y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s133si5811893pgc.86.2018.01.18.02.37.31; Thu, 18 Jan 2018 02:37:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=bjkfO61y; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932206AbeARKhG (ORCPT + 99 others); Thu, 18 Jan 2018 05:37:06 -0500 Received: from mail-oi0-f65.google.com ([209.85.218.65]:45963 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754759AbeARKhD (ORCPT ); Thu, 18 Jan 2018 05:37:03 -0500 Received: by mail-oi0-f65.google.com with SMTP id j129so15324640oib.12; Thu, 18 Jan 2018 02:37:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ckMFSb7Skcy9erpjBYnxsoYCdyTvLlsLpK1Y39iIm8g=; b=bjkfO61yvGY+djl189Gnfxgk1H5FNIudumo5owyIdughMm2zzGF2Wjrq8yWNr0p85x 62fCaMcwnggG4z/dI5EyevrjmtK96ONyN1jqtGHpg71fK6L12fQWl2H6JsgGwvSQy3md bavhS1AC54sfBQlfa/WC+v6nn/IoEAYPl8W/UwJTjB1FUb0+sFLV0kXkdXfL38Wb5X72 VmyWDvw6Z+gWPyfXzKOKvWNN9wOOtRQSBs6+yRIJJBZFqT3oNXoVjUHZhX0nEly+SIdS efXk6Xs/uyi5g512rQDGq2B3L0zSkCpSa0OrovN+b92JyAa1Z8eJQz+qkUDa348HN8KM KeyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ckMFSb7Skcy9erpjBYnxsoYCdyTvLlsLpK1Y39iIm8g=; b=MNz3p1VLkGb3rx4xDoWip3Z1xuMQe19OgcVqtWJsR4h9qpEQvOKRfabtU2BOcUdEcn wJTlzuiOuARR7yituSEkF1X6OWP8DmE+giye/A0dfeVldv61OwDTQGsZf/N96aMXubHL 2LaP0/GhOMC7I0Zyj08pYk0peQPFxBV+v1vqQEFn5Ejo6Fm8XejVuHDATZl/WM1HCm3A Wmg9u1tuGfYl5n/Cs2eYUXWnB9AgoHrlBr+wNBP4oArFQQ0ZqX+ODCBo3DeH+I3ptfzL 33nWyZ6hCWXyFUj4Ss+hhN8Mr6Ur58wR4CtCRXaI7modC3kmKtkfnNGEkRE9ptivJ6Jm tQaQ== X-Gm-Message-State: AKwxyteQlyc7ufwF1c2BzK9qXW3J131gj6Wv9NmCp0LFIr1QwDZBU4fh npToToGEoesjTTnk2rhYYCmHsFMBXI1BhEYWT/c= X-Received: by 10.202.225.212 with SMTP id y203mr2794142oig.64.1516271822720; Thu, 18 Jan 2018 02:37:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.17.89 with HTTP; Thu, 18 Jan 2018 02:37:02 -0800 (PST) In-Reply-To: <65ae3b5b7eabe8680857b1821c72127f611c950b.1515766253.git.green.hu@gmail.com> References: <65ae3b5b7eabe8680857b1821c72127f611c950b.1515766253.git.green.hu@gmail.com> From: Arnd Bergmann Date: Thu, 18 Jan 2018 11:37:02 +0100 X-Google-Sender-Auth: Y9UFVuEgTYN92QO33uN6qVDEAS4 Message-ID: Subject: Re: [PATCH v6 22/36] nds32: Debugging support To: Greentime Hu Cc: Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , Vincent Chen , DTML , Al Viro , David Howells , Will Deacon , Daniel Lezcano , linux-serial@vger.kernel.org, Geert Uytterhoeven , Linus Walleij , Mark Rutland , Greg KH , Guo Ren , Randy Dunlap , David Miller , Jonas Bonn , Stefan Kristiansson , Stafford Horne , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: > From: Greentime Hu > > This patch adds ptrace support. > > Signed-off-by: Vincent Chen > Signed-off-by: Greentime Hu 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