CSC369H5 Lecture Notes - Lecture 3: Loadable Kernel Module, System Call
Document Summary
Make kernel module whenever certain set of systems calls are made we intercept them. What we can do is in this assignment fopen -> go into kernel module -> do something (log messages) -> proceed to do the regular file opening. In the operating system we have a table abut 300 system calls and what we are going to need rio do is how do we know which system call is to be interrupted. For example for fopen what is the system call number. If fopen was 3 then request_syscall_intercept we give it system call number and do what we want it to do. Request sys call does what we want the resume the system calls normal functions. If every process was using fopen we want it so that only few process can fopen use it. So first we intercept fopen when we monitor a pid and anything does an fopen.