From patchwork Mon Mar 18 10:49:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 160486 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp2500573jad; Mon, 18 Mar 2019 03:49:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqz9EJL3CkEpKdIaBV2j7c1kf3x00348562bUStJpldhuAF9kZ/1hZiKmLnQ9gfAT6Cc1MUw X-Received: by 2002:a63:c511:: with SMTP id f17mr17038511pgd.202.1552906196156; Mon, 18 Mar 2019 03:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552906196; cv=none; d=google.com; s=arc-20160816; b=F4lki7+DcmHuwbajNxCWKTCzoYXls7v0fPJPna8NBt+HDFYUW1uHjenpM+x4n9/YwH YBMDzREAp9cCHDf6MQDbge5flzRPQzrf72bBTMdHUIGycmdZxIiGTsuiEck80DoWVxBJ Z5+mw8maUmXTEXbg/WfYnxlTsIK3pntds3pyvJZX5M0IDxFtfwJNZnEq+uvo4nuKlU4V HMQO31y/C6GIcwbnLV66AeWnZNnX/ouQ4Tn4bFwuHIT5lDJoB5Fs6vJb3faZNDij4Bo3 Xr8ICe0ShJ5rbGV4mEmNI+jJkBwSQsbUztNwmHekDHZkbtUSiv1hg95mcpf8HmJfyg2h SiLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=9vzgF4YzFoZA3jl6grIlJcp0XU2QZdMEr3ipmrJHPyk=; b=rTboYkyyIR8C4havmeOJccQ+tS/gmqhmkqZ8/0ZQhmMvmZd0rwHsU6rihcYWQQHdZR 5k88jtAFuJjyOtRosiOeBML3hrPQAOc+lKjggTnu15YLX2IYuoPCUyjZpwXTDG2ae++J Em5qX7hmmNWxSSyH1FjGGM3zjxMDWbaxzAVwj0n+vGpFD0smvsxwg7JX7ft4upU8zrQv 5LlIGM8JXCO0C+c4bDFlvmo1k3QBUIAR5s62VMzy6AWBhlVSk6t031yp96RMiPRNair7 qK7R1ne7Dcdtqv65kfKX3a2meYAWILi3AjPtv+I4EEt/4nO9HWqslcxjM5bwtivOHgIu aQzQ== ARC-Authentication-Results: i=1; mx.google.com; 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 cv7si9628987plb.322.2019.03.18.03.49.55; Mon, 18 Mar 2019 03:49:56 -0700 (PDT) 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; 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 S1727756AbfCRKty (ORCPT + 31 others); Mon, 18 Mar 2019 06:49:54 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:59786 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727723AbfCRKtw (ORCPT ); Mon, 18 Mar 2019 06:49:52 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BD7B880D; Mon, 18 Mar 2019 03:49:51 -0700 (PDT) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C11C13F614; Mon, 18 Mar 2019 03:49:48 -0700 (PDT) From: Sudeep Holla To: x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Cc: Sudeep Holla , Catalin Marinas , Will Deacon , Oleg Nesterov , Paul Mackerras , Michael Ellerman , Thomas Gleixner , Ingo Molnar , Richard Weinberger , jdike@addtoit.com, Steve Capper , Haibo Xu , Bin Lu , Andy Lutomirski Subject: [PATCH v2 5/6] arm64: add PTRACE_SYSEMU{, SINGLESTEP} definations to uapi headers Date: Mon, 18 Mar 2019 10:49:24 +0000 Message-Id: <20190318104925.16600-6-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190318104925.16600-1-sudeep.holla@arm.com> References: <20190318104925.16600-1-sudeep.holla@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org x86 and um use 31 and 32 for PTRACE_SYSEMU and PTRACE_SYSEMU_SINGLESTEP while powerpc uses different value maybe for legacy reasons. Though handling of PTRACE_SYSEMU can be made architecture independent, it's hard to make these definations generic. To add to this existing mess few architectures like arm, c6x and sh use 31 for PTRACE_GETFDPIC (get the ELF fdpic loadmap address). It's not possible to move the definations to generic headers. So we unfortunately have to duplicate the same defination to ARM64 if we need to support PTRACE_SYSEMU. Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Sudeep Holla --- arch/arm64/include/uapi/asm/ptrace.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/arch/arm64/include/uapi/asm/ptrace.h b/arch/arm64/include/uapi/asm/ptrace.h index d78623acb649..627ac57c1581 100644 --- a/arch/arm64/include/uapi/asm/ptrace.h +++ b/arch/arm64/include/uapi/asm/ptrace.h @@ -62,6 +62,9 @@ #define PSR_x 0x0000ff00 /* Extension */ #define PSR_c 0x000000ff /* Control */ +/* syscall emulation path in ptrace */ +#define PTRACE_SYSEMU 31 +#define PTRACE_SYSEMU_SINGLESTEP 32 #ifndef __ASSEMBLY__