Home > OS >  Prohibit the kernel Linux is done direct access to the user space?
Prohibit the kernel Linux is done direct access to the user space?

Time:11-25

Bosses to help me solve this scenario
Scenario: three-ring pointer to use in direct drive access memory words will lead to system collapse, can only use the copy_from_user of memory to copy the user space, such as system calls into the kernel,
Has examined the copy_from_user related data, the prior to the start copying data, have checked the 3 ring pointer beyond user space, etc.,
I understand: for the kernel safety in kernel access to user space memory must verify the legitimacy of the pointer,

But my question is, how Linux is do it banned kernel direct access to the user space?
Because I see the copy_from_user code also just checked the pointer legitimacy, what did I didn't see the operation, and it can be a copy, not a direct use of pointer reads,

Look up some information, a wp bit in the register cr0 is can limit the kernel to the user space in read-only memory write operation, but still can not explain the copy_from_user how can copy data,

So request you to understand this aspect of the bosses to help answer answer, thank you!
  • Related