From patchwork Tue Nov 3 10:25:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 11876651 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24E14C388F2 for ; Tue, 3 Nov 2020 10:27:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8968222404 for ; Tue, 3 Nov 2020 10:27:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="BPTrbK8i"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="Eq8WzEuB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=armh.onmicrosoft.com header.i=@armh.onmicrosoft.com header.b="Eq8WzEuB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8968222404 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Gh4iYbAJnzqalqY+FcTZJPm9+cL385tB120BCtDJcms=; b=BPTrbK8iwod07n8E5Q6Xu3Nhx +IWawggV8rkeHIHVTUKB4jEASgFqvVy0DH/sbGJ7Nt4OgoebInhcLcCCgDxqslBoM3VwH3tMvWqUz HVojzRgAM+BeRDnVxXXeZZBVFTOpkBfUcxdUlOznL+MaeT/xAxKCKeyueSnP+WWrrriiY91w34ZRn TSecHxMz96UqtWR2LBxU97PQMalCp0sTWmVXris4tqhBgeQ3I+wIwUqrPA6BxrYJmYUgjNzJQ1xAX sg2M3ZnobZGduSufm8fgvc8LO71+bIWGsTqBGoAuE5WqA92Rt/w/zDoQxZcLOSyj4EKhorWUMLDxk TU0PnsFLg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZtWQ-0008UI-0g; Tue, 03 Nov 2020 10:26:38 +0000 Received: from mail-eopbgr20045.outbound.protection.outlook.com ([40.107.2.45] helo=EUR02-VE1-obe.outbound.protection.outlook.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kZtWL-0008Sk-05 for linux-arm-kernel@lists.infradead.org; Tue, 03 Nov 2020 10:26:35 +0000 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=DA/uKEqYFIqv4yw/4vuKz0cdGhH9H2bnFuZnjVQ/Wbc=; b=Eq8WzEuB0TdDN9OLkTfgMfcLPE7sk9093wOs04dOGlFUd4eVfBKaQmommKTwuFZUUNS2wAKy6uRVxz32FZSGlegzEax/rIE2WhQfS8sLr25mxqDgTgPNkW0N0kSBGu5rO0vP7zhvvdou9rQjIGDMW1B5nKVGuEGPb5yVTUFnNAI= Received: from AM5PR0301CA0018.eurprd03.prod.outlook.com (2603:10a6:206:14::31) by DB6PR0802MB2199.eurprd08.prod.outlook.com (2603:10a6:4:82::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19; Tue, 3 Nov 2020 10:26:27 +0000 Received: from VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:14:cafe::fb) by AM5PR0301CA0018.outlook.office365.com (2603:10a6:206:14::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.19 via Frontend Transport; Tue, 3 Nov 2020 10:26:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.infradead.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.infradead.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 VE1EUR03FT014.mail.protection.outlook.com (10.152.19.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3520.15 via Frontend Transport; Tue, 3 Nov 2020 10:26:25 +0000 Received: ("Tessian outbound c579d876a324:v64"); Tue, 03 Nov 2020 10:26:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1b7fbd5d4e494ead X-CR-MTA-TID: 64aa7808 Received: from 66201f25bafa.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AE9A3D34-34A3-44BD-8767-015AE47FD291.1; Tue, 03 Nov 2020 10:26:14 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 66201f25bafa.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 03 Nov 2020 10:26:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KKyYgGMMKnI/dqhwGwOJ83t3I8qrN2728qtg6W6pgxyVz43txLL5KiRmC8aYXkqX40vaLyJnB9scgmb/1zfVv+1gFsafEaGWJarKMJNyvJpmVHJ22JegV/Wq+vbYLX6ensCQU/XkgN6OZJk1zit2nGbkQybbGCBpMeY6+n2iMPpuo8dd6K+mdB0w6/mTftgPBGp1bxe6HfwkOwVi8no5dicCqDeWJU+qEpmbNZPtcCua45ksq2FCEcoEznLVlb2c4EZy1YbkFJBMxlPkABZoRZ1EMEnHI4q06dX/PWRmNdPYi6PyDJAOISi9AeZtglV6qmMJDomeLKfl+6LOSIrLxw== 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=DA/uKEqYFIqv4yw/4vuKz0cdGhH9H2bnFuZnjVQ/Wbc=; b=Ki24zoZFsLrzrB/EJMZn407u9N0uDZdI7wCXYcogz4RwNpVa4kHUWH6nBLNlJJqZEbmxLN75FX7loYhTR30UwqgC/dPOOwSazJUeJM4nse0IAmtFftgJhahMdpQmbzQWarQ+YODYT8iu7vtDjPT5UiZ9w+FU1W4+6IhPeQ2aSWMKg79it2Ckl6gEAMDyH6AwmsC5U26SlMOgqJHWVKvehKKf0WII47+/s7AQL0+dptFfk40RuI1SojpfxQTEnjGfBF7egUDSdIV0fIeT1+YM9M2suCcmewzvwzRydXStJJ2Q6KshIbve5L0C4CFUl2s4VW7b6iuBS63CBYRrAELgvA== 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=DA/uKEqYFIqv4yw/4vuKz0cdGhH9H2bnFuZnjVQ/Wbc=; b=Eq8WzEuB0TdDN9OLkTfgMfcLPE7sk9093wOs04dOGlFUd4eVfBKaQmommKTwuFZUUNS2wAKy6uRVxz32FZSGlegzEax/rIE2WhQfS8sLr25mxqDgTgPNkW0N0kSBGu5rO0vP7zhvvdou9rQjIGDMW1B5nKVGuEGPb5yVTUFnNAI= 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 PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) by PA4PR08MB6223.eurprd08.prod.outlook.com (2603:10a6:102:e8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.27; Tue, 3 Nov 2020 10:26:12 +0000 Received: from PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::2904:edcf:b299:f792]) by PR3PR08MB5564.eurprd08.prod.outlook.com ([fe80::2904:edcf:b299:f792%3]) with mapi id 15.20.3499.032; Tue, 3 Nov 2020 10:26:12 +0000 From: Szabolcs Nagy To: libc-alpha@sourceware.org Subject: [PATCH 1/4] elf: Pass the fd to note processing [BZ #26831] Date: Tue, 3 Nov 2020 10:25:58 +0000 Message-Id: <31936e4acedb265ad49d04f7789bef09d6578448.1604393169.git.szabolcs.nagy@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: X-Originating-IP: [217.140.106.54] X-ClientProxiedBy: SN6PR05CA0019.namprd05.prod.outlook.com (2603:10b6:805:de::32) To PR3PR08MB5564.eurprd08.prod.outlook.com (2603:10a6:102:87::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (217.140.106.54) by SN6PR05CA0019.namprd05.prod.outlook.com (2603:10b6:805:de::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.10 via Frontend Transport; Tue, 3 Nov 2020 10:26:08 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: a064e2d4-5d2c-415f-b4c9-08d87fe2eaf7 X-MS-TrafficTypeDiagnostic: PA4PR08MB6223:|DB6PR0802MB2199: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: AaxZiJ7jdnYp8oYD2ZDBf5QY4DECjO04ey3y7RDl0oTDJTGmqCY+xJtoeab1SQ/opSeIsmOdH95B6FXKdajRMViBb6frjEKss63aZKt6svL+EwUnYdDYtQa9c+GZsbJJhRzQzQxLR500HnSBqbA1vqByjX1zi4EWyFnhAwsrHgOoVYuiSW3qC+pHZrMbnyd/YdqiVcv8tIP9ZUtNWc3Qs7W6rVqSo4fr93kioTeb+kgoYW5D2ysQFwTyhqtgBSvbMGNqdna38Kk6x1cZC3ts6J9vxdHxltY8oD2I0wznGuA5cvBr2sP4vBTAk4UGe7B2VkNJwFCYd6nBmyrFT5o99pVug4VYnL5i03uDM78aIdLVY85JdEF+I2l1GkHqHl8v X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PR3PR08MB5564.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(376002)(346002)(136003)(366004)(5660300002)(2906002)(66556008)(6506007)(8676002)(66946007)(478600001)(54906003)(66476007)(6666004)(6486002)(4326008)(6916009)(6512007)(69590400008)(186003)(16526019)(2616005)(7416002)(36756003)(956004)(8936002)(86362001)(44832011)(83380400001)(52116002)(316002)(26005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: sDODfNVK6I1Y/maSwD9fiqG+WsIIHDnTIDBUyAnsUO3P9ydzjO8R2e3ZHV6s3M+/aeO8WwB5dyZpuEa+CnFqYwJf4+df5QhbII+ZXY7FEAQsH120aHjz1GRbFAv3ftwh2udUaQbBtzWZDCPjNCPl6SMgucF2FCyXAIj/PaGF5skh/5+mhok/QsBP1LHtQhdk9y18xLf30TZXUCcZ5mcjrFe6viDgSWbjvB6R2rhHqtS/iTOixIa/KWzSoIdaY5Lo9cfss+5D5FGaycYr4sderddscABk9SD1cOGahFxf8a7lERQpCQMSyVSpv4mWweFo811P3SAFTrQu1GXFk77hQnIVMj7eoydL/vzATdYpc1i44otgFkMGkRJQy2lH4wjaX7BvApHbxoEvsUQ5S9ky+Bvx45tzPIh2dSNn8kv794dojyEOU8nv8MJg5uKyRcEF3DhFJlbtNbeRJfTVxiD/qtOcALiPGhprsvxXMOfuxgIU5xgsdW341fhSywjjnAxIeaIsLrSgy6obGJAfnq61CWIM3NJ5FT41eRnZbEeL3+k9Y2WT62vRWY21dKX4Jfw0niZ7luXX8KNJvBt+lKNXLyqotlGjHZnfeK/ZIGJUKilvH3VSP5DdgjG4UecSp0rC9GAEHFkWIDbmHAv17cVF0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6223 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: VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 8914356f-c88b-4471-257d-08d87fe2e2d7 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rfRITbndBEjVhmJlCixOh5FDm8YUxJ/G7eH2e9Fe6n8z1quF/b86Q8jz1nZu257NlfYCZAMynXMylER6/n5K9tVJMO4sz88gUXcc4kmNSLGZph+tmBDgrWMa69Xl6+gQ8ZEwbqm5Hee86urFKJEXTo5oAma/ryLSw13k+BTbhUzPt3B8cvVS+kjQRQDExtDzsNGfOWcSbI83TFehqF4k7gpn9pNy07nuJoKjJ+L+YapfENANeozNyTpfttYItv9hTIXQDIhwLOW2Hh1cBy+ksCRwjI5UJrZYjWPnu4lysX4OZfVWgU+G8/cYrn41sGQDuObBEnutMwiRNEFMfwzSsPyD7pj96qvYuQU555/i8yzAexeKXTyT1ZFJRhqjaonxKoTSwA+0eB+u3MUQC0/7D3l6RUSmMcZs+diXOxI5peuv/kkXREr9Vf4cKaAD4ZVB 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)(39860400002)(136003)(346002)(46966005)(36906005)(316002)(34206002)(6512007)(336012)(8936002)(956004)(69590400008)(5660300002)(107886003)(83380400001)(54906003)(82310400003)(356005)(2616005)(86362001)(6506007)(44832011)(82740400003)(6666004)(70586007)(47076004)(26005)(36756003)(2906002)(16526019)(6486002)(186003)(81166007)(4326008)(70206006)(478600001)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2020 10:26:25.2114 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a064e2d4-5d2c-415f-b4c9-08d87fe2eaf7 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: VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2199 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201103_052634_171505_3A169BDB X-CRM114-Status: GOOD ( 17.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Florian Weimer , Kees Cook , kernel-hardening@lists.openwall.com, Salvatore Mesoraca , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, Jeremy Linton , Mark Brown , Lennart Poettering , linux-hardening@vger.kernel.org, Topi Miettinen , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org To handle GNU property notes on aarch64 some segments need to be mmaped again, so the fd of the loaded ELF module is needed. When the fd is not available (kernel loaded modules), then -1 is passed. The fd is passed to both _dl_process_pt_gnu_property and _dl_process_pt_note for consistency. Target specific note processing functions are updated accordingly. --- elf/dl-load.c | 12 +++++++----- elf/rtld.c | 4 ++-- sysdeps/aarch64/dl-prop.h | 6 +++--- sysdeps/generic/dl-prop.h | 6 +++--- sysdeps/generic/ldsodefs.h | 5 +++-- sysdeps/x86/dl-prop.h | 6 +++--- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/elf/dl-load.c b/elf/dl-load.c index f3201e7c14..ceaab7f18e 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -861,10 +861,12 @@ lose (int code, int fd, const char *name, char *realname, struct link_map *l, /* Process PT_GNU_PROPERTY program header PH in module L after PT_LOAD segments are mapped. Only one NT_GNU_PROPERTY_TYPE_0 - note is handled which contains processor specific properties. */ + note is handled which contains processor specific properties. + FD is -1 for the kernel mapped main executable otherwise it is + the fd used for loading module L. */ void -_dl_process_pt_gnu_property (struct link_map *l, const ElfW(Phdr) *ph) +_dl_process_pt_gnu_property (struct link_map *l, int fd, const ElfW(Phdr) *ph) { const ElfW(Nhdr) *note = (const void *) (ph->p_vaddr + l->l_addr); const ElfW(Addr) size = ph->p_memsz; @@ -911,7 +913,7 @@ _dl_process_pt_gnu_property (struct link_map *l, const ElfW(Phdr) *ph) last_type = type; /* Target specific property processing. */ - if (_dl_process_gnu_property (l, type, datasz, ptr) == 0) + if (_dl_process_gnu_property (l, fd, type, datasz, ptr) == 0) return; /* Check the next property item. */ @@ -1266,10 +1268,10 @@ _dl_map_object_from_fd (const char *name, const char *origname, int fd, switch (ph[-1].p_type) { case PT_NOTE: - _dl_process_pt_note (l, &ph[-1]); + _dl_process_pt_note (l, fd, &ph[-1]); break; case PT_GNU_PROPERTY: - _dl_process_pt_gnu_property (l, &ph[-1]); + _dl_process_pt_gnu_property (l, fd, &ph[-1]); break; } } diff --git a/elf/rtld.c b/elf/rtld.c index 5d117d0d2c..6ba918338b 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1531,10 +1531,10 @@ dl_main (const ElfW(Phdr) *phdr, switch (ph[-1].p_type) { case PT_NOTE: - _dl_process_pt_note (main_map, &ph[-1]); + _dl_process_pt_note (main_map, -1, &ph[-1]); break; case PT_GNU_PROPERTY: - _dl_process_pt_gnu_property (main_map, &ph[-1]); + _dl_process_pt_gnu_property (main_map, -1, &ph[-1]); break; } diff --git a/sysdeps/aarch64/dl-prop.h b/sysdeps/aarch64/dl-prop.h index b0785bda83..2016d1472e 100644 --- a/sysdeps/aarch64/dl-prop.h +++ b/sysdeps/aarch64/dl-prop.h @@ -35,13 +35,13 @@ _dl_open_check (struct link_map *m) } static inline void __attribute__ ((always_inline)) -_dl_process_pt_note (struct link_map *l, const ElfW(Phdr) *ph) +_dl_process_pt_note (struct link_map *l, int fd, const ElfW(Phdr) *ph) { } static inline int -_dl_process_gnu_property (struct link_map *l, uint32_t type, uint32_t datasz, - void *data) +_dl_process_gnu_property (struct link_map *l, int fd, uint32_t type, + uint32_t datasz, void *data) { if (type == GNU_PROPERTY_AARCH64_FEATURE_1_AND) { diff --git a/sysdeps/generic/dl-prop.h b/sysdeps/generic/dl-prop.h index f1cf576fe3..df27ff8e6a 100644 --- a/sysdeps/generic/dl-prop.h +++ b/sysdeps/generic/dl-prop.h @@ -37,15 +37,15 @@ _dl_open_check (struct link_map *m) } static inline void __attribute__ ((always_inline)) -_dl_process_pt_note (struct link_map *l, const ElfW(Phdr) *ph) +_dl_process_pt_note (struct link_map *l, int fd, const ElfW(Phdr) *ph) { } /* Called for each property in the NT_GNU_PROPERTY_TYPE_0 note of L, processing of the properties continues until this returns 0. */ static inline int __attribute__ ((always_inline)) -_dl_process_gnu_property (struct link_map *l, uint32_t type, uint32_t datasz, - void *data) +_dl_process_gnu_property (struct link_map *l, int fd, uint32_t type, + uint32_t datasz, void *data) { return 0; } diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 382eeb9be0..702cb0f488 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -925,8 +925,9 @@ extern void _dl_rtld_di_serinfo (struct link_map *loader, Dl_serinfo *si, bool counting); /* Process PT_GNU_PROPERTY program header PH in module L after - PT_LOAD segments are mapped. */ -void _dl_process_pt_gnu_property (struct link_map *l, const ElfW(Phdr) *ph); + PT_LOAD segments are mapped from file FD. */ +void _dl_process_pt_gnu_property (struct link_map *l, int fd, + const ElfW(Phdr) *ph); /* Search loaded objects' symbol tables for a definition of the symbol diff --git a/sysdeps/x86/dl-prop.h b/sysdeps/x86/dl-prop.h index 89911e19e2..4eb3b85a7b 100644 --- a/sysdeps/x86/dl-prop.h +++ b/sysdeps/x86/dl-prop.h @@ -145,15 +145,15 @@ _dl_process_cet_property_note (struct link_map *l, } static inline void __attribute__ ((unused)) -_dl_process_pt_note (struct link_map *l, const ElfW(Phdr) *ph) +_dl_process_pt_note (struct link_map *l, int fd, const ElfW(Phdr) *ph) { const ElfW(Nhdr) *note = (const void *) (ph->p_vaddr + l->l_addr); _dl_process_cet_property_note (l, note, ph->p_memsz, ph->p_align); } static inline int __attribute__ ((always_inline)) -_dl_process_gnu_property (struct link_map *l, uint32_t type, uint32_t datasz, - void *data) +_dl_process_gnu_property (struct link_map *l, int fd, uint32_t type, + uint32_t datasz, void *data) { return 0; }