I don't know much about Linux kernel, and I have some questions.
What is the main purpose of separating kernel memory from user-space memory? To make sure that a user application cannot do anything bad to the kernel?
How many ways are there for a user-level application to transfer control to the kernel? What I can come up with include (1) invoking a system call, (2) mapping memory to the kernel (but I think mmap() is also a system call), and (3) loading a kernel module (but I guess lsmod also invokes some system call). Am I correct? Are there any other ways that I missed?
How many ways to attack the kernel? May I have some brief details about them?
If I get the root privilege, does it mean that I completely control the kernel? Namely, I can do whatever I want with the kernel and hardware? Or I still have limited power on the kernel?
I'd really appreciate it if someone can help me figure out the answer to these questions.