From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102311 invoked by alias); 16 Jul 2017 19:22:58 -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 102282 invoked by uid 89); 16 Jul 2017 19:22:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=HTo:D*org.uk, 02AM, 02am X-HELO: mail-oi0-f45.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=W8ZM+avGJD4oG25llbWbU35wLgVtrrLuckOB62ubXCY=; b=dLgiOT+RNRzOyYAVX1flyDCi5jLq58CiB6leOOTO/Jpl/dF69VHIJCGPQZJ/qUKRiF g0AM08/3bsLDX18gJTGv+cpMHnArVplIswlkpotHmJpGaKQeuGJeqDxB/Ofyf7xnNguh Z1PuvUBRhZYthMrncm59xoZxzHngdJefOrSukdvgFGwYWlNDvT60ZdEqNzCdo/2On44a sDafOpOqRqUtfp1oVxuK+6wvfjTmY1EIs/wgUzJeXTe8YQx5RMIkZCZ/N/9XklOpX7WX aIFywXVq+M6kpOmT3b7cmAMwYWIkJYpSid0Fn62iSyrmPdCurp8TSapBnJBp/vNlrd8e NOYQ== X-Gm-Message-State: AIVw111c+5Eez1Jrm6lWqzDW8d8rHebHZ6ELNa4R8bpMG6B8ofpMXvMi Svc+Z0cQ+/605bDxAJ2mnR1Mjblrnw== X-Received: by 10.202.81.202 with SMTP id f193mr13229878oib.178.1500232973265; Sun, 16 Jul 2017 12:22:53 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20170709154233.GA10935@gmail.com> <87d198lg6d.fsf@esperi.org.uk> <20170710131401.GA15657@gmail.com> <87shi4ju8l.fsf@esperi.org.uk> From: "H.J. Lu" Date: Sun, 16 Jul 2017 19:22:00 -0000 Message-ID: Subject: Re: [PATCH] Remove debug/stack_chk_fail_local.c [BZ #21740] To: Nick Alcock Cc: Nick Alcock , GNU C Library Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-07/txt/msg00587.txt.bz2 On Mon, Jul 10, 2017 at 10:34 AM, H.J. Lu wrote: > On Mon, Jul 10, 2017 at 6:29 AM, Nick Alcock wrote: >> On 10 Jul 2017, H. J. Lu said: >>> On Mon, Jul 10, 2017 at 11:50:02AM +0100, Nick Alcock wrote: >>>> If it passes a test build with --enable-stack-protector=all without >>>> pulling junk into ld.so and exploding at ld.so link time, sure. (That's >>>> what happened every time I tried to remove this stuff before, but I may >>>> have failed to notice that this may not be necessary any more.) >>> >>> Here is the updated patch. tst-_dl_addr_inside_object should be >>> linked with $(dummy-stack-chk-fail). Otherwise, __stack_chk_fail is >>> undefined. OK for master branch? >> >> I presume this is because it's in $(all-nonlib)? Are other all-nonlib >> things similarly affected? (If they are, is the code in Makerules >> perhaps a better place to adjust this?) >> >> I guess the only affected nonlib things would be things that directly >> link against objects that will otherwise end up in the shared libc or >> ld.so, which means this is the only affected test (since only those >> things reference the usually-hidden __stack_chk_fail). If so, I have no >> objection to this patch, but maybe a comment explaining this would be a >> good idea so that if more such tests turn up in future this unusual >> piece of linking can be generalized a bit. >> >> Modulo that, I have no objections, but of course I also have no actual >> right to ack anything whatsoever :) >> >>>> > -/* On some architectures, this helps needless PIC pointer setup >>>> > - that would be needed just for the __stack_chk_fail call. */ >>>> >>>> Does anyone know what architectures these might be? Presumably x86-32... >>>> >>> >>> config/i386/i386.c: __stack_chk_fail_local hidden function instead of calling >> >> I presume you tested a build on x86-32 :) I guess that will suffice... > > We must keep debug/stack_chk_fail_local.c for libc_nonshared.a. > Here is the updated patch to add __stack_chk_fail_local alias only > to libc.so. > > Tested on i686 and x86-64 with and without --enable-stack-protector=all. > OK for master? > Any objections? https://sourceware.org/ml/libc-alpha/2017-07/msg00406.html -- H.J.