From 9dc0d948965ecfa8bae20de5699f7d32cc6707a6 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Fri, 4 Jan 2019 02:07:53 +0100 Subject: [PATCH] kernel/hardened-config.nix: re-enable GCC plugins --- .../linux/kernel/hardened-config.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/hardened-config.nix b/pkgs/os-specific/linux/kernel/hardened-config.nix index 84d1dd8a378..2454ecd0b05 100644 --- a/pkgs/os-specific/linux/kernel/hardened-config.nix +++ b/pkgs/os-specific/linux/kernel/hardened-config.nix @@ -103,17 +103,15 @@ PAGE_POISONING_ZERO y PANIC_ON_OOPS y PANIC_TIMEOUT -1 -${optionalString (versionOlder version "4.18") '' - GCC_PLUGINS y # Enable gcc plugin options - # Gather additional entropy at boot time for systems that may not have appropriate entropy sources. - GCC_PLUGIN_LATENT_ENTROPY y +GCC_PLUGINS y # Enable gcc plugin options +# Gather additional entropy at boot time for systems that may not have appropriate entropy sources. +GCC_PLUGIN_LATENT_ENTROPY y - ${optionalString (versionAtLeast version "4.11") '' - GCC_PLUGIN_STRUCTLEAK y # A port of the PaX structleak plugin - ''} - ${optionalString (versionAtLeast version "4.14") '' - GCC_PLUGIN_STRUCTLEAK_BYREF_ALL y # Also cover structs passed by address - ''} +${optionalString (versionAtLeast version "4.11") '' + GCC_PLUGIN_STRUCTLEAK y # A port of the PaX structleak plugin +''} +${optionalString (versionAtLeast version "4.14") '' + GCC_PLUGIN_STRUCTLEAK_BYREF_ALL y # Also cover structs passed by address ''} # Disable various dangerous settings