From 4c73c02917f0fb65cb89b5df79d645280783d1f3 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Mon, 15 Feb 2021 22:48:12 +0100 Subject: [PATCH] linux: enable kcmp() system call Since 2020, Mesa requires the kcmp() system call to be available for some of its functionality. At the moment, this system call is enabled when CHECKPOINT_RESTORE is enabled in the Linux kernel. This option is also enabled by default in Fedora and Debian. This patch enables CHECKPOINT_RESTORE by default on all kernel versions where it is not marked as EXPERT, i.e. everything after and including 4.19. Fixes #112082. --- pkgs/os-specific/linux/kernel/common-config.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index c71fdc327358..d108a24e0ce8 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -637,7 +637,12 @@ let XZ_DEC_TEST = option no; }; - criu = optionalAttrs (features.criu or false) ({ + criu = if (versionAtLeast version "4.19") then { + # Unconditionally enabled, because it is required for CRIU and + # it provides the kcmp() system call that Mesa depends on. + CHECKPOINT_RESTORE = yes; + } else optionalAttrs (features.criu or false) ({ + # For older kernels, CHECKPOINT_RESTORE is hidden behind EXPERT. EXPERT = yes; CHECKPOINT_RESTORE = yes; } // optionalAttrs (features.criu_revert_expert or true) {