From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 46630 invoked by alias); 10 Jul 2017 15:28:52 -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 46613 invoked by uid 89); 10 Jul 2017 15:28:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=unrelated X-HELO: mx0a-001b2d01.pphosted.com From: "Tulio Magno Quites Machado Filho" To: Nix Cc: libc-alpha@sourceware.org, fweimer@redhat.com, carlos@redhat.com, joseph@codesourcery.com, gftg@linux.vnet.ibm.com Cc: Subject: Re: [PATCHv2] Fix float128 IFUNC relocations on ppc64le [BZ #21707] In-Reply-To: <87a84dmv67.fsf@esperi.org.uk> References: <6cc4b956-0a60-73af-ea6b-08c11cbc2267@redhat.com> <20170708183113.28695-1-tuliom@linux.vnet.ibm.com> <87a84dmv67.fsf@esperi.org.uk> User-Agent: Notmuch/0.24.2 (http://notmuchmail.org) Emacs/25.2.1 (x86_64-redhat-linux-gnu) Date: Mon, 10 Jul 2017 15:28:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable x-cbid: 17071015-0028-0000-0000-000001C9A2C4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071015-0029-0000-0000-000014CBD32A Message-Id: <877ezg1fbr.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-10_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1707100275 X-SW-Source: 2017-07/txt/msg00394.txt.bz2 Nix writes: > On 8 Jul 2017, Tulio Magno Quites Machado Filho said this: > >> diff --git a/csu/libc-start.c b/csu/libc-start.c >> index c2dd159..84b7f99 100644 >> --- a/csu/libc-start.c >> +++ b/csu/libc-start.c >> @@ -188,12 +188,15 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL), >> >> ARCH_INIT_CPU_FEATURES (); >> >> - /* Perform IREL{,A} relocations. */ >> - apply_irel (); >> - >> /* The stack guard goes into the TCB, so initialize it early. */ >> __libc_setup_tls (); >> >> + /* Perform IREL{,A} relocations. >> + Note: the relocations must happen after TLS initialization so that >> + IFUNC resolvers can benefit from thread-local storage, e.g. powerpc's >> + hwcap and platform fields available in the TCB. */ >> + apply_irel (); >> + >> /* Set up the stack checker's canary. */ >> uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard (_dl_random); >> # ifdef THREAD_SET_STACK_GUARD > > Note: I originally moved this above __libc_setup_tls() so that IFUNCs > could be stack-protected on statically-linked applications, but > subsequently found that this caused trouble with dynamically-linked > programs, so ended up de-protecting all the IFUNC resolvers anyway. > (See commit 003a27e8195470f470f4d9384ca70d4e9fc8bd1b.) > > If this passes make check with --enable-stack-protector=all, I'm happy > with it. Tested and confirmed no new failures with --enable-stack-protector=all. By the way, I noticed 2 unrelated failures: https://sourceware.org/bugzilla/show_bug.cgi?id=21744 https://sourceware.org/bugzilla/show_bug.cgi?id=21745 -- Tulio Magno