Kernel Memory Models & Protection Architecture¶
Hardware Privilege & Memory Isolation
Analysis of hardware privilege levels across x86_64 (Ring 0–3) and arm64 (EL0–EL3), 64-bit virtual address space splitting, and the 5-layer defense-in-depth kernel hardening architecture.
x86_64 Ring 0 / Ring 3
ARM64 EL0–EL3 & TTBR0/1
5-Layer Defense-in-Depth
1. Privilege Level Model Comparison¶
graph TD
subgraph x86_64 ["x86_64 Privilege Rings"]
R3["Ring 3: User Space (Applications)"]
R0["Ring 0: Kernel Space (Kernel Core, Modules)"]
R3 -->|"syscall / sysenter"| R0
end
subgraph arm64 ["ARM64 Exception Levels"]
EL0["EL0: User Space (Applications)"]
EL1["EL1: Kernel Space (OS Kernel)"]
EL2["EL2: Hypervisor (KVM)"]
EL3["EL3: Secure Monitor (Firmware)"]
EL0 -->|"svc (Supervisor Call)"| EL1
end
Distinction Between UID 0 (root) and Ring 0
Processes executing under the root account (UID 0) remain confined within unprivileged user mode (Ring 3 / EL0) from the CPU hardware perspective. For a deep architectural comparison between rooting and Ring 0 kernel control, see Scenarios Overview: Rooting vs Kernel Space Security Boundary.
2. 64-bit Virtual Address Space Splitting¶
2.1 x86_64 (48-bit / 4-Level Paging)¶
0x0000_0000_0000_0000~0x0000_7FFF_FFFF_FFFF(128TB): User Space0x0000_8000_0000_0000~0xFFFF_7FFF_FFFF_FFFF: Non-canonical hole0xFFFF_8000_0000_0000~0xFFFF_FFFF_FFFF_FFFF(128TB): Kernel Space- Direct mapping (physical memory identity map)
- vmalloc / ioremap ranges
- Modules and Kernel Text (
CONFIG_RANDOMIZE_BASErandomization target)
2.2 ARM64 (48-bit VA, TTBR0 vs TTBR1)¶
0x0000_0000_0000_0000~0x0000_FFFF_FFFF_FFFF: TTBR0_EL1 (User Space)0xFFFF_0000_0000_0000~0xFFFF_FFFF_FFFF_FFFF: TTBR1_EL1 (Kernel Space)- Hardware base registers split lower and upper address spaces directly.
3. Defense-in-Depth Architecture¶
flowchart LR
A["Attack Ingress"] --> B["Layer 1: Boundary Control (Seccomp, Landlock, AppArmor)"]
B --> C["Layer 2: Control Flow Defense (Stack Canary, kCFI, IBT/BTI)"]
C --> D["Layer 3: Layout Obfuscation (KASLR, FG-KASLR, Randstruct)"]
D --> E["Layer 4: Permission Enforcement (SMEP/SMAP, W^X Strict RWX)"]
E --> F["Layer 5: Fault Containment (KFENCE, Page Table Check)"]