From patchwork Wed May 16 08:18:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Norov X-Patchwork-Id: 10403045 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 A3F5D601F9 for ; Wed, 16 May 2018 08:32:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9355028807 for ; Wed, 16 May 2018 08:32:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 878B62880D; Wed, 16 May 2018 08:32:40 +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 0AC7428807 for ; Wed, 16 May 2018 08:32:40 +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=79URHeaU7pkpxcNOqaWG5sDO+Tbg2qWDyj1zZ1+dkJ0=; b=NNKWJYHVDHQ9jd M0FBBUppkjm1EMH49DqCcawUJfK1D1npsQMepo9Oa9v8iN5zvOvNJSSP/Ak0OnU6O+TYOTAD1ujqz 1WgOljhM5zrk+BhtP5oyTj6eJLpx2zk6z6SqLf2BqONDXCE+U64E+sl6ByKvWktkHQQB/kEZ7JzAK 5f4N3LsRyOGPV+VLsdj1CND8jplg6sD8p/T7ynNkjF0zA4KqgWoNdesm6K9HJ7p9MskV+qi4YxQLm MYdpdN/IJRtMlKoShf4JES4AMOt3pbQnmhNM2EdYML64QRuRVG1Gg1d78zKFGLqAegcvjXgaCWA/b l5BhvkFWexS7AF+QCNgQ==; 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 1fIrrL-0003uM-U6; Wed, 16 May 2018 08:32:31 +0000 Received: from mail-sn1nam02on061e.outbound.protection.outlook.com ([2a01:111:f400:fe44::61e] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIrhC-0004Za-2R for linux-arm-kernel@lists.infradead.org; Wed, 16 May 2018 08:22:32 +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=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 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 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+OMSOLoxl1ZMQC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AC4Qt7zzHFcx83t21wuF2jekMhZzZxglWGpe62hGOnbnvPgLGOs4OO7+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+Xf4dhYq4IaoYbq/p2Pugee+Yt6?= =?us-ascii?Q?PtWR2KE26lv5dNqEJNrWaM+OlwkrLbf4TRqsyQlLO4gOUh6tSmG8Wgj8p8oW?= =?us-ascii?Q?xm8oo0loyACvg5PmRmu4jtnOUsvRqh0P+eiq0A9R8Bal+MERjEmKqlWiNyzk?= =?us-ascii?Q?FtW6DZ0SByVp2tOi6Dnv2c2IupE7vH/gfpEKiBR8va01KtBkEp8B/dhec1FW?= =?us-ascii?Q?J44E+Hn5pJims2ugCOa5/P1iKl6CPrieEKyC5YcA7JG2r+yJEFJWv8tfoSXK?= =?us-ascii?Q?0RHbRDv9CbqYbgJcX9WbITtU0LoAx2Zkw274rCmJ5JQXz1MSy+Q93ENPNkW0?= =?us-ascii?Q?DQyygQqeB/0SdDtH8L1aIS/jc8v4jaZ9gN9I7oGFjIOhpYJiNf98DFmhvUSG?= =?us-ascii?Q?OKCBR672EBLeVkuq6n1ApEc6C/nXn/k4YOZ6WlO+S8UhuE37205K3ABYr55D?= =?us-ascii?Q?rVpEtu3FuURbUadzW+oDNSZNj2FyS45RQWkrdQu8q71ZAlZ07zB6TB78+YwZ?= =?us-ascii?Q?dmJKan8+fu82A92HERenRX50qxAEkScie8wg9mMzomBccrf/zFnW9d4f2YmO?= =?us-ascii?Q?lJMNhXaFtBir74RyhEZ+X+a0337Zel5vlG9GZrJ7PRgf4KmWffNOYe30Vvml?= =?us-ascii?Q?MdiqYLzUM7HKer6Ed4+eluNKhJfKvO4QAeSxOEmcWrMrIjCnn64vJpZ67xkG?= =?us-ascii?Q?2pujEqY557Mjqj7tmKWRZAoGbZsTdJXhKJtHD/wkE7kvvdabsA/tV55Jq4RA?= =?us-ascii?Q?SGJcIJZ42C2TFJCRUZsHCZL6X75djLTSS8BqGXc1vPr5BrjbpJ4qDO8e/WgK?= =?us-ascii?Q?IEmeTmzVnjxuqo8UjxOt1nzHrZIcvdw8z3zS6tC6Vk3/A2QICXQjD7NEBr8q?= =?us-ascii?Q?wWMQLTWcx+gQPIRwnNPhpU/15YdnzAl+tLbcyQAbESJn+HcfFB9/rRxTAAZe?= =?us-ascii?Q?L+vDozK0DMXVrbtbhqSNzvmcuOo7Tt7LfA1zwkIonJs4U1R9VX8PU61ljd/Z?= =?us-ascii?Q?qB5Z9GfQkEUmmHseXflGdUU7Rl/NEn4nlhhdjgfSnGfMlesQZaLcMwVLc4rU?= =?us-ascii?Q?gPwmdFURrf0zFU0NvdFDvgpWRxUX9TFyOhLqZp45fKDIsa+?= X-Microsoft-Antispam-Message-Info: ZAJTm+Lc/CKHmqcHhemNxj5RCL0vpbZJ34EMj0hAUDv05WZwxpxkACcwmJV+TuNrCGEZ7KqUYAxAhJAP80FOMa4OTcZHuBCcCaQxzFxPRcs1xu+OUM6ML4VVSkis8xxpJh0XF36ftVKZ1t1vt/T5MOQp9Im3NzHBLjggxLMcQZ3oJDRGozjgktrYIwZliedr X-Microsoft-Exchange-Diagnostics: 1; SN6PR07MB4383; 6:c1vVhqWF4t2fwma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HH0kJ 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180516_012202_275307_98C6DC23 X-CRM114-Status: GOOD ( 10.55 ) 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 , Andrew Pinski , 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 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 | \