From b93d18275c3e0ea8a5e471319420734bc07b808b Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 12 Aug 2023 08:10:06 +0100 Subject: [PATCH] linux: disable KUNIT only at 5.5 and later `KUNIT` knob was added around 5.5 release: https://github.com/torvalds/linux/commit/914cc63eea6fbe11ed46dba5e4438d81b0cd42d2 --- pkgs/os-specific/linux/kernel/common-config.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index caa788a92c41..e04fa843f0f2 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -1037,7 +1037,7 @@ let # > CONFIG_KUNIT should not be enabled in a production environment. Enabling KUnit disables Kernel Address-Space Layout Randomization (KASLR), and tests may affect the state of the kernel in ways not suitable for production. # https://www.kernel.org/doc/html/latest/dev-tools/kunit/start.html - KUNIT = no; + KUNIT = whenAtLeast "5.5" no; } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "aarch64-linux") { # Enable CPU/memory hotplug support # Allows you to dynamically add & remove CPUs/memory to a VM client running NixOS without requiring a reboot