Is there anywhere I can get a complete list of the minimum version of Linux needed for each syscall? I'm looking for a general answer to questions of the form "If I use syscall X, what is the minimum version of Linux on which my code can run?"
Actual code for system_call entry point can be found in /usr/src/linux/kernel/sys_call. S Actual code for many of the system calls can be found in /usr/src/linux/kernel/sys. c, and the rest are found elsewhere.
Many modern operating systems have hundreds of system calls. For example, Linux and OpenBSD each have over 300 different calls, NetBSD has close to 500, FreeBSD has over 500, Windows has close to 2000, divided between win32k (graphical) and ntdll (core) system calls while Plan 9 has 51.
On Linux, the arguments are passed using ebx , ecx , edx , esi , and edi . On Windows, the arguments are copied from the stack. The handler then performs some sort of lookup (to find the address of the function) and executes the system call. After the system call is completed, the iret instruction returns to user-mode.
There are mainly 5 types of system calls available. Process Control: It handles the system calls for process creation, deletion, etc. Examples for process control system calls are: Load, Execute, Abort, Wait Signal events for process.
This information can be found in the syscalls(2)
manual page. For those system calls where no kernel version is indicated, the system call appeared in kernel 1.0 or earlier.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With