CRIU: Under the Hood
This directory contains technical documentation detailing the internal implementation of CRIU, the kernel APIs it leverages, and the complex algorithms used to achieve checkpoint and restore of various Linux resources.
Core Architecture & Lifecycle
Memory Management
Files, Mounts & I/O
Networking
- TCP Connections: Using TCP Repair mode for zero-loss socket migration.
- Unix Sockets: Reconnecting stream and dgram unix sockets.
- Sockets: General socket restoration (Netlink, Raw, etc.).
- Change IP Address: Handling network configuration changes during migration.
- MAC-VLAN: Support for MAC-VLAN interfaces.
- TUN/TAP: Virtual network device restoration.
Process & Resource Management
- PID Restore: Algorithms for restoring tasks with specific PIDs.
- PIDFD: Checkpointing and restoring pidfds.
- PIDFD Store: Internal management of pidfds.
- Zombies: Handling processes in the
EXIT_ZOMBIE state.
- 32-bit Tasks C/R: Specifics for IA32/compat mode tasks.
- Pending Signals: Capturing and re-queuing signals.
- Restartable Sequences (rseq): Handling the
rseq kernel feature.
- vDSO: Handling the virtual dynamic shared object across kernel versions.
- TTYs: The complex state of terminal devices and PTY pairs.
- CGroups: Restoring cgroup hierarchy and membership.
Security
Kernel Features
- ARM64 GCS: Guarded Control Stack support on AArch64.
- BPF Maps: Experimental support for checkpointing BPF map data.
- Code Blobs: Management of PIE blobs (parasite, restorer).
Generated by Gemini CLI as part of the Documentation Audit (March 2026).