From 09406084bdd328cabf2c4440a908930bc4e7eeab Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Tue, 23 Mar 2021 09:50:52 -0400 Subject: [PATCH] linux-hardened: Fix page poisoning for 5.11 `PAGE_POISONING_NO_SANITY` was removed in https://git.kernel.org/linus/8f424750baaafcef229791882e879da01c9473b5 `PAGE_POISONING_ZERO` was removed in https://git.kernel.org/linus/f289041ed4cf9a3f6e8a32068fef9ffb2acc5662 --- pkgs/os-specific/linux/kernel/hardened/config.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened/config.nix b/pkgs/os-specific/linux/kernel/hardened/config.nix index acffa383f07..e4a7522fe59 100644 --- a/pkgs/os-specific/linux/kernel/hardened/config.nix +++ b/pkgs/os-specific/linux/kernel/hardened/config.nix @@ -55,8 +55,8 @@ assert (versionAtLeast version "4.9"); # Wipe higher-level memory allocations on free() with page_poison=1 PAGE_POISONING = yes; - PAGE_POISONING_NO_SANITY = yes; - PAGE_POISONING_ZERO = yes; + PAGE_POISONING_NO_SANITY = whenOlder "5.11" yes; + PAGE_POISONING_ZERO = whenOlder "5.11" yes; # Enable the SafeSetId LSM SECURITY_SAFESETID = whenAtLeast "5.1" yes;