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,NICE_REPLY_A, 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 966F31F8C6 for ; Wed, 14 Jul 2021 16:58:13 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 991C83840027 for ; Wed, 14 Jul 2021 16:58:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 991C83840027 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626281892; bh=tzWbNjdPxlWtCNx8mNfJCCf1nn6B+L8WgwFhmH1f0Go=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=gT5seCVMNqvCbeW8mglv24cUQvN536E4r7lQsmi0IwSghp5QotK7HjYVNqqzgmdqY Kf6KTTnWYnPzg8T8yHdnxxdqkdcCRHEt3Mrxom3FuwZyOr97NsvYbDLv9e8Nu1sRxt M+rGXTUEn6G1eJyP2vQKcgtmwjyI1v8jJpTJIVsc= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 7E63F3840027 for ; Wed, 14 Jul 2021 16:57:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7E63F3840027 Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-579-ILUoTPpJM-iZ_y8waveWOg-1; Wed, 14 Jul 2021 12:57:52 -0400 X-MC-Unique: ILUoTPpJM-iZ_y8waveWOg-1 Received: by mail-qv1-f71.google.com with SMTP id z93-20020a0ca5e60000b02902e558bb7a04so2077431qvz.10 for ; Wed, 14 Jul 2021 09:57:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=tzWbNjdPxlWtCNx8mNfJCCf1nn6B+L8WgwFhmH1f0Go=; b=Jhc0ZPSyH39NA9Yla/4v27bYBRfgA1bBIcjd8HElQxFpEvGsyRfoc1XdmRRgpCuvup 4pNvCFhxZXen5yLD7KUrtoXKefpdxHWvvhQ92DIuHdx/MKD8IwewOktgDfht0z0U41Rm 7xiYf3NahHEqQa+fD4Q5jAGrXQqtWFpQNAPf1xdKRJj+Pv6NjkvPz3Vn31zmRFEqOtNi xgib63R5IWhKGFnq40tyFeawroiHoGBscrudpvYPZWuUbpy+0lHAd+GiIfrVjUJJGD3+ Mwm0CG+jm/oYURbCRB6mvDQ8eEmafO0/hPfuymaAl1b9/LEvITy9jf6FQVOVM50kMe9y fG6g== X-Gm-Message-State: AOAM531eJEoFukNuqFryAkYoeiQN6AG/9VZynoFLeN55FvxpmuCLbt1C brzSCycI7KQ8IuJkMr5mDZkSqV2YQitbgiA1b6ZZ69Kn2V4mHhQlEYGxg5bazSisHmdOux/ydAA pB4wFWX54ueVNGkAY024/cAVW74HD62ZsLT9zzAlvV0vKJQ+P6T2PEsVBILe0X5j7yhLpOA== X-Received: by 2002:a0c:d845:: with SMTP id i5mr11649116qvj.32.1626281871584; Wed, 14 Jul 2021 09:57:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRkZBBgAw0pchsfiMsguCViMCAyHR0kNhEuJ7oEn+zRG8uRa8cu+r/EtSDiVAwuaYd6iRpCA== X-Received: by 2002:a0c:d845:: with SMTP id i5mr11649096qvj.32.1626281871389; Wed, 14 Jul 2021 09:57:51 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id 18sm1288288qkv.118.2021.07.14.09.57.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jul 2021 09:57:50 -0700 (PDT) Subject: Re: [PATCH v3] elf: Fix DTV gap reuse logic (BZ #27135) To: Adhemerval Zanella , Szabolcs Nagy References: <20210709135001.505521-1-adhemerval.zanella@linaro.org> <20210709150512.GT14854@arm.com> <0c977f4a-248d-c035-a615-852adee670a1@linaro.org> Organization: Red Hat Message-ID: <76323d51-f54d-29c1-1a72-3b439c521f44@redhat.com> Date: Wed, 14 Jul 2021 12:57:49 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <0c977f4a-248d-c035-a615-852adee670a1@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: Carlos O'Donell via Libc-alpha Reply-To: Carlos O'Donell Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 7/14/21 9:52 AM, Adhemerval Zanella wrote: > > > On 09/07/2021 12:05, Szabolcs Nagy wrote: >> The 07/09/2021 10:50, Adhemerval Zanella wrote: >>> Changes from previous version: >>> >>> - Fix commit message and add a line about the bug fixes. >>> - Use atomic operation while setting the slotinfo. >>> - Use test_verbose on tst-tls20.c. >>> >>> --- >>> >>> This is updated version of the 572bd547d57a (reverted by 40ebfd016ad2) >>> that fixes the _dl_next_tls_modid issues. >>> >>> This issue with 572bd547d57a patch is the DTV entry will be only >>> update on dl_open_worker() with the update_tls_slotinfo() call after >>> all dependencies are being processed by _dl_map_object_deps(). However >>> _dl_map_object_deps() itself might call _dl_next_tls_modid(), and since >>> the _dl_tls_dtv_slotinfo_list::map is not yet set the entry will be >>> wrongly reused. >>> >>> This patch fixes by renaming the _dl_next_tls_modid() function to >>> _dl_assign_tls_modid() and by passing the link_map so it can set >>> the slotinfo value so a so subsequente _dl_next_tls_modid() call will >>> see the entry as allocated. >> >> this paragraph still has 'so a so subsequente' >> and i would add the bug number into the first sentence. > > Fixed. > >> >>> >>> The intermediary value is cleared up on remove_slotinfo() for the case >>> a library fails to load with RTLD_NOW. >>> >>> This patch fixes BZ #27135. >>> >>> Checked on x86_64-linux-gnu. >> >> the patch looks ok to me, with the commit message >> and the comment issue below fixed. >> >> Reviewed-by: Szabolcs Nagy > > Carlos, is it for push? It's a non-ABI bug fix, so we can push it. Thanks for asking. -- Cheers, Carlos.