From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2048.outbound.protection.outlook.com [40.107.247.48]) by sourceware.org (Postfix) with ESMTPS id A0BF83858D1E for ; Wed, 21 Dec 2022 11:03:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0BF83858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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=aWYvw5TxqWRK7jfWXeoIJ6nTMOpS8HzKGSClQd7iBac=; b=6zHFJxoG5dULBxT7TqDf67Lae8l9FElFDdNeWeJmdpOrcfwcekJSxIu5NpgjLw0EeX9RzbG6OjZBzE+K1FRh9Win42uqzEqQGBfpjfLN8+yTGbPEQJC/qIM9qWLfeth3TKQS6imzXQvJXl1tID3j1J5aGxlFSJKjg8wc0cUdDm8= Received: from AS9PR06CA0714.eurprd06.prod.outlook.com (2603:10a6:20b:49f::21) by DU2PR08MB10085.eurprd08.prod.outlook.com (2603:10a6:10:496::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.6; Wed, 21 Dec 2022 11:03:53 +0000 Received: from VI1EUR03FT041.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:49f:cafe::7f) by AS9PR06CA0714.outlook.office365.com (2603:10a6:20b:49f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.21 via Frontend Transport; Wed, 21 Dec 2022 11:03:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass 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; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VI1EUR03FT041.mail.protection.outlook.com (100.127.145.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.10 via Frontend Transport; Wed, 21 Dec 2022 11:03:52 +0000 Received: ("Tessian outbound b1d3ffe56e73:v132"); Wed, 21 Dec 2022 11:03:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: d4c6b5c77babdfbe X-CR-MTA-TID: 64aa7808 Received: from 5623eed11ebd.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8D08AFDA-5FD3-4009-99B9-DB5C6DC4C30E.1; Wed, 21 Dec 2022 11:03:45 +0000 Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5623eed11ebd.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 21 Dec 2022 11:03:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kSkDfPlbPEFPzxXQrHZBMMPD25OniNuSJkOFf33IJS9l+RM0j6wStp5fRdPCaAZbub1S7r5bHll/1uZ0if65lcEwo7vbFBKeY5GtlXer+sOM03ys9sEs8b5ozNGGFn5ii7lBL+RTMGRvxlouePzqGGqM+CzItS4HAFjoJPzcaZJ7/i06+uuohFiy1lyErcXy7w6+NpVSaBXpwNLMD9fZetuWJtczcS23o872SxoFkFvB6SMnlRd8QwknFHpXJpdbZoEjzoOrZHTd9rRRqXd5vfuieygQHArdeufgWQo9GVEu3vZ20e7lf0CrrKPQqg/0lQn9NG6ss1YTi/6RizXocQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aWYvw5TxqWRK7jfWXeoIJ6nTMOpS8HzKGSClQd7iBac=; b=b9RXl5bCqS+mtn7ulS+X1Yck+bQ4LvOj6X1E5WOtcIIHFKO9rmn5tXBRy2ldaQjVqTld14+fL2H7cYIEOCrn/hvC/o1bU6Fqsxbau8QJACWg7gunF8WQ355MB7RJiPlaZxPfYbv1nD05ySsFKcWPkLV2CXjS72UYigkLCqY66ClJiuazVwNniw6Wwm4X/3ZSpshaK8fleVgDEWrqXXlmUwWmpcVxer+XmGUsWxBMwNicwJn+P8Jvrf4r/Zg1ceRnrVGSuQZlHYEo7EEhvNMmN/32tyeL93MqFahya/AQPNJ0rUMGisnxmNWTFhwXDCf9CI0AWdMW9jvyrzNJ4KOl7A== 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=aWYvw5TxqWRK7jfWXeoIJ6nTMOpS8HzKGSClQd7iBac=; b=6zHFJxoG5dULBxT7TqDf67Lae8l9FElFDdNeWeJmdpOrcfwcekJSxIu5NpgjLw0EeX9RzbG6OjZBzE+K1FRh9Win42uqzEqQGBfpjfLN8+yTGbPEQJC/qIM9qWLfeth3TKQS6imzXQvJXl1tID3j1J5aGxlFSJKjg8wc0cUdDm8= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AM9PR08MB5986.eurprd08.prod.outlook.com (2603:10a6:20b:281::24) by AS8PR08MB8633.eurprd08.prod.outlook.com (2603:10a6:20b:565::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.6; Wed, 21 Dec 2022 11:03:42 +0000 Received: from AM9PR08MB5986.eurprd08.prod.outlook.com ([fe80::a306:b2ae:dec5:960b]) by AM9PR08MB5986.eurprd08.prod.outlook.com ([fe80::a306:b2ae:dec5:960b%4]) with mapi id 15.20.5944.005; Wed, 21 Dec 2022 11:03:42 +0000 Message-ID: Date: Wed, 21 Dec 2022 11:03:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 From: Victor Do Nascimento Subject: [PATCH v5 0/8] Implement assembly cortex-M PACBTI functionality Reply-To: Victor Do Nascimento References: <> Content-Language: en-US To: newlib@sourceware.org Cc: Richard Earnshaw In-Reply-To: <> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0162.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::23) To AM9PR08MB5986.eurprd08.prod.outlook.com (2603:10a6:20b:281::24) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AM9PR08MB5986:EE_|AS8PR08MB8633:EE_|VI1EUR03FT041:EE_|DU2PR08MB10085:EE_ X-MS-Office365-Filtering-Correlation-Id: c042051b-8293-4ea1-a564-08dae3430c0d x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wszcG8ZZPnoLZWEnV3GfP2l6M9aG2Rf8veZrCQDDs29JMM0q0VIv5jJkYD1igC9+8QBOrWLhVhclx02A2nWkltFfbpeyjTPUEGjQyo8I0/v1lvmk5JK2s87SqNcyVF+HhR1xYn5cjML67Cq/Wgaa44I9LpI1pQk04IbBem7oEmbopcjAgYXirtRv/Jh4HHktdfWmMk0offQfsMkW+lQPBuq1nVXRIhub0vXDit9FKJnIUoGUREOIB1IUSPM4lQzf/PryNlUsKAW6mJWZSkcfC780PxyN0KodJg526PsVyVu0zYjf6pftWv/54f9cWjsZ3Wc2jhC3XUn23st0E+TUL42GP4nDUea2cmrwewKrY52WVujARGaHQ7/kXa7daUVmZT+XHsQAtD+YptJ5DujlZ/GrQmL4TLbieJ2Cacfakgn2E/pI3xd/MIhnasFcYaUOooKRcBjFtlMcm9l7yLdzQperNYx3cY9d3+DqKtZm+ojoxDIBHHxd9Tes3CxEPgn34/fEf70lNJwrdFv3BFZHveXqSZphh1Cb32WWztBluvTpXmRCyDzoN8sg1pm4dcrUkW4WwLkmk7n2S9/NEfEByr5wBOjQqU9XZQ+qZl5zQLcriV5uGKQDvqEfql1FgdZmJSdF0x+mLrI7+YUboFEQgkGf/6wJMPEYm65qj1suvd2W95kAFRiUCJQoxdeORZFOLiMa9lNnrMTXy0B3H60Z91e4X60vxAnq8LmOaHQA+ac8qHAWQNwahqeuTtKgGat5peFTOJHgCrkuH0N+Ljvff1yJap9nFg/bfmX3YGB1TMo= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR08MB5986.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(136003)(366004)(376002)(396003)(346002)(451199015)(66556008)(6916009)(31696002)(3450700001)(38100700002)(86362001)(5660300002)(83380400001)(8936002)(66946007)(41300700001)(4326008)(8676002)(186003)(2906002)(6512007)(6506007)(19627235002)(6486002)(26005)(316002)(2616005)(66476007)(478600001)(31686004)(36756003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB8633 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VI1EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 9525cca9-e1f5-4149-2e9e-08dae34305ad X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CWtXepyd3jReIJaJdZMq679uMvZ8u40cSwIdLHSDzxAkPNjLfApfgosBWIF8fLkQx3AIu/y25QBFjO4yI04PU+GVlxt6pUmRoyu3quuTTfC3uwVYUFftXR/rtIwH7cUiVyCHdVD5OkmAp8y0cfjiwuc2aCeWBfQoR56Dxtd3PzMBVpHCdkKjAilLohLZnxpDPvQkT2ZVrERO3cB6bRqablsBYBdD6BJcEqq/DQrjDNxoPYT5guWQnclsCrEh+72yb77stCmmD/EUaDzPqcAMiThmVNzfMWJDSoRqLavldZJI5QZ5VXZvtnDXYLGFXAfjVBUskdM1GW2x38sr7gMI0j99tf/ZQoSJKWdWsygt31FuhTL8lbO5vWjaQAYsYvAUVD36390hT3yIg/vOg1M8TnNtMd8yCCqYvtVAOJdpkxvSfhs9nkMLSqMpTT2X9PFqApsJRLa4ygPLyvz9FaZVFqpVA022YgsTaGpYqyZRIi0OZaGt4UN2hjKYdx3iKB3vPsp0NjGFr0iPhdMHJF3JetQs6Z8zuHk9h6kYp7Db7u/JLCzX+VvtexSekcBy30g1zoQHaCna/QH72bkGWPa7gwdoJgE30LUNgwzeWu7caRqfsA9K4TUAnOUmHVGNuuyKyo/3tB+NfMF7MUDUEbdVcglhbrKLjOlXNZGK3CoVaRhvZWIQcXoG3hhSpGIuqpU86WwREgOdCFCNVowM2ouMJcIpf4ZO7zAp//7OmUNusnZc22gZyE7nL2ArKKKzzO9vfNrX8t3nuVhOzdfWb2Ao7sR8OVKurrLxaxB6K5Yxszjqp50OvpQoKrtdhfg2JigX 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;SFS:(13230022)(4636009)(396003)(346002)(136003)(376002)(39860400002)(451199015)(36840700001)(46966006)(40470700004)(336012)(8936002)(6512007)(6916009)(40460700003)(186003)(47076005)(36756003)(2616005)(4326008)(41300700001)(70586007)(70206006)(19627235002)(316002)(8676002)(36860700001)(86362001)(82310400005)(31696002)(356005)(81166007)(82740400003)(5660300002)(83380400001)(40480700001)(3450700001)(6486002)(478600001)(2906002)(6506007)(31686004)(26005)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2022 11:03:52.9787 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c042051b-8293-4ea1-a564-08dae3430c0d 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-AuthSource: VI1EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR08MB10085 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,FORGED_SPF_HELO,KAM_DMARC_NONE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,TXREP,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi all, This respin of the patch series adds the final modifications required to patches in response to upstream comments and rebases work on the setjmp and longjmp routines onto the fixed arm abi. Tweaks necessary for correct cfi information generation made to: * newlib/libc/machine/arm/strcmp-armv7.S * newlib/libc/machine/arm/memchr.S Stray comment restored in: * newlib/libc/machine/arm/memcpy-armv7m.S Patch rebased, cleaned up and missing BTI landing pad added: * newlib/libc/machine/arm/setjmp.S All remaining patches in series remain as in previous iterations. Thanks, Victor ------ This patch series modifies hand-written assembly files for Arm targets, introducing a uniform prologue/epilogue interface, responsible for pushing/popping registers on function entry and exit, while conditionally enabling branch target identification as well as address return signature and verification based on Armv8.1-M Pointer Authentication [1] using ACLE feature test macros at compile-time [2]. The incorportaion of PACBTI functionality in function prologues/ epilogues is dictated by the combination of parameter macros in arm-asm.h and arguments passed to the `-mbranch-protection' flag at the time of Newlib compilation. Regression tested on arm-none-eabi with and without MVE extension and for Newlib and Newlib-nano. [1] [2] Victor Do Nascimento (8): newlib: libc: define M-profile PACBTI-enablement macros newlib: libc: strcmp M-profile PACBTI-enablement newlib: libc: strlen M-profile PACBTI-enablement newlib: libc: memchr M-profile PACBTI-enablement newlib: libc: memcpy M-profile PACBTI-enablement newlib: libc: aeabi_memmove M-profile PACBTI-enablement newlib: libc: aeabi_memset M-profile PACBTI-enablement newlib: libc: setjmp M-profile PACBTI-enablement .../libc/machine/arm/aeabi_memmove-thumb2.S | 17 +- newlib/libc/machine/arm/aeabi_memset-thumb2.S | 14 +- newlib/libc/machine/arm/arm_asm.h | 441 ++++++++++++++++++ newlib/libc/machine/arm/memchr.S | 50 +- newlib/libc/machine/arm/memcpy-armv7m.S | 33 +- newlib/libc/machine/arm/setjmp.S | 39 ++ newlib/libc/machine/arm/strcmp-arm-tiny.S | 8 +- newlib/libc/machine/arm/strcmp-armv7.S | 57 ++- newlib/libc/machine/arm/strcmp-armv7m.S | 26 +- newlib/libc/machine/arm/strlen-armv7.S | 17 +- newlib/libc/machine/arm/strlen-thumb2-Os.S | 14 +- 11 files changed, 656 insertions(+), 60 deletions(-) -- 2.36.1