From: "Jan Beulich" Subject: Re: [PATCH] x86/32on64: zero-extend hypercall index before use in memory access (debug mode only) Date: Thu, 16 Dec 2010 08:04:39 +0000 Message-ID: <4D09D6270200007800028503@vpn.id2.novell.com> References: <4D08AB71020000780002813F@vpn.id2.novell.com> <4D093F57.7030809@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4D093F57.7030809@goop.org> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jeremy Fitzhardinge Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org >>> On 15.12.10 at 23:21, Jeremy Fitzhardinge wrote: > On 12/15/2010 02:50 AM, Jan Beulich wrote: >> Signed-off-by: Jan Beulich >> >> --- a/xen/arch/x86/x86_64/compat/entry.S >> +++ b/xen/arch/x86/x86_64/compat/entry.S >> @@ -25,7 +25,8 @@ ENTRY(compat_hypercall) >> pushq UREGS_rbx(%rsp); pushq %rcx; pushq %rdx; pushq %rsi; = pushq=20 > %rdi >> pushq UREGS_rbp+5*8(%rsp) >> leaq compat_hypercall_args_table(%rip),%r10 >> - movq $6,%rcx >> + movl %eax,%eax >> + movl $6,%ecx >=20 > Is the second line part of the fix, or just a drive-by tweak? The latter (sorry, I couldn't withstand, as I was surprised I didn't do so when I created this code as a clone of its native counterpart). Jan