Skip to contentSkip to conversation

x86/32on64: adjust address when converting syscall to fault

PATCH New Jan Beulich 1 participant 1 message Dec 5, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/32on64: adjust address when converting syscall to fault

The faulting address is at the start of the syscall instruction rather than at the following one.

xen/arch/x86/x86_64/compat/entry.S +1 -0
Index: 2008-11-20/xen/arch/x86/x86_64/compat/entry.S
===================================================================
@@ -234,6 +234,7 @@ ENTRY(compat_syscall)
         call  compat_create_bounce_frame
         jmp   compat_test_all_events
 2:      movl  $TRAP_gp_fault,UREGS_entry_vector(%rsp)
+        subl  $2,UREGS_rip(%rsp)
         movq  VCPU_gp_fault_addr(%rbx),%rax
         movzwl VCPU_gp_fault_sel(%rbx),%esi
         movb  $(TBF_EXCEPTION|TBF_EXCEPTION_ERRCODE|TBF_INTERRUPT),%cl