Use 0 instead of syscall_invalid in syscall jump list

This commit is contained in:
Justin C. Miller
2019-05-18 18:11:08 -07:00
parent ce035d2a43
commit a653c55941
2 changed files with 8 additions and 5 deletions

View File

@@ -34,12 +34,16 @@ syscall_handler_prelude:
cmp rax, MAX_SYSCALLS
jle .ok_syscall
.bad_syscall:
mov rdi, rax
call syscall_invalid
.ok_syscall:
lea r11, [rel syscall_registry]
mov r11, [r11 + rax * 8]
cmp r11, 0
je .bad_syscall
call r11
inc qword [rel __counter_syscall_sysret]