From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20989 invoked by alias); 20 Sep 2018 02:01:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 20895 invoked by uid 89); 20 Sep 2018 02:01:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=accelerate X-HELO: mail-qt0-f195.google.com Return-Path: Subject: Re: [PATCH] Protect _dl_profile_fixup data-dependency order [BZ #23690] To: John David Anglin , Tulio Magno Quites Machado Filho , libc-alpha@sourceware.org, Adhemerval Zanella References: <20180919214829.20551-1-tuliom@linux.ibm.com> <2009c13b-169f-e476-6380-ffe4ceede9ac@redhat.com> From: Carlos O'Donell Openpgp: preference=signencrypt Message-ID: Date: Thu, 20 Sep 2018 02:01:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-09/txt/msg00349.txt.bz2 On 09/19/2018 09:59 PM, John David Anglin wrote: > On 2018-09-19 8:16 PM, Carlos O'Donell wrote: >>>    DL_FIXUP_VALUE_TYPE *resultp = &reloc_result->addr; >>> +  DL_FIXUP_VALUE_TYPE value = atomic_load_acquire(resultp); >> You are potentially requiring an atomic load of a structure whose size can be >> an arbitrary size depending on machine and ABI design (64-bit fore 32-bit hppa, >> and 128-bit for 64-bit ia64). These architectures might not have such wide >> atomic operations, and ... > We have implemented 64-bit atomic loads and stores for 32-bit hppa. They are not well tested but > they might work.  They use floating point loads and stores, and kernel helper.  The code is pretty horrific :-( We only need to use the fdesc->ip as the guard, so we don't really need the 64-bit atomic, but other algorithms like the new pthread condvars can use them effectively to accelerate and avoid 2 lws kernel helper calls and instead use 1 lws kernel helper 64-bit atomic. -- Cheers, Carlos.