From patchwork Wed Jul 8 16:26:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1325304 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=bYT7t/UH; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=bYT7t/UH; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B24Sk30jtz9sRK for ; Thu, 9 Jul 2020 02:26:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 25107384B106; Wed, 8 Jul 2020 16:26:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2052.outbound.protection.outlook.com [40.107.20.52]) by sourceware.org (Postfix) with ESMTPS id 56ACD3861969 for ; Wed, 8 Jul 2020 16:26:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 56ACD3861969 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=93ArmAjUR/ujchmNoidZzIWNIEHPqraem53xjIXDLuA=; b=bYT7t/UHqRR09doCl4mjPnTWVwD3hxTOvguCyZMAR1PliDsa6cjhl2CW9yACSU4BrlnkgaNGM6QHpoZhihKmovO/TMMfy04NRpeugCHEuzzd0uO0DNQ90+YsZF09QoWyXApIloDqkcJ3X9iGQBFx9ZkvAaApEnoIgRsE2qrhSrw= Received: from AM6P191CA0101.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8a::42) by AM0PR08MB3667.eurprd08.prod.outlook.com (2603:10a6:208:d5::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Wed, 8 Jul 2020 16:26:40 +0000 Received: from VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8a:cafe::7) by AM6P191CA0101.outlook.office365.com (2603:10a6:209:8a::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:26:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.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 VE1EUR03FT037.mail.protection.outlook.com (10.152.19.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:26:40 +0000 Received: ("Tessian outbound c4059ed8d7bf:v62"); Wed, 08 Jul 2020 16:26:40 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 51ca218ee73730b1 X-CR-MTA-TID: 64aa7808 Received: from f8c1e4963718.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AD7C8846-E729-4DDA-8EFB-E972C137AA93.1; Wed, 08 Jul 2020 16:26:34 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f8c1e4963718.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 16:26:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WoXUSDkplRtsl/RuL+IY2Y3Dne0PlSAz2+xBfMLERVhFZ3gDJ/W4MQS9BtmLYWZmr3ZSBUz4mMztgTpQIx+D7qcQx9/LtLgXnsg2gotCcQLMZeC/8bGJrlUR6Hkr4oPhygm2WpsmZ+W1+LGHd/JbG9kPfHJFOtbcPYW3Ss1FZACjsXpebBU4hvgF+ooCjTkb3hBkQPPT4T17UHVIBkBaCFRVVen/zLw6Y96t9HKl3PTpM6JqvrsO4iATjkP81VcXnHpMYgmDo/IwENbfbpHU5cIiwRiT31TM591nYZhWTOaZw6SCGzrJEVyI7RLs3WA6T6/pZVaW/P2fV+fKTWM/6A== 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=93ArmAjUR/ujchmNoidZzIWNIEHPqraem53xjIXDLuA=; b=OkrUO0ex9MNcge6c27aji5EauHEaTXDHem5045VO6erC+fOoOQL1gZJvwZBYaUKUiaVEiYfNIzI4vgCjeD7zpb1nlup+vK1qRuOxQ3PMO1ziT9oE/6RTwNpqhhyrBwFtbSZ8tIUySt/7oYIRgxsdNXcL0inmyCWL/zqUcSzznfkFXA3Zw5J+dg89ZxFLE0Uq8om5L/KqEm9gvxQGnAbhtwM7qu7ki+T3p+0r6kOyq6CCogQgDNw0hF7lceP2xQtJc6tB7NU1//5WZHvFS/PvdkEP6LdA+PH4VEodEXiOhpm0ZcFMaPtq23KbYZ3y+m1l2pGYFd1OWQi3EWztOoDcUA== 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=93ArmAjUR/ujchmNoidZzIWNIEHPqraem53xjIXDLuA=; b=bYT7t/UHqRR09doCl4mjPnTWVwD3hxTOvguCyZMAR1PliDsa6cjhl2CW9yACSU4BrlnkgaNGM6QHpoZhihKmovO/TMMfy04NRpeugCHEuzzd0uO0DNQ90+YsZF09QoWyXApIloDqkcJ3X9iGQBFx9ZkvAaApEnoIgRsE2qrhSrw= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM5PR0802MB2499.eurprd08.prod.outlook.com (2603:10a6:203:a1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Wed, 8 Jul 2020 16:26:33 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3153.031; Wed, 8 Jul 2020 16:26:33 +0000 From: Szabolcs Nagy To: gcc-patches@gcc.gnu.org Subject: [PATCH 1/6] aarch64: Add missing ACLE support for BTI Date: Wed, 8 Jul 2020 17:26:27 +0100 Message-Id: <30d8962517ee26ca0f3bb78abe97a3009219b9fd.1594224951.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LNXP123CA0022.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::34) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.53) by LNXP123CA0022.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Wed, 8 Jul 2020 16:26:32 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 67083d8c-41cf-43d6-84a3-08d8235bb1b7 X-MS-TrafficTypeDiagnostic: AM5PR0802MB2499:|AM0PR08MB3667: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:2887;OLM:2887; X-Forefront-PRVS: 04583CED1A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: bHZH+SQj/N0uyCvlSOuzgV29Df/kHgYnU3K48tK2HAmm3Dte/bive9MfdxA/P5GPd33U1dYM6m8RkYMOsyzAweFP4lc6A899x1+T4LVEQFB/Y579LbHA6CtN/Qhe+3YgKIg6jsUX+ajqFXLmU8vtRVD0KXj9ugsq32bQYLMltOJHlRqljhjsZmKT1hDRgOduXHwxO4iehtlhqy8A+mpIp9tGCEbTDGYqLTXgtmenp+TZ3S4sJb9nY+xKR+mQMqoWyg3X6Oav9dtTraSeC8l5PXgSz/R0W4It/Fd+M/SRzIQKb6TTmGyoGGBGF8xd6mLxCUnxoVZ3sw1q+nHaijABbDTZN1yDXNx6LGVIb5dXVlsCgUeTz1xQLmFvBPbsfG/3+zclBb0CSR3xoK9IKkNO423nLLZNxwQKPImLaHUdS34= 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)(396003)(136003)(376002)(39860400002)(366004)(346002)(66946007)(316002)(36756003)(66476007)(66556008)(6486002)(6666004)(52116002)(5660300002)(86362001)(8936002)(186003)(26005)(2906002)(6916009)(4744005)(69590400007)(44832011)(478600001)(8676002)(4326008)(83380400001)(2616005)(16526019)(6506007)(6512007)(956004)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: YyhM4aB1KbxTDmTCwt/BdYLsWzyxMj0gLFmCkauVJOQvCTiiRRz3NX6Yjsq7G06dZmLYeeiIRzxc6j33K8XY98oBEKWweYrVcHHpeQJo6atszgyePQVT1QX43OUTq53B+ZAfwf+6PQgXJ1OW6xw+NZ3tezNS54t2O1mq+6nMbeh61ImLibTWsvSGZz8/rWhKe0REd9i9fLjuJy0xzuHFAqizjhpEPCl82zGkJ2NmcSLWcYcwnwNu23Z+6qB+QREVVZuwMz6S+LTCKS63v8TUY0ThSMru4R9x3ThGmgvCO+Hp/6xNMGj8yHZR8xwEt3bYcC0W32D+hDsqKvmtWN3ok5lnR95LNyPEG+Q1RLE9SSC6Qs9hSUAw9qmv/fWR1NUYOSrV8/3eXangY74mWwCqx3jBPA0nmHt5zgCiWmanvqFsXeh8Mr6mU7fhd/A7MQcN0Neu6eQiL49vjH0XB5ayp7Dr9w+y1fSjsU8JoMvTEeAYm7JtGCPmSOGxBZ9Lz/Lw X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2499 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT037.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)(46966005)(356005)(70206006)(81166007)(8676002)(82310400002)(5660300002)(36756003)(956004)(83380400001)(2906002)(44832011)(70586007)(2616005)(336012)(69590400007)(6916009)(6506007)(4744005)(498600001)(6512007)(36906005)(4326008)(86362001)(8936002)(26005)(6666004)(16526019)(186003)(47076004)(6486002)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 694338e7-eef0-41be-1cb3-08d8235bad5a X-Forefront-PRVS: 04583CED1A X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tphZ1xYL2iKClXuJbrbbXbFPOfRs3f6R8JqHlgODKcwynKGNMZ8ujcUcm9AEtmUkceIGzF4matMbr3OeTSw+ExD96v0ixl+Sv3LDCaUBiJXP2MGCpFBKCfpbjwVS6aCwyA6SDX3azofKwRTQ73c9wwiPNiw9Tot0MXo6nK7pL1rtI08IG+FZ7Ks3PfB38UrRGdJNvuFwkkcdg7wvk8+bIevDg0vHsNO2vl3nMT0ZCV+wxfhUqIsxDFSVJaP9/ugBAJV0hADsyfXdFy6HapSRtk2e3KHq0C3tUAcHZod/5PUyGExKZx+/tg9FMjN4gGlOF3w/3FSQCvGUz5YxzdU71FX91FVhWppTXBeZZLRYJKjGaDhNERc4OAvstvbsDB8lPVz0ITHEGF7IkKprexkrg9++5lbJnorBP5C2E5uhDqRLj76MSr/ebR2LnxG48MgROjcOLY1FcV4T3OREeERL8w== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 16:26:40.2346 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 67083d8c-41cf-43d6-84a3-08d8235bb1b7 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: VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3667 X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.earnshaw@arm.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Define the __ARM_FEATURE_BTI_DEFAULT feature test macro when BTI branch protection is enabled. gcc/ChangeLog: 2020-07-08 Szabolcs Nagy * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add __ARM_FEATURE_BTI_DEFAULT support. --- gcc/config/aarch64/aarch64-c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/config/aarch64/aarch64-c.c b/gcc/config/aarch64/aarch64-c.c index e1c1cd415dc..1882288af8d 100644 --- a/gcc/config/aarch64/aarch64-c.c +++ b/gcc/config/aarch64/aarch64-c.c @@ -178,6 +178,9 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) aarch64_def_or_undef (TARGET_RNG, "__ARM_FEATURE_RNG", pfile); aarch64_def_or_undef (TARGET_MEMTAG, "__ARM_FEATURE_MEMORY_TAGGING", pfile); + aarch64_def_or_undef (aarch64_bti_enabled (), + "__ARM_FEATURE_BTI_DEFAULT", pfile); + aarch64_def_or_undef (TARGET_I8MM, "__ARM_FEATURE_MATMUL_INT8", pfile); aarch64_def_or_undef (TARGET_BF16_SIMD, "__ARM_FEATURE_BF16_VECTOR_ARITHMETIC", pfile); From patchwork Wed Jul 8 16:26:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1325305 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=lN5S4Pbn; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=lN5S4Pbn; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B24T435ndz9sRK for ; Thu, 9 Jul 2020 02:27:04 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9761E386197F; Wed, 8 Jul 2020 16:27:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80083.outbound.protection.outlook.com [40.107.8.83]) by sourceware.org (Postfix) with ESMTPS id BFDBD3858D34 for ; Wed, 8 Jul 2020 16:26:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BFDBD3858D34 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=LKfg4+iYx+s6cBbtL/J3gpmlt6SAIqnls37D/MLYjz8=; b=lN5S4PbntOoo0o/pHw/LAUMQFzqAyvZnwqCs0XM27bQ0Y6iz+XDMVsWq39fCiGbsXdR80n2jT6T/UswTidb0kdMtgmprz6qudJvm3vfNq9CUj8wK70iVJngQAgQ0GVHtAde8xtWnI6Z8Z5Y3fyeWrmfPI0Om4eLfIhiYezUGXbQ= Received: from DB6PR0601CA0043.eurprd06.prod.outlook.com (2603:10a6:4:17::29) by VI1PR08MB2926.eurprd08.prod.outlook.com (2603:10a6:802:1f::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Wed, 8 Jul 2020 16:26:58 +0000 Received: from DB5EUR03FT030.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:17:cafe::13) by DB6PR0601CA0043.outlook.office365.com (2603:10a6:4:17::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:26:57 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.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 DB5EUR03FT030.mail.protection.outlook.com (10.152.20.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:26:57 +0000 Received: ("Tessian outbound 1dc58800d5dd:v62"); Wed, 08 Jul 2020 16:26:57 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a943c2cb9205ab75 X-CR-MTA-TID: 64aa7808 Received: from 9541accb91e9.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D2D3C464-07C3-4F18-B172-0BFA0F4D642F.1; Wed, 08 Jul 2020 16:26:52 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9541accb91e9.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 16:26:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QzSh4CS1nF2zGG0Wcp97PR2R/IjzAT0xclMpVV/oQPvyC+xnusTjhQgPj8wAd7Ry1LdaWVWYqfQ/EFQw26wkLhuYDJOBaF6s4UqCu+65kMpkXtLKLiu18ZraPyfVz4Tes5NsY2NuGqprsrk14cpkNrGvUIUViaKMJwI/1hLaV0eFbWk7la3L74v1kTfsbdhwJylM+yCPwrYOhBG0NNz614rRkbxU+P9BMbzmsL0VFs2LC2pz/CaFvAb+ba0DQqxfYXSynnNUQEqJjH22bpFw/U+5PBCv9pfh87AcEN09/zn+duu2UPdQPc58rmwnAJ0H1R8u+cAbXJD/MJIvfRixwg== 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=LKfg4+iYx+s6cBbtL/J3gpmlt6SAIqnls37D/MLYjz8=; b=NJsHJneju+3di5RU3MkIJXmtxucJ6mpr/TewixBz12KtR9I/95pFyfETPULrmURzFT92Sexm2XnRhjc6npz8Vtot4ebUIBpudBPzVkrDygz8+kBQ8JdO8r027kK1ekvKyiiPaOwYfqnu2/OlGzHMdHSFA8ey3YoKbBR+YJDQ1vxthon62s+8kJAEKP70tEVhXi2CDjikWGHpB3/uco2zKEADb08avty1XqZR+NkNPG3e71Ert62AFeHsUpADZUFmYSlIbBgzwrfneYZpNXqf1XMuvyGeecNMwB+T8ZTT/2qESC6Q3mzepFQnCh4v77SSrrCGVlTKv1IhnG2DMttrog== 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=LKfg4+iYx+s6cBbtL/J3gpmlt6SAIqnls37D/MLYjz8=; b=lN5S4PbntOoo0o/pHw/LAUMQFzqAyvZnwqCs0XM27bQ0Y6iz+XDMVsWq39fCiGbsXdR80n2jT6T/UswTidb0kdMtgmprz6qudJvm3vfNq9CUj8wK70iVJngQAgQ0GVHtAde8xtWnI6Z8Z5Y3fyeWrmfPI0Om4eLfIhiYezUGXbQ= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM5PR0802MB2499.eurprd08.prod.outlook.com (2603:10a6:203:a1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Wed, 8 Jul 2020 16:26:51 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3153.031; Wed, 8 Jul 2020 16:26:51 +0000 From: Szabolcs Nagy To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/6] aarch64: Add missing ACLE support for PAC-RET Date: Wed, 8 Jul 2020 17:26:45 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LO2P265CA0141.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::33) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.53) by LO2P265CA0141.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9f::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.24 via Frontend Transport; Wed, 8 Jul 2020 16:26:50 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3c9258b3-a323-46fd-cf73-08d8235bbc22 X-MS-TrafficTypeDiagnostic: AM5PR0802MB2499:|VI1PR08MB2926: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:5797;OLM:5797; X-Forefront-PRVS: 04583CED1A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 2l45Mas29qSviWrBwtGVhTLnkul6XeH9Retrb6w8B760khWk50dtmzufOed199xNq33220fjVYopQSrwkdd2aw2aRO718rMb4Zyk6fAkyN0xqZjBlhbuKbYt8PcWBdNjOqmiWURcjpkwN2PJlT7d2fOKEiLRCZHIITL/Rbjk/R8R7juUWmJvf9GL4kIqy5a8Eu3/3pnOM8iecSjiQ+UU58EpYgCO7M5FXz+3JevJ6iRkJwpULCstg3Oz9lbneHuL4gr7r1MhsZmHLJX6p3b1rudRsep47A1OEaC1wRYli37O6pm5160qPiPdRl9prk78+vlHRxxfohaslcwQsp4Xb60yLYkaRPXeEdisywPzkO7FMDx1sWoY8eCwuKS7CRIucGmP+lmlu0fkvf2lthOccRsFSpFCBbRt+quTAviI62U= 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)(396003)(136003)(376002)(39860400002)(366004)(346002)(66946007)(316002)(36756003)(66476007)(66556008)(6486002)(6666004)(52116002)(5660300002)(86362001)(8936002)(186003)(26005)(2906002)(6916009)(69590400007)(44832011)(478600001)(8676002)(4326008)(83380400001)(2616005)(16526019)(6506007)(6512007)(956004)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: PeZaRyd1CUDYL4Om+SB/V+WXgecWfIsYMHttTQoYmTisPrmeMf1KNiT5PRAjO/lw9zvWOJo/bXOnEXfI0w0433JRMDXVz0W+5otk3aHCyAjmIEmW/sc+81pexpXYCWGiq7BskCgsGv8xwAq7CnEGQXHdVxt5OrMNAzSk2fT4Bg3YzsoJpdiy2aKAMfubA85ohjl6/3usoQkAN70S/Wx/IK7lEJ3kJHEU+J6LZ4Bgikb+J7lDzCdWVmg0tAsPjBtmNZpj9JlnK9Y1qr5GTZM7V3+Y0R1Phu4Nyquz5NejMCt2z84ozI/MKwdeVIazAhUU5+T7k0dWw1topUxby85IlGxviBGINJdhnbb1dEn0r+btOV00mdLm6rYU4VrbiZN+wPtFb5tc8mWOmHCcV532P/5j7HadlY1LBHDZhpZeJQiaOJQpX/i0h0pcqZsIlSuybiL1jKUN4/8Fdnh2s2dtVm1SVrnlV1FCY+Xa0G3UEU3ee52T3l5IDQoZ8vZK7Y3s X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2499 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT030.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)(396003)(346002)(376002)(136003)(39860400002)(46966005)(6666004)(44832011)(4326008)(26005)(8936002)(6506007)(8676002)(83380400001)(956004)(2616005)(478600001)(86362001)(70206006)(6916009)(82310400002)(5660300002)(316002)(336012)(36756003)(70586007)(16526019)(69590400007)(186003)(356005)(6512007)(81166007)(47076004)(6486002)(82740400003)(2906002)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 4ef62755-194c-4ca0-b24b-08d8235bb7fa X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0gsEZYp0ONYfBOm5UW1WWMG1CeP8IC3l/hDlkHXawJyzITkYJSRjhiSItWSD7hdyry3BRrKrLXbMoPWORTKY607n620+brYPI+udqgvY9fU52AUhTXzvCjP5KmVv57Hqy93vcIiR88+0fPJqPBfFoJ5VgVbOTXH/2gYh1nrJmNgIpgjLCsC0TjifU50z4VSaz0u09Usz7DOv59OVkkyI/AO0B0dRrCj0GiffduvnkvjridFmhQdQTfl9vjl8oX1S/Mff9+mTuUumO75hj8yxOTdkWildA2Of1Eqg7ysmqdmUwhNSSN4Tk/R3f3v/YASmuVmzXm8xblSssKdLl5rhfj37nD6ehJ5hjo4H2UR+PFg5RPfof1nP22KxNE2nJGH7u5E6Gct/1MgaAwcRD7wfgjXK1edTnzWawSrgMkNkbeZjMx1ApnTkZpoJgUqJocsU3d/YMfwHZdPM0ikeDYbK+w== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 16:26:57.8239 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c9258b3-a323-46fd-cf73-08d8235bbc22 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: DB5EUR03FT030.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2926 X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.earnshaw@arm.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Define the __ARM_FEATURE_PAC_DEFAULT feature test macro when PAC-RET branch protection is enabled. gcc/ChangeLog: 2020-07-08 Szabolcs Nagy * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Add __ARM_FEATURE_PAC_DEFAULT support. --- Note: i expect to push this patch after the pac-ret __builtin_return_address and unwinder patches are resolved so we only advertise pac-ret support in a fixed gcc which makes it possible to configure test for __builtin_return_address behaviour. --- gcc/config/aarch64/aarch64-c.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gcc/config/aarch64/aarch64-c.c b/gcc/config/aarch64/aarch64-c.c index 1882288af8d..1a1f4ecef04 100644 --- a/gcc/config/aarch64/aarch64-c.c +++ b/gcc/config/aarch64/aarch64-c.c @@ -181,6 +181,19 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) aarch64_def_or_undef (aarch64_bti_enabled (), "__ARM_FEATURE_BTI_DEFAULT", pfile); + cpp_undef (pfile, "__ARM_FEATURE_PAC_DEFAULT"); + if (aarch64_ra_sign_scope != AARCH64_FUNCTION_NONE) + { + int v = 0; + if (aarch64_ra_sign_key == AARCH64_KEY_A) + v |= 1; + if (aarch64_ra_sign_key == AARCH64_KEY_B) + v |= 2; + if (aarch64_ra_sign_scope == AARCH64_FUNCTION_ALL) + v |= 4; + builtin_define_with_int_value ("__ARM_FEATURE_PAC_DEFAULT", v); + } + aarch64_def_or_undef (TARGET_I8MM, "__ARM_FEATURE_MATMUL_INT8", pfile); aarch64_def_or_undef (TARGET_BF16_SIMD, "__ARM_FEATURE_BF16_VECTOR_ARITHMETIC", pfile); From patchwork Wed Jul 8 16:27:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1325306 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=b8bLmAms; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=b8bLmAms; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B24TW3cWNz9sRK for ; Thu, 9 Jul 2020 02:27:27 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A14EE384A034; Wed, 8 Jul 2020 16:27:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70077.outbound.protection.outlook.com [40.107.7.77]) by sourceware.org (Postfix) with ESMTPS id A44AD384B009 for ; Wed, 8 Jul 2020 16:27:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A44AD384B009 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=KzJNrxRAA2FVrK7ERbzmZQbQbONNWohQkNKmqyS/26o=; b=b8bLmAmsgbMdVplZ0XghSxzQaOURgKJ6x/3bjSsj9SI7h1RMC5WiMozwyTL8miTxE9C2vj4jL82Go3fLKKKuu47NsuOz8mFn6PagGuVZqfYi9ZI6xMvBt8H9LP6gfdmq4VDvwR/H6F+xiHUMw3OETk8oGVan9zV75rK9cfW0Okw= Received: from AM6P191CA0080.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8a::21) by VI1PR08MB2816.eurprd08.prod.outlook.com (2603:10a6:802:1c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.22; Wed, 8 Jul 2020 16:27:16 +0000 Received: from VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8a:cafe::fa) by AM6P191CA0080.outlook.office365.com (2603:10a6:209:8a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20 via Frontend Transport; Wed, 8 Jul 2020 16:27:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.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 VE1EUR03FT037.mail.protection.outlook.com (10.152.19.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:27:16 +0000 Received: ("Tessian outbound c4059ed8d7bf:v62"); Wed, 08 Jul 2020 16:27:16 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f011ff3e412c3089 X-CR-MTA-TID: 64aa7808 Received: from c09ef32ade62.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id D81AF657-2103-4943-9350-100D57DB8DB2.1; Wed, 08 Jul 2020 16:27:11 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c09ef32ade62.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 16:27:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MHDwxxV37shuDhBNEl09fnZt7T/dPXyuvORoRXC1QmEADl8C4HCYKguFl/W22IRc05wri+92SLf0ImZF6gHK7L8TtbCHG4bS5Ml/Dnnnt2Vff1lURpFK+k63X2whWmReJaOEc7+BA5KB9fPQV2FVeHJd/UPHe7xRzQKYgeXbLye78SOAwS2vrhHRhsicIHLFVkrofLEbqW2Ll4h1Kx7ST9Kymv+c0GpLocp43h4l73ep5/IA9ISymUY73OOA0FfAOiDOjVvZRydUvZy8Jz9hZhe9H03J0tgsMtWnXpsQ0XoNfaqF+Dd1dM//m8KiO3J5PqRn3c5aX5v5CAhS+hQJ8A== 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=KzJNrxRAA2FVrK7ERbzmZQbQbONNWohQkNKmqyS/26o=; b=gMPtrsY3AWZIUl1/0yHxbgUuy1oWRr6FQ9Fc6AtLOcluv/ME08tblxzzTdAzGysFfptkE8qYL3OB6XnWBCZ51NWQ/ZM/WV04y4cXxqk5cIMyOfkHItxF+uS8CSG4hV1f0lISerEXaoiH3xvmY64rOn6m6rY3mO3rsop/lAZibbv6ThbEHBgns0b6GZbMtI4avHygXYRCpPoLORdwfTx/KT9HhP7NV4DWUybR3mmM7Tcq2jYQGCMBlLOFHghf1cRr3zqAGk/uf/0/bJ4mvSHz9Q2hsH0pkAV/0XWkLYyeEqiaJMdgZa7jtc+rhykyoPdjk6tipuaajoKlTrD9aOcVDA== 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=KzJNrxRAA2FVrK7ERbzmZQbQbONNWohQkNKmqyS/26o=; b=b8bLmAmsgbMdVplZ0XghSxzQaOURgKJ6x/3bjSsj9SI7h1RMC5WiMozwyTL8miTxE9C2vj4jL82Go3fLKKKuu47NsuOz8mFn6PagGuVZqfYi9ZI6xMvBt8H9LP6gfdmq4VDvwR/H6F+xiHUMw3OETk8oGVan9zV75rK9cfW0Okw= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM5PR0802MB2499.eurprd08.prod.outlook.com (2603:10a6:203:a1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Wed, 8 Jul 2020 16:27:09 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3153.031; Wed, 8 Jul 2020 16:27:09 +0000 From: Szabolcs Nagy To: gcc-patches@gcc.gnu.org Subject: [PATCH 3/6] aarch64: Fix noexecstack note in libitm Date: Wed, 8 Jul 2020 17:27:03 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LNXP123CA0017.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::29) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.53) by LNXP123CA0017.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:d2::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Wed, 8 Jul 2020 16:27:09 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ae0901bd-8a40-44f6-58f7-08d8235bc760 X-MS-TrafficTypeDiagnostic: AM5PR0802MB2499:|VI1PR08MB2816: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7691;OLM:7691; X-Forefront-PRVS: 04583CED1A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 1Gg4HnDHtdl5vuEcDN5gD3BLrSyb4mpheXzYAKRpl2ekNYCHqoatVEyy8c7vqhadZv6JlFVdCDqnEZc2DudTBP3Lf1ofG9SzMXD4JVN3TIOMUap5y/KhjxpbJSfUQa5vwgTyyFGprbqP69q49ip811bphw5TM54Kz8qt1sk8Vll38kZMH19nV5SJ97mB5CuxGbAZHxF10XFjLTA60fuUiv1CTNH7HCZzo6z/2iZCSIyYaWITGQGEdwjBVMjfd7OJcwpiwlnuFOOwG8pigj5R5I7fqnUn2motPOKpFhyanNDFP42LKVtK7mKQBzTZFt+E+35nMvhGtbMmJFoNd++2vReXu7IPAVw4629bWxX0yPJ20vyBdPIeNBmj3EMI5xZ7fcBfftWs8HYj4yVdj033bbtkeWnCbfQM92Oq1X2QIPw= 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)(366004)(66946007)(36756003)(66476007)(66556008)(6486002)(6666004)(52116002)(5660300002)(86362001)(8936002)(186003)(26005)(2906002)(6916009)(4744005)(69590400007)(44832011)(8676002)(4326008)(83380400001)(2616005)(16526019)(6506007)(6512007)(956004)(498600001)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: IvJBUJgKzMxaF32pMUAM6PYiZ6Phc8+lB5rywUnTnWEQEiHCWrjc5h8YqmoKEz0CfzoZ71mSZkAJkFSr6bYyHH408kY7n0YfvOP59Ds3mtvD70fqsnMa9lAlewSUC6f6GJ/3BKlmfhaKechdqe3BSoE6biZnNebuCggLF/jucXu76cXGfmok6HcgA5Z27RH3EUvAKY+xljBZ8k6FByIUxAX+lJe8eL9MPGB6qzzpiJADVQnQr7vwAH7SwenPxFP8+2aodWNzJHNPgMY/WKEn4oQpGPkyJWTbboIrndRuzkDVWdpCQz5S3BQF4yVh2RYNjpxuDBuLQKac+/EyGrd/GGEkoNKWPxNE9LDskJEXPHBGF2oDfSKWv0Y4jYuSO7HLOLH52xk95ha8ANoRljcccyAg3ve+j2/igRcgEfIY1zpslBZQ+DEBIxMuR/gm1slsx2QbUuXP/Ikpr/R1hhtdIR85P3RdhPcHNn9J6ikv45sJpXBOqAXMIFeQ6mfpNGQn X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2499 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT037.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)(6506007)(86362001)(4326008)(47076004)(5660300002)(69590400007)(316002)(8936002)(83380400001)(356005)(6512007)(82310400002)(36756003)(81166007)(4744005)(82740400003)(16526019)(186003)(8676002)(2906002)(478600001)(6666004)(26005)(36906005)(6916009)(6486002)(44832011)(70206006)(70586007)(956004)(2616005)(336012)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 0007ab5c-c5ec-4ae3-07af-08d8235bc306 X-Forefront-PRVS: 04583CED1A X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0W2gjeAKY41Ovafiwa2BOJj4p4M0uHDY6dbjCHjXBtjYRLplXGwfazyfg/SnoeBpDe+/YCz5Ldpz1lVPAHdNvtd2oDWlhFengLjnIOEQwCWmhv+Wq+X0PADtgGR46O7VMpMt7Ytk3/LZE4cchestz34Zn3ejjcGPEjvLGBO12zuOBA9zIv7uUAmIHkSBYD99irIEXLzHq/2jymRnMnvffp5Uy2P/V399x0W872HTbkxt1ZhYIpnwa7tWgWrz3IUTwgS1PMTvnWjnItfX+zY9LkkrxbcSTeMIXdKq3T7EaBt+IEMANpDUYuXq8lP22P62ZztzQMoIujkiPdhKdqYwI57FAuDKVvMzaQquaxCV/qlwC5Uxt1rJYMda5+JSzYJqCx42UsS14p0BeatCdK7LtW0dLQIPVqz9o3T6nELPelhV7luwhAxrC/7/D/lrtJHK5SfRViqrT7TONrlc3QScdw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 16:27:16.5722 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae0901bd-8a40-44f6-58f7-08d8235bc760 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: VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2816 X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.earnshaw@arm.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" sjlj.S only had the note on Linux, but it is supposed to have it on FreeBSD too. libitm/ChangeLog: 2020-07-08 Szabolcs Nagy * config/aarch64/sjlj.S: Add stack note if __FreeBSD__ is defined. --- Note: this is a minor change to make the asm consistent with gcc code generation (which emits the note on freebsd too). the linker defaults to noexecstack on aarch64 so this should not matter much in practice. --- libitm/config/aarch64/sjlj.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S index 27626c1f378..5b97b973e27 100644 --- a/libitm/config/aarch64/sjlj.S +++ b/libitm/config/aarch64/sjlj.S @@ -87,6 +87,6 @@ GTM_longjmp: cfi_endproc .size GTM_longjmp, . - GTM_longjmp -#ifdef __linux__ +#if defined(__linux__) || defined(__FreeBSD__) .section .note.GNU-stack, "", %progbits #endif From patchwork Wed Jul 8 16:27:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1325310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=fHoafEv5; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=fHoafEv5; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B24Tn3786z9sRK for ; Thu, 9 Jul 2020 02:27:41 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1C9A5384A01C; Wed, 8 Jul 2020 16:27:39 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70073.outbound.protection.outlook.com [40.107.7.73]) by sourceware.org (Postfix) with ESMTPS id 10F88384B806 for ; Wed, 8 Jul 2020 16:27:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 10F88384B806 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=TGee8pdc3WAJXc5CkDKI4cJrHtZL9d27NCdrH+loaGs=; b=fHoafEv5XDU+KPPUGyyf3uD0N3GWgj+297JGck0+XRxZKTU/Ucr4toA++fBx9XRtw8Wk8mQOjlVus4ydMpDFrf0+E69KL7GMJjLmVsGFxwMdYBSFMT4uqHznV5mwJlRP2eiJ3QQb0pFcWfYdU32ZT9TFpLauusKz50tPTLnHa9M= Received: from DB3PR06CA0035.eurprd06.prod.outlook.com (2603:10a6:8:1::48) by DB7PR08MB4586.eurprd08.prod.outlook.com (2603:10a6:10:34::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.20; Wed, 8 Jul 2020 16:27:34 +0000 Received: from DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:1:cafe::7b) by DB3PR06CA0035.outlook.office365.com (2603:10a6:8:1::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:27:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.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 DB5EUR03FT021.mail.protection.outlook.com (10.152.20.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:27:34 +0000 Received: ("Tessian outbound 8f45de5545d6:v62"); Wed, 08 Jul 2020 16:27:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 399303069ffe88bd X-CR-MTA-TID: 64aa7808 Received: from a08dd4d9e3be.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 45E1837C-96B9-4765-A6AE-CEF4E7E3C4CF.1; Wed, 08 Jul 2020 16:27:29 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a08dd4d9e3be.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 16:27:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b+KVNNhITdTazGYAa7HE8UNgMlLQBoMYUQS1/fp3zJtQuP37RMbKnZi8ZzjGXTubwawkbc0PZCTBraKNpTQZb6kWXuShmmlaQOqDvuhdnIfJrgQbd5aOLeOt7zqdSQ2Dm7zD+xAR8nVtBXChglHdx8RgJs1JMd10wwr4b0X/qqQf2srPEyLIihpJLr8t/rCgPF0cnMLMEwutng/p0EChrRLK+tL3hBEM8VpuPd4Y5td6/rU8s9w8QHIzg1qJA5v6USHVnDI5zE9DGMe319V96kHYRPg/3BPRCQ7BEnD74QXvswLvr1exQOOjyDr6a1DK8PpZByp/7IRiRuWqZips7w== 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=TGee8pdc3WAJXc5CkDKI4cJrHtZL9d27NCdrH+loaGs=; b=ZzOB41P92PvYIGmYRZ6qgIvEQu8SEeLKW08gpM3n5DlKh8oM1nfQJW7RPHdylTS1SrioUTAE7j740ltF9316L8DZU7iaeFuI/H09l3GSZAymOuY2GHFQ0VZ4mFHVWFSAC2V3RsMQj8/T4niOWoImnAJYVe4QAi55i3X/vTtk3g0LYvqgfZmxwGGlRjB/uxiseEH2WbwhamJqsge0a2BrtgynkWNUO74z3pH5WXBxHkWaoFMiOYb7Q05C2LShTxu7PMNP5gFFjB8BYiwhL8bhKYcwftFaGokMLbkjKTxopYEczupHJRyftqzhpKNkPu4Klxb4TBjL8sOUa4lLi7PS1Q== 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=TGee8pdc3WAJXc5CkDKI4cJrHtZL9d27NCdrH+loaGs=; b=fHoafEv5XDU+KPPUGyyf3uD0N3GWgj+297JGck0+XRxZKTU/Ucr4toA++fBx9XRtw8Wk8mQOjlVus4ydMpDFrf0+E69KL7GMJjLmVsGFxwMdYBSFMT4uqHznV5mwJlRP2eiJ3QQb0pFcWfYdU32ZT9TFpLauusKz50tPTLnHa9M= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM5PR0802MB2499.eurprd08.prod.outlook.com (2603:10a6:203:a1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Wed, 8 Jul 2020 16:27:27 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3153.031; Wed, 8 Jul 2020 16:27:27 +0000 From: Szabolcs Nagy To: gcc-patches@gcc.gnu.org Subject: [PATCH 4/6] aarch64: Fix noexecstack note in libgcc Date: Wed, 8 Jul 2020 17:27:21 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LO2P265CA0097.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::13) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.53) by LO2P265CA0097.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Wed, 8 Jul 2020 16:27:27 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c562b409-d7a5-45d9-8e26-08d8235bd1d8 X-MS-TrafficTypeDiagnostic: AM5PR0802MB2499:|DB7PR08MB4586: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:4125;OLM:4125; X-Forefront-PRVS: 04583CED1A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 6Y268+azCooGlBaf5Gg/qlMG85vjX6kRrBN8ZFaVRS8n3x0vsOG2XwPO59obKCZzxOKDIKqJU85PzxJnxvzPkP6YJkbWJjhhPhUOiMNj7Wg8x4ky3nS1nTjjTTDSu9Y3PjNBRpAjZyCaXQPcx6qovEA/bbQw/iRHT1XXwwtAEtGk+2YDg0TTnCNriq/DXcr7OmrMP52rJVNLkBrunTz/wxH5Cgmp8KSJ+t/rKuss6wI4H3qr/dryG2gPx5Gd17J3C44mv0mn48xwovEi/ojWP/ryuVVWVVfnCpeansuI3+A+YHqEjeYjN0hG7pbwI2exsqpwaIUxQ2sX5PcBS2xM/6iYjqSCCgkjjSwQjpFVNvALJxBfyno/O0KW1F9EXhnq1hXji9gzxAf3Q/rq5sIs2pfvoz3b8mch1RtMKyLcke0= 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)(396003)(136003)(376002)(39860400002)(366004)(346002)(66946007)(316002)(36756003)(66476007)(66556008)(6486002)(6666004)(52116002)(5660300002)(86362001)(8936002)(186003)(26005)(2906002)(6916009)(4744005)(69590400007)(44832011)(478600001)(8676002)(4326008)(2616005)(16526019)(6506007)(6512007)(956004)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Cuv+N8zOZ1/MBiJXqTuHEWwkA4fnu9RS/J8YMJyEUF/glhwKjaMGCrefapCqVFzqgD75PFoqbTCQnjYRb5DZuFtWdUsTcyZTf0ICgE4pwOE/wPfGZrpTzs6nT9NK07UiISuFnwDwPufpkyF88OERZCA8KxHlF/OI+xsaB9MwnTANptX2oF88T7LMN/o3cCnJqb1aONBi8+GKibtJdyI60Xu6NpMRuQ+a+u6e8WTOOO43cy+3PKzyDe6FwGsBLWTOrIdrmdiPPPbaDlVZCM3MkStna93a7icF3VUA6yCNoX4WyXpnfb99EVjjjU+DtBDwHM5O3xAr3i6GThudK51zicKiKBMc8Xq+UPyG+C/cEj/h/S3+i/SypSxL/LT+2yB3M9+MwEYlJKsbB9BWz+aqvvyPWwyc+7HbSE8jm90TytFhnWH+3ZKaSBGZT0nYAiV+M80uxb8r6UAT40uv4AbgmUXu2KjYns2dlO1kChiHxywxl9WDVvgSlPE8AiML9WUI X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2499 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT021.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)(396003)(376002)(136003)(39860400002)(346002)(46966005)(44832011)(82310400002)(186003)(69590400007)(316002)(26005)(6512007)(478600001)(6506007)(70586007)(70206006)(2906002)(4744005)(6666004)(8936002)(81166007)(86362001)(356005)(6486002)(8676002)(956004)(36756003)(2616005)(6916009)(16526019)(47076004)(82740400003)(5660300002)(336012)(4326008)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: aaa48724-2078-4154-68c6-08d8235bcdac X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vto99V0qG3gMCdtf+SueNgLTa2SvXFHPAOmmR6CezWR+5OtwwFOXz7ua2VtXRAbllLXqHvLFAvES/qUbMayrdmRQPW0nRFIH+Xez1L2yfYpA1exyHPTef92RLKx1nrQAg5tpj+iGXFfcQPYyQ2yOThu8PWCLWfNzNYpLfBjwA7SO7Rlop4FbpzsV053Y816+7vG4JZwS2Pl9ZL09AthnFIF0jJTXgebNUB/GFqFTjj83WaUmzhP3eQZBZLm6mfHnBw7mGEGbHvw6FHvN6O7gKeK805CwiY6qIy6YsFt4ZVtnHzqCKhVHu7MXR6sgqISlH54tDy/UUTjRhVnQ4tIAk0RkSM+IfOD1I31ZSmJ/ZAc67w6UIQr7JvmrisNLwbowr/1RMZZz0bppkXroUZTehZhInumoN2tacNe0PBT2SPeCBoF89bklPxpXa+DDqvAlmIUCeYbMrqmrpKVwMK4m8A== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 16:27:34.2486 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c562b409-d7a5-45d9-8e26-08d8235bd1d8 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: DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB4586 X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.earnshaw@arm.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" lse.S did not have GNU stack note, this may cause missing PT_GNU_STACK in binaries on Linux and FreeBSD. libgcc/ChangeLog: 2020-07-08 Szabolcs Nagy * config/aarch64/lse.S: Add stack note. --- libgcc/config/aarch64/lse.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S index f3ccf5cf543..9e2acae806b 100644 --- a/libgcc/config/aarch64/lse.S +++ b/libgcc/config/aarch64/lse.S @@ -274,3 +274,7 @@ STARTFN NAME(LDNM) ENDFN NAME(LDNM) #endif + +#if defined(__linux__) || defined(__FreeBSD__) +.section .note.GNU-stack, "", %progbits +#endif From patchwork Wed Jul 8 16:27:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1325313 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=Iq7K4wSF; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=Iq7K4wSF; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B24V70Ytlz9sRK for ; Thu, 9 Jul 2020 02:27:59 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 28AFA384605A; Wed, 8 Jul 2020 16:27:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2049.outbound.protection.outlook.com [40.107.20.49]) by sourceware.org (Postfix) with ESMTPS id 2E30C38460A3 for ; Wed, 8 Jul 2020 16:27:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2E30C38460A3 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=uSe5Y14Kz1OdDBelIXyJ1arcdaIoJjIjyBqsa6zBLG0=; b=Iq7K4wSFIYU6Sdh2jaLxN5VO/gHYwldVdCRDiv/n/Lzsu92+DlcW47uO1LLD2z55ZVxPjTszXtM/w77UIeEgdtPkE674lPv12QvXKUSrQccm9YJDrGWtDGIsBZ6SUeeKzBvZveCmhgRYzt/ygTI6AIRkonJWmqefG4WYtII6qis= Received: from DB6PR07CA0200.eurprd07.prod.outlook.com (2603:10a6:6:42::30) by AM6PR08MB3701.eurprd08.prod.outlook.com (2603:10a6:20b:8b::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Wed, 8 Jul 2020 16:27:52 +0000 Received: from DB5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:42:cafe::8f) by DB6PR07CA0200.outlook.office365.com (2603:10a6:6:42::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.14 via Frontend Transport; Wed, 8 Jul 2020 16:27:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.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 DB5EUR03FT005.mail.protection.outlook.com (10.152.20.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:27:52 +0000 Received: ("Tessian outbound 7de93d801f24:v62"); Wed, 08 Jul 2020 16:27:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 10378beb7d679fcd X-CR-MTA-TID: 64aa7808 Received: from 6614abeb00fb.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AB8FB9F3-3DA6-484F-B313-AAF2D80E877C.1; Wed, 08 Jul 2020 16:27:47 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6614abeb00fb.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 16:27:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eDm4n0z48/bCfosgEV0yQXmSspxeaOL3aDAjnVVghIdPVyqrsCDw4D7Unm/2lL92iHnKIfRSTuM41iVeI0z8joZk6PdYgG0eQP19+i51orTHrODzTK7dp/vTaaapuwtgf3OcJ2BA5XPqAb32rpqzCgmJiIlcWCPvAcpBDBiG2ojjHjBdyJcyJDe4wskzGes6s0oxlzRsgQcB6wsrAIwGOBGRaCL/maFLmwPAyS4yokCurfhKm1RGKZ7BZmUjIiVUUdw9kqsg4U0Mi7xTRxyuJCmWRvQZCGrCanThtOCdpa2oTQvQfz8tUTd4b0XAjDIdYqNPwotDxllQWrSfgjntJQ== 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=uSe5Y14Kz1OdDBelIXyJ1arcdaIoJjIjyBqsa6zBLG0=; b=bJXw57NPwJ2I9f4KxsvhFdgEt4U48QtMorMxkv/5x0a4ke2f+44Ioz7Mjc02/NByd9IPQg2BcM9pZ6VsLM+7GVLHxn4MIPG5fddd7+dl4W0vvVfurueHhhbdqKop+MqSKkqu2+A5FubP7IKyuR1pyPCDSP0pOFyNH2NrYMR5HKCsiOHoMZY2gr3Fu4wOnJbRRGDZyBSXpHdiUwBKxU9C7EMmH+Vir/sGa8wGmtmEfY/e/rhmL6UxxVOgeZvC7we9czEDao1CIu8WISn+A9C/12o4x6p2C314HQ5WSsqLWyO9ctJNeqmyI7oJS0dtKWB7ppmosW6g7AFjyQW9vZdxlA== 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=uSe5Y14Kz1OdDBelIXyJ1arcdaIoJjIjyBqsa6zBLG0=; b=Iq7K4wSFIYU6Sdh2jaLxN5VO/gHYwldVdCRDiv/n/Lzsu92+DlcW47uO1LLD2z55ZVxPjTszXtM/w77UIeEgdtPkE674lPv12QvXKUSrQccm9YJDrGWtDGIsBZ6SUeeKzBvZveCmhgRYzt/ygTI6AIRkonJWmqefG4WYtII6qis= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM5PR0802MB2499.eurprd08.prod.outlook.com (2603:10a6:203:a1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Wed, 8 Jul 2020 16:27:45 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3153.031; Wed, 8 Jul 2020 16:27:45 +0000 From: Szabolcs Nagy To: gcc-patches@gcc.gnu.org Subject: [PATCH 5/6] aarch64: Fix BTI support in libgcc Date: Wed, 8 Jul 2020 17:27:39 +0100 Message-Id: <07344034e9db66f4eeb850344e844ad0e366107f.1594224951.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LO2P265CA0312.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::36) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.53) by LO2P265CA0312.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.21 via Frontend Transport; Wed, 8 Jul 2020 16:27:45 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d64330c9-2de4-4dbb-1eb1-08d8235bdcb8 X-MS-TrafficTypeDiagnostic: AM5PR0802MB2499:|AM6PR08MB3701: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 04583CED1A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: H8Y1YUS/gJe7DVDyQYaDKvU96gTonY+r1wKwEpMv1UOO8u7yWwuBenICmYibYTIySDCxQAWmNL+3WkL7pBv69BHdUMTJ1tO/XD/7izkdTsEkoIXDMF8OETMQ2iyRwzK0NLWXkJULy4Goz12VLx6KmqVSfMkZm9C0/uVS/8Af6F7YBGdIunUaBVAHeQ4LPbpIBZTbpxN8zy7ie0IgDvMzw2X7GgDpIbFFkrlr1jWFKLplkkoquF4F14BEkvp2QJnY2DhXRorpnCNHYtZ9voGShr/ZcZ4JwZ761T+q+j4pCvxQGKgr1NpUgQJT43V0qZw99ldQaRv1jIx/qPfCA+tvPJMw3zKuGOSjk1cJRkbi1OqYoW3swwnE0tXwsZBP3KDARV68c4yiryTuIjSdFfBS7Vdmv2l1C5CqlEGCxXFiNA8= 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)(396003)(136003)(376002)(39860400002)(366004)(346002)(66946007)(316002)(36756003)(66476007)(66556008)(6486002)(6666004)(52116002)(5660300002)(86362001)(8936002)(186003)(26005)(2906002)(6916009)(69590400007)(44832011)(478600001)(8676002)(4326008)(83380400001)(2616005)(16526019)(6506007)(6512007)(956004)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: gxlaOtcACwTieUaST7l90IY2nDRm2hzgVbCcUNWBcbmFCkQXbgkT9PYwlP8pkosW2whpY1uzgi/R0Or1S70MOQjEP1NupHa6ub1V4RjP+zAdEckcRxz7OQ2fBlFNRPreLvfODgAb5La/uRcfS3qUj9Y9Gnnc23H+3fMnj8bbyAO23npIw/rkHoNsZiCBY40TeuyfgKoyFbgE2qbgNiIPIIPjtDvptbyENnmXdICdoZhKu1LdNZVAAmL/p6+jD6DVOTTdOTsw3AJa2Kfz7a67dQdc40EL/hO87xHv9FoeWBZuRBW24f4YfuJJPHukXmWtzssdCSRDsp2Q2uYUPp7HaB3PZTTpu7+BGOi48qMtk51qYs6fgAL6AILyAT4ZvhcsrlTfJsDoX/h+RDCOPCQGCkGaZiyRWnv1FS2SPCplDY2mlyUPqDob8DX55qpu3FFCfY9NthQfLbsRMexjVC5qqo1+x934NHS+X22sTLXwDkE8K1Tdss3BAL3w+Qs3/8Fj X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2499 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT005.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)(376002)(396003)(136003)(346002)(39860400002)(46966005)(8936002)(4326008)(86362001)(82740400003)(69590400007)(47076004)(6666004)(5660300002)(82310400002)(356005)(83380400001)(81166007)(6486002)(6512007)(26005)(16526019)(2906002)(186003)(44832011)(8676002)(2616005)(956004)(478600001)(6506007)(70206006)(316002)(6916009)(36756003)(70586007)(336012)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: fdc71eae-9983-48ff-ac4d-08d8235bd885 X-Forefront-PRVS: 04583CED1A X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QQRJwYtoeVJ5rnZUB+iZfe1liyMJmfGHSiWD3BED2hx1ReYpa64byn2P4bYtJJ7SYE2OmxE/gbghqdj2MKL2antmcn2Z9772Q8jE03zjW3nFxlazpENyEuL2x52mrBY1aXhqfy35FLXgDNha1DE+4FS/zqdgBcF+OSJXtX02ogSFHyy3lX1iq8hqZNiRuAH+2U22nmaN5jMeJ2/ywiGLuF4LCN0786q3Cue6CHNxLc3ariKtwvIHlCUNarF0HlJCiXJsK2anyI4qhFi/rHP4RO0e+h+RbAshNZFufIEa7nUeaq0BC0vwjF6WPsO/6FNwYyV8zaZVPCoMWgKCRFNqtbYPFMpE6JedSxJaC/qFkNzvwsZkLTLqqbgnlV+BHoBJjeUbnqSmJb/QTPcyaipmycy5G/s6jvh4axZnbu5qTPTp93/z6C5IC2ITNOLi4MmqhaHfTZKg/p8z2aLCWC+lLw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 16:27:52.4895 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d64330c9-2de4-4dbb-1eb1-08d8235bdcb8 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: DB5EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3701 X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.earnshaw@arm.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" lse.S did not have the GNU property note markup and the BTI c instructions that are necessary when it is built with branch protection. The notes are only added when libgcc is built with branch protection, because old linkers mishandle the note (merge them incorrectly or emit warnings), the BTI instructions are added unconditionally. Note: BTI c is only necessary at function entry if the function may be called indirectly, currently lse functions are not called indirectly, but BTI is added for ABI reasons e.g. to allow linkers later to emit stub code with indirect jump. libgcc/ChangeLog: 2020-07-08 Szabolcs Nagy * config/aarch64/lse.S: Add BTI marking and related definitions, and add BTI c to function entries. --- libgcc/config/aarch64/lse.S | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/libgcc/config/aarch64/lse.S b/libgcc/config/aarch64/lse.S index 9e2acae806b..64691c601c1 100644 --- a/libgcc/config/aarch64/lse.S +++ b/libgcc/config/aarch64/lse.S @@ -136,6 +136,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define tmp1 17 #define tmp2 15 +#define BTI_C hint 34 + /* Start and end a function. */ .macro STARTFN name .text @@ -145,6 +147,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see .type \name, %function .cfi_startproc \name: + BTI_C .endm .macro ENDFN name @@ -275,6 +278,29 @@ STARTFN NAME(LDNM) ENDFN NAME(LDNM) #endif +/* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */ +#define FEATURE_1_AND 0xc0000000 +#define FEATURE_1_BTI 1 +#define FEATURE_1_PAC 2 + +/* Add a NT_GNU_PROPERTY_TYPE_0 note. */ +#define GNU_PROPERTY(type, value) \ + .section .note.gnu.property, "a"; \ + .p2align 3; \ + .word 4; \ + .word 16; \ + .word 5; \ + .asciz "GNU"; \ + .word type; \ + .word 4; \ + .word value; \ + .word 0; + #if defined(__linux__) || defined(__FreeBSD__) .section .note.GNU-stack, "", %progbits + +/* Add GNU property note if built with branch protection. */ +# ifdef __ARM_FEATURE_BTI_DEFAULT +GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI) +# endif #endif From patchwork Wed Jul 8 16:27:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 1325314 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=qG3A6jrG; dkim=pass (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-armh-onmicrosoft-com header.b=qG3A6jrG; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B24VT1qPDz9sRK for ; Thu, 9 Jul 2020 02:28:17 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1991A384C008; Wed, 8 Jul 2020 16:28:15 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2089.outbound.protection.outlook.com [40.107.22.89]) by sourceware.org (Postfix) with ESMTPS id D3D713864877 for ; Wed, 8 Jul 2020 16:28:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D3D713864877 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=4cs7JGUhQslVZh1rp6loGUQpHCwzT/IcoirZsq8SHt0=; b=qG3A6jrGV4jUJ4NXjIZQiWdP2naB0oHExtq4teq+uySXHAqVQ6m/mMKKJttsrEVlexdSL+vx2uqRrIvf4c7SCmqMZRKRa8DB8+S9Tkrlpju3HPnyWZOOeR5aMyyscXXcpph39Ai1YhYbNwUOsmz9Q7F7TbIpxf/yYM+CGYhDWB8= Received: from DB3PR06CA0028.eurprd06.prod.outlook.com (2603:10a6:8:1::41) by AM0PR08MB4307.eurprd08.prod.outlook.com (2603:10a6:208:13d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23; Wed, 8 Jul 2020 16:28:10 +0000 Received: from DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:1:cafe::a6) by DB3PR06CA0028.outlook.office365.com (2603:10a6:8:1::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Wed, 8 Jul 2020 16:28:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; gcc.gnu.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;gcc.gnu.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 DB5EUR03FT021.mail.protection.outlook.com (10.152.20.238) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3174.21 via Frontend Transport; Wed, 8 Jul 2020 16:28:10 +0000 Received: ("Tessian outbound 8f45de5545d6:v62"); Wed, 08 Jul 2020 16:28:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 609b1b6e5f30f6e6 X-CR-MTA-TID: 64aa7808 Received: from 181a5aa7feed.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id ED3F3C24-FDF6-427D-AC57-9DFA806E4507.1; Wed, 08 Jul 2020 16:28:04 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 181a5aa7feed.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 08 Jul 2020 16:28:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QIIRPsrF6LxLI7dSh2HPYFPAZkkJVj8Dll+vq0LRf/5y9fyKaj/dMBsjF/J1jwh1BDrFBGlnVzr2YwgeqZ2dgSdapv7s27yvioZ5vP+pk+krVMzLnPVE1hs0eQsKcZZ4eZATlBzJOazVA9g7+yASToyOU5QjMUHmX0/nYx5A5lpukks9hZmM/odYdDH4DBGKOAZj5LFGNm3GwRPAPglUEpXiUaxj9x2A62dZbTfI3CjNa/qykT5KDkzWCVRWlGEvkLTjqKXielgv0ZDStDTFibmr41AsSY3SiX9fNgGk2ZEErnzmao/LVtd+HEqPHegIfj+Cqpc8iN8SES0rWLM5pw== 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=4cs7JGUhQslVZh1rp6loGUQpHCwzT/IcoirZsq8SHt0=; b=K2pXnfMymCUvHBMbO0xfuVLrwQOzgP4nmkFsY/NKOTACMbtjkUTNFCKoYGQfDArgt7TQxgu6Zwak745lIEUoD2DfIH+0m7ZwAb4btDwTveVzCv7UGIeNdBIsauURXkxFIqC3H7ZhZjG5VsCupY3qV9UbVxMc4UHdlMFp3isZPbRGM2IqpL9LDpaHPk786VglsoUF0S7HseFuo81BgVTjLm4pSHbUXlZNro0Ktoo14k/PbCmuv3ZICgEP5Qi+RILGl1Ai77HJNiq0RN2nwbCfdvDNzbHlCcXs7b8tTrtJo+JOcYPn7S13fQZ9JifQEAZzLcxq2oV4flf1s24WuwtS2w== 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=4cs7JGUhQslVZh1rp6loGUQpHCwzT/IcoirZsq8SHt0=; b=qG3A6jrGV4jUJ4NXjIZQiWdP2naB0oHExtq4teq+uySXHAqVQ6m/mMKKJttsrEVlexdSL+vx2uqRrIvf4c7SCmqMZRKRa8DB8+S9Tkrlpju3HPnyWZOOeR5aMyyscXXcpph39Ai1YhYbNwUOsmz9Q7F7TbIpxf/yYM+CGYhDWB8= Authentication-Results-Original: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM5PR0802MB2499.eurprd08.prod.outlook.com (2603:10a6:203:a1::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.20; Wed, 8 Jul 2020 16:28:03 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::2404:de9f:78c0:313c%6]) with mapi id 15.20.3153.031; Wed, 8 Jul 2020 16:28:03 +0000 From: Szabolcs Nagy To: gcc-patches@gcc.gnu.org Subject: [PATCH 6/6] aarch64: Fix BTI support in libitm Date: Wed, 8 Jul 2020 17:27:57 +0100 Message-Id: <24d58e5509c1391f3506f390367d73c782b5bc30.1594224951.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LO2P265CA0207.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::27) To AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.53) by LO2P265CA0207.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:9e::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3153.23 via Frontend Transport; Wed, 8 Jul 2020 16:28:03 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.53] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 2805721c-aabe-4e5c-e6a2-08d8235be742 X-MS-TrafficTypeDiagnostic: AM5PR0802MB2499:|AM0PR08MB4307: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-Forefront-PRVS: 04583CED1A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Uylr3UdrMWaPV8XOppIpVr016NCmLfkBMJA2KorvjRBhpnojPXL/XHXmQtvBrVir3YLvEcxFDBmWtOZNVpUmUa1k9Oai38HzJ4woC4GOl07ohJnyxu5RP6YwQ+lAj/85zPp8l3jeesQO+zJv7nMGJ7iIp9Zbddn9gYkNohDey7xBynXkExGzHRN0YBOdbHf1ioHAoq84THN2K+dc5RbNAqSAoMeKcWN6YFWuaOyV7lBBAjz56jTB51g6IBLYU3PyriEHPZ5eh42U1MuzYuoA4eB4rpP2JcbY7L2/paTWajo6PCEQLKVC3Ef9ERjDTheUOpOzbMwN4/ckufymQZeda/2XDPIFi0S4TZgcDQAdFfWjnMzvJXnj4AMBZXfwPYleOygP0L1gS2I8sP1tx6ZsBXI38oj+ckkzG/bMgxmVLyk= 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)(396003)(136003)(376002)(39860400002)(366004)(346002)(66946007)(316002)(36756003)(66476007)(66556008)(6486002)(6666004)(52116002)(5660300002)(86362001)(8936002)(186003)(26005)(2906002)(6916009)(69590400007)(44832011)(478600001)(8676002)(4326008)(83380400001)(2616005)(16526019)(6506007)(6512007)(956004)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 7nSEktBAnoIWOsdN2H8yv/bjjcxout7Rl0FWcfP14wMn/9QrDyCW2oqRxD0IWEAkDEsh+cmjiM5bYBDVeNXlOhWsNMsUEaPFH7AgVBr0kCcxRq26U3aW4dmSIndBOXlPC890ASHYGejE8H4lrZxtoMqp7RYe940yCUmVxOmCeo9tMaqfpCyn5fOJe9INHGRBpnuhfY+lsyap2uIYUIhbDFmy2MgJ6QvEMqxftCHKdn1VbKfAQkkziz1QoiWvORHWj1p9oVk3RactYgejLhfVuhYpi4lQm0Sl1uSO4A7OWQuzItLJLoS3Nfs2y+Uiez761KI3wQP5JYHSvoz8htezPB4SpJARLFLO3Y7/0gVaxd3C4il6o30ra1a49uyLdIj7/C+IWTsGfgnViF7ig1wd0w4EvIiWr5XkzShtq//ksqs9sXfYmq97V3NbGe0qfbR5xkRanhFUnBE18m5mJhcl4nBwq4Fu+NCY7ANUrzvSZkyn/voT+s2gGwDOUckjkvIc X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0802MB2499 Original-Authentication-Results: gcc.gnu.org; dkim=none (message not signed) header.d=none;gcc.gnu.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT021.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)(136003)(396003)(376002)(346002)(46966005)(81166007)(356005)(70206006)(70586007)(478600001)(2906002)(6486002)(8936002)(82310400002)(4326008)(36756003)(8676002)(83380400001)(86362001)(956004)(6506007)(2616005)(69590400007)(26005)(316002)(186003)(44832011)(5660300002)(16526019)(336012)(82740400003)(6512007)(6916009)(6666004)(47076004)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 0b52ebc9-aa94-40d6-783f-08d8235be32a X-Forefront-PRVS: 04583CED1A X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DdwfZyUq30Mlqjnf8rUYgb6h4ofaifOivt8zS3LBawouxsrwOgMnVkEZSCpVtUJJWYEDjsOaZpLixFiY/9nqTAraqNlDb+hZhZcumRXDyu0Yv4CrZLsMqx81Q4Mczl+iGb4xmvriNPVJ6/Zdyzg4Q4t/mYe1sS4mC60Dta1dIZzzsnrKZSdRA5nc1fkBEcbs8sNiutZb52n2NDgn38KaoN9dhN5agR4TH8t9D2c3PjUxFB3fGdqMGvXL6Yo0SrR0gKeiiQCwaAekivh87rpY2snAN15bkd0k5us3lQPPP5o4dOpiy3CoHsL7pEP3btEoUyf3G+MRT62Yu4rkvrliSQPu8x5ZrrjOxPU7LpIMMQb2qh/No6oiHoDWjBWkwcSH+rVuvblyOwnDhjXu1UmnUG5dvhLJmtoCa8px7NudVW5vLd7QrBKce6LFqdJzB6AWYx1OnRlw8V68T6dnAIqVAg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2020 16:28:10.1777 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2805721c-aabe-4e5c-e6a2-08d8235be742 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: DB5EUR03FT021.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4307 X-Spam-Status: No, score=-15.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: richard.earnshaw@arm.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" sjlj.S did not have the GNU property note markup and the BTI c instructions that are necessary when it is built with branch protection. The notes are only added when libitm is built with branch protection, because old linkers mishandle the note (merge them incorrectly or emit warnings), the BTI instructions are added unconditionally. libitm/ChangeLog: 2020-07-08 Szabolcs Nagy * config/aarch64/sjlj.S: Add BTI marking and related definitions, and add BTI c to function entries. --- Note: there is some redundancy: the libgcc fixup patch needed the same macro definitions, but i did not find a convenient place from where both libgcc and libitm can include them. Since this is a common problem i expect a change in the assembler that will be able to add the note without doing this manually, until then i think we can live with the code duplication. --- libitm/config/aarch64/sjlj.S | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S index 5b97b973e27..e2093ca1a97 100644 --- a/libitm/config/aarch64/sjlj.S +++ b/libitm/config/aarch64/sjlj.S @@ -24,6 +24,8 @@ #include "asmcfi.h" +#define BTI_C hint 34 + .text .align 2 .global _ITM_beginTransaction @@ -31,6 +33,7 @@ _ITM_beginTransaction: cfi_startproc + BTI_C mov x1, sp stp x29, x30, [sp, -11*16]! cfi_adjust_cfa_offset(11*16) @@ -70,6 +73,7 @@ GTM_longjmp: /* The first parameter becomes the return value (x0). The third parameter is ignored for now. */ cfi_startproc + BTI_C ldp x19, x20, [x1, 1*16] ldp x21, x22, [x1, 2*16] ldp x23, x24, [x1, 3*16] @@ -87,6 +91,29 @@ GTM_longjmp: cfi_endproc .size GTM_longjmp, . - GTM_longjmp +/* GNU_PROPERTY_AARCH64_* macros from elf.h for use in asm code. */ +#define FEATURE_1_AND 0xc0000000 +#define FEATURE_1_BTI 1 +#define FEATURE_1_PAC 2 + +/* Add a NT_GNU_PROPERTY_TYPE_0 note. */ +#define GNU_PROPERTY(type, value) \ + .section .note.gnu.property, "a"; \ + .p2align 3; \ + .word 4; \ + .word 16; \ + .word 5; \ + .asciz "GNU"; \ + .word type; \ + .word 4; \ + .word value; \ + .word 0; + #if defined(__linux__) || defined(__FreeBSD__) .section .note.GNU-stack, "", %progbits + +/* Add GNU property note if built with branch protection. */ +# ifdef __ARM_FEATURE_BTI_DEFAULT +GNU_PROPERTY (FEATURE_1_AND, FEATURE_1_BTI) +# endif #endif