Linux: change syscalls?

Syscalls is an interface that accesses kernel user space. The user process usually does not call them directly, but uses libc to do this. libc or simply provides a thin wrapper around the script, or performs some work, as in the case fork()andexec()

So my question is: has the syscall kernel interface ever changed between kernel versions in non-backward compatible mode? Or is it once installed syscall, will it never change?

+4
source share
2 answers

A syscall in terms of application code is an atomic atomic operation (this is a “virtual machine instruction”). See also syscalls (2) .

ABI determines how this happens. For x86-64 you can find here . See also x86 calling conventions .

For some system calls, the latest kernels provide vdso (7) to speed up their execution.

The Linux kernel is trying to maintain binary compatibility. Rumor has it that the 15-year-old (statically linked) ELF executable should work unchanged in the latest kernels.

( , . Linux howto). libc (, GNU libc MUSL libc). libc.so. - ( , libc, ).

+4

:

  • libc, libc - libc, .
  • Syscalls , libc.

libc fork() exec() , , . , system(), fork-s exec .

syscalls , Linus , , syscalls, _reiser4..., .

, sys_open, sys_close .., .


, , , , . ancients linux/i386 int 0x80, syscals eax. / , , asm-opcode, SYSENTER, . , , ​​ , syscalls. cat /proc/$$/maps, [vdso] [vsyscall], . (, 2.4?) .

+1

Source: https://habr.com/ru/post/1533926/


All Articles