Reputation: 2535
From the aspect of programe, how is done?
How can it avoid user mode programe to load kernel modules and call its functions?
Upvotes: 2
Views: 592
Reputation: 65
Read about Rings of protection
Hardware view : 1) There is a bit in a control register that is different (say 0=kernel, 1=user). 2) Hardware access to devices is usually unavailable in user mode. 3) Some instructions are available only in kernel mode. 4) Modifications to the page tables are only possible in kernel mode. 5) The interrupt controller can only be modified in kernel mode. 6) Other hardware control registers (such as system time, timer control, etc) are available only in kernel mode. 7) Kernel memory is not available to users in user mode.
copied from cs162 p sets
Upvotes: 1
Reputation: 283644
Unprivileged processes simply can't reach the kernel data structures and code, because there are no corresponding page table entries. And the CPU prevents unprivileged processes from swapping the page table.
Upvotes: 2