Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Mar 2017 15:21:33 +0100
From:      Tijl Coosemans <tijl@FreeBSD.org>
To:        Bruce Evans <brde@optusnet.com.au>
Cc:        Ed Maste <emaste@freebsd.org>, 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>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 19 Mar 2017 13:04:50 +1100 (EST) Bruce Evans <brde@optusnet.com.au> 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).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170319152133.0921abd9>