summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/common-config.nix
diff options
context:
space:
mode:
authorJulian Stecklina <js@alien8.de>2021-02-15 22:48:12 +0100
committerMichael Weiss <dev.primeos@gmail.com>2021-02-18 12:31:11 +0100
commit4c73c02917f0fb65cb89b5df79d645280783d1f3 (patch)
tree71b339549d1cce0cc445b8f0c8267200823d2c08 /pkgs/os-specific/linux/kernel/common-config.nix
parentafcea016141370a8ba1e398f613cb42988a11b17 (diff)
downloadnixpkgs-4c73c02917f0fb65cb89b5df79d645280783d1f3.tar
nixpkgs-4c73c02917f0fb65cb89b5df79d645280783d1f3.tar.gz
nixpkgs-4c73c02917f0fb65cb89b5df79d645280783d1f3.tar.bz2
nixpkgs-4c73c02917f0fb65cb89b5df79d645280783d1f3.tar.lz
nixpkgs-4c73c02917f0fb65cb89b5df79d645280783d1f3.tar.xz
nixpkgs-4c73c02917f0fb65cb89b5df79d645280783d1f3.tar.zst
nixpkgs-4c73c02917f0fb65cb89b5df79d645280783d1f3.zip
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.
Diffstat (limited to 'pkgs/os-specific/linux/kernel/common-config.nix')
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index c71fdc32735..d108a24e0ce 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) {