X86 : system call

Muni Sekhar munisekharrms at gmail.com
Sun Dec 12 02:04:54 EST 2021


Hi all,

32-bit system call numbers and entry vectors are defined in the format
"<number> <abi> <name> <entry point> <compat entry point>". What is
the difference between <entry point> and <compat entry point>?

The abi is always "i386" for arch/x86/entry/syscalls/syscall_32.tbl,
whereas for 64-bit(arch/x86/entry/syscalls/syscall_64.tbl) it is used
as "common" and "64", "x32". What is the difference between "common"
and "64", "x32"?

While adding a new system call(for example: mlock) to kernel,
/kernel/sys_ni.c file modified as mentioned below:
+cond_syscall(sys_mlock2);

Why do we pass <entry point> to cond_syscall()?

Also, could someone please point me to a document which explains about
"how to add a new system call" and the "system call flow from user
space to kernel space" in X86 ARCHITECTURE (32-BIT AND 64-BIT).


-- 
Thanks,
Sekhar



More information about the Kernelnewbies mailing list