From patchwork Thu Apr 30 17:42:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 38888 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4FCE8396E468; Thu, 30 Apr 2020 17:43:14 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70059.outbound.protection.outlook.com [40.107.7.59]) by sourceware.org (Postfix) with ESMTPS id B3082396D838 for ; Thu, 30 Apr 2020 17:43:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B3082396D838 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Szabolcs.Nagy@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y9+VXiMU6DcRnWwaex86XBWDhrgkY11WqtnJjadsTkQ=; b=g7cC6frs0rFeirhj5mFPDo+vq4Tx14SHHX+ltU8lHjMVXZ8/u0WEzo/Zvo9izmDVKb9hXtZUBb7ndsXa9y5D5CngfUY8OAJTzGINQvIxzyWwS0L1RP1Nq1M+kVsImfr0NatTC4F2VZPUJ3VN6W9WF/87ILp+y2u7/oJOnQwaUK0= Received: from AM5PR0701CA0054.eurprd07.prod.outlook.com (2603:10a6:203:2::16) by AM5PR0801MB1923.eurprd08.prod.outlook.com (2603:10a6:203:4c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Thu, 30 Apr 2020 17:42:59 +0000 Received: from AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:2:cafe::23) by AM5PR0701CA0054.outlook.office365.com (2603:10a6:203:2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.11 via Frontend Transport; Thu, 30 Apr 2020 17:42:59 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT037.mail.protection.outlook.com (10.152.17.241) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Thu, 30 Apr 2020 17:42:58 +0000 Received: ("Tessian outbound 4cdf5642225a:v54"); Thu, 30 Apr 2020 17:42:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ce49f0fe58083f1f X-CR-MTA-TID: 64aa7808 Received: from 5aa76c5a1944.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 09F8248D-504B-4573-B03B-3C84A5FB2914.1; Thu, 30 Apr 2020 17:42:53 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5aa76c5a1944.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 30 Apr 2020 17:42:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hG2S/qRoD42VPxLe1S6s05cTHmn0FG6sdeO5l2FIXe4KS9X697IqrvOxs48jCxxay82FQ1lvdjqMPZbn6QGcEO9kiFjJPAzq4hB/x4ZgfKs8jpWDRX4d7XwT1+WAuMVhocwlbssXnbFU9PHGpcJ7rY8+K0hJJM1PVeW1ujmmzQW7jC/AGu4ItnNp/LrhwMa66Dw6iXCTVmxSfV/um9aS83IrPpcE8YNquWurY8hvEirBp1aBWWO+EhpKiheRnNurYFtWeGkv1CUidRNbJ8lZTrBGrwP6EGVuzhLFFMkFnmvKNVbZALMH7uYYBfw3c9JDEGBgphL6l0bt0ldVYTDapQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y9+VXiMU6DcRnWwaex86XBWDhrgkY11WqtnJjadsTkQ=; b=niTlYMhOKeOqLf+qC94CPYEtI2PiQ/LKGIsmE7DpqWYDsKm9d8qfV9mHsYna5JG4Jt4W/9nnPLEbM1OVt7QBFV4KqvH1QuQ5HieMpRTBR5m7A30ysWcOeMwZDuVLQsy12NnFrEYWKhrYFWp2j6Lwxzc9jkOFjt8YuA2nU96x9+H+jZ3ym988ByI+KV+kWAHYCdi06OAwfeq0pYwbZKoLMv0VoUqQCFvq+iYuykF3BuhKIxPsUgxAWPqM3jQ7rKpkxso7G1W/ddrl7Y72Qu04TVbdBYb5AkNHku9nOl3UFYrJCANiJVU0AQo4uHiXOa5k5TS/6GEUKZVRzDtIUn5jFA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=y9+VXiMU6DcRnWwaex86XBWDhrgkY11WqtnJjadsTkQ=; b=g7cC6frs0rFeirhj5mFPDo+vq4Tx14SHHX+ltU8lHjMVXZ8/u0WEzo/Zvo9izmDVKb9hXtZUBb7ndsXa9y5D5CngfUY8OAJTzGINQvIxzyWwS0L1RP1Nq1M+kVsImfr0NatTC4F2VZPUJ3VN6W9WF/87ILp+y2u7/oJOnQwaUK0= Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM6PR08MB3224.eurprd08.prod.outlook.com (2603:10a6:209:47::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Thu, 30 Apr 2020 17:42:52 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862%7]) with mapi id 15.20.2958.020; Thu, 30 Apr 2020 17:42:52 +0000 Date: Thu, 30 Apr 2020 18:42:50 +0100 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH 07/12] aarch64: fix syscalls for BTI Message-ID: <20200430174250.GC29015@arm.com> References: <20200430173458.GV29015@arm.com> In-Reply-To: <20200430173458.GV29015@arm.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-ClientProxiedBy: LO2P265CA0029.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::17) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from arm.com (217.140.106.55) by LO2P265CA0029.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Thu, 30 Apr 2020 17:42:51 +0000 X-Originating-IP: [217.140.106.55] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 37245255-213a-4caa-ae72-08d7ed2dec2e X-MS-TrafficTypeDiagnostic: AM6PR08MB3224:|AM6PR08MB3224:|AM5PR0801MB1923: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7219;OLM:7219; X-Forefront-PRVS: 0389EDA07F X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Cj+pu+KUg83q1A2uyVqrrW2RUSUP7xoaidUBYljvRnRtpX/vZYt8bJK7nmZv5u7L0cNqeevjcYuLOJTQmlIcbgdciV72Yw0uCLV0EgUYsSRjozKbo9jwUqcrcTCRRl1693R/SJ4fctf0J+Hg+W/sU2ttUT+MpIbepUqRdpijFQNoYy6FgTAZNHFP9SEgb75Qiw1s4xO3TWhtkGy2mYRWpYYgb2l94lBtnBxSKoruHtav3nkZrWKVVRLmLx7/xqRvSC9MRVr7MyarOJ+DLpm1kj8ddS7gU/Z7x7wlagyKznljNr2C0i/+nbYFmgd4x1gjAwdahnKm9U9bMdGtXtTyJVPGwDNhTAb74pz89VabVJaOjE1sUQWRd1xBcp0Q9aOh X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR08MB3047.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(376002)(366004)(396003)(136003)(39860400002)(1076003)(86362001)(33656002)(36756003)(66946007)(235185007)(66476007)(8886007)(55016002)(66556008)(66616009)(564344004)(478600001)(16526019)(26005)(186003)(52116002)(6916009)(44832011)(7696005)(33964004)(2906002)(4326008)(8676002)(8936002)(44144004)(956004)(2616005)(316002)(2700100001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: X7tzAyCvDEmQYou571IlONCg8oQnVuoa+E5uhFfEejMSTCEIlg7fO/YrnGMisfoEnQofz7MK/oj/NfQK/tUVawX/SGsh4WhTA46NdpTn+4b6rrtj0D9bv0yiYS1zOLYVuf/ZiDhkFWP871VM/Zev/KpeEyE5ElkB6KnLYkdGtIQvfMHiL88NiOI+qVIAgzbFFzs9ho7vUcY3gdUjgMZyH8O5DpnPtbVie6DR0+P7Ard+azcDz3YpIOwsr6l2WkCAfft4Vi4q1KdQwyaYM12KdfbAxlHdITviD7gn4lacHRd2d15QLFx5gTX5dOA+4i3dWoWMqFgkfV+lZ1hvBd5iM42ocsxDRDd7klfGI58h/nQtraxRsi0GgTQVRgvAwDaftert3W17dJUre5NXaG6tHQ3aCc8Bq8q6/ldZpCSaOuZOi1laxrSlA7p9+fx2DiUNGH7nferA3cVvXQwbZ2SjPVYWhpZkKFpjxCojVGgbY8kJiBNGGOlrmg5aOn1KD6wQ49NZXf9E7MG39VoI6p5nFq0G32hzWRmZTz/XwBh8i5g7OuA/I3amsv9tcYmvE91s0w4e4moB/uIn7SC2NdlSsM+wrbCwcp9zXn1DsSUlqDAojM1FH+7o72WeEsC/04h+reZrmHFcKBAEHG9lH/yB02tpe6iW/EggYM2YKseDKVVT0u2o8du8/7uZuGKJde6im2zLofbFJ2VIBfbhoYoehhAzan0z6DhUYIuBQOamB/p9a9Ls6zTILXL/SoYq9+slvHznWw0WF7dxh9vZubRv3cJGBJ/DZRf9dg9uHlWKUtU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3224 Original-Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT037.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFTY:; SFS:(4636009)(39860400002)(396003)(376002)(136003)(346002)(46966005)(1076003)(44144004)(2906002)(235185007)(33964004)(26005)(4326008)(6916009)(36906005)(70586007)(186003)(316002)(47076004)(7696005)(8936002)(66616009)(82310400002)(16526019)(8676002)(36756003)(70206006)(564344004)(44832011)(2616005)(956004)(55016002)(81166007)(33656002)(478600001)(82740400003)(86362001)(356005)(336012)(8886007)(2700100001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: c64d2b54-484b-40d5-148a-08d7ed2de80c X-Forefront-PRVS: 0389EDA07F X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zfBs71w39SXBjY7Y1NVPl7ftMfdsBz9A1iDdLUyYGuRgtbzLaVqc/D1U5k/SqXul134iKDqBuEDa+4+bW+l36wVk878IMn8lQaD9PS0np+AAy9wX8ZCuEl+sv3LCHAmpvoi25lG1VZOcj7l4lG8THomlHFU4Hv+LNHSUFFosRaxfHK6Zj7Dp+ObBFDDDyP5ujPpyK7pnpIgm1h7ZRImxFBagzEo1v57IKLK1qK5GaVvOLqWnPmOJMDD8PFQIT3wT5tMQQPXg5MXAzBZdnE92jKFlaOFUrY2GN7oBScWfuVk6zek9Y04TD9D/aVkM3jORuccQlVPQ3PSpXY/rwndu/gCtxM2aJmbIuiqVw1PpF4PjpXBRF8H0+luKOsURYkLmghDHb/tF3Gy8Carzs8yab1KloawFWagjeskj0++bsaM= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2020 17:42:58.7438 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37245255-213a-4caa-ae72-08d7ed2dec2e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1923 X-Spam-Status: No, score=-28.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Disposition: attachment; filename="0007-aarch64-fix-syscalls-for-BTI.patch" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sudakshina Das Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" From 10741a1943239f0b22c8dd3f7df93aa338ec003f Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 1 Apr 2020 15:27:12 +0100 Subject: [PATCH 07/12] aarch64: fix syscalls for BTI Syscall asm code needs an ELF property marking for BTI when glibc is built with BTI support so we add AArch64 variants of syscall-template.S and umount2.S. --- .../sysv/linux/aarch64/syscall-template.S | 20 +++++++++++++++ sysdeps/unix/sysv/linux/aarch64/umount2.S | 25 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/aarch64/syscall-template.S create mode 100644 sysdeps/unix/sysv/linux/aarch64/umount2.S diff --git a/sysdeps/unix/sysv/linux/aarch64/syscall-template.S b/sysdeps/unix/sysv/linux/aarch64/syscall-template.S new file mode 100644 index 0000000000..50db585289 --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/syscall-template.S @@ -0,0 +1,20 @@ +/* Assembly code template for system call stubs. + Copyright (C) 2020 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +END_FILE diff --git a/sysdeps/unix/sysv/linux/aarch64/umount2.S b/sysdeps/unix/sysv/linux/aarch64/umount2.S new file mode 100644 index 0000000000..4fe26c35e2 --- /dev/null +++ b/sysdeps/unix/sysv/linux/aarch64/umount2.S @@ -0,0 +1,25 @@ +/* umount system call with two parameters. + Copyright (C) 2020 Free Software Foundation, Inc. + + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#include +PSEUDO (__umount2, umount2, 2) + ret +PSEUDO_END(__umount2) +weak_alias (__umount2, umount2) +END_FILE -- 2.17.1