From 4df979114fc1d52911340b2bced583e5cbb0999d Mon Sep 17 00:00:00 2001 From: dramforever Date: Sun, 7 Jun 2026 13:18:53 +0800 Subject: [PATCH] linux/common-config: Use LIST_HARDENED instead on >= 6.6 According to the message in the patch that introduced LIST_HARDENED [1], DEBUG_LIST was not optimized for performance in production and presents a significant performance hit in hot paths in some workloads. Use the new LIST_HARDENED option instead on >= 6.6 for better performance. [1]: https://git.kernel.org/torvalds/c/aebc7b0d8d91bbc69e976909963046bc48bca4fd --- pkgs/os-specific/linux/kernel/common-config.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index e5f06e7d481d..245db6407280 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -798,7 +798,9 @@ let FORTIFY_SOURCE = option yes; # https://googleprojectzero.blogspot.com/2019/11/bad-binder-android-in-wild-exploit.html - DEBUG_LIST = yes; + DEBUG_LIST = whenOlder "6.6" yes; + # https://git.kernel.org/torvalds/c/aebc7b0d8d91bbc69e976909963046bc48bca4fd + LIST_HARDENED = whenAtLeast "6.6" yes; HARDENED_USERCOPY = yes; RANDOMIZE_BASE = option yes;