如何理解为linux挂钩系统调用编写的代码或编程? [英] How to understand code or programming written for linux hooking system calls?

查看:90
本文介绍了如何理解为linux挂钩系统调用编写的代码或编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经找到了关于如何挂钩系统调用的材料,但我完全没有理解编程,例如:

I have found materials on how hooking system call is done but the programming done is not understood by me for e.g:

include<ASM / cacheflush.h> 
  #IFDEF KERN_2_6_24 
  #include LT& ASM / semaphore.h> 
  INT set_page_rw (long unsigned integer _addr) 
  { 
  Structure page * Pico; 
  Pgprot_t PROT; 
  PG = virt_to_page(_addr); 
  Prot.pgprot = VM_READ | VM_WRITE; 
  Return change_page_attr(PG,1,PROT); 
  }INT set_page_ro (long unsigned integer _addr) 
  { 
  Structure page * Pico; 
  Pgprot_t PROT; 
  PG = virt_to_page(_addr); 
  Prot.pgprot = VM_READ; 
  Return change_page_attr(PG,1,PROT); 
  }#Other #includes LT& Linux/semaphore.h> 
  INT set_page_rw (long unsigned integer _addr) 
  { 



...等



大多数这些功能或任何东西对我来说是不可理解的,因为我对此非常陌生,任何人都可以指导我应该采取哪些步骤来以编程方式理解这一点。



我尝试了什么:



试图理解钩子系统调用程序但是对此不熟悉所以不完全理解什么是函数做..


...etc

most of these functions or any thing is un understand able for me as i am very new to this can any one guide me what are steps i should take to understand this programmatically.

What I have tried:

tried to understand hook system call programs but new to this so not fully understanding what functions are doing..

推荐答案

你了解C?你了解指针吗?这是调用函数。阅读函数以了解它们的作用
Do you understand C? Do you understand pointers? This is calling functions. Read the functions to see what they do


这篇关于如何理解为linux挂钩系统调用编写的代码或编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆