blob: ff2428d7a561f561f6c74cf19a8e7cb9036403f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
.section .text
.extern fake_syscall_handler
.global fake_syscall_entry
fake_syscall_entry:
hlt
.global fake_syscall_return
fake_syscall_return:
cli
mov %rdi, %rsp
lgdt (%rsp)
add $16, %rsp
movw (%rsp), %ds
movw (%rsp), %es
movw (%rsp), %fs
movw (%rsp), %gs
movw (%rsp), %ss
add $8, %rsp
lretq
|