Use an invalid system call number so that the send code is simply returned using
eax = -ENOSYSinstead of sending the system call processing functions at all.
, iret sysret/sysexit. , , 17 , syscall(SYS_getpid), glibc ( errno), , . , sysret -ENOSYS.
sysenter, syscall. sysenter/sysret ( , sysexit sysenter, sysret syscall). sysenter 32- x86-64.
64- syscall . (, Meltdown/Spectre, - C do_syscall_64 4.16-rc2).
My , 32- int 0x80 Linux ABI 64- ? Q & A - x86-64 (entry_64_compat.S). .
, Linux 4.12, Meltdown, .
int 0x80 sysenter . entry_SYSENTER_compat. AFAIK, sysenter , 64- . Linux __USER32_CS CS, 32- .
, struct pt_regs , TRACE_IRQS_OFF ( , ), call do_fast_syscall_32, C. ( 64- syscall asm, 32- C).
do_syscall_32_irqs_on arch/x86/entry/common.c : , ( , strace ptrace),
...
if (likely(nr < IA32_NR_syscalls)) {
regs->ax = ia32_sys_call_table[nr]( ... arg );
}
syscall_return_slowpath(regs);
}
AFAIK, sysexit .
, , , EAX , , , - , Spectre, .
sysenter/sysexit , Linux, , / .
, ABI, (, syscall ) , Linux sysenter ABI; get_user() EIP, .
, , eax, -ENOSYS; , - 32- .