From patchwork Thu Feb 15 15:47:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dmitry V. Levin" X-Patchwork-Id: 873945 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-90306-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="yuIyIeE8"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zj0z30pMgz9t32 for ; Fri, 16 Feb 2018 02:47:42 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=IGTu Ru57k96FFPTbD7GME/VPzqWoev3p+J2sy+eLuCibAx2Q6+TnQctEXzHxLxMadFEx BoeFsxGE1br2x5srcywAVgUkn9kb6wUNCkgbRKWFlqUPC0Hj2w/3HewLrp0jnSsh tiOyCxTsrXtgUCxbPidxkqKELwbercEsI86XtPk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=Bjgy88jPUa X0HD2uf3kNaLhsugw=; b=yuIyIeE8VlnakrSKn56I3BZbegY3touN35VS4ce3NU 1piF6YUFX+Wc4CzK6pXOrfnikG5gfdohTn1ORF6Vh2YqF1bm1JxINVQp74ecTGXm WyM3lHggk+AhqqEv9yqHm6Z2e3Xl+RYGP5w5DJnQhm+dd3ct1VkvinUObu8lpMax E= Received: (qmail 83921 invoked by alias); 15 Feb 2018 15:47:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 83900 invoked by uid 89); 15 Feb 2018 15:47:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Hx-languages-length:3627 X-HELO: vmicros1.altlinux.org Date: Thu, 15 Feb 2018 18:47:30 +0300 From: "Dmitry V. Levin" To: Tulio Magno Quites Machado Filho Cc: libc-alpha@sourceware.org Subject: [PATCH v2] linux/powerpc: sync sys/ptrace.h with Linux 4.15 [BZ #22433, #22807] Message-ID: <20180215154729.GA4385@altlinux.org> Mail-Followup-To: Tulio Magno Quites Machado Filho , libc-alpha@sourceware.org References: <20180211005832.GA25117@altlinux.org> <87mv0dkmgj.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87mv0dkmgj.fsf@linux.vnet.ibm.com> Tested with strace. [BZ #22433] [BZ #22807] * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h (__ptrace_request): Add PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS, PTRACE_SETFPREGS, PTRACE_GETVRREGS, PTRACE_SETVRREGS, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS, PTRACE_GETREGS64, PTRACE_SETREGS64, PTRACE_GET_DEBUGREG, PTRACE_SET_DEBUGREG, PTRACE_GETVSRREGS, PTRACE_SETVSRREGS, and PTRACE_SINGLEBLOCK. --- v2: - added PTRACE_SINGLEBLOCK; - fixed comments about PTRACE_GETVSRREGS and PT_SETVSRREGS; - removed the note about conflict between and that is going to be fixed by "powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request" fix. ChangeLog | 11 +++++ sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h | 62 ++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h index 75567b2..5ff65d5 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h @@ -69,6 +69,22 @@ enum __ptrace_request PTRACE_SINGLESTEP = 9, #define PT_STEP PTRACE_SINGLESTEP + /* Get all general purpose registers used by a process. */ + PTRACE_GETREGS = 12, +#define PT_GETREGS PTRACE_GETREGS + + /* Set all general purpose registers used by a process. */ + PTRACE_SETREGS = 13, +#define PT_SETREGS PTRACE_SETREGS + + /* Get all floating point registers used by a process. */ + PTRACE_GETFPREGS = 14, +#define PT_GETFPREGS PTRACE_GETFPREGS + + /* Set all floating point registers used by a process. */ + PTRACE_SETFPREGS = 15, +#define PT_SETFPREGS PTRACE_SETFPREGS + /* Attach to a process that is already running. */ PTRACE_ATTACH = 16, #define PT_ATTACH PTRACE_ATTACH @@ -77,10 +93,56 @@ enum __ptrace_request PTRACE_DETACH = 17, #define PT_DETACH PTRACE_DETACH + /* Get all altivec registers used by a process. */ + PTRACE_GETVRREGS = 18, +#define PT_GETVRREGS PTRACE_GETVRREGS + + /* Set all altivec registers used by a process. */ + PTRACE_SETVRREGS = 19, +#define PT_SETVRREGS PTRACE_SETVRREGS + + /* Get all SPE registers used by a process. */ + PTRACE_GETEVRREGS = 20, +#define PT_GETEVRREGS PTRACE_GETEVRREGS + + /* Set all SPE registers used by a process. */ + PTRACE_SETEVRREGS = 21, +#define PT_SETEVRREGS PTRACE_SETEVRREGS + + /* Same as PTRACE_GETREGS except a 32-bit process will obtain + the full 64-bit registers. Implemented by 64-bit kernels only. */ + PTRACE_GETREGS64 = 22, +#define PT_GETREGS64 PTRACE_GETREGS64 + + /* Same as PTRACE_SETREGS except a 32-bit process will set + the full 64-bit registers. Implemented by 64-bit kernels only. */ + PTRACE_SETREGS64 = 23, +#define PT_SETREGS64 PTRACE_SETREGS64 + /* Continue and stop at the next entry to or return from syscall. */ PTRACE_SYSCALL = 24, #define PT_SYSCALL PTRACE_SYSCALL + /* Get a debug register of a process. */ + PTRACE_GET_DEBUGREG = 25, +#define PT_GET_DEBUGREG PTRACE_GET_DEBUGREG + + /* Set a debug register of a process. */ + PTRACE_SET_DEBUGREG = 26, +#define PT_SET_DEBUGREG PTRACE_SET_DEBUGREG + + /* Get the first 32 VSX registers of a process. */ + PTRACE_GETVSRREGS = 27, +#define PT_GETVSRREGS PTRACE_GETVSRREGS + + /* Set the first 32 VSX registers of a process. */ + PTRACE_SETVSRREGS = 28, +#define PT_SETVSRREGS PTRACE_SETVSRREGS + + /* Execute process until next taken branch. */ + PTRACE_SINGLEBLOCK = 256, +#define PT_STEPBLOCK PTRACE_SINGLEBLOCK + /* Set ptrace filter options. */ PTRACE_SETOPTIONS = 0x4200, #define PT_SETOPTIONS PTRACE_SETOPTIONS