I'm writing a kernel module that checks the integrity of code segments for running tasks by controlling checksums. I ran into a few hurdles:
- How can I get the
module_list
variable if it isn't exported by the kernel (there is no such symbol inksyms
)? I can see all modules calling thelsmod
command, so how can I get it in my module? - While my module is running it shows that some code segments have been changed. It always happens with certain libraries. Why does it happen? I thought that code segments were constant.
- Is it feasible to control memory access for process data from a kernel module and how to do it?