Implement a System Call in Kernel 3.10.56 (X86_64)

本文详细介绍了内核2.6.32和内核3.10.56在注册系统调用和添加系统调用项上的不同之处,通过比较两者的方法,帮助开发者更好地理解和实施系统调用的实现。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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. 

转载于:https://www.cnblogs.com/miaoyong/p/4014889.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值