From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id 41EDD1F8C6 for ; Wed, 15 Sep 2021 16:35:55 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0F30C385843D for ; Wed, 15 Sep 2021 16:35:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0F30C385843D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631723754; bh=G5TsxvuByVcZagXM+ToAgl0RPmDUkMfIEIoaytC0OKA=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=MLA8jwUR4PosXNizMKn5jmu47bUgI4swQ6Y8ESMU8u1WDun/FXkfP7wp8OvM5Fwk0 vxgt26svKlZahH0VS7Llk+XDD2Blx+REjdXYpFvnInFU8rc/9zwgfC1jjuKUgaY45K yJTYiKX8xNRrxX1QQ7MIYHy18iLoM/WBeDK5mvEY= Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id E134C385840E; Wed, 15 Sep 2021 16:35:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E134C385840E Received: by mail-pf1-x432.google.com with SMTP id q22so3258999pfu.0; Wed, 15 Sep 2021 09:35:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G5TsxvuByVcZagXM+ToAgl0RPmDUkMfIEIoaytC0OKA=; b=ampeQZ5hp/tz1AfwAJ+ZL+HvSS+BPViH3U7mIAxmNgLmvv8GNQOATN1BR3fhdP7aov lV+S7Odri3IE8Quexqfu2ZEg4Z1iGXcluJkumSFMP64wGGdsrpLX2zoosXDlIW79w9K1 dJtHrSvE7BxRP7jwgGqMgkN99OHSTSwCnfnNo6qIP3ggxTfC1Y3U1BjOHmlPtFbcnxcJ R6gAUX4cnvrJAbjW7o+acS9XrJ8moz+11p2yVJEJ8f8pOyZgrgm1luX1ozaHbdhdjgfQ kiqHdeHMeJQLwE5UbjYoI/oh4G4YfrqREtg9OcJBv4zesW041xM6jqi6z/WECaxHWpMK /CLA== X-Gm-Message-State: AOAM530mD04Fsg7ei8u69Awkkg7w8ZjaOaks40zfcvDuThT5ukxnhVHT qXvn+GbWZ2HpaHTNZ4WNRBAegCAgBhtEJ8sjWjFv6prf X-Google-Smtp-Source: ABdhPJwDdzD4Lpbws/aaY82cSS/Jmac/Frcwnossla90WigFEbpUBuTFgz5HEuHqy9eYhQIRDUkjpuv2Ih/4Sj90zWg= X-Received: by 2002:a63:1656:: with SMTP id 22mr633737pgw.20.1631723731731; Wed, 15 Sep 2021 09:35:31 -0700 (PDT) MIME-Version: 1.0 References: <20210914190919.1728320-1-siddhesh@sourceware.org> In-Reply-To: Date: Wed, 15 Sep 2021 09:34:56 -0700 Message-ID: Subject: Re: [PATCH] ld.so: Handle read-only dynamic section gracefully [BZ #28340] To: Siddhesh Poyarekar Content-Type: text/plain; charset="UTF-8" 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: , From: "H.J. Lu via Libc-alpha" Reply-To: "H.J. Lu" Cc: Florian Weimer , GNU C Library Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Wed, Sep 15, 2021 at 9:24 AM Siddhesh Poyarekar wrote: > > On 9/15/21 9:43 PM, H.J. Lu via Libc-alpha wrote: > > Can you extract logic from setup_vdso to handle DSOs without > > relocations? > > The logic is already in elf_get_dynamic_info; setup_vdso only supplies > the static temp buffer to store the adjustments. We could dynamically > allocate memory for every DSO that has a read-only dynamic segment and > put the adjustments there, pointing l->l_info pointers to it, but is it > really necessary? What's the use case for a DSO with a read-only > dynamic segment? > > Siddhesh I think there are 2 separate, but related cases: read-only dynamic segment and DSOs without relocations. -- H.J.