|
@@ -482,7 +482,12 @@ GLOBAL(system_call_after_swapgs)
|
|
|
testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags+THREAD_INFO(%rsp,RIP-ARGOFFSET)
|
|
|
jnz tracesys
|
|
|
system_call_fastpath:
|
|
|
+#if __SYSCALL_MASK == ~0
|
|
|
cmpq $__NR_syscall_max,%rax
|
|
|
+#else
|
|
|
+ andl $__SYSCALL_MASK,%eax
|
|
|
+ cmpl $__NR_syscall_max,%eax
|
|
|
+#endif
|
|
|
ja badsys
|
|
|
movq %r10,%rcx
|
|
|
call *sys_call_table(,%rax,8) # XXX: rip relative
|
|
@@ -596,7 +601,12 @@ tracesys:
|
|
|
*/
|
|
|
LOAD_ARGS ARGOFFSET, 1
|
|
|
RESTORE_REST
|
|
|
+#if __SYSCALL_MASK == ~0
|
|
|
cmpq $__NR_syscall_max,%rax
|
|
|
+#else
|
|
|
+ andl $__SYSCALL_MASK,%eax
|
|
|
+ cmpl $__NR_syscall_max,%eax
|
|
|
+#endif
|
|
|
ja int_ret_from_sys_call /* RAX(%rsp) set to -ENOSYS above */
|
|
|
movq %r10,%rcx /* fixup for C */
|
|
|
call *sys_call_table(,%rax,8)
|