From patchwork Mon Jun 19 15:49:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 105873 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp940859qgd; Mon, 19 Jun 2017 08:52:48 -0700 (PDT) X-Received: by 10.99.126.67 with SMTP id o3mr26519848pgn.36.1497887568293; Mon, 19 Jun 2017 08:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497887568; cv=none; d=google.com; s=arc-20160816; b=we2IZ29O2MuRSbD6wID/hwDzJviQLV1IGRMAtkmntO5NMKTQk+N+xxj7mQgcwHmGMX 9VLuRom0YnmD+h6mLXlXGgX8HVSqUT+ghEItQgPZ3+4lHUXg6Lo+SslIhwpRxcZP55ph rDlO8jiQFI9XWyoVdpl+HTwLRt+QgiHEJRI3bTLc14eaHT80ran3vNPl6OMLd1/vednY sYeuPvulO1kbByJA3ygQ6KAkZmIAatqGit6oTjtnmdN1mn12TuiBi6DMqjoO3T4lp8V5 rqHANSrsXpeNgtXGcVE4yLdoVL6qyFLUro0Gq7hQSrj1/afEsijjJ7t3Gu9kjqlUt1D1 n/lg== 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=XELQI0+xp2bh9jHZuGu5/+BuLc/kBgK3u2BtG+LkSMM=; b=MqOgVoMC0lh3/kTag4gd8meE+WVVB3C0jaDCnegJyudtYhpH6HLIC3b/xMHZ70Wx6P BwvgY3FGrxsUAbsKJiv7azlDnwgz+TnweaWmEW3ypxu9Lu0XejJORASJY9Bixv8RrEGh fQmYCBJSMvOV4FdlvAQF0dVUMC8J4BewCsNjKJSXasKB2okJ+ruqp2t1vQdL7WyMXdsI TVIqE3kRQrfqlQ+33teTLrYVEQk1zFcMDNb4Y8VTRkQGT1rp++4nb2Ahfn7rJxBWPhxr F5ADUrSoXzIFGJUwiN50JvMzHkK/RrF+zt6gnM/YXO+5BMA99veNl/10agAGCZubLqvr +jZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=ds71xsi8; 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 a61si9249718pla.235.2017.06.19.08.52.47; Mon, 19 Jun 2017 08:52:48 -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=ds71xsi8; 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 S1753837AbdFSPwe (ORCPT + 25 others); Mon, 19 Jun 2017 11:52:34 -0400 Received: from mail-by2nam03on0064.outbound.protection.outlook.com ([104.47.42.64]:56419 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752176AbdFSPw3 (ORCPT ); Mon, 19 Jun 2017 11:52:29 -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=XELQI0+xp2bh9jHZuGu5/+BuLc/kBgK3u2BtG+LkSMM=; b=ds71xsi8DMgpLQLW495iPZO0SuBjzsye3ZcCsySk02umBDNqgBBbQYvjC0y3nyevw/3aYxAExVBx5nNGtfiJQ1AGS+5t46Z3ssSMoW/n1FghwPc7XhfVgkddWepvBPi/VJaJqqL1BK0vq26DDE0GsmzKizu/+NPPf8nFeYrxs3U= 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 BLUPR0701MB1858.namprd07.prod.outlook.com (10.162.88.144) 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:52:25 +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, Andrew Pinski Subject: [PATCH 10/20] arm64: ilp32: add is_ilp32_compat_{task, thread} and TIF_32BIT_AARCH64 Date: Mon, 19 Jun 2017 18:49:53 +0300 Message-Id: <20170619155003.13218-11-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 BLUPR0701MB1858.namprd07.prod.outlook.com (10.162.88.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a98250db-9d18-4fe1-712d-08d4b72b2e4c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BLUPR0701MB1858; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1858; 3:3lntzoNITZOoZZykNAtYFdqgnftSYHRET6T4fwNAPba9vZhOuTyx2DdJkFHOSCX/M371RJNJQMh7OZaaSC1V+BqqQCHdiZvWQCmCs0wiDm2+/SZy0CIYrLXnoZnKpWxazSVrCdd4ylD8yVF1dKTN4Vz4eeRErXpsTOsJlNvIT9P6q8yCoonCWWyfiFGTjSGpJegfXVb4fp8fD8mltL4erAdOLEMSPOFHcPzzZ3jq5Da8Wot2ZYXQr3YCvfoLz7vyRqTsVm3J6E5QrvgnIuKgkURsjnLLRk2hjkdzALLsPcLpYTvGqw5vwx5BdrETFhiJ94Vs+2JICH1iWSQ8+ylGvA==; 25:XOdUuQii5BEul8ZZm7qSWkLuUFi5CT/JBYPybXZCjx11SnLwpQ0loZpfc0Z7N1kzEpzPgcY4Ba9H4b6LFN/kSbZT9xmS9NiJoCwdXJNBXuIiOobE+zMImOSiauNYMUcRClPtkpP/v6pWRrrUgIqzVZ3mT2pSZqfGR06377yG0oXtfxnh2rpP5lT37MYNF7xh+Nvah/9q74tiiU3fCR5BK+BVP0Cr374uquCjJO9eY+aWgZeraOxpbcdFm3WplQVpafYo6JPf9fPmezhoZS1dase5uRgQ4SfHmIVZPwhbrf5Vo8NoJzIcAUmLe2Hnesof5Ljh9G9X9OJCoXzjjeJnPNtFJ5wTF7h3x484Ct8BsgkDLEL7xPpbEaTQkOh0jyEbBkb6SF7Z0TGAk8l/wDT4GaOpgEKO5fJZ3E1RWegLAqGn8klsZcmpaKmvnyqHiaXrcCFacgyf9V12j57TsGsZkg3WvumKuk7pZCItOhpOb7A= X-MS-TrafficTypeDiagnostic: BLUPR0701MB1858: X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1858; 31:18XnFW+AS0tSl+rCFdY4YodtsEJ8noepaCl6H1iQIwE9QyYsMxAMRw1CMoltGdqUeYsDkVK7GY12KONiiFiG0dVEM8ZDyASmvlupKfVDgMtchj2rfHx2olsa3ZHua5GkC3IXpqUAFU+94KJWrdXahgm3eWiB1Aa+PKiGvsgPsuK2wak0CT1lcP7+AIbiTuPcBSpoUsYOlEg/F9H+utoQt6m0nkYb0bhj/Qlyc/x+M7g=; 20:9vYBYPWDsCiuXmoWrdM2bp3O3Fz/UFy5FogD9LjXUbF8Z0hsWzMpZ2vS8l8ChMZ/TxXy5p5To9ZoYUnlzbNIlfmZWXuh+yvRDE0kgqP7idRUpVnTOtqGWV8bA7eeNvHA9huIKbrJuhMNz4fScc7opeGy1xitAHyxZ2OgQDtu44wF9+6K53lX/e62HguGNGYOGVbdKcguZVaePZNYfmS+77GkQ3cVYVpPs7YZg3Y2nMXjVzbQvDmF7BRrm1DuSpcSOcIQzle2feOuYCl4iSklEMU8oQG+DjEQPwcDqTYXvPMj69vW7UKVQuhMJtDA7dTYAJ0V8Upixo7Ijn746WpkvtsBCmjvgnUAb40qGvR2otbJMBTWXk9MDC1DhDoMH4Q4Svh/qEGak/ZRFReQAqQv2Vkl5K9FD6eQ+Gmv9QnP4BfKR+PABEV/lwflXmaiIBOhqdczeQVm6aOpir+0Fq+U7lruLmWzJiLjpUOd2OauAI67+5ccgLkESJjPzFa63DzzsRGCbQNmGwtdElLQ8plG8P2KUMXc967izxJ4YpUEynRGneXS9l52duDKEnHmGqEESpW6Dmw+WXRTmL/ipJyRlkzBB0nTLi4Sqcg1n9JQzyM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BLUPR0701MB1858; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BLUPR0701MB1858; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1858; 4:xq8ynQbnyF19TssxXIMkvPF5qtcxU8y4Smxusd4mzsikyUqyrFuk/D97fNELZzJco9KY4YEtKY4QUugxyow1ZFRCh7wztyl3cYC3wvwVzl9z5VUrGArtXYEZcy+nNd7BFDmplsy0lUiQsYhmp8Dnx/Ux824kyW/7TdkvjpdMT0Kmb1fRFb0TjuHjAW/ZYoXOKW2LvUpiWeYfjQbDWcbpVl/vBECSgwA61fD7KyqUyXRC5Tn9rS+jdASM4SORUrevAEZhqRmAj6dTPUzmZQwG9t5CSqQH0IKkqulKsnY3kcXuFGrwPy6pOceLmL3rXJ4+9bwb06yR70SC3y2jg/E4DzlaecHsxqZDRZBHD8c4A+37KbDghEEB3iNRt6wBXWGP5OAw63BhnwmlYob8N3SrfLUdyPdZwSgc4A5BqAVA3jXpeK08P/pug3LmRFbE31r5VQICrP/ahp4//4OpzBtnvozMbwCTc/59760X1kEy7w9+pw1EpE8wyXkRUMrwJ3UQ6KegEz3dzj8/x8sYr+sc5O7v0VRR8i01PduZLJ3N3iTp+InDno8aKd4dTiTbdQ+0U15mvDK+apFzFUMr0NxoWjXGT7NI7TXau6RCa2jjMfXSRjN8k3cIqSglFCJkNb4jqdPAEJ+CCND7yTXFKj5LYmD6Pbu5BSVIXQwFScU+I2EOfthbCGsWr2f7GeBOhPQo1ls8RI536DQcUhcp1AYaoj9pwuMEW8W+0whqWRzKe0c+A6Tx994MMJWilJBpG4sFhO/EABmTZmYnXzNOe95bkElbft2j9E6OgZQwaEjEoyzJCbk2wT2nK9gx0yHZsIA4JYNufF1Cgtm7pqAGDaQW82NLVLWV/hv2h7Kss1BXgZ+xswQl8JmB577EM5YQ2qAE7K916wTINigVUBs1Q1zpodZR8WRN4d7r3erYJWZuPtus+49C99sByGR+XqHVeHismLCFBAWLA2rIwNMzglYevJGDjToLLVRrCylWciiWHs2bqqKOICKJ+3UjWhfr6Sn8+MRis2jh1e+EEGu06+Nj/zTHu2EHwuZzfeA7s3say/BxKcBT7TH87ZTFVHhQRk08kdcNGVuSSO8JHQKj98d8fW4/Une0SCU/2APPig8MjWM= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39840400002)(39410400002)(39400400002)(39850400002)(39450400003)(6486002)(50466002)(48376002)(36756003)(305945005)(2906002)(107886003)(38730400002)(6496005)(42186005)(76506005)(76176999)(189998001)(54906002)(50986999)(53936002)(66066001)(25786009)(6666003)(72206003)(2950100002)(33646002)(478600001)(1076002)(8676002)(7736002)(6116002)(3846002)(5660300001)(7406005)(7416002)(50226002)(5003940100001)(42882006)(47776003)(81166006)(15760500002)(142933001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1858; H:localhost; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1858; 23:Giraf5U44mA1n9J/uVIjVzJniaxapCvCoih6Nx75YYicU/Qvj7EYAo4s75hmQqHlNEIb7CtzNc7k8VnyPS6oFMwgH/b80a1AbHxEusBONvEJiFgKlsLuMJwEoNacTKQiVx5pjyGE2UTgA9K02C/2uNPG6IB2TttqyFQNMNry6TgxglYAMsoqXGQX8kpb3FVdpinMmQuflVYe4VfagzboKOxpEUMbDm5VF8a7w4hNw79NJkBJh4rbdXPmXA4xh2ucDCnfbJU50oXf+cIDOs/81Qt5TUKPZe8v0P/3tIJjRJOqzKdnlgHw318VQ1/VVN54vhTBIokf6TxdoFxk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QP7Xr574CoXtrHbB/JHMrbvQSL/1dHJZ9FjQbsjdqWvLLVlJWzS7CjKPe/zMAfX0h6ole6zEUtS8J0BUQbf8RLonNC/6t4Ee09D5zxUFCIzXg4eIOrt4ryGJ9Ae8tS348MkOmMvFA4XaiSQorZmk7uIBEtd3gsJCop++os1EtFC/iWeBz1JXqUidjE= X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 15:52:25.0883 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1858 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ILP32 tasks are needed to be distinguished from lp64 and aarch32. This patch adds helper functions is_ilp32_compat_{task,thread} and thread flag TIF_32BIT_AARCH64 to address it. This is a preparation for following patches in ilp32 patchset. For consistency, SET_PERSONALITY is changed here accordingly. Signed-off-by: Andrew Pinski Signed-off-by: Philipp Tomsich Signed-off-by: Christoph Muellner Signed-off-by: Yury Norov Reviewed-by: David Daney --- arch/arm64/include/asm/elf.h | 2 ++ arch/arm64/include/asm/is_compat.h | 30 ++++++++++++++++++++++++++++-- arch/arm64/include/asm/thread_info.h | 2 ++ 3 files changed, 32 insertions(+), 2 deletions(-) -- 2.11.0 diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index 6a37b6facc69..8f7bafa60d01 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h @@ -145,6 +145,7 @@ typedef struct user_fpsimd_state elf_fpregset_t; #define SET_PERSONALITY(ex) \ ({ \ clear_bit(TIF_32BIT, ¤t->mm->context.flags); \ + clear_thread_flag(TIF_32BIT_AARCH64); \ clear_thread_flag(TIF_32BIT); \ current->personality &= ~READ_IMPLIES_EXEC; \ }) @@ -196,6 +197,7 @@ typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG]; #define COMPAT_SET_PERSONALITY(ex) \ ({ \ set_bit(TIF_32BIT, ¤t->mm->context.flags); \ + clear_thread_flag(TIF_32BIT_AARCH64); \ set_thread_flag(TIF_32BIT); \ }) #define COMPAT_ARCH_DLINFO diff --git a/arch/arm64/include/asm/is_compat.h b/arch/arm64/include/asm/is_compat.h index 8dba5caaf5d1..7726bebc4115 100644 --- a/arch/arm64/include/asm/is_compat.h +++ b/arch/arm64/include/asm/is_compat.h @@ -45,18 +45,44 @@ static inline int is_a32_compat_thread(struct thread_info *thread) #endif /* CONFIG_AARCH32_EL0 */ +#ifdef CONFIG_ARM64_ILP32 + +static inline int is_ilp32_compat_task(void) +{ + return test_thread_flag(TIF_32BIT_AARCH64); +} + +static inline int is_ilp32_compat_thread(struct thread_info *thread) +{ + return test_ti_thread_flag(thread, TIF_32BIT_AARCH64); +} + +#else + +static inline int is_ilp32_compat_task(void) +{ + return 0; +} + +static inline int is_ilp32_compat_thread(struct thread_info *thread) +{ + return 0; +} + +#endif /* CONFIG_ARM64_ILP32 */ + #ifdef CONFIG_COMPAT static inline int is_compat_task(void) { - return is_a32_compat_task(); + return is_a32_compat_task() || is_ilp32_compat_task(); } #endif /* CONFIG_COMPAT */ static inline int is_compat_thread(struct thread_info *thread) { - return is_a32_compat_thread(thread); + return is_a32_compat_thread(thread) || is_ilp32_compat_thread(thread); } diff --git a/arch/arm64/include/asm/thread_info.h b/arch/arm64/include/asm/thread_info.h index a7ffea24d94d..abb60b5fc9f4 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -96,6 +96,7 @@ struct thread_info { #define TIF_RESTORE_SIGMASK 20 #define TIF_SINGLESTEP 21 #define TIF_32BIT 22 /* AARCH32 process */ +#define TIF_32BIT_AARCH64 23 /* 32 bit process on AArch64(ILP32) */ #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) @@ -108,6 +109,7 @@ struct thread_info { #define _TIF_SECCOMP (1 << TIF_SECCOMP) #define _TIF_UPROBE (1 << TIF_UPROBE) #define _TIF_32BIT (1 << TIF_32BIT) +#define _TIF_32BIT_AARCH64 (1 << TIF_32BIT_AARCH64) #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \ _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \