* [PATCH] x86/32on64: zero-extend hypercall index before use in memory access (debug mode only)
@ 2010-12-15 10:50 Jan Beulich
2010-12-15 22:21 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2010-12-15 10:50 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
[-- Attachment #1: Type: text/plain, Size: 523 bytes --]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- 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 %rdi
pushq UREGS_rbp+5*8(%rsp)
leaq compat_hypercall_args_table(%rip),%r10
- movq $6,%rcx
+ movl %eax,%eax
+ movl $6,%ecx
subb (%r10,%rax,1),%cl
movq %rsp,%rdi
movl $0xDEADBEEF,%eax
[-- Attachment #2: 32on64-hypercall-debug.patch --]
[-- Type: text/plain, Size: 517 bytes --]
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- 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 %rdi
pushq UREGS_rbp+5*8(%rsp)
leaq compat_hypercall_args_table(%rip),%r10
- movq $6,%rcx
+ movl %eax,%eax
+ movl $6,%ecx
subb (%r10,%rax,1),%cl
movq %rsp,%rdi
movl $0xDEADBEEF,%eax
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/32on64: zero-extend hypercall index before use in memory access (debug mode only)
2010-12-15 10:50 [PATCH] x86/32on64: zero-extend hypercall index before use in memory access (debug mode only) Jan Beulich
@ 2010-12-15 22:21 ` Jeremy Fitzhardinge
2010-12-16 8:04 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2010-12-15 22:21 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel@lists.xensource.com
On 12/15/2010 02:50 AM, Jan Beulich wrote:
> Signed-off-by: Jan Beulich <jbeulich@novell.com>
>
> --- 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 %rdi
> pushq UREGS_rbp+5*8(%rsp)
> leaq compat_hypercall_args_table(%rip),%r10
> - movq $6,%rcx
> + movl %eax,%eax
> + movl $6,%ecx
Is the second line part of the fix, or just a drive-by tweak?
J
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/32on64: zero-extend hypercall index before use in memory access (debug mode only)
2010-12-15 22:21 ` Jeremy Fitzhardinge
@ 2010-12-16 8:04 ` Jan Beulich
0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2010-12-16 8:04 UTC (permalink / raw)
To: Jeremy Fitzhardinge; +Cc: xen-devel@lists.xensource.com
>>> On 15.12.10 at 23:21, Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> On 12/15/2010 02:50 AM, Jan Beulich wrote:
>> Signed-off-by: Jan Beulich <jbeulich@novell.com>
>>
>> --- 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
> %rdi
>> pushq UREGS_rbp+5*8(%rsp)
>> leaq compat_hypercall_args_table(%rip),%r10
>> - movq $6,%rcx
>> + movl %eax,%eax
>> + movl $6,%ecx
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-16 8:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-15 10:50 [PATCH] x86/32on64: zero-extend hypercall index before use in memory access (debug mode only) Jan Beulich
2010-12-15 22:21 ` Jeremy Fitzhardinge
2010-12-16 8:04 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).