Kernel: Fix signal trampoline
32 bit did not even support it and 64 bit did not align stack
This commit is contained in:
@@ -7,22 +7,26 @@
|
||||
|
||||
.global signal_trampoline
|
||||
signal_trampoline:
|
||||
ud2
|
||||
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
subl $8, %esp
|
||||
|
||||
pusha
|
||||
|
||||
movl 40(%esp), %edi
|
||||
movl 36(%esp), %eax
|
||||
|
||||
// align stack to 16 bytes
|
||||
movl %esp, %ebx
|
||||
andl $0x0F, %ebx
|
||||
subl %ebx, %esp
|
||||
|
||||
subl $12, %esp
|
||||
pushl %edi
|
||||
call *%eax
|
||||
addl $16, %esp
|
||||
|
||||
// restore stack
|
||||
addl %ebx, %esp
|
||||
popa
|
||||
|
||||
leave
|
||||
|
||||
Reference in New Issue
Block a user