From patchwork Fri May 15 14:40: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: 1291244 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=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.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=PSE2bxPm; 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=PSE2bxPm; 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 49Nrjj3r2Dz9sf8 for ; Sat, 16 May 2020 00:42:49 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DB03E3986020; Fri, 15 May 2020 14:41:38 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2069.outbound.protection.outlook.com [40.107.21.69]) by sourceware.org (Postfix) with ESMTPS id 288163985818 for ; Fri, 15 May 2020 14:41:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 288163985818 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=RmtY0NhwqbPGT826SOq+Hl+U3xYruAwcSkyz8TOWg2M=; b=PSE2bxPmb3zWkd6UmL6VZbP01OMHXjxgaBJ0ImrtYbkUFOYA1EDN3BnyWrsmQcEgnn+y8OcifDdMb0izRvKcBPmRzyRJffFhxDkW3tV0U0EvXWvkctKLsLFDiaeO6vlCeFZIp3XO1kSsj8ubGZgbpE9WXHFPuO1oF86EbdaFy6s= Received: from DB6PR0501CA0020.eurprd05.prod.outlook.com (2603:10a6:4:8f::30) by DB6PR0801MB2069.eurprd08.prod.outlook.com (2603:10a6:4:7a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24; Fri, 15 May 2020 14:41:14 +0000 Received: from DB5EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:8f:cafe::d9) by DB6PR0501CA0020.outlook.office365.com (2603:10a6:4:8f::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20 via Frontend Transport; Fri, 15 May 2020 14:41:14 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; sourceware.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; sourceware.org; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DB5EUR03FT037.mail.protection.outlook.com (10.152.20.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.19 via Frontend Transport; Fri, 15 May 2020 14:41:14 +0000 Received: ("Tessian outbound e88319d7ccd0:v54"); Fri, 15 May 2020 14:41:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: be91da385cd56d5a X-CR-MTA-TID: 64aa7808 Received: from 939156a5856d.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 747CAEDB-449B-46FE-BC3B-E701403EAD58.1; Fri, 15 May 2020 14:41:09 +0000 Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 939156a5856d.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 15 May 2020 14:41:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FMZ1oB+QFWoRMh78GvfLKX8yJHeut4FFDyHhuQNonVpOYjrAUIWSxwCKS1wmxPh4jtz1/IeehOPrdVJbBI3Eo4VcZXvmIYMrdt3Q15PUv2qzoelYTDxeZXzCgQ/DoC4WwcHd4TMqbPGNI4EmH2nwbXqCIdl0htJprpPFdQfD9h0JUyzIBXEmysAprq5LMnlygQnVwW0OI1Ddk36C/+v/FzErNLYLZ7tBvnQ7JbxEvWPbhkNHw32P75kA56Zg6ugxV/vCFyYg1yVfMmsQEhBvkjNj+19CsYjSfHuC9vouA8DqWSLJlDZ6rC3mVdS/WNn07/dXutIJz+4J0n+XrBZyuA== 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=RmtY0NhwqbPGT826SOq+Hl+U3xYruAwcSkyz8TOWg2M=; b=M++iPsKSt2roQiRciKeXVXTjGXLyEuyrflcL+KCyqKt/2l9DRUvIRZtaDV8BNX21cTEp6k//mJ+7jTyEhOI7WCULGkbWDw+BiLJ4as9mJgdsrG00+ALwg3qN4AExGjLQCev0tPOwKLCifUXvliMQGExQ+wMOIFKk3pSob6pL3JUQnG7WwC9WZqAt2Y7ERcL1bxH1ZS0mzxUbtddWcQwvqvQisNUN6l5QLmryb7f/acdf65JzM4Y7FWiehCxAZwX4ba7AYyb6b/l6FxjG+GVzijetkJpi8AUAOOgH9b+0hrT2IFertvvfF9Bq+71Pk2Y98YemfAivAjxReg5+Q3etkA== 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=RmtY0NhwqbPGT826SOq+Hl+U3xYruAwcSkyz8TOWg2M=; b=PSE2bxPmb3zWkd6UmL6VZbP01OMHXjxgaBJ0ImrtYbkUFOYA1EDN3BnyWrsmQcEgnn+y8OcifDdMb0izRvKcBPmRzyRJffFhxDkW3tV0U0EvXWvkctKLsLFDiaeO6vlCeFZIp3XO1kSsj8ubGZgbpE9WXHFPuO1oF86EbdaFy6s= Authentication-Results-Original: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from AM6PR08MB3047.eurprd08.prod.outlook.com (2603:10a6:209:4c::23) by AM6PR08MB3528.eurprd08.prod.outlook.com (2603:10a6:20b:4b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.34; Fri, 15 May 2020 14:41:08 +0000 Received: from AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862]) by AM6PR08MB3047.eurprd08.prod.outlook.com ([fe80::49fd:6ded:4da7:8862%7]) with mapi id 15.20.2979.033; Fri, 15 May 2020 14:41:08 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH v3 13/13] aarch64: fix _mcount for pac-ret Date: Fri, 15 May 2020 15:40:57 +0100 Message-Id: <3d422103bcd42547829b53fa07d3891e5bfabba3.1589552055.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-ClientProxiedBy: LO2P265CA0309.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::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.55) by LO2P265CA0309.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a5::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.24 via Frontend Transport; Fri, 15 May 2020 14:41:08 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [217.140.106.55] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c95020c6-2d1e-4621-b24c-08d7f8de051b X-MS-TrafficTypeDiagnostic: AM6PR08MB3528:|DB6PR0801MB2069: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:4941;OLM:4941; X-Forefront-PRVS: 04041A2886 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: qF3DCpgyKWEqzaEDsHr4fn3iGcq81Bm4DyNgjs7QVdiLdYyqUENtKCMT5mnDHXevkhc0x0fXCnbPj5lRV5dmr7xCp2FQYspxHTMddJmMMOVpxEtFYQUJjRMkF/JxZZp1crbrhIk3AgEibAfSmjsOLFvLaU+JIoTVnUtCsY54MAsIlwHY8KlNNu8n3yHuAJlBO0GeRMnZzUGDJsp+JfoKVDzjIyKAQ7WxFQbQviGUpwJZVJj2WKXXNND5CAmw2cmCp2zmvSflN0mU3CKetgxwefqNVzlBY+9xr8hGqL2grPrE9vFwOgjGPPZ7Jmpia4y3XOD4by6QSquCtXWKeObkFB+5cL/lGQsSKNR02VIMlN/4wj9w/DUKmhAg9gZEhwCU1rYFifM4/x50PEc1lTljkuuUsYJtdUkH/36cS49rCPE01/V5sPSQz6VZSUMcv7ZHbRwin61/T/yJWC10y6Bo1LWMwT762Dx45w4mjFjM8R4cMPg9jMbeqDboa2hlU+78TjbQ9wI58pmmMsjfbv7tctMg1yYuFSdxvuueLKcXPwp43biPAD0P0LDcUaC3F1NUINS+uPQYCp2JPkBm/OZqcbPBeSnty4RPXveVjYThSQg= 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)(136003)(376002)(39860400002)(346002)(366004)(396003)(86362001)(6506007)(69590400007)(52116002)(478600001)(966005)(316002)(6666004)(6916009)(6486002)(66556008)(44832011)(6512007)(5660300002)(2906002)(956004)(66476007)(8936002)(66946007)(36756003)(4744005)(186003)(26005)(2616005)(8676002)(16526019)(136400200001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: Ga/nUKkyWbxGmRpBESVCN2JowqW/3Jsi3o0fFoRFFEQ/nF0rQFxd8cSLsNyGT3UHnnYR8/g1jixahiLR7ET0yD8AtoM5BjhHO3Szn7YjdoXMEV6H2D6HXvF/hMMNP/A/EMfMcBOblx7Y/zBBK4f1xfuTWNEwi3OdgyuijB+Q+ufHdg6l063J8Evycsxt5VZe9QMOPcOv3Kpfx1oQ/R0odqMXfNlflOLPsGG/J5zMfSJ+k6Refu6mUNknAjNa1aW7812C1idyeOUedt/eeJbE4aMlcuL7UPZlKj08SJ4BmvKU/tGzCmvEXbU342X/0JcpzSLwtmlbWUto0bu775BFSfPBjKpB7GMhAjOIDunKnBcXlXxUHzBpbx19CNr7nraa79cdBOwl6ze4HiZ0UJDmOmVBiyXBZt361AUC5S7Wl5ZQXIwhgX2YvgfS+VCTLESJ644Y0H2pmTSvL92MyU55XzLLkD0MER1Vylog3oxrnmI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3528 Original-Authentication-Results: sourceware.org; dkim=none (message not signed) header.d=none; sourceware.org; dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT037.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)(346002)(396003)(39860400002)(136003)(46966005)(6486002)(336012)(966005)(6506007)(70586007)(2616005)(8936002)(8676002)(186003)(70206006)(478600001)(16526019)(44832011)(86362001)(6512007)(956004)(26005)(6916009)(36756003)(6666004)(69590400007)(4744005)(47076004)(2906002)(81166007)(82740400003)(5660300002)(356005)(82310400002)(316002)(136400200001); DIR:OUT; SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: d0827742-42b5-4be7-f67b-08d7f8de0133 X-Forefront-PRVS: 04041A2886 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Eg6kDFZ5ZQTmXvb23s5O55uEvIJEWIaoPnJErW1i0IdIRc3n4mrnFnqbkP1iuY6hAwxM1uqrFaiacIcVHxH+XTjwKHKRAtNn0O72BN2odkgZ6X44IJgrOBmFliZjKD0rrW1LxZCQx4DgArJqVQ71KHJD3gMK5rhudQGAOXWkZiCx1xcVK7BUAU4PGsddG0MXXPhiSEbN7bjq5Zo2sowYEo2NHsO6q0xmuo/+iG03Sq0joO1aZbO0UVGNcA0RJ3v8CSTlGP/VwWNZ8ZFKfzjLDH1sDtgG6GhcNOc61coicoKT6D7/jXvjRc8e1AIW/YB09n/gtNczxNal7ShcGEKGs6xMCn63s1XDyfIapn7QmUypxxaauODntNqV9hvrJ0LhXzGQSoZw7sMhPwaaZtod0LO4b5zzu+obpAoupfuzEhMbBcWymsGNvk0m7+yKFkgKcINYoQ/hNn1+o9jkplqJ0TPoKHBbhl+rRxK/HI2NLbEdAChdfxV1XFlMoqMzw+u+leiqU21CU9vKdWDxPfiog4Z6EDNJ8/NAdF5oyeB1Jn7OZAed69u0InnREYa2dlr8TZEhA0/VmejHIIDxgzuF1+DS4QqxbCsxA+Np+BGziDN9XEyvrHsW220LD/r9aep6V+npy6kxm4jpbmUnr3ZDsc9QMciy7o2OlZ/mnPinYtE= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2020 14:41:14.8283 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c95020c6-2d1e-4621-b24c-08d7f8de051b X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2069 X-Spam-Status: No, score=-19.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_SHORT, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" gcc -pg with -mbranch-protection=pac-ret passes signed return address to _mcount, so _mcount now has to always strip pac from the frompc since that's from user code that may be built with pac-ret. This is a backward incompatible _mcount abi change introduced by return address signing support in gcc-7. TODO: fix -pg on the gcc side? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94791 Reviewed-by: Adhemerval Zanella --- sysdeps/aarch64/machine-gmon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/aarch64/machine-gmon.h b/sysdeps/aarch64/machine-gmon.h index 730a23b781..328cbdda16 100644 --- a/sysdeps/aarch64/machine-gmon.h +++ b/sysdeps/aarch64/machine-gmon.h @@ -30,5 +30,5 @@ static inline void mcount_internal (u_long frompc, u_long selfpc) #define MCOUNT \ void __mcount (void *frompc) \ { \ - mcount_internal ((u_long) frompc, (u_long) RETURN_ADDRESS (0)); \ + mcount_internal ((u_long) strip_pac (frompc), (u_long) RETURN_ADDRESS (0)); \ }