Kerndat is a CRIU module responsible for detecting the capabilities and features of the currently running Linux kernel. Since CRIU’s functionality depends heavily on specific kernel system calls and behaviors, runtime detection is essential for ensuring compatibility and selecting the most efficient algorithms.
CRIU performs a wide array of checks during initialization. These include:
kcmp(), userfaultfd(), memfd_create(), clone3(), openat2(), membarrier(), and more.pagemap functionality, PAGEMAP_SCAN support, and anonymous shared mapping behaviors.The results of these checks are stored in a global kdat structure, which other CRIU modules query to determine how to proceed during dump and restore operations.
Executing hundreds of kernel feature checks can be time-consuming. To speed up subsequent CRIU invocations, the results are cached on disk.
/run/criu.kdat (typically stored on tmpfs to ensure it is cleared on reboot).$XDG_RUNTIME_DIR/criu.kdat.kerndat_init(). If the cache is missing or stale (e.g., if the CRIU binary has been updated with new checks), CRIU performs a full detection and saves the new results back to the cache file.It is important to distinguish between kerndat and the inventory image (inventory.img):
To see the features detected by CRIU on your current system, use the check command:
criu check --extra
This command triggers a kerndat initialization and prints the status of various required and optional kernel features, allowing you to verify that your environment is ready for CRIU.