From owner-freebsd-toolchain@freebsd.org Sat Aug 27 17:45:58 2016 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16999B77991 for ; Sat, 27 Aug 2016 17:45:58 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2A92EAA; Sat, 27 Aug 2016 17:45:57 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id u7RHjj3U020081 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 27 Aug 2016 20:45:46 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua u7RHjj3U020081 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id u7RHjj9P020076; Sat, 27 Aug 2016 20:45:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 27 Aug 2016 20:45:45 +0300 From: Konstantin Belousov To: Pedro Giffuni Cc: "freebsd-toolchain@FreeBSD.org" , Warner Losh , Baptiste Daroussin , Mark Millard Subject: Re: Time to enable partial relro Message-ID: <20160827174544.GC83214@kib.kiev.ua> References: <20160826105618.GS83214@kib.kiev.ua> <2e5bee0b-0102-8454-9975-e997bd5229ae@FreeBSD.org> <04514DD6-F431-490D-9ED6-EBFC9DCE97BF@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.1 (2016-04-27) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2016 17:45:58 -0000 On Sat, Aug 27, 2016 at 11:06:54AM -0500, Pedro Giffuni wrote: > > > On 08/26/16 20:10, Pedro Giffuni wrote: > > > > > ...>> I think we should move forward, just want to make sure it doesn???t > >> break some arch completely before moving ahead. While lld is a goal, > >> the goal is also to have a ld.bdf installed for 12, iirc, as a fallback. > > > > And very right you are, this has all the chances of breaking MIPS*: > > > > "A configure option --enable-relro={yes|no} to decide > > whether -z relro should be the default behaviour for > > the linker in ELF based targets. If this configure > > option is not specified then relro will be enabled > > automatically for all Linux based targets except FRV, > > HPPA, IA64 and MIPS." > > > > _____ > > > > I will update the patch to exclude MIPS (and MIPS64 JIC). > > > > Pedro. > > > > *https://gcc.gnu.org/ml/gcc/2016-08/msg00134.html > > > > Looking more into this, and the arm report from Mark Millard (thanks!), > binutils has tests for RELRO in their testsuite that would be an > important indicator before enabling the option. > > It surprises me that we don't have an easy way to run those checks from > the port, so I borrowed the regression-test mode from GCC and I am > attaching it. > > The tests may depend on some gnu-isms but we don't appear to do too > well on the tests: > > === ld Summary === > > # of expected passes 511 > # of unexpected failures 78 > # of expected failures 4 > # of unresolved testcases 35 > # of untested testcases 1 > # of unsupported tests 9 > /usr/ports/devel/binutils/work/binutils-2.27/ld/ld-new 2.27 And ? In which way this data is useful or indicative of anything ? Why this tests are relevant to the proposed change ? AFAIK, binutils tests typically compare ld output against expected binary. And, number of the unexpected failures in your showcase is quite worrying.