From patchwork Wed May 16 08:19:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 10403095 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 94462601D2 for ; Wed, 16 May 2018 08:45:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 811172881A for ; Wed, 16 May 2018 08:45:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74C252881B; Wed, 16 May 2018 08:45:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7C34628817 for ; Wed, 16 May 2018 08:45:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DubjkKH9IEqcRwx6qeQxasEOGqGEe/LViOfCavhUViw=; b=ccq+g+HzKrb6wQ QnQhPFMi+UpJ4Uxv3iOgHpx7rDTD+XT/9Yd9GCf231EzStBStIM6oSkeXMojO7P1DEi6ZB5gr7drg zBBNbOiKmIW2/ebY1E0yGSsCXizn1PfRkz4u5y12lJgX0PxMFzacdd7VGFKpwOVsM/1iPWkVSaMs6 jtxN/HkAFXd28USmb0IOhD4RZaxmGzxqp8DHUQ7RcK00j9W9UUMJq/BTTcfTv7D8czjKgCfWbXWNb 8XvL0MgaO7XcLlyu2Zz0H/WdXwjOFNMyXNUIvOB2rDRBTo01jqpJ0ILX51PdOEUjF5Iph++Vyev98 nBK+5gw5v3MOZz8B9p7w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIs41-0006tX-9Z; Wed, 16 May 2018 08:45:37 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIrwz-00088X-Gw for linux-arm-kernel@bombadil.infradead.org; Wed, 16 May 2018 08:38:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=fEYtN73YklWNSL/ouDKKOITZB1KkAIwOpK5rGF++FNw=; b=cVBkxI5kbyR3zTxrLwHHHo36/ h3ApoHIjutgOAWinAdRw5jXH82xlEGkAY8/vC24nwpW2kCaerqcEMhQ0PhOi1cHA1K/Xrmzx28D1K xuPrbWSKxQpzrxObfF2QsElfWEYhSP3cudGT8K/qg7XN1I/VSoC4bbxziHkzjgvoLBrnJoPoG+ZY+ Er6z3n4UKKrd218/A9tNH0TTCmh5BF5LOZlumDKT95SbcEAHE+Q/ntEYfFv9CFyYHwbEXQOEBOktx bb0+Wo863nBkqNqNREUOQB0OSuiQoiOtXQsqBrn83PTbGIHOCrDo18przPSjES8IR8mCEA+p/87fX EvnqpjQsQ==; Received: from mail-dm3nam03on0072.outbound.protection.outlook.com ([104.47.41.72] helo=NAM03-DM3-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIriZ-00021x-Su for linux-arm-kernel@lists.infradead.org; Wed, 16 May 2018 08:23:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fEYtN73YklWNSL/ouDKKOITZB1KkAIwOpK5rGF++FNw=; b=ijXdEYVwUPCKP58F8bZQHjr4CYVnGg3Ec3i7EGuUAXl3byzHAwn01Y1lrXXBo8K6JoG6KcecwkSPnDyFDfzxzfiWtktAPxOfo+6mtAZ68LLFedMhy34szWJgPqVtfZIvh/UYDMfs2GktDDdbTdkODTnmu5H4d3bELuP7sjn/mjc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (176.59.36.13) by BYAPR07MB4376.namprd07.prod.outlook.com (2603:10b6:a02:c0::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.755.16; Wed, 16 May 2018 08:23:12 +0000 From: Yury Norov To: Catalin Marinas , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-api@vger.kernel.org Subject: [PATCH 21/24] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 Date: Wed, 16 May 2018 11:19:06 +0300 Message-Id: <20180516081910.10067-22-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516081910.10067-1-ynorov@caviumnetworks.com> References: <20180516081910.10067-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [176.59.36.13] X-ClientProxiedBy: VI1PR08CA0111.eurprd08.prod.outlook.com (2603:10a6:800:d4::13) To BYAPR07MB4376.namprd07.prod.outlook.com (2603:10b6:a02:c0::19) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BYAPR07MB4376; X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4376; 3:Fm93lf+BpGAn22gQo9W0Ym6Zvfk/C89Y59yPTG7qOG7Z5VZMX2gVuV6Uh066wp6gn2XYgd8U7xzYAfyBYz+XGpUuTga869AEdEZW+q7ESFCBN/0Q7wjdBgU0wMaKQUdFuOVPTII62vt7EO44OTx9d5S7dIBd4dMmBkwNj+m2CQkCygfBdSC5a95v3getQRvIXqrdyPD6bhytPGboUuTEmON2C0nsyP6HZVMkimACeRvQ8d9WE3dOd01PbdhoHPyg; 25:6zQGuopHsPe+c4W3JQiSm/HlK+3hq7DqwlTN9Nm0TtDqIDW9hMMT4Yb7RWW787EWzAXb8o7oTX5QAJw0VD7SWRNBl/v1rs8CsIWRxgnIpE3w0NSHsJ8o3zfpWSKxLrXv8DuWSVB8PuTn0KoLgp+tt8xh/ohraCa+RrIH7kqL6Ci2wu0bumX86wWaM9XCuc4daMECxscFtHP/NCLNkHCF9Ut6Y5+FZIYl38BHe7AN/ZevLdIE1szaFQvUJHPIgXMa+CXxx3cWklgfrNAutEqr9K6GJrInPV7ZUUpIqVvDmwTM8xOlXIwg6RfA3GhD7TBJQ+LKdcnN8wt5mFqCgpaU8w==; 31:BqGzgpRo3M3O0EyFzxUTvfrBCY85VLGd+ih+YkcqD4YUJywz3Vi3blRrl7k07SZBcc3aS2dM3WYFQs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4tJInGBXZYiDdUnwLCY5bVKLOOpf5fVc7WoaiLMtRtT0YFppdG7r5eKCb+jaLA3HdZZP2AvhmRkROJ1RSnfnnHPuTTMiNe X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(85827821059158); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(93006095)(3002001)(10201501046)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:BYAPR07MB4376; BCL:0; PCL:0; RULEID:; SRVR:BYAPR07MB4376; X-Forefront-PRVS: 0674DC6DD3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(376002)(346002)(366004)(39850400004)(39380400002)(396003)(189003)(199004)(39060400002)(42882007)(59450400001)(6486002)(53936002)(6666003)(4326008)(51416003)(386003)(76176011)(52116002)(446003)(6496006)(50226002)(16586007)(305945005)(7736002)(72206003)(2616005)(26005)(316002)(478600001)(11346002)(36756003)(956004)(105586002)(186003)(16526019)(97736004)(2906002)(486006)(5660300001)(106356001)(8936002)(476003)(76506005)(575784001)(50466002)(48376002)(110136005)(47776003)(66066001)(25786009)(54906003)(7416002)(3846002)(81166006)(7406005)(1076002)(68736007)(81156014)(8676002)(6116002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR07MB4376; H:localhost; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BYAPR07MB4376; 23:HT4tsQZfYCSzueeBdyPKmOHX4ZeJ+a/wIO7VEN//V?= =?us-ascii?Q?u/+gQbJvnFcGt4HfFPxjznDIm9aVhAyRRsjJSsKi4T5r141J+xNdDX6r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IsOgH3mq0vJ72bHZmzHW8qXg98Btl56hHG7ESW6Pe96dTOPuxLD0VqHPv4u9SqtrSm4/eJLdLt0nGAxDlmhtvaDUcHxQSj8Rru6+5j+P0gVroIJa7/jRfDBXuZ3XwOu2/P5IEDIFr4WNrmZVDWOfXTBY57zH6hSCBFWOpQ==; 5:QQTiR17Y9AttB0aGoPFCR41SCPtU6Wh7vTWj1EW2p5EJKhO9JxTNHFbLER3IpIwTeMooucip6PCSvMk8v8DXaC1VIwnVxo11l09LOihCDAKK29YGv1ePhtJ1q2jsYowrijmtaog/tvPj9lgjdZbzE+rqGQ9d6MRcLErh+O9+3H8=; 24:mUTysO5KCt/ubWUhuU/Ar3JAsuhq/2dAvRc4J1n0viWAcA4vUoed+08KgrENWxofwK/1dcYixtlMgtd7Ggb3XlRJRXW6eTJQWeiDWbmi5c0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BYAPR07MB4376; 7:4hts6yOm7eN5fsJiN7e2PQwdx1SF/Sw3vobGs3OkryMDkyN6H1pL0JwqD6WBPPbhxIfQdktWSGeVlbfhZyPr0iuo18jgkuK7JLzQ3PIafJQeexOgv9iBVkLLqLN82mJAbcPPyPlkmZeTyc168vh4AkO3kpiilhXReFXi6Rf2HS2XA+Byac4VtwMIgnVBEU37vJEJnt+2+fn6dfvqVrrc38/7H449QZ40GNK/W6RdTz2q50UA6JWhH946/ySWrYnh X-MS-Office365-Filtering-Correlation-Id: 7c042f61-7387-4196-d703-08d5bb064464 X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2018 08:23:12.5075 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7c042f61-7387-4196-d703-08d5bb064464 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR07MB4376 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180516_042327_991008_FAC869CB X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Szabolcs Nagy , Heiko Carstens , Yury Norov , Philipp Tomsich , Joseph Myers , Steve Ellcey , Prasun Kapoor , Andreas Schwab , Alexander Graf , Bamvor Zhangjian , Geert Uytterhoeven , Dave Martin , Adam Borowski , Manuel Montezelo , James Hogan , Chris Metcalf , Andrew Pinski , Lin Yongting , Alexey Klimov , Mark Brown , Maxim Kuvyrkov , Florian Weimer , Nathan_Lynch , James Morse , Ramana Radhakrishnan , Martin Schwidefsky , "David S . Miller" , Christoph Muellner Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP ILP32 has context-related structures different from both aarch32 and aarch64/lp64. In this patch compat_arch_ptrace() renamed to compat_a32_ptrace(), and compat_arch_ptrace() only makes choice between compat_a32_ptrace() and new compat_ilp32_ptrace() handler. compat_ilp32_ptrace() calls generic compat_ptrace_request() for all requests except PTRACE_GETSIGMASK and PTRACE_SETSIGMASK, which need special handling. Signed-off-by: Yury Norov Signed-off-by: Bamvor Jian Zhang --- arch/arm64/kernel/ptrace.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index 4d0a541d049b..da7f47c7e586 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -1038,9 +1038,11 @@ static const struct user_regset_view user_aarch64_view = { .regsets = aarch64_regsets, .n = ARRAY_SIZE(aarch64_regsets) }; -#ifdef CONFIG_AARCH32_EL0 +#ifdef CONFIG_COMPAT #include +#endif +#ifdef CONFIG_AARCH32_EL0 enum compat_regset { REGSET_COMPAT_GPR, REGSET_COMPAT_VFP, @@ -1503,7 +1505,7 @@ static int compat_ptrace_sethbpregs(struct task_struct *tsk, compat_long_t num, } #endif /* CONFIG_HAVE_HW_BREAKPOINT */ -long compat_arch_ptrace(struct task_struct *child, compat_long_t request, +static long compat_a32_ptrace(struct task_struct *child, compat_long_t request, compat_ulong_t caddr, compat_ulong_t cdata) { unsigned long addr = caddr; @@ -1580,8 +1582,23 @@ long compat_arch_ptrace(struct task_struct *child, compat_long_t request, return ret; } + +#else +#define compat_a32_ptrace(child, request, caddr, cdata) (0) #endif /* CONFIG_AARCH32_EL0 */ +#ifdef CONFIG_COMPAT +long compat_arch_ptrace(struct task_struct *child, compat_long_t request, + compat_ulong_t caddr, compat_ulong_t cdata) +{ + if (is_a32_compat_task()) + return compat_a32_ptrace(child, request, caddr, cdata); + + /* ILP32 */ + return compat_ptrace_request(child, request, caddr, cdata); +} +#endif + const struct user_regset_view *task_user_regset_view(struct task_struct *task) { #ifdef CONFIG_AARCH32_EL0