From patchwork Thu May 23 09:06:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 164950 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1913779ili; Thu, 23 May 2019 02:06:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGD/FYSRTkw1RVfuwprHWMa2XkiBQWuyKi9RnANLp1zGK5Ukl9B0a8Oiru1w1EMA9OTzlD X-Received: by 2002:a63:c106:: with SMTP id w6mr11926639pgf.422.1558602402946; Thu, 23 May 2019 02:06:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558602402; cv=none; d=google.com; s=arc-20160816; b=oD1Vvg+CCwjRr7DYnYo+AiyU8XCcrcJhMjaOhlXw/VqAZTsoTvxA6mnkxzIelBPhII VIGYlmeZvQzB0+iLR5K3QcMYAYMyERq+xGT7LECKdqjubFTUqazVYGZ4wyyNHI5BimaN sM9W6sdsAxz92QnJoUH6X8p1Mry9K9J3zkynkIOeLSp7xLEv5BhzGwqH4eYMuSTsipPX jhQdb3g5h9FfG/9LryAUa6JlLO5CiR6WeoyfOvhSPbriYBDVlDxAhQBAa5T7tP+IsIOC 3ieJj/F24MGm3uytCYoZbp3RWGGBNWoJ92b8YBwWoD0/De9unfsaiwr89QxrIrNfNIa8 9GgA== 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=g5QQEGQLW//t5dOUXT0AbO58BS980jp6eytiOL7yUPE=; b=bfF/uaB0f8g9TgkeeZBQZIRkf76BGYQF/2YTIfP0cb6G/ZSRIjI2LUnDv9vz+PIayI ppm+XBQl9IhUD7nPLQjowl9cWMO6n8Z0k/zdgJuWNbp2kj0Gz7e8BByViunjzJMH38eA gkKp9kYdaMWgzKkJHVaXEm0YpYxYXOIrS6jJiSyLjUdmP1KD7efXHcDgEHPsRrksnGOj iWOivNa+A0tqfQRZow3cQ/EI0WwN/uRmr/MbQFfshX/oxN4SEmwjOBa64iqbKB9oxOV9 8fiw5hU1cXgqVp8NbgcP+te3Cx7Z/iaxBtAXtoV18DC0w4l2vUaH4Mpkx/7vF6uie6YJ x+eg== 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 x4si1821854pgp.592.2019.05.23.02.06.42; Thu, 23 May 2019 02:06:42 -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 S1730276AbfEWJGl (ORCPT + 30 others); Thu, 23 May 2019 05:06:41 -0400 Received: from foss.arm.com ([217.140.101.70]:40776 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729898AbfEWJGj (ORCPT ); Thu, 23 May 2019 05:06:39 -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 C296015BF; Thu, 23 May 2019 02:06:39 -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 A698E3F575; Thu, 23 May 2019 02:06:37 -0700 (PDT) From: Sudeep Holla To: x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , Catalin Marinas , Will Deacon , Oleg Nesterov , Richard Weinberger , jdike@addtoit.com, Steve Capper , Haibo Xu , Bin Lu Subject: [PATCH v4 3/4] arm64: add PTRACE_SYSEMU{, SINGLESTEP} definations to uapi headers Date: Thu, 23 May 2019 10:06:17 +0100 Message-Id: <20190523090618.13410-4-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190523090618.13410-1-sudeep.holla@arm.com> References: <20190523090618.13410-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 and PTRACE_SYSEMU_SINGLESTEP. 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__