Message ID | cover.1610016590.git.szabolcs.nagy@arm.com |
---|---|
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2EF46396EC64; Thu, 7 Jan 2021 11:01:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2EF46396EC64 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1610017269; bh=dJou4+dxrosUc97MaSifOD8dGjGxiixxIJ0cqqeRIJ8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=fN2J+vMUH1A/ukSiakhal7jH/pdCBfdwuKVmQDtuPtRwkkeRlTswQol2NldyXAJLM TGf9S5hgGAmDXi/9iihD1VoAXSqNjyOiqvvoYeUPpLFl2MyUZ3TL6Gr9IXoB8clozi wb2l5KEkIifE+mT6W4i8lTMic9S7siglVM6DT7uc= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from EUR03-AM5-obe.outbound.protection.outlook.com (mail-eopbgr30052.outbound.protection.outlook.com [40.107.3.52]) by sourceware.org (Postfix) with ESMTPS id 1D24A3851C26 for <libc-alpha@sourceware.org>; Thu, 7 Jan 2021 11:01:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1D24A3851C26 Received: from AM5PR04CA0001.eurprd04.prod.outlook.com (2603:10a6:206:1::14) by AM4PR08MB2851.eurprd08.prod.outlook.com (2603:10a6:205:d::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.22; Thu, 7 Jan 2021 11:01:02 +0000 Received: from VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:1:cafe::b8) by AM5PR04CA0001.outlook.office365.com (2603:10a6:206:1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Thu, 7 Jan 2021 11:01:02 +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=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 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.3742.6 via Frontend Transport; Thu, 7 Jan 2021 11:01:02 +0000 Received: ("Tessian outbound 665ba7fbdfd9:v71"); Thu, 07 Jan 2021 11:01:01 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: adcef0b4d35b8340 X-CR-MTA-TID: 64aa7808 Received: from 0ebbdb3feb53.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 2B0A0184-08D7-4F65-8C94-715A81ED180D.1; Thu, 07 Jan 2021 11:00:55 +0000 Received: from FRA01-PR2-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 0ebbdb3feb53.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 07 Jan 2021 11:00:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ATrCIpIE8eY7b8BO0VDidXFdoopRp9j/+F1ismIxUfS4xMxgtK2VhzFYqABa/KZBxpoJhm1C7llX9GxZRjCQHPU0cT/0KHGOmgFIiiS3FLMIXtWvRQovTT+XKcP/xBNszOh/TCZsQxk8oyaOVuleoMNr9I6Dr440sIR6BJU9XccAMtFFmdo9Pq+9OKh0zHC7O5lTfh2KunSoK4oj4AHQNWaI2R8OKh/rvV3eim+5H6or/ffClCC+AUdXnHPoqbn3i00vw9trNOcErrTxuaBcrzPDz08MOO1o1NmgFosPbFmIGdixqDGb1LfUpRRzx9WuJRRCagGwrZ2kmmzc2Sau/Q== 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=dJou4+dxrosUc97MaSifOD8dGjGxiixxIJ0cqqeRIJ8=; b=BiVcMRgKYHQ2bqVnG1YYLG4BWjnqEF8Ch/I7GFGDVSpOEqnhYzhuMti1f4/NRHthoPvisFes879Bx/rjxRldTPTdAs/fuS3DP/34ckkxHxW8NwU96vNr+2gv4Y6fin/38uj4YhaQcAY0Iepz63UEsmpunfcM96oFrnhmHs0XdWkpwfgIXAe5neVKTwkmLJdXQWK28jfSbeidVfxFr/RYQ/QJN9mD1myqkhOEyvz8jGQdfhEnInwhs+z9fPmTeFvokrjfGeSXfzkVey2EMMYqv0cLT2444uq/7KApGyGx+0sHr0IqFAuIm2lFyXFsFN1uTeVqHG6AnUo5notw+0c2sg== 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: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=arm.com; Received: from PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) by PR2PR08MB4809.eurprd08.prod.outlook.com (2603:10a6:101:1a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3721.21; Thu, 7 Jan 2021 11:00:54 +0000 Received: from PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::700f:ddbe:a347:ee4f]) by PA4PR08MB6320.eurprd08.prod.outlook.com ([fe80::700f:ddbe:a347:ee4f%6]) with mapi id 15.20.3742.006; Thu, 7 Jan 2021 11:00:54 +0000 To: libc-alpha@sourceware.org Subject: [PATCH 0/3] fix ifunc with static pie [BZ #27072] Date: Thu, 7 Jan 2021 11:00:47 +0000 Message-Id: <cover.1610016590.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 Content-Type: text/plain X-Originating-IP: [217.140.106.51] X-ClientProxiedBy: LO4P123CA0042.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::11) To PA4PR08MB6320.eurprd08.prod.outlook.com (2603:10a6:102:e5::9) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.51) by LO4P123CA0042.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:152::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6 via Frontend Transport; Thu, 7 Jan 2021 11:00:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 0841dd26-15b8-4f97-ea1b-08d8b2fb85b4 X-MS-TrafficTypeDiagnostic: PR2PR08MB4809:|AM4PR08MB2851: X-Microsoft-Antispam-PRVS: <AM4PR08MB2851A48D7EF5AAAAE834FBA3EDAF0@AM4PR08MB2851.eurprd08.prod.outlook.com> x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:3968;OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: J13Dgrjd7sog4/KlR0yeLRRgW2eHvMikfYOIhJFUJqws71DbQCeYTCZFjj7/XNSVKnufjTEJZQePtXC4PA2wtY3qIabptBMz0d5wP1xUdZjDFQMS6tZEo2sG/nL6sXLgmeEDy8z9mN90qLeIo/yvGLrW7KbrYZ3DKNSX5wMlNChtdqdllBbJR9yDNbSbxsLbYbs2hHc3JJdL2FMnasEVrTBM8QAPF3eOTtfWUXedyLqBt8NvI+9r+WcfC7j7++XYV+F1Bb5PIE1S80KJq8jc8s76rkbypTqwOAdcyX3DmTdmhfw07nScLZoBEwMupUGkaBAw9LI8Jmg1REVwFSB1CHka1LyrXg9lssb0S63qt/NWoBPkDal5oiaxOlJuvji6T4FkbrFhojAe+RFySW3ConbNCDaVI4GnC9LQkmxSEcMTYNhDh8w/TGq9fB/0dk8MkZzXQQEOE2s2E9pBR0efPOQaNY/VxBiSpwIV57+Ji3tyNxdzWOF4AGjc8h0h4LLD/xEv5dbqcNXK3bAVgf5MtQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PA4PR08MB6320.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(136003)(396003)(39860400002)(376002)(366004)(6666004)(2616005)(6916009)(86362001)(44832011)(69590400011)(52116002)(6486002)(956004)(8936002)(36756003)(26005)(966005)(2906002)(66946007)(66476007)(16526019)(5660300002)(6506007)(66556008)(83380400001)(8676002)(316002)(4744005)(186003)(6512007)(478600001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: zKeM2vdWRdeDrAFScUmbnb10jEm8SMV7rgJVI5tD8B4Hx5vuX9yGbjCinGsSeN+3RlvTxKxCjbD6RZijv1J866nrDzGKa4QOMHGLgJObQkBwnEJ1xao9r0yMQu34XZsW11X8D3/5iOsRRzHIoDBKXpQMgxT+25iR6/vDGh4SF9X0KYdvcdk/YwPWOIaHAmsKYX92cHirnuZcrkjgPgX9z2DIlVEGHT9kNnKvcy3M8mJNKKByyAjxOBXelgF1ETpfljX32ph9lN+VT7M1G2YN2klyIEAVd8mf7qy8YpUCbpdX8PggpHVXjGfIu2J96aLM5xweFoMuchV15CEkbO7kq3TnQlITz2f4qtGC5Gcn1nsEJnZBYe4O9ckRM3N9BOnnDALxP7+p+qLEQ4DpU9r27JbFwmcfeetmidq9fQ42/br7wwH/aCTXWJDJue8lV9AFphEMsfpUFEYrayK2lQ6km4JFRhQgNyjrEO38Cpo6N12K8Ki9UTAtQXlrxzEVslW9xszU+u27oMzdP7zapV27OIV5AF0fJMwDDiHEaJ1d5Bo7JmHaZljhzbaLHosGhCDn8pCg5nnwvlFzCU4mlrjLrYM1TTk1xS8k8bIUN4r2iKbzD01c9aO7U9jw2KnFaO8xYgDuUIvrj7WUvqERP9omoigZWUV5pDGtbZnwfFouvNP2vwC+0tultTE+WfBVuk/yKuGhe1Rhh5AntKxn2Kbs/F8K9XxWw6DlbhhjBs3+5ul8ZI/b6ea9aT0iUolzOk1IzGzC8XCqsCFvWZMl3EcV33mmn+dpKJ7R4bFRW4qfzGLBwggjToT9oCuzUEcu+x1EObZwBtAbGD0O0Vgcfxvh1XKtS8wTIAOb4Hcn/1J8HwTyBOseq6LLALkmzhgdfLs6toRZiUvfY/CAsiQqcL7EeIiksrwOgdvXJPk22aNU0PNgRpHTZu/eCniVj3lSv8uFnHgpx2ggataHQLQdcmBA2FW9+5UuTrSYApb5tVnJ8EGkQpj1JvquxC49p3AaG0m3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4809 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: VE1EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 2d90c388-23c6-456d-bbf9-08d8b2fb80d4 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aUKwK5SqNSCjv1PxfOavHmofgejM+VBYZk1pDJUmpSdEwepsR7vxfPr+0ISjtX0WoTzjwnWjXVuvSJEUhlTlARhW1IrgZA5lorMtmT4SjUFDUhS7WvWLAe2kMGBB3FPtUcD8Xi8ODsISY1eXY/VcoRili3N6JV8T6GMW44AaF8ugklOwUFsObVprgIxRA+HVOFQzUY8A8xVDumA/B5VcDkCDKeg05E3EqCkfwsVlwAp44yPHf0InzeVOijnIxacQJSoLTvr/SV57BxLIKxqBbLUVpA35zt19JFvNKUXPmricOXg+usQJFooq+noBTPoW52a/lw8PJrbCM6OalEcK2QKLhoobpKD9SWm+FUm5dMEHJC77K2pvmnIeg+bboZ2cpqxzNx/BIDmXEDoc7jTB2PKdkyF1skDS+NdIr9ZsmNIMmxFNEetzmRyk8rxRph+wtZ3DtzmLngrGK2AEX1Y9cp0gN5yLE6e+nttfpvfY+STUJIEJq91DKg4g/wUrkepydIeuMR4I+coSbfMJAbI3TGD7PcEtJxd0kxCy9wtSxpt/Sc4fNxjPhpUeDKv7LIRzNBHYdXm9qXfWakzWQc36WyqyH2nhgV1Vl4NnzIZH8lM= 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)(376002)(396003)(136003)(39860400002)(346002)(46966006)(36756003)(83380400001)(44832011)(4744005)(16526019)(6666004)(8676002)(6486002)(356005)(956004)(70206006)(336012)(70586007)(2616005)(82740400003)(316002)(47076005)(34020700004)(8936002)(478600001)(966005)(86362001)(69590400011)(6916009)(81166007)(2906002)(6512007)(6506007)(82310400003)(26005)(186003)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2021 11:01:02.1397 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0841dd26-15b8-4f97-ea1b-08d8b2fb85b4 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: AM4PR08MB2851 X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_NONE, 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Szabolcs Nagy via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Szabolcs Nagy <szabolcs.nagy@arm.com> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
fix ifunc with static pie [BZ #27072]
|
|
Message
Szabolcs Nagy
Jan. 7, 2021, 11 a.m. UTC
on aarch64 this depends on a patch i posted earlier: https://sourceware.org/pipermail/libc-alpha/2021-January/121366.html with that aarch64 static pie tests pass. i'm still working on the tunables change and thinging about libc build time checks for reloc-free early startup code. i havent tested x86, it might need changes. Szabolcs Nagy (3): Make libc symbols hidden in static PIE [RFC] elf: hack up tunables to avoid RELATIVE relocs csu: Move static pie self relocation later [BZ #27072] csu/libc-start.c | 10 ++++++++++ elf/dl-tunables.h | 4 ++-- include/libc-symbols.h | 8 ++++++-- scripts/gen-tunables.awk | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-)
Comments
On Thu, Jan 7, 2021 at 3:01 AM Szabolcs Nagy via Libc-alpha <libc-alpha@sourceware.org> wrote: > > on aarch64 this depends on a patch i posted earlier: > https://sourceware.org/pipermail/libc-alpha/2021-January/121366.html > > with that aarch64 static pie tests pass. > > i'm still working on the tunables change and thinging about > libc build time checks for reloc-free early startup code. > > i havent tested x86, it might need changes. Please fix the linker bug: https://sourceware.org/bugzilla/show_bug.cgi?id=13302 first before changing glibc.
On 1/7/21 7:48 AM, H.J. Lu via Libc-alpha wrote: > On Thu, Jan 7, 2021 at 3:01 AM Szabolcs Nagy via Libc-alpha > <libc-alpha@sourceware.org> wrote: >> >> on aarch64 this depends on a patch i posted earlier: >> https://sourceware.org/pipermail/libc-alpha/2021-January/121366.html >> >> with that aarch64 static pie tests pass. >> >> i'm still working on the tunables change and thinging about >> libc build time checks for reloc-free early startup code. >> >> i havent tested x86, it might need changes. > > Please fix the linker bug: > > https://sourceware.org/bugzilla/show_bug.cgi?id=13302 > > first before changing glibc. You will still need potential changes in the loader to handle existing binaries, so the binutils fix need not come first, but it needs fixing.
On Thu, Jan 7, 2021 at 4:50 AM Carlos O'Donell <carlos@redhat.com> wrote: > > On 1/7/21 7:48 AM, H.J. Lu via Libc-alpha wrote: > > On Thu, Jan 7, 2021 at 3:01 AM Szabolcs Nagy via Libc-alpha > > <libc-alpha@sourceware.org> wrote: > >> > >> on aarch64 this depends on a patch i posted earlier: > >> https://sourceware.org/pipermail/libc-alpha/2021-January/121366.html > >> > >> with that aarch64 static pie tests pass. > >> > >> i'm still working on the tunables change and thinging about > >> libc build time checks for reloc-free early startup code. > >> > >> i havent tested x86, it might need changes. > > > > Please fix the linker bug: > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=13302 > > > > first before changing glibc. > > You will still need potential changes in the loader to handle > existing binaries, so the binutils fix need not come first, Linker fix may impact how glibc should be changed. > but it needs fixing. > Whatever we do in glibc, please make it target dependent and it should be NOP for x86.
The 01/07/2021 04:55, H.J. Lu wrote: > Whatever we do in glibc, please make it target dependent > and it should be NOP for x86. the current x86 logic is completely broken it is not valid to do irelative before tunables.
On Thu, Jan 7, 2021 at 5:03 AM Szabolcs Nagy <szabolcs.nagy@arm.com> wrote: > > The 01/07/2021 04:55, H.J. Lu wrote: > > Whatever we do in glibc, please make it target dependent > > and it should be NOP for x86. > > the current x86 logic is completely broken > > it is not valid to do irelative before tunables. Do you have a testcase to show that?
The 01/07/2021 05:15, H.J. Lu wrote: > On Thu, Jan 7, 2021 at 5:03 AM Szabolcs Nagy <szabolcs.nagy@arm.com> wrote: > > > > The 01/07/2021 04:55, H.J. Lu wrote: > > > Whatever we do in glibc, please make it target dependent > > > and it should be NOP for x86. > > > > the current x86 logic is completely broken > > > > it is not valid to do irelative before tunables. > > Do you have a testcase to show that? what's the point of GLIBC_TUNABLES=glibc.cpu.hwcaps=... if it does not affect ifunc selection?