Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there raw linux system call API/ABI documentation

There are man(2) pages for the system calls, but these describe the behavior of the C library (glibc) that sits on top of the system calls. Is the raw system call API/ABI documented somewhere (other than UseTheSourceLuke)? I saw some mention of differences between kernel/libc in the man pages, but i did not get the feeling that it is a top priority to document these differences.

What i really mean to say is: Is the C library considered to be the stable/documented Linux API by POLICY, and the system call API/ABI of the kernel is considered unstable (may change) and therefore undocumented on purpose or low priority?

So kernel developers that change a system call make workarounds in glibc? What about the other libc's then?

Can i find historical discussions about this subject?

Edit: So the ABI is stable, and also the behavior of syscalls, but they are not documented by kernel developers. The glibc is documenting them instead (with its own additions/changes). Correct?

like image 832
ctrl-d Avatar asked Dec 10 '15 14:12

ctrl-d


People also ask

Which tool is useful for tracing the system calls in Linux?

The tracing tools on Linux are strace and ltrace. The command man strace displays a full set of available options. The strace tool traces system calls. You can either use it on a process that is already available, or start it with a new process.

How does Linux system call work?

A system call is implemented by a ``software interrupt'' that transfers control to kernel code; in Linux/i386 this is ``interrupt 0x80''. The specific system call being invoked is stored in the EAX register, abd its arguments are held in the other processor registers.

In which file system calls are declared in Linux?

syscall is declared in unistd.

How are arguments passed to system calls?

On page 74 he says the easiest way to pass arguments to a syscall is via : Somehow, user-space must relay the parameters to the kernel during the trap. The easiest way to do this is via the same means that the syscall number is passed: The parameters are stored in registers.


2 Answers

I don't think the kernel developers actually post the interrupt API, but you can find third-party charts like this one.

like image 53
owacoder Avatar answered Oct 26 '22 19:10

owacoder


The answer to your question is in the syscall man page. Particularly pay attention to the section title "Architecture calling conventions" and note as mentioned by John Bollinger above that this information could vary among kernel versions.

like image 25
JJF Avatar answered Oct 26 '22 19:10

JJF