我别的部分都已经改好了,但就是sys.c里不知道怎么写,前面
unistd.h里为:
#define__NR_mysyscall 223
__SYSCALL(__NR_mysyscall,sys_mysyscall)syscall_32.tbl
223 i386 mysyscall在include/linux/mm.h里申明了变量pfcount
在sched.h里的task_struct中写了unsigned long pf;
将kernel/fork.c中的dup task struct函数里的pf设为了0:
static struct task_struct *dup_task_struct(struct task_struct *orig)
{
……
tsk=alloc_task_struct_node(node);
if(!tsk)
    return NULL;
tsk->pf=0;
……
}
在arch/x86/mm/fault.c里
定义unsighed long pfcount;
在do_page_fault里写了
pfcount++;
current->pf++
就是mysyscall的实现这一部分(输出)不会写 求帮忙!拜托了!