From owner-freebsd-current@freebsd.org Fri Feb 26 00:23:16 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 864AE54EC30 for ; Fri, 26 Feb 2021 00:23:16 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dmr3S2MqDz4SyR; Fri, 26 Feb 2021 00:23:16 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.16.1/8.16.1) with ESMTPS id 11Q0LwUO049391 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 25 Feb 2021 16:21:59 -0800 (PST) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.16.1/8.16.1/Submit) id 11Q0LwCx049390; Thu, 25 Feb 2021 16:21:58 -0800 (PST) (envelope-from warlock) Date: Thu, 25 Feb 2021 16:21:58 -0800 From: John Kennedy To: "Greg 'groggy' Lehey" Cc: Ed Maste , FreeBSD Current Subject: Re: HEADS-UP: PIE enabled by default on main Message-ID: References: <20210225231028.GB69550@eureka.lemis.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210225231028.GB69550@eureka.lemis.com> X-Rspamd-Queue-Id: 4Dmr3S2MqDz4SyR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2021 00:23:16 -0000 On Fri, Feb 26, 2021 at 10:10:28AM +1100, Greg 'groggy' Lehey wrote: > On Thursday, 25 February 2021 at 15:58:07 -0500, Ed Maste wrote: > > As of 9a227a2fd642 (main-n245052) base system binaries are now built > > as position-independent executable (PIE) by default, for 64-bit > > architectures. ... > > > > If you track -CURRENT and normally build WITHOUT_CLEAN you'll need to > > do one initial clean build -- either run `make cleanworld` or set > > WITH_CLEAN=yes. > > This details worries me. How compatible are PIE executables with > non-PIE executables? Can I run PIE executables on older systems? Can > I run older executables on a PIE system? Assuming we're basically talking about WITH_PIE=YES in /etc/src.conf, I've been doing this since 2020/08/04 (12.1 -> 12.2 -> 13/14). I don't think I've associated any problems with PIE. I've certainly got lots of non-PIE ports linked against base libraries (but ELF 64-bit LSB shared object, vs ELF 64-bit LSB pie executable). The E in PIE is executable. Not sure if Ed Maste just wants to make sure that all the executables are rebuilt as PIE (vs hit-and-miss) or there is a sneaker corner-case that he knows about. I can't say that I've had an opportunity to try the scenario I think you're looking at. My "older" crossovers are +/- a __FreeBSD_version bump.