From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 9CC97385781B for ; Thu, 13 Jan 2022 19:03:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9CC97385781B Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-21-eVeymMFCMraEY9XMY5tQwQ-1; Thu, 13 Jan 2022 14:03:00 -0500 X-MC-Unique: eVeymMFCMraEY9XMY5tQwQ-1 Received: by mail-qv1-f71.google.com with SMTP id ib7-20020a0562141c8700b0040812bc4425so6564990qvb.16 for ; Thu, 13 Jan 2022 11:03:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=0FmZNnspxZpVzPVUdh8lZOXCyXwwVJ0+P8sNtRSVruM=; b=47z/QncWkCkKLomp0her1Cx2O2UQE9w0wN1jV6/cdsO12GuObfbqdz5t4HKC2YRqjC 3TgIF628kxTAoQvzzwdV6w0mUFwTDZidWOa4/Nj05aNu6Z35yGahmNkSjwOu38lvi6zD rFeuvKJEcoH50vcatPBD0Las/MC5b/wj/SJxMjFmUQ+k5bkI+pMRRoKexPDAJ3mgMgoD yD7iJVJMWONsCv8RVoiZaVvODvnnSP2DWm8G4oUp9RycOdWuvOw30Lq8dGcM+tQpa9zj x13c1Ff1N4ltNgDIZ0gCVjc43slj8//jFRhFyquJfnmNnXBET0WQOsp1hXkKufNalGw/ FbDA== X-Gm-Message-State: AOAM530Y5TTs5pqjEoy4RIL71+gb+xB94R9bDeNDUV60oZPDWn5WF8dE h6uJMNrdYgrcsYAdZeOaCke0/6HmUJ1nPRgTS/wi8PpsnwozWx0wxmFqYVbgwnVeVQxP40WuA2R 0eFWq2D6Nj432HmMXUbwT X-Received: by 2002:ac8:59c5:: with SMTP id f5mr4676036qtf.135.1642100578574; Thu, 13 Jan 2022 11:02:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcikTwDoam3GsR6laRHHW/7vdr+1hv44XNIsTSfZFyXvm1PqGfpaNtnK5mGj046I3WKd213g== X-Received: by 2002:ac8:59c5:: with SMTP id f5mr4675902qtf.135.1642100577057; Thu, 13 Jan 2022 11:02:57 -0800 (PST) Received: from [192.168.0.241] (135-23-175-80.cpe.pppoe.ca. [135.23.175.80]) by smtp.gmail.com with ESMTPSA id o6sm2291793qtr.83.2022.01.13.11.02.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 13 Jan 2022 11:02:56 -0800 (PST) Message-ID: <61940983-6adf-32fd-394d-74e6158eb323@redhat.com> Date: Thu, 13 Jan 2022 14:02:55 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] elf/dl-deps.c: Make _dl_build_local_scope breadth first To: Khem Raj , libc-alpha@sourceware.org Cc: Mark Hatle , Mark Hatle References: <20211209235354.1558088-1-raj.khem@gmail.com> From: Carlos O'Donell Organization: Red Hat In-Reply-To: <20211209235354.1558088-1-raj.khem@gmail.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP 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: Thu, 13 Jan 2022 19:03:09 -0000 On 12/9/21 18:53, Khem Raj via Libc-alpha wrote: > From: Mark Hatle > > According to the ELF specification: > > When resolving symbolic references, the dynamic linker examines the symbol > tables with a breadth-first search. > > This function was using a depth first search. By doing so the conflict > resolution reported to the prelinker (when LD_TRACE_PRELINKING=1 is set) > was incorrect. This caused problems when their were various circular > dependencies between libraries. The problem usually manifested itself by > the wrong IFUNC being executed. > > Similar issue has been reported here [1] > > [BZ# 20488] > > [1] https://sourceware.org/legacy-ml/libc-alpha/2016-05/msg00034.html > > Signed-off-by: Mark Hatle > Signed-off-by: Khem Raj This needs much more discussion before inclusion. At the very least we need clear test cases that show the problem. The alternative patch I would support is prelink support removal. -- Cheers, Carlos.