From patchwork Tue Dec 12 15:22:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 177405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp7797504vqy; Tue, 12 Dec 2023 07:23:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKBhUKjVr3iwSLcIcRmN0eAlDCrzoL6nUUlm08AZxmVqRcUSpm+LE0CyS5XNAqYWtlc9kn X-Received: by 2002:a05:6122:4b0f:b0:4b2:f8b7:a414 with SMTP id fc15-20020a0561224b0f00b004b2f8b7a414mr2214603vkb.15.1702394635795; Tue, 12 Dec 2023 07:23:55 -0800 (PST) ARC-Seal: i=4; a=rsa-sha256; t=1702394635; cv=pass; d=google.com; s=arc-20160816; b=i5PSxnQ2qNdDNtv4dCSPkid8OaslHImHDMkz+18JzzpgLsUNBarFQPHLd4mAA0FkPf jKKMy7R2tG7vIp9gjtTid/H5+lvi+tPyfTG4Iqxt7bxkx64W4N5N5Tb4+Bovvnrs0CdQ SNmDN1ODLEV9Wrn5k+0Ya0zaMxx4XxDeqm9gEEe6HixtN5Ou61CnGctugQ9HQhhFRfqm U8lvpXvyqrXD2bXlO6QdHnwgil5+CGWHxi+0o6k/E0yQICKWuv15fzfdQwQZ1Snnp5pg 202H98CxsVMfenMklEBPEN6sHUUGNOOay8f/sEjKgSyoo3Sms9WYjEhorgFGiA9Urxqo JG3A== ARC-Message-Signature: i=4; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:nodisclaimer :content-transfer-encoding:mime-version:message-id:date:subject:to :from:dkim-signature:dkim-signature:arc-filter:dmarc-filter :delivered-to; bh=E6Qm1kq6bu5NQNvrBA6CJXeVgBuIo8OAKFKr0pUcT8s=; fh=gk9A5O7Gbglvz1MjrRQ4hZ2i3c68kYkpOZJg1emXh+g=; b=cXGdE9THbS791u9RqI5rwQ0HW61fHYuaLefsbeyNbGPyoyIG/D2ZbvF5+GJyt4LR/2 SscrkbcqNp5mlX3A4ZHgwqXpGY2jljOica84BUJ4G1UlsFkDF0r8SgoOQO8P2dLds5MN pwh4FMNsXta6+bl5Kbcueyl5uD6QZbBgM3dNSWyye9aexLYxNwa/JIReHpyyEUIs8ulX 8sRzHZVjhA796GG4/xc2XyQzftK8qs06chV4TM2x4Cb4QsXnQ4wm+AXfbm5RLBU11xCi K+MKeWAYkHilEwQJZE4DJs0HYBJq1ETl8+p4G+fADzOKEclyn9G/aI9TqdTGUdfwB2/M ZWdQ== ARC-Authentication-Results: i=4; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=oSMqgSbn; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=oSMqgSbn; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id fm23-20020a056122291700b004b2dac99365si2120858vkb.20.2023.12.12.07.23.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 07:23:55 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=oSMqgSbn; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=oSMqgSbn; arc=pass (i=3); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8425C3858020 for ; Tue, 12 Dec 2023 15:23:55 +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-db8eur05on2050.outbound.protection.outlook.com [40.107.20.50]) by sourceware.org (Postfix) with ESMTPS id CF7DD3858C2F for ; Tue, 12 Dec 2023 15:23:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CF7DD3858C2F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org CF7DD3858C2F Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.20.50 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1702394606; cv=pass; b=FjSZd4ZyqURsMHgYEtqsfju53IGDwa2B/TMC8vH4ilnkPXboba7/2ya/cswssU513y+g8AwdHiUQbyw3umEwdYZ2vDx2v6souUoF4g6xPVUrMuY0v1DBrHy1JPsRaTZmW/iwQ37ClgZw7iHPqXEcVjKAEjGhlA0sSy5HPSKOASE= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1702394606; c=relaxed/simple; bh=0106nmyRqnqm8PcbKcPKlAwdMFaaq36EPHolx+DiJ4c=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=lcOnHbqy7bNvXY0tcJ11kdRsGQ6+92sw5YTwUndqJ3TZOSPy2/Uo7RNI+1q7ThAG1sYRuEn5lWuhMSdbNwrM+7L9v+1VDGIb4wUztIbDlHV0KDbAVqgV5lDJ3HaLW7RIbZxDZof36a/OXLXSAnNMboDSeM7jpb9/11y1JS05Ue8= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=jNcDUX5yv+91lgRgrNuSJ9kbBSkmlp+E4QqEloYx3VpJILfRnylNY7lHt0ZzkCyCztdMQoPdUHmTCitOrygAY0z/n6QMIC9qGsWR8lcaayMzrTwxWA2whXx+dkFO7z20LTMubiVzc97UkpzPM0Ju+0fOFwQB5SId4JB2Satwtj/mmHqATEYquAZyDKv5jK8UFsirUhnlmJe3TxS6wHN4oylxbKCDBfHnePZ7Fn8K3C7olcH03RcriQclDuXarQjESM8gvkhTG6iPc0gfKI5bX9XwzKDukKNAMJcGmCsAPHjFZ+mTMdGryklXxggN5AKYHS8gR2TZsJRwEQ5DSsaCiw== ARC-Message-Signature: i=2; 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=E6Qm1kq6bu5NQNvrBA6CJXeVgBuIo8OAKFKr0pUcT8s=; b=DtbE9QqdtAA3aJN1ZnSTJNKrj6nzMs5v9MDcVwsHIGnylLij4FwGrbdSl8WXQY6muxfmGMn9oad2Hwv5F75+jqpbXFB35tXO+zORDAvQO5zOixVL3SMNa1ZL723X6vzyqlPqTfn87Rv/y7K5/+y+R3ERnKUXOCnKwqhKuvg9iB00YU/M6LuMzZVwSB9zZeMOyiiukMFeRAJ8s3j6o/EjPfHl16buWztEp+q6sRNH377nWD35XFjAAqdYUGkmxzfO4lEzlsiCt/5gl10C2LdsWbN5X6sxhH/r08F62k9OwiV9rQVDWWEG8Tlm/BFXvSfT4jENxAoWhnQ5J82rW46VPw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=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=E6Qm1kq6bu5NQNvrBA6CJXeVgBuIo8OAKFKr0pUcT8s=; b=oSMqgSbncqYXEF3vpIOL8borKZ/Yyrrn0U5oGLrBAVTumfQWxVXfEARP4GesRrk+jhuv4gKLPuWHHrcy8btMvjUSq3sA+ue6Iae3FpmS6jZTX0P/MRIJPE2OM8BbbM+e1CcNmTIdHA3P2bEb1atzZISI2GlOJk/NDzE8tPIMY+k= Received: from AS9PR06CA0681.eurprd06.prod.outlook.com (2603:10a6:20b:49c::26) by DU0PR08MB8348.eurprd08.prod.outlook.com (2603:10a6:10:408::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32; Tue, 12 Dec 2023 15:23:11 +0000 Received: from AMS1EPF0000004D.eurprd04.prod.outlook.com (2603:10a6:20b:49c:cafe::39) by AS9PR06CA0681.outlook.office365.com (2603:10a6:20b:49c::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33 via Frontend Transport; Tue, 12 Dec 2023 15:23:11 +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 AMS1EPF0000004D.mail.protection.outlook.com (10.167.16.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.26 via Frontend Transport; Tue, 12 Dec 2023 15:23:11 +0000 Received: ("Tessian outbound e243565b0037:v228"); Tue, 12 Dec 2023 15:23:11 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: de9f0eee67b6e2f3 X-CR-MTA-TID: 64aa7808 Received: from 3345447c6c2e.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FE480E26-EF2E-4EC2-A862-C601D895C0A1.1; Tue, 12 Dec 2023 15:23:03 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 3345447c6c2e.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 12 Dec 2023 15:23:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OKlUo56wiy/jbNh76/RQPCrC04aujxz9Uku38xFE4xVBuxIKZdFGmZnpXQ5Gz2vj5X2CsrmD7ru8p34w/WNNNU6W7HMNw7NIGh2y5hA6jn3Nz4p2/K59V7UXxUtWZ/XGU334ZvwZN6leHQxGx/A8gtXZjrcioC1tKSCWM/J+LAzGNZEUv/TIOk4jDFy3ZxLhzoBlRuBfAGsEe3KyLSdRkdFdmvIRZ2ViUGgOCIgu/QDc7iuYqly3hSqlNu8QfkrVHIw5KIsuwtKkbflhFF6NWKxTJtnqsit5r/0psx5RUMQF3xoWP+oNYK7UoGE+KpCJu7x0THXfe12PI7keX5hf5A== 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=E6Qm1kq6bu5NQNvrBA6CJXeVgBuIo8OAKFKr0pUcT8s=; b=i7IVesdLO6E/ekSvLcscYskghCwSsUtYGE25m3XbaA6gMy56jD1irCZmGudCcWBwwpUyYNvbLZGKcexuuIQYFHQ1cFKVUJqiOJPr1in1/kQZ+/D54/Nip5yVGBf7nD8TO1et+lcLNvEHlQw+AE05rT1ivwswLyiiuVG3wd1P/wManwQR5Rh/Jc2a9NY6EoJo2MPlqLPAkStFGxONqczEYM4dwagaCQwt0IYJGREarqlyAbDCq/Nooig6nw1mjfAy0jFG85La7VMo54pnc7m+ZWAJJVmvTQ4vkrVSU8YvCtZsCZBa4dA0wc6TOZpU9ElL8jPG+sNi8PVRIj/TnQNt7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) 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=E6Qm1kq6bu5NQNvrBA6CJXeVgBuIo8OAKFKr0pUcT8s=; b=oSMqgSbncqYXEF3vpIOL8borKZ/Yyrrn0U5oGLrBAVTumfQWxVXfEARP4GesRrk+jhuv4gKLPuWHHrcy8btMvjUSq3sA+ue6Iae3FpmS6jZTX0P/MRIJPE2OM8BbbM+e1CcNmTIdHA3P2bEb1atzZISI2GlOJk/NDzE8tPIMY+k= Received: from DU2PR04CA0246.eurprd04.prod.outlook.com (2603:10a6:10:28e::11) by PA4PR08MB5903.eurprd08.prod.outlook.com (2603:10a6:102:e9::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Tue, 12 Dec 2023 15:23:01 +0000 Received: from DB5PEPF00014B8C.eurprd02.prod.outlook.com (2603:10a6:10:28e:cafe::fa) by DU2PR04CA0246.outlook.office365.com (2603:10a6:10:28e::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33 via Frontend Transport; Tue, 12 Dec 2023 15:23:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DB5PEPF00014B8C.mail.protection.outlook.com (10.167.8.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7091.18 via Frontend Transport; Tue, 12 Dec 2023 15:23:00 +0000 Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 12 Dec 2023 15:22:59 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 12 Dec 2023 15:22:58 +0000 Received: from armchair.cambridge.arm.com (10.2.80.71) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Tue, 12 Dec 2023 15:22:58 +0000 From: Szabolcs Nagy To: Subject: [PATCH v3] aarch64,arm: Move branch-protection data to targets Date: Tue, 12 Dec 2023 15:22:58 +0000 Message-ID: <20231212152258.4164170-1-szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB5PEPF00014B8C:EE_|PA4PR08MB5903:EE_|AMS1EPF0000004D:EE_|DU0PR08MB8348:EE_ X-MS-Office365-Filtering-Correlation-Id: 695862d3-932f-4fd5-cbea-08dbfb2640a6 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: p0lwgI7Xt0lTCeEdNnMBws/04VmI0V9Tu4hQEqHoIPejYtNBMEfdM/BprO0nihf2xNvBVegwodSdtYdoxD1mDH4wHyUGoZJA3J4NMseITJYSzfE7zI176T3wB3Zqu/mXKIe4ky+IAQavaVLgsnpawyQBX5RKDQsPu3YhDfwDle5RrRrrmaPTdwhQGeHT5b1D2YX0UrMN4ujm3oQ9t+LKig7tWSmuK/4jKT26rbcL2GZr0KXCTVTBq2V7EUHt1SB4CoBXls4eHtnOo+LVbolD8+pibHbCbcEdOZswBcTgX2RtXJfjgppaglygpQdHj/5p6AQnU2fCxtcWg2Xo654eZRkL3xbb9FUrwHKljiiD2gx3AoupHlYsCeQs/L+jFaCQUBWbdGMHjOMrX08kq1MFXu7RRd/MYW7HwJHrgHWHLZPZb6O24kE713p6yXng/QuElFkGkrYijtVpJ/QtFdKWMnohS51OYUorGu5T/RYsrFoU4CLvVOIkMrGML7dqmwqPOaUtnktyZkjVHyd2QXFfN6Q1pE4tgmhgDOJykdIf40EB1iplYWltyJRe9YWUhUQTfadUO98dNzmgB1kXy7N9CLqRb8sBf1p7Bsw5ewCEOWa+yw3kVjYTTjseYKgGVdRFKD4cpUB3xApVe0T0H2FxhUQes9wRkxGiInrW/hWNlX303Ah74RgqOTpYiNfSS6N6VUenJ2qvt8nqq3/2pwkxe6p9M3Q0lte/67z0Yt5VA/7x4zDll3yeWmybGnxG2J9qpdC/E56q4ZgffA58AVpu8dJOwm7ugmDHrg7E6MKcCS2zEcU7WnLd2Gbq0nvfMBor X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(136003)(39860400002)(346002)(376002)(396003)(230273577357003)(230922051799003)(230173577357003)(1800799012)(451199024)(64100799003)(82310400011)(186009)(46966006)(40470700004)(36840700001)(316002)(6916009)(70586007)(70206006)(41300700001)(7696005)(26005)(1076003)(36756003)(426003)(336012)(2616005)(86362001)(81166007)(356005)(82740400003)(83380400001)(36860700001)(478600001)(47076005)(44832011)(40480700001)(30864003)(2906002)(40460700003)(8936002)(8676002)(5660300002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB5903 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS1EPF0000004D.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: ad3297e4-bed6-4646-0239-08dbfb263a25 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: slU09UZrb1jl5hD++n2eDdpyCk2hcfUjNgr5UN7BAlb+bTqR1bRfPukhUIqjQWwqk2pSF2ytNKSduuvJZPqoog9dq74kNIVa6QqyIeApUkzUPb4UregSMS9i+ZG2RHZ+lxN3V8Sl8SmCHeCofm/DT0HLvSs8YHUhFEmGMAA0KvgWQeYhRoQxu7Lm18SnCrocCHhQmY6TZIMDrI11rv+rIhovmdbUtyYG7yCOVeYTLsG60FfEcXazHMBYuqqamNH7W3va6N1lVFB2V7DL6ZXjEIsvoQH3fQIt1FcDI42N1M5busvsNMT2isxxxUupt7QwJwx9qujEliLGQgVP5iU5wItq+t8nuFZLGgu9ooEd52/GzWN0924JuxWJivO8ApAcKueoPwOwI6rDXBBkt7yeJ0GUsHjF7To5SZ6HZWUHv/MAGVS4LU6IQ8S0ENgH8P6WWSnOXfQvCCyOJaBk9LLOQV+OEWl9g8kyXnB0nJ0wqjNJXxHe9XL6M4ETbAk0wA0uigzx7esCrRGHlNOCyjB3LSxcE1xycXDNjwbpguziz3b8iGjGAh/M/QWxMPVKL8eSNnayOlU0vyGTDEBwI8N9Ebw5aSC68JqtsyAxe1EThJF+vq+79K/eNc/y3AR3/NmaE5J7UOhLQOeqs9YZRcy2LuFLInjnYmmCOczocfWkRrmpyGEbYKpHij6esEE1/ml/wvuuxYvykhbgmVvygKDEHnJM38jqoPXyo9XyxwKhbmLOmmhXrL2B02RSoJc4LNtcNEH3CUR9ustFUS7HsofXeKL83YIOhS9QH9cK0ZElkRw= 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:(13230031)(4636009)(39860400002)(376002)(346002)(136003)(396003)(230922051799003)(230173577357003)(230273577357003)(186009)(82310400011)(64100799003)(1800799012)(451199024)(40470700004)(46966006)(36840700001)(40460700003)(426003)(336012)(1076003)(36860700001)(2616005)(26005)(478600001)(7696005)(83380400001)(5660300002)(44832011)(41300700001)(2906002)(30864003)(316002)(8676002)(8936002)(70206006)(70586007)(47076005)(6916009)(82740400003)(81166007)(86362001)(36756003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Dec 2023 15:23:11.4277 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 695862d3-932f-4fd5-cbea-08dbfb2640a6 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: AMS1EPF0000004D.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8348 X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785090158031308640 X-GMAIL-MSGID: 1785090158031308640 The branch-protection types are target specific, not the same on arm and aarch64. This currently affects pac-ret+b-key, but there will be a new type on aarch64 that is not relevant for arm. After the move, change aarch_ identifiers to aarch64_ or arm_ as appropriate. gcc/ChangeLog: * config/aarch64/aarch64.md: Rename aarch_ to aarch64_. * config/aarch64/aarch64.opt: Likewise. * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Likewise. * config/aarch64/aarch64.cc (aarch64_expand_prologue): Likewise. (aarch64_expand_epilogue): Likewise. (aarch64_post_cfi_startproc): Likewise. (aarch64_handle_no_branch_protection): Copy and rename. (aarch64_handle_standard_branch_protection): Likewise. (aarch64_handle_pac_ret_protection): Likewise. (aarch64_handle_pac_ret_leaf): Likewise. (aarch64_handle_pac_ret_b_key): Likewise. (aarch64_handle_bti_protection): Likewise. * config/arm/aarch-common.cc (aarch_handle_no_branch_protection): Remove. (aarch_handle_standard_branch_protection): Remove. (aarch_handle_pac_ret_protection): Remove. (aarch_handle_pac_ret_leaf): Remove. (aarch_handle_pac_ret_b_key): Remove. (aarch_handle_bti_protection): Remove. * config/arm/aarch-common.h (enum aarch_key_type): Remove. (struct aarch_branch_protect_type): Declare. * config/arm/arm-c.cc (arm_cpu_builtins): Remove aarch_ra_sign_key. * config/arm/arm.cc (arm_handle_no_branch_protection): Copy and rename. (arm_handle_standard_branch_protection): Likewise. (arm_handle_pac_ret_protection): Likewise. (arm_handle_pac_ret_leaf): Likewise. (arm_handle_bti_protection): Likewise. (arm_configure_build_target): Likewise. * config/arm/arm.opt: Remove aarch_ra_sign_key. --- v3: aarch_ to aarch64_/arm_ renames. --- gcc/config/aarch64/aarch64-c.cc | 4 +- gcc/config/aarch64/aarch64.cc | 69 +++++++++++++++++++++++++++++---- gcc/config/aarch64/aarch64.md | 2 +- gcc/config/aarch64/aarch64.opt | 2 +- gcc/config/arm/aarch-common.cc | 55 -------------------------- gcc/config/arm/aarch-common.h | 11 +++--- gcc/config/arm/arm-c.cc | 2 - gcc/config/arm/arm.cc | 52 ++++++++++++++++++++++--- gcc/config/arm/arm.opt | 3 -- 9 files changed, 117 insertions(+), 83 deletions(-) diff --git a/gcc/config/aarch64/aarch64-c.cc b/gcc/config/aarch64/aarch64-c.cc index 115a2a8b756..553c99845e2 100644 --- a/gcc/config/aarch64/aarch64-c.cc +++ b/gcc/config/aarch64/aarch64-c.cc @@ -235,9 +235,9 @@ aarch64_update_cpp_builtins (cpp_reader *pfile) if (aarch_ra_sign_scope != AARCH_FUNCTION_NONE) { int v = 0; - if (aarch_ra_sign_key == AARCH_KEY_A) + if (aarch64_ra_sign_key == AARCH64_KEY_A) v |= 1; - if (aarch_ra_sign_key == AARCH_KEY_B) + if (aarch64_ra_sign_key == AARCH64_KEY_B) v |= 2; if (aarch_ra_sign_scope == AARCH_FUNCTION_ALL) v |= 4; diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 9530618abea..dfd374c901e 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -9461,12 +9461,12 @@ aarch64_expand_prologue (void) /* Sign return address for functions. */ if (aarch64_return_address_signing_enabled ()) { - switch (aarch_ra_sign_key) + switch (aarch64_ra_sign_key) { - case AARCH_KEY_A: + case AARCH64_KEY_A: insn = emit_insn (gen_paciasp ()); break; - case AARCH_KEY_B: + case AARCH64_KEY_B: insn = emit_insn (gen_pacibsp ()); break; default: @@ -9880,12 +9880,12 @@ aarch64_expand_epilogue (rtx_call_insn *sibcall) if (aarch64_return_address_signing_enabled () && (sibcall || !TARGET_ARMV8_3)) { - switch (aarch_ra_sign_key) + switch (aarch64_ra_sign_key) { - case AARCH_KEY_A: + case AARCH64_KEY_A: insn = emit_insn (gen_autiasp ()); break; - case AARCH_KEY_B: + case AARCH64_KEY_B: insn = emit_insn (gen_autibsp ()); break; default: @@ -18541,6 +18541,61 @@ aarch64_set_asm_isa_flags (aarch64_feature_flags flags) aarch64_set_asm_isa_flags (&global_options, flags); } +static void +aarch64_handle_no_branch_protection (void) +{ + aarch_ra_sign_scope = AARCH_FUNCTION_NONE; + aarch_enable_bti = 0; +} + +static void +aarch64_handle_standard_branch_protection (void) +{ + aarch_ra_sign_scope = AARCH_FUNCTION_NON_LEAF; + aarch64_ra_sign_key = AARCH64_KEY_A; + aarch_enable_bti = 1; +} + +static void +aarch64_handle_pac_ret_protection (void) +{ + aarch_ra_sign_scope = AARCH_FUNCTION_NON_LEAF; + aarch64_ra_sign_key = AARCH64_KEY_A; +} + +static void +aarch64_handle_pac_ret_leaf (void) +{ + aarch_ra_sign_scope = AARCH_FUNCTION_ALL; +} + +static void +aarch64_handle_pac_ret_b_key (void) +{ + aarch64_ra_sign_key = AARCH64_KEY_B; +} + +static void +aarch64_handle_bti_protection (void) +{ + aarch_enable_bti = 1; +} + +static const struct aarch_branch_protect_type aarch64_pac_ret_subtypes[] = { + { "leaf", false, aarch64_handle_pac_ret_leaf, NULL, 0 }, + { "b-key", false, aarch64_handle_pac_ret_b_key, NULL, 0 }, + { NULL, false, NULL, NULL, 0 } +}; + +const struct aarch_branch_protect_type aarch_branch_protect_types[] = { + { "none", true, aarch64_handle_no_branch_protection, NULL, 0 }, + { "standard", true, aarch64_handle_standard_branch_protection, NULL, 0 }, + { "pac-ret", false, aarch64_handle_pac_ret_protection, + aarch64_pac_ret_subtypes, ARRAY_SIZE (aarch64_pac_ret_subtypes) }, + { "bti", false, aarch64_handle_bti_protection, NULL, 0 }, + { NULL, false, NULL, NULL, 0 } +}; + /* Implement TARGET_OPTION_OVERRIDE. This is called once in the beginning and is used to parse the -m{cpu,tune,arch} strings and setup the initial tuning structs. In particular it must set selected_tune and @@ -23380,7 +23435,7 @@ void aarch64_post_cfi_startproc (FILE *f, tree ignored ATTRIBUTE_UNUSED) { if (cfun->machine->frame.laid_out && aarch64_return_address_signing_enabled () - && aarch_ra_sign_key == AARCH_KEY_B) + && aarch64_ra_sign_key == AARCH64_KEY_B) asm_fprintf (f, "\t.cfi_b_key_frame\n"); } diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index f4d4427a3a0..d13259463e1 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -1002,7 +1002,7 @@ (define_insn "*do_return" if (aarch64_return_address_signing_enabled () && (TARGET_PAUTH)) { - if (aarch_ra_sign_key == AARCH_KEY_B) + if (aarch64_ra_sign_key == AARCH64_KEY_B) ret = "retab"; else ret = "retaa"; diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt index df84c662d24..564e2bb90b2 100644 --- a/gcc/config/aarch64/aarch64.opt +++ b/gcc/config/aarch64/aarch64.opt @@ -40,7 +40,7 @@ TargetVariable unsigned aarch_enable_bti = 2 TargetVariable -enum aarch_key_type aarch_ra_sign_key = AARCH_KEY_A +enum aarch64_key_type aarch64_ra_sign_key = AARCH64_KEY_A ; The TLS dialect names to use with -mtls-dialect. diff --git a/gcc/config/arm/aarch-common.cc b/gcc/config/arm/aarch-common.cc index 2594e56c51a..2755ebc1bec 100644 --- a/gcc/config/arm/aarch-common.cc +++ b/gcc/config/arm/aarch-common.cc @@ -660,61 +660,6 @@ arm_md_asm_adjust (vec &outputs, vec & /*inputs*/, return saw_asm_flag ? seq : NULL; } -static void -aarch_handle_no_branch_protection (void) -{ - aarch_ra_sign_scope = AARCH_FUNCTION_NONE; - aarch_enable_bti = 0; -} - -static void -aarch_handle_standard_branch_protection (void) -{ - aarch_ra_sign_scope = AARCH_FUNCTION_NON_LEAF; - aarch_ra_sign_key = AARCH_KEY_A; - aarch_enable_bti = 1; -} - -static void -aarch_handle_pac_ret_protection (void) -{ - aarch_ra_sign_scope = AARCH_FUNCTION_NON_LEAF; - aarch_ra_sign_key = AARCH_KEY_A; -} - -static void -aarch_handle_pac_ret_leaf (void) -{ - aarch_ra_sign_scope = AARCH_FUNCTION_ALL; -} - -static void -aarch_handle_pac_ret_b_key (void) -{ - aarch_ra_sign_key = AARCH_KEY_B; -} - -static void -aarch_handle_bti_protection (void) -{ - aarch_enable_bti = 1; -} - -static const struct aarch_branch_protect_type aarch_pac_ret_subtypes[] = { - { "leaf", false, aarch_handle_pac_ret_leaf, NULL, 0 }, - { "b-key", false, aarch_handle_pac_ret_b_key, NULL, 0 }, - { NULL, false, NULL, NULL, 0 } -}; - -static const struct aarch_branch_protect_type aarch_branch_protect_types[] = { - { "none", true, aarch_handle_no_branch_protection, NULL, 0 }, - { "standard", true, aarch_handle_standard_branch_protection, NULL, 0 }, - { "pac-ret", false, aarch_handle_pac_ret_protection, aarch_pac_ret_subtypes, - ARRAY_SIZE (aarch_pac_ret_subtypes) }, - { "bti", false, aarch_handle_bti_protection, NULL, 0 }, - { NULL, false, NULL, NULL, 0 } -}; - /* In-place split *str at delim, return *str and set *str to the tail of the string or NULL if the end is reached. */ diff --git a/gcc/config/arm/aarch-common.h b/gcc/config/arm/aarch-common.h index f72e21127fc..90d2112408f 100644 --- a/gcc/config/arm/aarch-common.h +++ b/gcc/config/arm/aarch-common.h @@ -44,12 +44,7 @@ enum aarch_function_type { AARCH_FUNCTION_ALL }; -/* The key type that -msign-return-address should use. */ -enum aarch_key_type { - AARCH_KEY_A, - AARCH_KEY_B -}; - +/* Specifies a -mbranch-protection= argument. */ struct aarch_branch_protect_type { /* The type's name that the user passes to the branch-protection option @@ -64,4 +59,8 @@ struct aarch_branch_protect_type unsigned int num_subtypes; }; +/* Target specific data and callbacks for parsing -mbranch-protection=. + The first item is used to reset the branch-protection settings. */ +extern const struct aarch_branch_protect_type aarch_branch_protect_types[]; + #endif /* GCC_AARCH_COMMON_H */ diff --git a/gcc/config/arm/arm-c.cc b/gcc/config/arm/arm-c.cc index d3d93ceba00..204403b3ff4 100644 --- a/gcc/config/arm/arm-c.cc +++ b/gcc/config/arm/arm-c.cc @@ -248,8 +248,6 @@ arm_cpu_builtins (struct cpp_reader* pfile) { unsigned int pac = 1; - gcc_assert (aarch_ra_sign_key == AARCH_KEY_A); - if (aarch_ra_sign_scope == AARCH_FUNCTION_ALL) pac |= 0x4; diff --git a/gcc/config/arm/arm.cc b/gcc/config/arm/arm.cc index 0c0cb14a8a4..336ff249674 100644 --- a/gcc/config/arm/arm.cc +++ b/gcc/config/arm/arm.cc @@ -3259,6 +3259,52 @@ static sbitmap isa_all_fpubits_internal; static sbitmap isa_all_fpbits; static sbitmap isa_quirkbits; +static void +arm_handle_no_branch_protection (void) +{ + aarch_ra_sign_scope = AARCH_FUNCTION_NONE; + aarch_enable_bti = 0; +} + +static void +arm_handle_standard_branch_protection (void) +{ + aarch_ra_sign_scope = AARCH_FUNCTION_NON_LEAF; + aarch_enable_bti = 1; +} + +static void +arm_handle_pac_ret_protection (void) +{ + aarch_ra_sign_scope = AARCH_FUNCTION_NON_LEAF; +} + +static void +arm_handle_pac_ret_leaf (void) +{ + aarch_ra_sign_scope = AARCH_FUNCTION_ALL; +} + +static void +arm_handle_bti_protection (void) +{ + aarch_enable_bti = 1; +} + +static const struct aarch_branch_protect_type arm_pac_ret_subtypes[] = { + { "leaf", false, arm_handle_pac_ret_leaf, NULL, 0 }, + { NULL, false, NULL, NULL, 0 } +}; + +const struct aarch_branch_protect_type aarch_branch_protect_types[] = { + { "none", true, arm_handle_no_branch_protection, NULL, 0 }, + { "standard", true, arm_handle_standard_branch_protection, NULL, 0 }, + { "pac-ret", false, arm_handle_pac_ret_protection, arm_pac_ret_subtypes, + ARRAY_SIZE (arm_pac_ret_subtypes) }, + { "bti", false, arm_handle_bti_protection, NULL, 0 }, + { NULL, false, NULL, NULL, 0 } +}; + /* Configure a build target TARGET from the user-specified options OPTS and OPTS_SET. If WARN_COMPATIBLE, emit a diagnostic if both the CPU and architecture have been specified, but the two are not identical. */ @@ -3308,12 +3354,6 @@ arm_configure_build_target (struct arm_build_target *target, { aarch_validate_mbranch_protection (opts->x_arm_branch_protection_string, "-mbranch-protection="); - - if (aarch_ra_sign_key != AARCH_KEY_A) - { - warning (0, "invalid key type for %<-mbranch-protection=%>"); - aarch_ra_sign_key = AARCH_KEY_A; - } } if (arm_selected_arch) diff --git a/gcc/config/arm/arm.opt b/gcc/config/arm/arm.opt index 88299dabc3a..bd8bb00d035 100644 --- a/gcc/config/arm/arm.opt +++ b/gcc/config/arm/arm.opt @@ -30,9 +30,6 @@ enum aarch_function_type aarch_ra_sign_scope = AARCH_FUNCTION_NONE TargetVariable unsigned aarch_enable_bti = 0 -TargetVariable -enum aarch_key_type aarch_ra_sign_key = AARCH_KEY_A - Enum Name(tls_type) Type(enum arm_tls_type) TLS dialect to use: