@@ -104,18 +104,19 @@ def bytes(self):
104104 Field ('syscall_hook_trampoline' , 4 ),
105105 ),
106106 'X86VsyscallMonkeypatch' : AssemblyTemplate (
107- RawBytes (0x53 ), # push %ebx
108107 RawBytes (0xb8 ), # mov $syscall_number,%eax
109108 Field ('syscall_number' , 4 ),
110- RawBytes (0xe9 ), # jmp $X86VsyscallMonkeypatchShared
109+ RawBytes (0xe8 ), # call $X86VsyscallMonkeypatchShared
111110 Field ('vsyscall_monkeypatch_shared' , 4 ),
111+ RawBytes (0xc3 ),
112112 ),
113113 'X86VsyscallMonkeypatchShared' : AssemblyTemplate (
114114 # __vdso functions use the C calling convention, so
115115 # we have to set up the syscall parameters here.
116116 # No x86-32 __vdso functions take more than two parameters.
117- RawBytes (0x8b , 0x5c , 0x24 , 0x08 ), # mov 0x8(%esp),%ebx
118- RawBytes (0x8b , 0x4c , 0x24 , 0x0c ), # mov 0xc(%esp),%ecx
117+ RawBytes (0x53 ), # push %ebx
118+ RawBytes (0x8b , 0x5c , 0x24 , 0x0c ), # mov 12(%esp),%ebx
119+ RawBytes (0x8b , 0x4c , 0x24 , 0x10 ), # mov 16(%esp),%ecx
119120 RawBytes (0xcd , 0x80 ), # int $0x80
120121 # pad with NOPs to make room to dynamically patch the syscall
121122 # with a call to the preload library, once syscall buffering
0 commit comments