Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1689532imm; Wed, 16 May 2018 01:22:58 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqJ/dQqr2bBT2lwJkFHmzbKXSSdRO9nj1jaqeJAg3nVtRQVdcU57eEI18bSTZMS5+do9zMg X-Received: by 2002:a65:4e03:: with SMTP id r3-v6mr15454462pgt.121.1526458978704; Wed, 16 May 2018 01:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526458978; cv=none; d=google.com; s=arc-20160816; b=lnJwRqmXy0Z4xQnQK/Gor5Bqi27xHJhm8s9202LIjbAtQL7Kbzo9NVYeqyhzsUHM+g uEwyZnCpBs/czIE0jPotoNE7L7kUXoeutND9h9CuNYXVJqJd9rQ5+tS6g37f36zeCeuN K9PX8gea1WyXNX5j/GAW7eimGSc2R9uzWlPcXF4oQQrBIvvLwkR1tyiGJWB8kN1kp3Zf pjdyLFlLzQvy7s7BIbBNdx3tygEoqghTL951PbMCAYKUF2dwx2OQBGQBzoIvcuCoVV+7 OfgicoBWJWZfemh95CoA1ft/SsM83tTDF/Z29HgwIzotfXyOV2qUYNiYnt9wbHpfFmd6 acJQ== 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=a5yqGaCpZINhRiCYqdWyzuWVg4AWWW4FRARp7oWXln8=; b=WSmRXhho4rWG3DH6gdgmqUuMjYASZxi8uYMMN1bTr+bL3om1knV1O7mz0sbSR/pmtd YZdBcHlaxwD19Tr730FD4Rr3fvzwRPy7TyEjf27Pgro6zEvQ7466AUVbRbDzy0upeQhl nd3J5YIESl8BT87rt2Rtq/Uqs/tIyRNW2iu9HJlbMQqOqzO4oWFNu75/ojEw4QYjgPlQ /oZo+xl93xYkVYxEtaOvQ+ymt20v9QHikped0pNU+JdcQ39tf7AphV7yunHH67CdDFqK Ah+6KtKrX2e7wS64r1ql5CBao4aZbly5cd4nYvms9v4J4R8sEV/k8Rln2/abzoHHFbF8 rumg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=aqRikEsw; 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 g8-v6si2040523plo.245.2018.05.16.01.22.44; Wed, 16 May 2018 01:22:58 -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.s=selector1-cavium-com header.b=aqRikEsw; 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 S1752970AbeEPIV5 (ORCPT + 99 others); Wed, 16 May 2018 04:21:57 -0400 Received: from mail-sn1nam02on0060.outbound.protection.outlook.com ([104.47.36.60]:31712 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752939AbeEPIVv (ORCPT ); Wed, 16 May 2018 04:21:51 -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:X-MS-Exchange-SenderADCheck; bh=a5yqGaCpZINhRiCYqdWyzuWVg4AWWW4FRARp7oWXln8=; b=aqRikEsw73aCeDQ31bcGKpNLGqdppuldigT4qBj1HLwLYGOWZM2o1CubmThXkRg1Z9rL7dGfTpw2YmrWRoovj37xXgF4Oe6yVgsA1O/PG7lQRJa7xoKRqLhotje5QSJ8KcQEel79scNg71fYj3ZQU99LwxHLQPCw5g85ty5kx9A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Yuri.Norov@cavium.com; Received: from localhost (176.59.36.13) by SN6PR07MB4383.namprd07.prod.outlook.com (2603:10b6:805:58::14) 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:21:46 +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 Cc: Yury Norov , Adam Borowski , Alexander Graf , Alexey Klimov , Andreas Schwab , Andrew Pinski , Bamvor Zhangjian , Chris Metcalf , Christoph Muellner , Dave Martin , "David S . Miller" , Florian Weimer , Geert Uytterhoeven , Heiko Carstens , James Hogan , James Morse , Joseph Myers , Lin Yongting , Manuel Montezelo , Mark Brown , Martin Schwidefsky , Maxim Kuvyrkov , Nathan_Lynch , Philipp Tomsich , Prasun Kapoor , Ramana Radhakrishnan , Steve Ellcey , Szabolcs Nagy , Andrew Pinski Subject: [PATCH 12/24] arm64: ilp32: add is_ilp32_compat_{task,thread} and TIF_32BIT_AARCH64 Date: Wed, 16 May 2018 11:18:57 +0300 Message-Id: <20180516081910.10067-13-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 Content-Type: text/plain X-Originating-IP: [176.59.36.13] X-ClientProxiedBy: VI1PR08CA0116.eurprd08.prod.outlook.com (2603:10a6:800:d4::18) To SN6PR07MB4383.namprd07.prod.outlook.com (2603:10b6:805:58::14) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(2017052603328)(7153060)(7193020);SRVR:SN6PR07MB4383; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4383;3:DE45wwVso0vgHL04VX21OiMxUmNA21OlBF3XvVQsGOzallQbIynhdF2/4I/qvresVG/OQaEJyiunCTEM8j3w/TzH2HRlMAELqGJ5X9k7C0fKpV5Ug4iELDQ8Y7rGa7fAAAS6qhIxgAy+2hCXGo01WJeY2RXcYxcp+V9SA95Fj14LV4fC4ZFHUIGFvPAnwvUuRXXOxf0f84EMtGqypc8U3MWu2JRmnJ7sRnt4LJs/3KrdHBg4tq+R4BpAmdkTLVPB;25:zYRSeA6zkcijT2Z0qGpNbbE7LGmCPdcCl+NkpTyHsuFg2RLBznZy5i97s5RrPbCPrfhOYgXUN+ctTCsWCbArr/pWAibBns1nR+OMSOLoxl1ZMQC7w9rxUrEYSBstlhq74jDbVy75aD1qqGIVeuQSB59IIqzSvtaqXgDH2psouVovCNrZVqKKnr+vY0YhAYy/6+fqTjq283OajIL0ylv0kXr/mYZY89zdWFWANMQPe39T3eqVSArOfNbO5LvHLwDr/dwb/z2R/YNN7P7BDHGXVNyrWRuuEOTtgfS08NbLn015xhyziRywLZM3kx4+cSX4DkLrbI/pp/LFWymiVMxVHg==;31:0JimyTjwv4QolXIax/DV4TD/FgKC4GIUZ6Xx4Wuom12JbgWUIJP/QndWt1m4TnBgXYrmE4EY8cIvE6ZwShc0G1jHzB/7AaOjGkfl5qQLiBE2ZJHN/4jYYMdZ9eqz+0ryj9CXhvfTUOuSbjpZDF6jI3o/KACDTJHdlNplAyUSE2ZaJUTwORP16GTk1xXDVvqcBxWSBFzPfH9M6KcCCaUmFZaFdmZfJG/OLG/PgA4Z5D0= X-MS-TrafficTypeDiagnostic: SN6PR07MB4383: X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4383;20:y5qdc60TDCqM0SJf+y0NQrzZOB4cG3CeTN3jaV7Lm4x537e2iZH1NOhM6nxExHBwnSTE1TJ4WpXDmuW/dzk4LJPdrxuu5ivM5YYo/blA7AESr/tg6gNx74hYNYy4II+tWourY4UPfupQQf7EcGJDufMIoW32FSjQHnz+yi9h2X+iPi6A7KknKRWY6ATS8885OnwPh5OJowiPtsEm5akEcc81H1sDNf9L9SHgAZnLkd4+rp9xh3POYbrEr5jgEDLhs+br4msxFAjPNr+7Qi+WK9x9uPnQL0PC3+HlHvWMIKJLtI9B3BOpFztyUTMDKpI3DfUb87MyF/oSzoxEorxxFf+8ZbduhtWzDloRtuxxwn+ji5G9NCV8dCCZb4I7HujgYPYWDf2bdPF3OJuC3nLz1F1P9X+TbAB7P8O+I+z1xZSiye40Qe28phOqZeDUyl7rvArsZkek4dVKxTjNwR90Bbg6H507QDMqLL5EQpGoZmt73nZyMK/ySOfjuO+eOjELYHFMBvsMWLFsYknF0dPnAa2meCQPPXoAC4Qt7zzHFcx83t21wuF2jekMhZzZxglWGpe62hGOnbnvPgLGOs4OO7+I9PNT2gvJ4FrwqxhAVY4=;4:3U4JdOgBpY5Ns4p2Q72UKueSVU2//M/3XsGGVUSzbSMt8w2G5WW7CYmQVzG+8wfUiYCraoWHov27yb4rI/6IRfq8TY2sq5TTT0yg0+h/9nhwmhPC56DWNqr90FfY/uXKLmUepF29D8g4ED8Z3tl4n/rz2ewm2cw5CJv/GA0E5qNIE049LB37xg6yxX6Qy9/kCeBl/ZZivMrxK19d1xErRPJjpE8lZfNduepx5kjtZwTearC9z1LBAKIF2U0J1YAmub0ZdT0gYXJves+wyeTIfg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; 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)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(6072148)(201708071742011);SRVR:SN6PR07MB4383;BCL:0;PCL:0;RULEID:;SRVR:SN6PR07MB4383; X-Forefront-PRVS: 0674DC6DD3 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6069001)(346002)(376002)(39860400002)(366004)(396003)(39380400002)(189003)(199004)(6496006)(72206003)(478600001)(446003)(39060400002)(2906002)(11346002)(486006)(3846002)(4326008)(956004)(2616005)(25786009)(6116002)(1076002)(42882007)(53936002)(50466002)(476003)(107886003)(48376002)(50226002)(66066001)(6666003)(47776003)(16586007)(36756003)(68736007)(110136005)(54906003)(15760500003)(8676002)(76506005)(81156014)(81166006)(106356001)(386003)(7416002)(8936002)(76176011)(305945005)(7736002)(5660300001)(97736004)(7406005)(26005)(16526019)(186003)(316002)(105586002)(6486002)(51416003)(52116002)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR07MB4383;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;SN6PR07MB4383;23:+XUBOJboeTmeAl1qbE/qJF0O0iL7x0ZC+RT8laDg8?= =?us-ascii?Q?ciewYIqPSbzmJ/c0W215ZCcjVsDHmBp2ED2783/bkshwTRIxFB6l7Mtnoe+Y?= =?us-ascii?Q?k2tOlxctEh0KfZNQyX9pmIu4H0Z0BMyooy+uth8sgZfNoB7npH0e5ioK4CN1?= =?us-ascii?Q?6iy0xCLe+iIoIiOo0N84Zsqmw9YVUQdh1DdGguWqQT2f5AvRR+BWpATVN8C/?= =?us-ascii?Q?nqAiIdFnwQ8O3gyU+7xH8knqkJz/07ohuRIHe6z9seq8gX5IF71d5mHW3u//?= =?us-ascii?Q?kH//mbKU5oPWUV8E+6NJcEhuvMgWzQWmV+Xf4dhYq4I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xL+YwZ90UiVC6xM9RSlfjx9xtQAaBn5apx0LWsLxWjjGGIQwVJ5+8QiVZM67fHryQscvwtRKnb3pzLjyhXM=;24:NFWeFNwMhWOMDUwWiWn9i91VtKnItvX4NLpUmozHzh5p1Uh+jmTJTnncTEe+Lhxw3cpmL+2lcFBKp5qSl/ujX4IXSiCg0mR4uO4Cqe73bz8= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4383;7:vfXWg2hn4HH1EYbTlQSSIW0KR9/q4AWWx+BzawMVn9K+sNs43wSzDnci5wNVD8xWzYXV11z9JRfZ1G7DcXEBFuZrxhF3/v3mquAimnledzwfGljWawgGOG3J59CR4wQeu79ZlCqYBscZHxym0+hIOsGg7/GRuUftzX1dan+9/l9hIpF9VLZLDZ2IV07fU8Jqn6Bd8cLf4Qd+acTw0NXNmcCz2jz9Qa18ZGLm6rDLjSDsQRZVvYrZ5U7UuX8HH0kJ X-MS-Office365-Filtering-Correlation-Id: aa930f35-f954-40ae-407f-08d5bb06114f X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2018 08:21:46.7709 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa930f35-f954-40ae-407f-08d5bb06114f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4383 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(-) diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h index b4b10eefc667..023b2fbc1454 100644 --- a/arch/arm64/include/asm/elf.h +++ b/arch/arm64/include/asm/elf.h @@ -143,6 +143,7 @@ typedef struct user_fpsimd_state elf_fpregset_t; #define SET_PERSONALITY(ex) \ ({ \ + clear_thread_flag(TIF_32BIT_AARCH64); \ clear_thread_flag(TIF_32BIT); \ current->personality &= ~READ_IMPLIES_EXEC; \ }) @@ -194,6 +195,7 @@ typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG]; */ #define COMPAT_SET_PERSONALITY(ex) \ ({ \ + 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 19868588fbef..484c01def030 100644 --- a/arch/arm64/include/asm/is_compat.h +++ b/arch/arm64/include/asm/is_compat.h @@ -33,18 +33,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 6d2d58daa9d7..8ed56630e6a5 100644 --- a/arch/arm64/include/asm/thread_info.h +++ b/arch/arm64/include/asm/thread_info.h @@ -94,6 +94,7 @@ void arch_release_task_struct(struct task_struct *tsk); #define TIF_32BIT 22 /* AARCH32 process */ #define TIF_SVE 23 /* Scalable Vector Extension in use */ #define TIF_SVE_VL_INHERIT 24 /* Inherit sve_vl_onexec across exec */ +#define TIF_32BIT_AARCH64 25 /* 32 bit process on AArch64(ILP32) */ #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) @@ -108,6 +109,7 @@ void arch_release_task_struct(struct task_struct *tsk); #define _TIF_FSCHECK (1 << TIF_FSCHECK) #define _TIF_32BIT (1 << TIF_32BIT) #define _TIF_SVE (1 << TIF_SVE) +#define _TIF_32BIT_AARCH64 (1 << TIF_32BIT_AARCH64) #define _TIF_WORK_MASK (_TIF_NEED_RESCHED | _TIF_SIGPENDING | \ _TIF_NOTIFY_RESUME | _TIF_FOREIGN_FPSTATE | \ -- 2.17.0