Zephyr OS Memory Protection
summary
Zephyr implements MPU-backed user mode with memory domains, using a build-time DWARF scan and a perfect hash table (via Jeepers) mapping kernel-object addresses to metadata and per-object permission bitmaps indexed by numeric thread IDs. System calls run a verification step that validates pointers, copies user buffers to avoid TOCTOU, and enforces policy. The runtime programs MPU/MMU regions (some boards expose 16 regions), enforces power-of-two alignment, supports futex-like fewtex locks to avoid syscalls when uncontended, and routes globals into linker-generated partitions.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:30Zephyr vs. Linux
- 1:33So What's the Problem?
- 6:30High Level Security Objectives
- 8:02User Mode Threads
- 12:36Build Generation
- 15:01Object Metadata
- 16:36Futex-like objects
- 20:06Dynamic Kernel Objects
- 23:40System Calls Flowchart
- 24:20MPU Hardware - SAM E70 Example
- 25:43Memory Domains / Kernel Object Permissions
- 27:34Automatic Memory Domain Setup
- 28:34Automatic Memory Partitioning
- 30:35Resource Allocation
- 31:24Wrap-Up
related talks
35mZephyr OS Memory Protection
41mUserspace in Zephyr: Overview and Practicality
41mUserspace in Zephyr: Overview and Practicality
46mSecurity in Zephyr and Fuchsia
27mZephyr and Trusted Execution Environments
33mZephyr Support for Heterogeneous SoCs
27mZephyr and Trusted Execution Environments
49mThe Zephyr™ Project – An Updated Overview
