From owner-svn-src-head@freebsd.org Sun Mar 19 14:22:50 2017 Return-Path: Delivered-To: svn-src-head@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 B37AAD13A71; Sun, 19 Mar 2017 14:22:50 +0000 (UTC) (envelope-from tijl@freebsd.org) Received: from mailrelay108.isp.belgacom.be (mailrelay108.isp.belgacom.be [195.238.20.135]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (Client CN "relay.skynet.be", Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DDBD1F56; Sun, 19 Mar 2017 14:22:48 +0000 (UTC) (envelope-from tijl@freebsd.org) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2CCDQD0ks5Y/0nD8VFdHQEFAQsBg1FBE?= =?us-ascii?q?BCBCo5kkGYpAZUZgg4mhXwCgwBBFwECAQEBAQEBAWsohRYBBTocIxALDgoJJQ8?= =?us-ascii?q?qHgYTigQKtH6KPQEBAQEBAQEBAQEBAQEBAQEdBYs9ijkFnABNhnmLPXaQQpNYI?= =?us-ascii?q?QE1gQQ5LAiHGT81igoBAQE?= X-IPAS-Result: =?us-ascii?q?A2CCDQD0ks5Y/0nD8VFdHQEFAQsBg1FBEBCBCo5kkGYpAZU?= =?us-ascii?q?Zgg4mhXwCgwBBFwECAQEBAQEBAWsohRYBBTocIxALDgoJJQ8qHgYTigQKtH6KP?= =?us-ascii?q?QEBAQEBAQEBAQEBAQEBAQEdBYs9ijkFnABNhnmLPXaQQpNYIQE1gQQ5LAiHGT8?= =?us-ascii?q?1igoBAQE?= Received: from 73.195-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.195.73]) by relay.skynet.be with ESMTP; 19 Mar 2017 15:21:36 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id v2JELXGk002430; Sun, 19 Mar 2017 15:21:35 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Sun, 19 Mar 2017 15:21:33 +0100 From: Tijl Coosemans To: Bruce Evans Cc: Ed Maste , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r315522 - in head: contrib/binutils/ld/emulparams sys/conf Message-ID: <20170319152133.0921abd9@kalimero.tijl.coosemans.org> In-Reply-To: <20170319123107.W994@besplex.bde.org> References: <201703190022.v2J0MDhq015941@repo.freebsd.org> <20170319123107.W994@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Mar 2017 14:22:50 -0000 On Sun, 19 Mar 2017 13:04:50 +1100 (EST) Bruce Evans wrote: > On Sun, 19 Mar 2017, Ed Maste wrote: >> Log: >> use INT3 instead of NOP for x86 binary padding >> >> We should never end up executing the inter-function padding, so we >> are better off faulting than silently carrying on to whatever function >> happens to be next. >> >> Note that LLD will soon do this by default (although it currently pads >> with zeros). >> >> Reviewed by: dim, kib >> MFC after: 1 month >> Sponsored by: The FreeBSD Foundation >> Differential Revision: https://reviews.freebsd.org/D10047 > > Is this a pessimization? Instruction prefetch near the end of almost > every function now fetches INT3 instead of NOP. Both have to be > decoded to decoded whether to speculatively execute them. INT3 is > unlikely to be speculatively executed, but it takes extra work to > decide not to do so. I seem to vaguely remember that ud2 should be used to stop speculative execution (and the instruction fetching and possible cache invalidation because of it).