From patchwork Mon Jun 19 15:50:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 105879 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp941442qgd; Mon, 19 Jun 2017 08:54:14 -0700 (PDT) X-Received: by 10.84.130.98 with SMTP id 89mr30106206plc.222.1497887654831; Mon, 19 Jun 2017 08:54:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497887654; cv=none; d=google.com; s=arc-20160816; b=xAP4UgbtbM0/Sds2oeyONDkzoFFevbOHOLL9/Mb1utysmUHzKCKRXwBBEI2G8YNoIJ fUO9+8CrH/tSFK1mUO4DV67wct41FbL9Sv0NE7yqwom2jWGi4TY9UVLct8+Dwwm2slBW LVGSHuXB0voN4MidACQE0T1yeLnKKEf20GjwNH0sQhokyxMW0UJDVVF/jj1TyT60ZIr2 qGVfKksBt9LR2Wid4dbvFImeB+5mTjVW1PeiT2MmfHBPJ9HOoyMIg1ID7HakurWizhuR zxZbGD9HNfezXup68OBpvFovmoIMEZLxx3bl3PrgrN8lyAYn++LdwjzsMdMskOcXoqum NVPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=aILKQS0Yy4EPMF4XbX5PBnWpLzCC0Lf23oSQDggRzYE=; b=Y97R4d9JLfPioObv7kxoTYK3AL39XHVKLkuTCisHwe1j4ghgzj07tPwCCdhH0d950v ificYj3qnydzCGcw3RrhVQ+ylFG9tvWWK8Y9zB4BgUr8o5Y6zcHPZun5aiIi9pvejOge Nc1mxitdcUsr7QdDDwgVXb8yDZSYDBCCUZjcUL5Ovmn/7uPvxX8sYmpmj7IBgDeadBfa o7zH4igRfA4sYYllSvQClpL4hAr5TrvYrS52TRIgeYi0MU/6aHq5FcW9mzL4n9yhr46L T5OE7ftOflSblKYDYcybx3/eARUBdaeqK4+HF4UNiIR9Z5nu7b1wlchBEACXxKalaTJO P1rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=FLz2ihcj; 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 d187si8231671pfg.220.2017.06.19.08.54.14; Mon, 19 Jun 2017 08:54:14 -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; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=FLz2ihcj; 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 S1753933AbdFSPxv (ORCPT + 25 others); Mon, 19 Jun 2017 11:53:51 -0400 Received: from mail-cys01nam02on0085.outbound.protection.outlook.com ([104.47.37.85]:61408 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753920AbdFSPxq (ORCPT ); Mon, 19 Jun 2017 11:53:46 -0400 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; bh=aILKQS0Yy4EPMF4XbX5PBnWpLzCC0Lf23oSQDggRzYE=; b=FLz2ihcjPUQWxi13QniMzmWtGGkD73yiqb30e/T4W8JiycXbySvw+PwnzokrP234OM/SNrqBrj9Nu83frpPCzf91rr0HiLd1RIvlxG10W/9dTsOT5TkXZNSh38hrUNcRTaGcjasCwPDJ8pLfAtKlZ6T+h3O5FUQI+lK9dZhZa+Y= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none; arm.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost (85.253.137.34) by CY1PR0701MB1866.namprd07.prod.outlook.com (10.163.42.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1178.14; Mon, 19 Jun 2017 15:53:42 +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 Cc: Yury Norov , Adam Borowski , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Chris Metcalf , Florian Weimer , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Maxim Kuvyrkov , Nathan_Lynch@mentor.com, Prasun.Kapoor@caviumnetworks.com, Ramana Radhakrishnan , Steve Ellcey , Alexander Graf , Mark Brown , christoph.muellner@theobroma-systems.com, davem@davemloft.net, Geert Uytterhoeven , Alexey Klimov , linyongting@huawei.com, manuel.montezelo@gmail.com, philipp.tomsich@theobroma-systems.com, schwidefsky@de.ibm.com, szabolcs.nagy@arm.com, zhouchengming1@huawei.com, Bamvor Jian Zhang Subject: [PATCH 18/20] arm64: ptrace: handle ptrace_request differently for aarch32 and ilp32 Date: Mon, 19 Jun 2017 18:50:01 +0300 Message-Id: <20170619155003.13218-19-ynorov@caviumnetworks.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170619155003.13218-1-ynorov@caviumnetworks.com> References: <20170619155003.13218-1-ynorov@caviumnetworks.com> MIME-Version: 1.0 X-Originating-IP: [85.253.137.34] X-ClientProxiedBy: VI1P190CA0030.EURP190.PROD.OUTLOOK.COM (10.165.188.171) To CY1PR0701MB1866.namprd07.prod.outlook.com (10.163.42.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44c13d53-11c5-4cc1-9a6f-08d4b72b5c5e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY1PR0701MB1866; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 3:GCKlrwpe5O4NNSNrWLW5b7DiP8hCAmmc0seY0fSbLAv3lT0rKyZGSibHZLNQzCLhkVzGPNEJj3RtzI+HxoDoihMZb+4LDY6sA1RBhUVDHnG/etMh47k8Q4feHC39qsBXHrTDRCKRr2pXsmhAnIsCcaHfAbh4JI+vz5fg9N3XWAqS7/klSMW/4irwe8Wvx3v1BDt8PX0WFTT8c22mvCUf+pdrbLJY6af7G4V20yn98WsuwLpXk/fcpUJHIp/hLYPHz3aayt2qAfsWUxmUkexqkvAcG8nsKGc/TXWzoHNjBi0WNaorZO6T8H7tCSeOJdFcwawY/t7ikeLMec+kM3p6dw==; 25:jSgFnsOhJ5GwNvRk0Igkz10emW7oygnmRzrsUKM9UVt6Fpv4kXpNpR0kCKvQQYEpsBp2DKSpodZ4KwJfR9x3f3dprtiRe6KX9mzL3db/d0YkucPm3l/r2o2WMuC/Ks9xwTMVVGCYPGtc2bSpmNT2dqnQb+YtuUaoaYyEhUFHYJgAAy2/wPUcl2sf6FzQH0D5MJ/hJ2u52YwJoVwhpr+CTV4wXMwDVduAWviSZftLtxqlM38A/afhkiGYQPQHJKWcCK2jc/vixhXNEx+LAXqd/i3rctKieQcH1VYQhlUqkfny/1SOp/UqBgK+BF3I9Hjciiq4I/z9Ofd6VtCS8kDZo3zhmdyXhkwK0YWO6RUgdSFJM3yKEbl/nTQpC2CseDOxU8uWFe0OfR5dokHnRZQDyLxq4Xenfb/QHLbEnTaEuOZeciO6PJ7YgcuvcAXfZP2VmBAeGEnzw2NR3edv+5zqyG/yyM//wQqv648offxiZ7s= X-MS-TrafficTypeDiagnostic: CY1PR0701MB1866: X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 31:HS6N8v+oc7NyEzE51ajiPTRAfFcltT7CxiZFbJ6vr0ULu6eu7rZC2Qu7B60pLMt7ag9CnjIOeRggYnPY0utH+C/AqcqBilNsx0GDAO8hxXCCCIt715IMPknhEYm5gkkZ/bmtyx9bZwXcDitzcU2o39y8Oehjcheq2r02KoBIobFxFpNg3Rt5LX7INh2miusCWbr05/A8mGbmSqdRyhABmcb78qt3LNl2f+QWvt2JagQ=; 20:8ZvP7G227CSHJ8a9DUo2PaPtTSHHlYO4Ks26jh4SPCcQyQLTdLlCRx3ObXWnkJbG/Sx9sNkgAv/agtJVFiJNySae9W1+rgCQ7wxXlmMEOKC5xpZgNXfJXoTaUir/mqmjelIRF9kiD4t/xX2cuTjzYbwt1MxHkiBQA4kB4h6WM2QtR9UR/FwLxBxqZdDcvefa1boR61OH1TS8uFBrdG4w5sGN9aM/tLCgagWhzJDNXH3idqovyvnDecXv9oiFaqs0/5QpfRa4gOO8f3VofvSMMUuwP5Di8DCPcSvdh/Vpf7IxV1SqbCOxH0J5X82CBTRYE8HZgSNPSpcEM2DOleSFzrnB1Ug1vdMDXqeYQIa7FSx4mMgJ3njYSkYhTFkvWMSYTKeYX/J6euHA/GUNgaQ/0W1r8toz1q3IUN/DBPrrwVtAEjcxIWQFardaUlP85l/NTYoLhIkiSKgUiQ9KNrn1VHIHsd75zcVmMd7GdiFotKNM7gWiI1gBMin/cT4DB3EsUxesV277aqvHYRAz43mULyN8mDyjW1WC1zRXqG0opVn8+GSBwXQ8TioVbQ12/k1PxnkiXbHj/sO+6l34VS9SLIyOEuRgUxzTDx7F+xK++2w= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(50582790962513); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(3002001)(93006095)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY1PR0701MB1866; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY1PR0701MB1866; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 4:IgX5pbc9vWgwpvSYHv8s2KuWM6/LpKd392z0me9WP+mlT5KJLLiV1QHr70ihRUWvhwI33RBlgMiJvx2Sgjx6GtmgGiEY8Z75HasrmtUsosi+L2eF2wldEoHNfSZvfA2j8Gz4Pz8oo/9xpAMoUso32JOENUC+RH+3tPYDeGT2vs8/3qXqCTet0m0HXZMofmbv/5ztVpq/c51s0zLYfqw/u35ArNZgrIic3aTDC2kLnh8w5lpW3KX6Sd+8d4ffGIfj+LwxqEq81Et+ugra+JUOpBBHIsl3JhX0jkuiCm3b3UmyIArUWiJOikUu1ROUb2v8NwYwdz0dR97yhVbyRwnKgey7Q1f26HcXnvwigiH7pSGJwySwbNMBR1WFvjOaaJXuguFKqZbFqKjAYgTEJqAE+wflZgi+fdUy/7qMhc9QiI3/NSwCiYchSKbo+4f/Hvd+iG5i8qo7c3QJCay8xNlw5MP1RAGNlqPZ5NBl1GauYV1KjgUYL1URpCo0n3mslgYk3RwGXp8/cxG9Ix/T+fyAdmxmVisof22kdNyXXFzLNPav/qlv0HQ0gyjCh1ZhTyg6+XyPxuQT6gk/GDCh1808lh6aTSoRb5hGf18n+2ssUUPHqNQ/Yp8GDlzPkI5AdywmAPi5Da7tmde5qmkf0MpgHAOF92Yu9FIIYP6c6dX5axvgSVCrVArLihOFc/6uOIDGGtgiiOYTYY2La0d288t4guccakZ98QsxlrFllBntqf7I1T8B14zkD1TQgOKy9d8A+WgliC6FMzf+AjT8qlhwmpyxwzFKgTmIFBizHtaVfWycp69JQD+ZNmCiLBdUnZqarPe++nKS+pGcdeAc/GQ43RhPN6Dr+T3E5r8nRbH0QSHNztmKr+I4Cv9zcOtwXE2qQkK/G602DT0g91SK+HJlY/0na3KpFoALT81elF2h515J953pWoT5sq35wyv+QUGdW60uTRzbv79Yy6g415BIO3v0xL+j7YVBL7k5sASQFbp5y1h2M4tEYPnhMX4EewTw4xJIlQZKbPQ40ETmwmcnfBSUUerP60kzoH2PvmxRuWFuHC1EuoQ5XxneE9rqYWrlEFaeNbachd5L3rrsCJaK6wvZ2uYWe8ITf6zA97OtTX5o3Jt6/cZp6Ukz/vCnz+efR9pGZ60+J1b+t1rBpRtdSA== X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(6069001)(39840400002)(39410400002)(39400400002)(39850400002)(39450400003)(6666003)(305945005)(47776003)(42186005)(38730400002)(2950100002)(42882006)(1076002)(76506005)(6486002)(81166006)(25786009)(8676002)(7416002)(81156014)(4326008)(7406005)(5003940100001)(36756003)(50986999)(76176999)(6496005)(53936002)(54906002)(48376002)(7736002)(189998001)(50466002)(5660300001)(2906002)(3846002)(6116002)(66066001)(33646002)(50226002)(478600001)(72206003)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1866; H:localhost; FPR:; SPF:None; MLV:ovrnspm; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1866; 23:ah57n2gkeABsoId7pP3dl6GkTHjHUNoVYY0Q8LZWQrr0B5CAhQu3w9wSdxpVsjnI+/kgpRrNPFY7ddUKFhTNSCevmI1ceK+Tit442JXNwBzb9qPwqu5gJhdnRlr7o3/AtYGakrCW+nRG9Q8omlteyFtToMAqvNpjhid/AbKUNnhr4hWmhVwOJJQRMB8GU9AhQ82QgAVEhYna7yGcQa8f8c+l3sYH22RFZ/c4Vcb0vd8INkbSKyqIHALPr8SR8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AWLFH+nmrytz+9fFXArsThZs228VSHbhSzv89qUJN2L70aXcvcKJjU7ApD8vxOf97sv6xn+yxR9MEIut1dYmFk0yEN+AKebyoMEOg7qjGDU/TgmblrV7hiPtEM2tz4PAWgJI0XrsbQjKu8f/gbGS1Ce08eYgqSGWnjBLjyImt54bYwlpeWwJQ454vlHQqT4W6MV27fAl0Ld9JiU6VsFd8FoPS7txUOLhB/nyc5wr2tCUr85tO65s7UetIP3hn2LTKWTyfU6vxNt6/OlRTCgA0ZR6MfuC6O/V1MMIeeQEKfaUXIhXPxqjIZcfdu1X8Sr6U4FnZLoMtLJjWL8L0HEgI4lDdCIvPWFh4= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:53:42.2731 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1866 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Chengming Zhou --- arch/arm64/kernel/ptrace.c | 65 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index e2b7c040bf84..28f96765e8cc 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -765,9 +765,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, @@ -1223,7 +1225,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; @@ -1300,8 +1302,67 @@ 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_ARM64_ILP32 +#include + +static long compat_ilp32_ptrace(struct task_struct *child, compat_long_t request, + compat_ulong_t caddr, compat_ulong_t cdata) +{ + sigset_t new_set; + + switch (request) { + case PTRACE_GETSIGMASK: + if (caddr != sizeof(compat_sigset_t)) + return -EINVAL; + + return put_sigset_t((compat_sigset_t __user *) (u64) cdata, + &child->blocked); + + case PTRACE_SETSIGMASK: + if (caddr != sizeof(compat_sigset_t)) + return -EINVAL; + + if (get_sigset_t(&new_set, (compat_sigset_t __user *) (u64) cdata)) + return -EFAULT; + + sigdelsetmask(&new_set, sigmask(SIGKILL)|sigmask(SIGSTOP)); + + /* + * Every thread does recalc_sigpending() after resume, so + * retarget_shared_pending() and recalc_sigpending() are not + * called here. + */ + spin_lock_irq(&child->sighand->siglock); + child->blocked = new_set; + spin_unlock_irq(&child->sighand->siglock); + + return 0; + + default: + return compat_ptrace_request(child, request, caddr, cdata); + } +} + +#else +#define compat_ilp32_ptrace(child, request, caddr, cdata) (0) +#endif + +#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); + + return compat_ilp32_ptrace(child, request, caddr, cdata); +} +#endif + const struct user_regset_view *task_user_regset_view(struct task_struct *task) { #ifdef CONFIG_AARCH32_EL0