Userspace in Zephyr: Overview and Practicality
summary
Zephyr implements a userspace model that enforces access by assigning buffers and globals to memory partitions and grouping threads into memory domains; illegal MMU/MPU accesses cause page‑faults that kill the thread. Kernel services use an explicit syscall argument verification step and copy‑in/copy‑out, which prevents TOCTOU attacks but adds latency and extra stack/page‑table memory. Userspace requires MPU or MMU, offers isolation for accidental bugs (not full hostile code protection), and uses build‑time linker magic with examples in the docs.
AI-written summary · about
chapters (20)
- 0:00User space in Zephyr
- 0:43User vs kernel space
- 3:53Sharing data between threads
- 7:12System calls from user space
- 15:00Why and why not use user space
- 21:09Q&A: Applications & limits
- 23:16Q&A: Loadable modules
- 25:25Q&A: MMU vs MPU
- 27:40Q&A: Memory access permissions
- 30:49Q&A: Memory access errors
- 31:32Q&A: Memory partitioning
- 32:17Q&A: Memory layout tooling
- 32:59Q&A: Driver code in user space
- 33:40Q&A: User space vs TEE
- 34:26Q&A: Future user support
- 35:32Q&A: Interactive scenarios
- 36:58Q&A: Threat model limits
- 37:42Q&A: Shell & user support
- 38:04Q&A: User space overhead
- 39:54Summary
related talks
41mUserspace in Zephyr: Overview and Practicality
35mZephyr OS Memory Protection
35mZephyr OS Memory Protection
46mSecurity in Zephyr and Fuchsia
28mIntroduce Hardware-Level Device Isolation to Zephyr
35mLeveraging Userspace to Safely Run Untrusted Lua
27mZephyr and Trusted Execution Environments
18mZVM: Zephyr-based Virtual Machine
