x86/32on64: zero-extend hypercall index before use in memory access (debug mode only)
PATCH 1/1 x86/32on64: zero-extend hypercall index before use in memory access (debug mode only)
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/x86_64/compat/entry.S +2 -1
@@ -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
Signed-off-by Jan Beulich <[email protected]>
xen/arch/x86/x86_64/compat/entry.S +2 -1
@@ -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
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
xen/arch/x86/x86_64/compat/entry.S ENTRY(compat_hypercall) · line 29
Quoted 11 lines · Jan Beulich
Signed-off-by Jan Beulich <[email protected]>xen/arch/x86/x86_64/compat/entry.S +2
-1@@ -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
Quoted 9 lines
Quoted 1 line
Quoted 1 line · Jeremy Fitzhardinge
xen/arch/x86/x86_64/compat/entry.S ENTRY(compat_hypercall) · line 25
Quoted 6 lines · Jan Beulich
Signed-off-by Jan Beulich <[email protected]>xen/arch/x86/x86_64/compat/entry.S +0
-0@@ -25,7 +25,8 @@ ENTRY(compat_hypercall) pushq UREGS_rbx(%rsp); pushq %rcx; pushq %rdx; pushq %rsi; pushq%rdi
Quoted 7 lines
xen/arch/x86/x86_64/compat/entry.S ENTRY(compat_hypercall) · line 29
Quoted 5 lines
xen/arch/x86/x86_64/compat/entry.S +2
-1pushq UREGS_rbp+5*8(%rsp) leaq compat_hypercall_args_table(%rip),%r10 - movq $6,%rcx + movl %eax,%eax + movl $6,%ecxIs 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