Consider the following question on Stack Overflow on system call hooking by modifying the sys_call_table.
https://stackoverflow.com/questions/2103315/linux-kernel-system-call-hooking-example
Since CR0 "Write Protect" (bit 16) controls whether it's possible for the kernel to write to read-only pages, why does some code then calls set_memory_rw to set the permissions for the target pages to RW?