From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from olivedrab.birch.relay.mailchannels.net (olivedrab.birch.relay.mailchannels.net [23.83.209.135]) by sourceware.org (Postfix) with ESMTPS id D3FAA386F429; Fri, 12 Feb 2021 02:55:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D3FAA386F429 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gotplt.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=siddhesh@gotplt.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id C6C45542CA9; Fri, 12 Feb 2021 02:55:57 +0000 (UTC) Received: from pdx1-sub0-mail-a51.g.dreamhost.com (100-96-16-13.trex.outbound.svc.cluster.local [100.96.16.13]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 50A42542C92; Fri, 12 Feb 2021 02:55:57 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a51.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.13 (trex/6.0.2); Fri, 12 Feb 2021 02:55:57 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Drop-Cure: 408122bc1cfd019e_1613098557612_3541341329 X-MC-Loop-Signature: 1613098557612:1251199747 X-MC-Ingress-Time: 1613098557612 Received: from pdx1-sub0-mail-a51.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a51.g.dreamhost.com (Postfix) with ESMTP id 184AB7F52C; Thu, 11 Feb 2021 18:55:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gotplt.org; h=subject:to :references:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=gotplt.org; bh=X5HlLP cM58C4XYScKRphzunEhDU=; b=OS5195gDD74vQ+DtfXaKPexraQJeXdVqfbzw5S 0GI8YMkEHAFyo3aAGsLZPhHCBE325ZW1enCItSQ+BDLchGunZl0bEcJvJCGGVtpD 9QuHf9FDaj33aGBagD85wxzKpZH7I75sUah5dyCYIGb7O5jow6VEZ6TyHqbu7mJc CSUrY= Received: from [192.168.1.111] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a51.g.dreamhost.com (Postfix) with ESMTPSA id 773E57F52D; Thu, 11 Feb 2021 18:55:54 -0800 (PST) Subject: Re: [PATCH] Build libc-start with stack protector for SHARED To: Siddhesh Poyarekar , Adhemerval Zanella , libc-alpha@sourceware.org References: <20210203054219.1589041-1-siddhesh@sourceware.org> <9d271fde-faf6-9687-e2cd-854f89f390a5@sourceware.org> X-DH-BACKEND: pdx1-sub0-mail-a51 From: Siddhesh Poyarekar Message-ID: <5c57aec4-b6b2-4098-ce56-7e2bf165d6c6@gotplt.org> Date: Fri, 12 Feb 2021 08:25:50 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <9d271fde-faf6-9687-e2cd-854f89f390a5@sourceware.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3028.9 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Fri, 12 Feb 2021 02:56:02 -0000 On 2/12/21 6:26 AM, Siddhesh Poyarekar via Libc-alpha wrote: > On 2/12/21 12:55 AM, Adhemerval Zanella wrote: >> >> >> On 03/02/2021 02:42, Siddhesh Poyarekar via Libc-alpha wrote: >>> This does not change the emitted code since __libc_start_main does no= t >>> return, but is important for formal flags compliance. >>> >>> This also cleans up the cosmetic inconsistency in the stack protector >>> flags in csu, especially the incorrect value of STACK_PROTECTOR_LEVEL= . >> >> I am seeing the following regressions with --enable-stack-protector=3D= all >> on x86_64 and i686 (I haven't seen is on powerpc64le-linux-gnu): >> >> FAIL: elf/ifuncmain9picstatic >> FAIL: elf/ifuncmain9static >> FAIL: elf/tst-ifunc-isa-1-static >> FAIL: elf/tst-ifunc-isa-2-static >> >> $ gdb ./elf/ifuncmain9picstatic >> [...] >> (gdb) r >> [...] >> Program received signal SIGSEGV, Segmentation fault. >> 0x0000000000401944 in resolver () at ifuncmain9.c:47 >> 47=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 { >> (gdb) bt >> #0=C2=A0 0x0000000000401944 in resolver () at ifuncmain9.c:47 >> #1=C2=A0 0x0000000000402e88 in elf_ifunc_invoke (addr=3D) at=20 >> ../sysdeps/x86_64/dl-irel.h:44 >> #2=C2=A0 elf_irela (reloc=3D0x4004f0) at ../sysdeps/x86_64/dl-irel.h:4= 4 >> #3=C2=A0 apply_irel () at ../csu/libc-start.c:86 >> #4=C2=A0 __libc_start_main (main=3D0x401690
, argc=3D1,=20 >> argv=3D0x7fffffffd808, init=3D0x403cd0 <__libc_csu_init>, fini=3D0x403= d60=20 >> <__libc_csu_fini>, rtld_fini=3D0x0, stack_end=3D0x7fffffffd7f8) at=20 >> ../csu/libc-start.c:206 >> #5=C2=A0 0x00000000004017ba in _start () at ../sysdeps/x86_64/start.S:= 120 >> >> (gdb) disas >> Dump of assembler code for function resolver: >> =C2=A0=C2=A0=C2=A0 0x0000000000401940 <+0>:=C2=A0=C2=A0=C2=A0=C2=A0 su= b=C2=A0=C2=A0=C2=A0 $0x18,%rsp >> =3D> 0x0000000000401944 <+4>:=C2=A0=C2=A0=C2=A0=C2=A0 mov=C2=A0=C2=A0=C2= =A0 %fs:0x28,%rax >> (gdb) i r fs >> fs=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0 0x0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0 >> >> It seems we need to setup the thread pointer earlier. >> >=20 > I wasn't able to reproduce this until I repeated the build from scratch= .=20 > =C2=A0Sorry, I'll take a look at this again.=C2=A0 Thanks for checking= . ... and now I see these failures all the way back to 2.33 tag and 2 out=20 of the 4 failures all the way back to 2.32. memusagestat (of all=20 things!) prevented my build from completing on Fedora 33 because it=20 needs 2.32 symbols that it couldn't find during the build. I'll work on detangling this and figuring out the root cause soon. Siddhesh