This implements a simple kernel module to take the pid of a process as a parameter and obtain the task_struct of the pid.
Clone this repo, cd into it, and run:
makeThis will generate the taskStructReader.ko file.
You can run the module using:
sudo insmod taskStructReader.ko pidint=<insert pid here>You can check the output using:
sudo dmesg -t | tail -4You can remove the module using:
sudo rmmod taskStructReader