Zephyr OS Memory Protection
Talkat Open Source Summit Europe + Embedded Linux Conference Europe 2019 · on Tuesday, 2019-10-29· at 14:25· Forum 6·
summary
Zephyr implements MPU-based protection on Cortex-M and an identity-page MMU on x86, using memory domains (collections of MPU partitions) programmed on context switch so threads only map their stack, text, and granted partitions. Kernel objects get a build-time perfect-hash table (DWARF parse + jeeper) mapping addresses to metadata and per-thread permission bitmaps. A futex-like fewtex lets uncontended locks avoid syscalls. Automatic linker-driven partition coalescing handles MPU alignment/power-of-two sizing; build-time ELF parsing (pyelftools) is slower but functional.
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
46mSecurity in Zephyr and Fuchsia
41mUserspace in Zephyr: Overview and Practicality
27mZephyr and Trusted Execution Environments
27mZephyr and Trusted Execution Environments
37mThe Hacker’s Perspective: Zephyr OS and On-Device Runtime Protection
28mIntroduce Hardware-Level Device Isolation to Zephyr
