From: Keir Fraser Subject: Re: RE: [Xen-changelog] [xen-unstable] [HVM][SVM] Obtaining instruction address needs to mask to 32 bits Date: Mon, 02 Oct 2006 14:06:20 +0100 Message-ID: References: <907625E08839C4409CE5768403633E0B018E15B1@sefsexmb1.amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <907625E08839C4409CE5768403633E0B018E15B1@sefsexmb1.amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Petersson, Mats" , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 2/10/06 12:56, "Petersson, Mats" wrote: > Where we're adding to EIP we probably should take this into acocunt - > although most code wouldn't naturally wrap the IP (in fact, I think it's > a fault to do so - but I can't confirm that from any of my books), so > it's probably a very obscure corner-case - but it's probably a bit > nightmarish to debug so it's possibly better to have code that deals > with it correctly. I'll figure out if it's a fault or "wrap" that is the > correct operation first... I think it faults on AMD and silently wraps on Intel. One of the Xbox hacks relies on this 'feature' to break into the secure bootstrap sequence. I doubt anyone legitimately relies on it so I'm not too concerned about this case. Also, back to my original point, it's probably a good idea to mask the high bits of RIP when in 16-bit mode. I doubt that the switch from 32- to 16-bit mode guarantees to clear those high bits. Or does it? -- Keir