From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80084.outbound.protection.outlook.com [40.107.8.84]) by sourceware.org (Postfix) with ESMTPS id B4DF33858C3A for ; Tue, 21 Dec 2021 17:47:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B4DF33858C3A Received: from AS9PR06CA0381.eurprd06.prod.outlook.com (2603:10a6:20b:460::28) by AM0PR08MB4562.eurprd08.prod.outlook.com (2603:10a6:208:124::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.19; Tue, 21 Dec 2021 17:47:22 +0000 Received: from VE1EUR03FT036.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:460:cafe::e4) by AS9PR06CA0381.outlook.office365.com (2603:10a6:20b:460::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14 via Frontend Transport; Tue, 21 Dec 2021 17:47:22 +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; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT036.mail.protection.outlook.com (10.152.19.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.14 via Frontend Transport; Tue, 21 Dec 2021 17:47:21 +0000 Received: ("Tessian outbound 157533e214a9:v110"); Tue, 21 Dec 2021 17:47:21 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 612701aad37834aa X-CR-MTA-TID: 64aa7808 Received: from 310017973955.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 6DF71E7F-4DFA-4CC5-BC17-A20555EDEB98.1; Tue, 21 Dec 2021 17:47:14 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 310017973955.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 21 Dec 2021 17:47:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TwPTzHw+nUyMj9aPfiSQARyNrE7rqC3C0+31z5OOIyA7Vz3V4EyMRB+9vdqqG1DhCG88KF4OmYL9IFiaZbgiB+nqsXYazH1QeQzf0GIkFmFLAQtprgbXSnw6F3maQ9fFxBLVps2pYhoyGIQ36pLvDL+oPsJR/g8xkBt4gsG8EeFEZ+tMlJSCgEp6t6/xcZoK8SEgVt1aLd7kftab5Q1uMWzZyakg0Y8qJPQ0MH29sfRB1mrvziLAgspnZEFPf2FWgXeV7fFRYAtbeKbixHuyijlq3FTclfWyJGUFvu5kwDNnh28V5zpXH2vpUlnA0DJ/HvRtZ95V9lJEcskQDAyKDg== 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=nJlEbD7ykw2env9Z5ruQqmklv7bc8+FIeetPZhKPlbk=; b=kqkgOkGjYuufbnbzIrnnS+3l4GktZZ8g2+sFB4w0KcduOkycPfrEsjiEIDF3XY/67AADrabwCz+etMrHGMUwZ1His8NgqPWPF3w+O0q2oKFey5/Qp6DXlqcDKr1A6b6+XpLx5TLNKlzB26/+1jAH3zgzd424Qg0AFUX+zWzNZftjc7SdkwQWepQbLcj2AjOJ/wHwIc1c2KOIaVFw8ytsL+JQGmamGF7+UlFRq/8KYsOScLWETxVCRTtswFR2hWzlUrsTJ5ZoHyiQdYff3k/FOGohrqWXPBhzVcKc/ThCqzc5lquBYdGzJYS3xKf09SGOJzqanCmmGdhYueX+He2V3g== 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 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) by DB9PR08MB7161.eurprd08.prod.outlook.com (2603:10a6:10:2ca::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.15; Tue, 21 Dec 2021 17:47:11 +0000 Received: from DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::25f9:a7e6:422a:da43]) by DB9PR08MB7179.eurprd08.prod.outlook.com ([fe80::25f9:a7e6:422a:da43%7]) with mapi id 15.20.4801.020; Tue, 21 Dec 2021 17:47:11 +0000 Date: Tue, 21 Dec 2021 17:47:09 +0000 From: Szabolcs Nagy To: Adhemerval Zanella Cc: libc-alpha@sourceware.org, Florian Weimer , John Mellor-Crummey Subject: Re: [PATCH v6 19/20] elf: Fix runtime linker auditing on aarch64 (BZ #26643) Message-ID: <20211221174709.GD3294453@arm.com> References: <20211115183734.531155-1-adhemerval.zanella@linaro.org> <20211115183734.531155-20-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211115183734.531155-20-adhemerval.zanella@linaro.org> X-ClientProxiedBy: LO4P123CA0453.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1aa::8) To DB9PR08MB7179.eurprd08.prod.outlook.com (2603:10a6:10:2cc::19) MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 5955792c-3ca1-4eef-996c-08d9c4a9f0e8 X-MS-TrafficTypeDiagnostic: DB9PR08MB7161:EE_|VE1EUR03FT036:EE_|AM0PR08MB4562:EE_ X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: FbN2wXJqcgRYqQaFErmKQG+y6mEwR5cnkvofwXI9U7ufXUVmJ5LdPZbh+1QeSrVnRiqmH07zSbU3bQn3GWrnHt/TxbuVAhpx9+kgZWf+GCS3uhb6vTJgu8F4eO0usW66sl4ngUnDetbmR8Hwv1gsQnGffG9nxFA+GtHlUquXmzmBP199J8py1niMItfWjo8VKUlHEBfPUrdtCb2ukTGJ/A+h/j7RJ0mpXGv562tJKBghZSwtoDOYHo6uuxm9vzdKhkrDNBnXz3YgWWlR2KKYc52uNvxQFrlsS8Hj1adp8qY5O0siPUOnzi8nxAWmm+VFPVrC4iwyw4y745HQ5RVgHt8F27+Lz65k1J+PXaGfk5i3d9xclgzkaPXCPrjobHp78pPoAmR3F0j4ij/77QCnTqXMcHvOlBHQEvReQ8Rmxpjbm3r+ntU+6u3C5ZGspGP4F2gh/yt7Vtmesj+iL8nt39I9nYK/BkynHqujpXy3FSx3eiyNtSnVUI1M9a/mmnbKEJaTxJmylx78wCcZxt5aMAcf6aUG8TMjMCDMT4JCI2fGTq+1gM8T4Z6/e+y7h2Jy+SSXxBuB93iTva9nPHFZGZvBK0hfi0uGQ5vADbhlIXgkDDSE+RYB7u99dOj+D5L2N0nrC66wsbcIeBoq1uuABWMhmw3TZjgd/GzXPzGlUAAhrBWfkwnP/Ur0oCFlEhzM X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR08MB7179.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(1076003)(26005)(52116002)(186003)(6512007)(4326008)(508600001)(44832011)(8936002)(6506007)(54906003)(8676002)(2906002)(86362001)(33656002)(38350700002)(66476007)(6486002)(316002)(38100700002)(66556008)(36756003)(66946007)(2616005)(5660300002)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7161 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 670e9119-c2d8-4e3b-b52f-08d9c4a9ea82 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NMCIaQ3mS8ga14UAiLevTJ6c830vKX5AJFCxx/C5XReH//n78kKjCWFBcYxnKqrW/XFMoWjG8MNpdCl+9vNdK3w9EtH9dBDrV1pd2fTJgxahGkbRo+e8qmK0uG829vrRGVgcB9Ai+Ianubf9Ts/WGMGU0jTytA4zV4mqQ74ZosMuvsL4/EIJ9Uil0isNjeFggHCbJ1KCz4oB4cUQ+xZguhallhARPqdYDc95Zfu2NtbWTV/g5UdTo9TCfCAxENiBWqU0iL3uVFeV2rCQSwRxXyRD0QLUTMBD/iA2nfJt1Re7zXkV/VWmYRxFAfCK5FbUjLf3JF0+9WS51VHgZwRX9FaYXmNk1AKO8Mf4lgrQp2ZaZa4z+L80UHFW6gOGxPUPIBElRwyLvmoTcW19Q3Aq3OakvH6NejzBirvRtP9+u6nDIaDL5YljH47LtppErrX44bVp7YmQfMmPO51cl++A30LPgrLRewm9S7np4oBpCMtvZw3h16HynW6A8mr55mBafz1qkprOfSUFyRjHwH/xn8j2ZxjLjbxwaPUJfa/EFbJC5JL7hf9kEA/Tn0JVlZohbcSVKvFtGEI/eyY5HRXvBigswiHMoObbSEjP8J6CFNZCpG9CmTLlc4G4ddQ85znQ0cyumeo2FvCzsrW9LblODJtzrdo1r+wNrXwaq6etZ4uH7g0KGfhhylXDHdjaANcK 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:(4636009)(46966006)(36840700001)(47076005)(54906003)(82310400004)(8676002)(81166007)(36860700001)(6486002)(33656002)(26005)(508600001)(44832011)(70206006)(336012)(70586007)(2906002)(1076003)(6862004)(4326008)(6506007)(8936002)(6512007)(107886003)(186003)(2616005)(36756003)(5660300002)(356005)(86362001)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2021 17:47:21.8834 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5955792c-3ca1-4eef-996c-08d9c4a9f0e8 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: VE1EUR03FT036.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4562 X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , X-List-Received-Date: Tue, 21 Dec 2021 17:47:28 -0000 The 11/15/2021 15:37, Adhemerval Zanella via Libc-alpha wrote: > --- a/sysdeps/aarch64/bits/link.h > +++ b/sysdeps/aarch64/bits/link.h > @@ -20,23 +20,29 @@ > # error "Never include directly; use instead." > #endif > > +typedef union > +{ > + float s; > + double d; > + long double q; > +} La_aarch64_vector; > + > /* Registers for entry into PLT on AArch64. */ > typedef struct La_aarch64_regs > { > - uint64_t lr_xreg[8]; > - uint64_t lr_dreg[8]; > - uint64_t lr_sp; > - uint64_t lr_lr; > + uint64_t lr_xreg[9]; > + La_aarch64_vector lr_vreg[8]; > + uint64_t lr_sp; > + uint64_t lr_lr; > } La_aarch64_regs; > > /* Return values for calls from PLT on AArch64. */ > typedef struct La_aarch64_retval > { > - /* Up to two integer registers can be used for a return value. */ > - uint64_t lrv_xreg[2]; > - /* Up to four D registers can be used for a return value. */ > - uint64_t lrv_dreg[4]; > - > + /* Up to eight integer registers can be used for a return value. */ > + uint64_t lrv_xreg[8]; > + /* Up to eight V registers can be used for a return value. */ > + La_aarch64_vector lrv_vreg[8]; > } La_aarch64_retval; > __BEGIN_DECLS i think for variant_pcs we will only need a void *extension; or similar member at the end of both structs. (we can make it point to a dump of all registers in some format for variant_pcs PLT hooks) if this can avoid a second bump of LAV_CURRENT when we add variant_pcs support then it may be useful to have. (if this turns out to be not enough then we don't lose much, but it also means users have to check extension==0 for now and avoid interpreting or touching the registers otherwise. not sure if this is better or bump, depends on how many users need to keep updating their auditor libs on our bumps.)