您的位置:首页 > 其它

Implement a System Call in Kernel 3.10.56 (X86_64)

2014-10-10 05:21 513 查看
Implementing a system call in Kernel 2.6.32 is somehow different from

the method in Kernel 3.10.56.

In kernel 2.6.32, we should register the system call number in the file

/arch/x86/include/asm/unistd_64.h and then add the corresponding function

prototype of system call in the file /include/linux/syscalls.h.

But in kernel 3.10.56, we just need modify one file /arch/x86/syscalls/syscall_64.tbl,

for example, we want to add a system call Print_Info in kernel 3.10.56, adding the entry

314 common Print_Info  sys_Print_Info

at here, 314 represents the system call number, common means we can use this system

call under 32 bit architecture and 64 bit architecture. The last two items have the same

meaning as in kernel 2.6.32.

under the system call entry 313 is ok. Also you should implement this system call in the

appropriate souce file.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: