<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Memory-Protection on Samuel Matildes - Knowledge Base</title><link>https://docs.matildes.dev/tags/memory-protection/</link><description>Recent content in Memory-Protection on Samuel Matildes - Knowledge Base</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 26 May 2026 14:15:13 +0100</lastBuildDate><atom:link href="https://docs.matildes.dev/tags/memory-protection/index.xml" rel="self" type="application/rss+xml"/><item><title>Kernel Mode vs User Mode: Privilege Levels and System Call Execution</title><link>https://docs.matildes.dev/linux/kernel/kernel-mode-vs-user-mode/</link><pubDate>Tue, 14 Jan 2025 00:00:00 +0000</pubDate><guid>https://docs.matildes.dev/linux/kernel/kernel-mode-vs-user-mode/</guid><description>&lt;p&gt;&lt;i class="fas fa-shield-alt" aria-hidden="true"&gt;&lt;/i&gt; CPU Privilege Levels and Execution Contexts&lt;/p&gt;
&lt;h2 id="summary"&gt;Summary&lt;a class="td-heading-self-link" href="#summary" aria-label="Heading self-link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Modern processors implement hardware-enforced privilege levels to isolate untrusted user code from critical kernel services. Linux uses two primary modes: &lt;strong&gt;kernel mode&lt;/strong&gt; (ring 0, CPL 0, EL1) and &lt;strong&gt;user mode&lt;/strong&gt; (ring 3, CPL 3, EL0). Kernel mode grants unrestricted access to CPU features, physical memory, I/O ports, and privileged instructions. User mode restricts access to a virtualized, isolated address space and requires kernel mediation for hardware resources. The transition between modes occurs via system calls, interrupts, and exceptions, all managed by the kernel&amp;rsquo;s interrupt and system call handlers. Understanding this separation is fundamental to security, performance optimization, and kernel debugging.&lt;/p&gt;</description></item></channel></rss>