From owner-freebsd-toolchain@freebsd.org Fri Aug 26 15:06:50 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 5FEC2B703F1 for ; Fri, 26 Aug 2016 15:06:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 28E27163 for ; Fri, 26 Aug 2016 15:06:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x242.google.com with SMTP id f128so767162ith.2 for ; Fri, 26 Aug 2016 08:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=DQ7TclWz81hlUTEKkfnanH+8mRA9sB0GmDDlKt6w0NA=; b=MNPLpLQL91rZBX1c8+mieL/N+lKgCF8Xft66vDt2kSSYtipQwnGXBFLaO1UOoPcwAg dZLr1FS9FsCEBOW26mbobLMWr6Fl2MOlne672XqsfmSi+Y0MHGY3QIinGwrJ65oHTS22 aN2/VRRV7gzRMSBDbhRRgGgQP8C9sO4zdcvU8/0WWGFV3w3oVoP1FhZgT9Z8MomYqvkR UiUzmx9yPIeIuJdt+KlMAxz3JEj/85cmCeckh0ht7YEfhEc8tYoT0VIHoK9jQufpSw7h WT5AnwXjym+AJWMrkn6+Pyx+FN420G7uaIsrbso+TlALtwV2Wc5+gKgp1jZJsLF7a5Zj 3GOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=DQ7TclWz81hlUTEKkfnanH+8mRA9sB0GmDDlKt6w0NA=; b=XxEktxHp+Hreedg8+7rJJz5KdscXmbDXbN3J73FqAIFC07V8mfzZK7JKKSnMSgGoyX rr1QdK9bZnoGq8TSnQ2tBYWtFP7aqDHkQYLa7fs0xy3mIFR9VxcO/Fq50APJKePauYC7 bTSbkIdjj0VFkIM2y/jX2TjSxNuf1l0UWes+oWjyhRN91vHLL02qke7qhgmmcGfo9AVB BdihuH6l8+c3UXdsrJusX0JXM0xyXtIcx81S7D2ZHB+DAzWcPoZqlUTvJdDwW2NKLo/j bQmVz98qL5Vxx15Gy5z2TNckii4YoiPTcvPzNP78F9FH0mu4lbV3VfjD+lBMZAyfkd4W ZPGA== X-Gm-Message-State: AE9vXwNaTaE1G94lXZU5TlUv0z1oHDH0f4XK8SQsbC1Pp8DSi95+D/95M9xf3DTacv3dCuFoY5QsVfJ7BatcIA== X-Received: by 10.107.21.134 with SMTP id 128mr4465440iov.59.1472224009505; Fri, 26 Aug 2016 08:06:49 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.7 with HTTP; Fri, 26 Aug 2016 08:06:48 -0700 (PDT) X-Originating-IP: [69.53.245.200] In-Reply-To: References: <20160826105618.GS83214@kib.kiev.ua> From: Warner Losh Date: Fri, 26 Aug 2016 09:06:48 -0600 X-Google-Sender-Auth: cD1MRlvTfW4sy4zubMs2pLx6gLY Message-ID: Subject: Re: Time to enable partial relro To: Pedro Giffuni Cc: Konstantin Belousov , "freebsd-toolchain@FreeBSD.org" Content-Type: text/plain; charset=UTF-8 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: Fri, 26 Aug 2016 15:06:50 -0000 On Fri, Aug 26, 2016 at 9:00 AM, Pedro Giffuni wrote: > > > On 08/26/16 05:56, Konstantin Belousov wrote: >> >> On Thu, Aug 25, 2016 at 05:50:31PM -0500, Pedro Giffuni wrote: >>> >>> Hello; >>> >>> GNU RELRO support was committed in r230784 (2012-01-30) but we never >>> enabled it by default. >>> >>> There was some discussion about it on >>> https://reviews.freebsd.org/D3001 >>> >>> By now, all Linux distributions, NetBSD and DragonFly support it and >>> it is the default for most systems in binutils 2.27. >>> >>> This doesn't affect performance, I ran it through an exp-run last >>> year, no other OS has had issues etc ... seems safe and can be >>> disabled if needed when linking. >> >> Exp-run does not test anything interesting about relro. If all testing >> that was done is basically just an exp-run, then there was no useful >> runtime testing done. >> > > The exp-run does cover Java and other VM-type thingies that bootstrap. > For upstream binutils this is now the default (at least for linux, > they never ask us if we want to follow). So the change has been tested > extensively but perhaps not on cases that are relevant to us. > > Note that the "fix" for any port is ultimately trivial: > LDFLAGS+= "-z norelro" > >>> >>> I think it's time to enable it be default in our base binutils. If >>> there are no objections, I will just commit the attached patch over >>> the weekend. >> >> >> There are objections, the change must be runtime tested on large and >> representative set of real-world applications before turning the knob. >> > > You are not giving any hint on what would be a "representative set of > real-world applications". Given that you committed the initial support your > objection stands very high and is a blocker. :( > > As I see it committing it now would give ample time to test this in current > before it hits any release. If you want more extensive testing merging it in > -stable right after the 11-Release is guaranteed to help > weed out any remaining update ports may need. I'd say a minimum is 'buildworld' + a test boot on at least Intel (i386 and amd64), armv6 and mips (both 32-bit and 64-bit) before we proceed. How many of those have we done? Warner