user686844
user686844

Reputation: 11

why user space kernel space sepearation in linux

I am trying to understand what makes the linux to go for sepration of user space and kernel space ?

I have some below basic understanding but I want to know more details.

  1. If user allows the access to hardware it is more prone to errors
  2. portability reasons.

Upvotes: 0

Views: 386

Answers (1)

C. K. Young
C. K. Young

Reputation: 223193

You forgot one of the most important reasons: so that security controls (e.g., root vs non-root access, file permissions, application memory space isolation, etc.) can be enforced.

If user code had the same access as kernel code, user code could bypass all the security-related bookkeeping data in the kernel. e.g., a normal user could then overwrite the current uid field to 0, automatically making them root.

Upvotes: 1

Related Questions