From: "Jan Beulich" Subject: [PATCH 2/7] x86_64: syscall argument clobber check Date: Wed, 23 Aug 2006 11:00:56 +0200 Message-ID: <44EC3568.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part81A42458.0__=" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --=__Part81A42458.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline (noticed during preparation of initial PAE-guest-on-64bit patches) The offset used to compare the return IP was apparently wrong; I didn't actually test that things didn't work as intended (or that they do now with this change), it just caught my eye that the UREGS_rip access a little further up in the same function was done with adjustment for the extra item on the stack, but this one wasn't. Signed-off-by: Jan Beulich --=__Part81A42458.0__= Content-Type: text/plain; name="x86_64-clobber-check.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="x86_64-clobber-check.patch" Index: 2006-08-16/xen/arch/x86/x86_64/entry.S =================================================================== --- 2006-08-16.orig/xen/arch/x86/x86_64/entry.S 2006-08-22 12:47:14.000000000 +0200 +++ 2006-08-16/xen/arch/x86/x86_64/entry.S 2006-08-22 12:48:12.000000000 +0200 @@ -152,7 +152,7 @@ ENTRY(syscall_enter) #ifndef NDEBUG /* Deliberately corrupt parameter regs used by this hypercall. */ popq %r10 # Shadow RIP - cmpq %r10,UREGS_rip(%rsp) + cmpq %r10,UREGS_rip+8(%rsp) popq %rcx # Shadow hypercall index jne skip_clobber /* If RIP has changed then don't clobber. */ leaq hypercall_args_table(%rip),%r10 --=__Part81A42458.0__= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=__Part81A42458.0__=--