问题
I'm trying to add new System Call to Linux Kernel(x86_64). Based on this article which explained how to add System Call to Kernel(x86). The article says I need to define my System Call name in a file called syscall_table_32.S
which is located in src/arch/x86/syscall_table_32.S
.
But in my case, there is no file named syscall_table_32.S
or syscall_table_64.S
in the kernel source! There isn't even a directory for x64 System Call table in src/arch/
.
So, where is syscall_table_64.S
defined in kernel 3.13.0-14-generic (x86_64) ?
Where can I define a new system call?
回答1:
Version 3.3 onward are different from 2.X that the guide use. You should look for the syscalls
directory, in the arch/x86/
directory. So is:
cd /kernel-src/arch/x86/syscalls/syscall_64.tbl
kernel-src
being the directory where your kernel sources resides. A good idea would be reading this answer in SO and compare it with your resource.
来源:https://stackoverflow.com/questions/26681507/where-is-located-syscall-table-in-kernel-x86-64