kernel space
also: kernel mode, ring 0
The protected memory region where the Linux kernel executes with unrestricted hardware access, separate from user space where applications run with limited privileges.
Kernel space is a privileged memory area reserved exclusively for the operating system kernel and trusted drivers. Code running here operates in kernel mode, allowing direct access to hardware, memory management, and system resources without restrictions.
User applications run in user space, a restricted memory sandbox where dangerous operations are blocked. When a program needs kernel services—like reading a file or allocating memory—it makes a system call, which temporarily switches the CPU to kernel mode to perform the privileged operation, then returns control to user space.
For example, when you run cat /etc/passwd, the shell and cat process execute in user space. When cat calls open() to read the file, that syscall transitions to kernel space where the kernel accesses the disk and manages file descriptors, then returns the data safely to the user-space process.