summary refs log tree commit diff
path: root/pkgs/os-specific/linux/kernel/hardened-config.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/kernel/hardened-config.nix')
-rw-r--r--pkgs/os-specific/linux/kernel/hardened-config.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/kernel/hardened-config.nix b/pkgs/os-specific/linux/kernel/hardened-config.nix
index 79ee27c52b5..156a4cf4423 100644
--- a/pkgs/os-specific/linux/kernel/hardened-config.nix
+++ b/pkgs/os-specific/linux/kernel/hardened-config.nix
@@ -83,6 +83,9 @@ optionalAttrs (stdenv.hostPlatform.platform.kernelArch == "x86_64") {
 
   SLAB_FREELIST_HARDENED = whenAtLeast "4.14" yes;
 
+  # Randomize page allocator when page_alloc.shuffle=1
+  SHUFFLE_PAGE_ALLOCATOR = whenAtLeast "5.2" yes;
+
   # Allow enabling slub/slab free poisoning with slub_debug=P
   SLUB_DEBUG = yes;