From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102514 invoked by alias); 9 Mar 2016 23:48:23 -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 102498 invoked by uid 89); 9 Mar 2016 23:48:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=Hx-spam-relays-external:sk:mail.es, HX-HELO:sk:mail.es, H*r:sk:mail.es, tear X-HELO: mail.esperi.org.uk From: Nix To: Mike Frysinger Cc: libc-alpha@sourceware.org Subject: Re: [PATCH 03/18] Do not stack-protect ifunc resolvers. References: <1457445064-7107-1-git-send-email-nix@esperi.org.uk> <1457445064-7107-4-git-send-email-nix@esperi.org.uk> <20160309224700.GF6588@vapier.lan> Date: Wed, 09 Mar 2016 23:48:00 -0000 In-Reply-To: <20160309224700.GF6588@vapier.lan> (Mike Frysinger's message of "Wed, 9 Mar 2016 17:47:00 -0500") Message-ID: <8737rzmcw3.fsf@esperi.org.uk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-DCC-URT-Metrics: spindle 1060; Body=2 Fuz1=2 Fuz2=2 X-SW-Source: 2016-03/txt/msg00285.txt.bz2 On 9 Mar 2016, Mike Frysinger told this: > On 08 Mar 2016 13:50, Nix wrote: >> +AC_CACHE_CHECK(if $CC accepts -fno-stack-protector with \ >> +__attribute__ ((__optimize__)), libc_cv_cc_no_stack_protector, [dnl >> +cat > conftest.c <> +void >> +__attribute__ ((__optimize__ ("-fno-stack-protector"))) >> +foo (void) {} >> +EOF > > actually, which versions of gcc *don't* support this ? if it's in gcc-4.7 > and newer, then we don't need this test as we require that already. Good question. The worrying thing is that support for __attribute__((__optimize__)) may not be enough: IIRC, that attribute was not exactly perfectly functional in the first release or two after it landed, IIRC. Let's see... ... GCC 4.4?! OK, way older than I remembered. We can definitely drop this: there have been fixes to fix things like target-specific options with __attribute__((__optimize__)) right up until recently, but nothing that would perturb -fno-stack-protector (and nothing at *all* between 4.6.x and 4.8.x, and I know 4.8.x works). So I'll drop this bit. (Technically this makes libc_cv_ssp useless too, because -fstack-protector is *much* older than __attribute__((__optimize__)), but it's consistent with the checks for -fstack-protector-strong and -all to have it there, and those are much newer and still not consistently supported on all targets. I can tear libc_cv_ssp and have_ssp out as well if you think it worth doing.) -- NULL && (void)