sys_call_table
来源:互联网 发布:云计算的教育应用案例 编辑:程序博客网 时间:2024/06/05 17:48
今天看懂有意思的代码,以前没见过的思路,copy过来
#define MODULE
#define __KERNEL__#ifdef MODVERSIONS
#include <linux/modversions.h>
#endif
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/sched.h>
#include <asm/unistd.h>
unsigned long **sctable;
int init_module(void)
{
unsigned long ptr;
extern int loops_per_jiffy;
int z;
sctable = NULL;
for (ptr = (unsigned long)&loops_per_jiffy;
ptr < (unsigned long)&boot_cpu_data; ptr += sizeof(void *)){
unsigned long *p;
p = (unsigned long *)ptr;
if (p[__NR_close] == (unsigned long) sys_close){
sctable = (unsigned long **)p;
printk("The address of the system call table is: 0x%x\n",&sctable[0]);
for(z=0;z<256;z++) //this max number of the system calls should be set
printk("The address of %d system call is 0x%x\n",z, sctable[z]);
break;
}
}
return 0;
}
int cleanup_module(void)
{
printk("Module is unloaded!\n");
return 0;
}
- sys_call_table
- sys_call_table
- linux sys_call_table 初始化
- sys_call_table 的总结
- 获取Linux 2.6.x sys_call_table
- linux中导出sys_call_table解决方法
- 导出Linux系统调用表(sys_call_table)
- 截获系统调用(sys_call_table/VFS)
- 一些Android sys_call_table获取的方法
- 多种方法获取sys_call_table(linux系统调用表)的地址
- Linux 2.6 中导出sys_call_table表修改系统调用函数
- Linux 2.6版内核中通过模块获取sys_call_table地址的方法
- Linux 2.6版内核中通过模块获取sys_call_table地址的方法
- Linux 2.6版内核中通过模块获取sys_call_table地址的方法
- c 字符串、字符和字节 strlen、strcpy、strcat、strcmp、strchr、strstr
- DMI 用法
- C++Builder函数集(文件操作、获取时间、类型转换等)
- HDU 4258 Covered Walkway【斜率优化dp】
- form表单中name属性值为submit时,无法提交,出现"对象不支持此属性或方法"
- sys_call_table
- 复合索引优化
- Chapter 4 Arrays and Pointers
- 搞IT的好友们,注意了将来身体是革命的本钱哦
- 北大光华本科女强人的超长综合面经
- Game with points(数学,难度中)
- andengine学习
- usaco msquare java
- extern “C”总结 C++中的explicit关键字