Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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..
Posted
Updated 13-May-18 13:05pm

1 solution

Do you understand C? Do you understand pointers? This is calling functions. Read the functions to see what they do
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900