From b26c824da3d982beb46384b9d75421b9635878d4 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Tue, 8 Jan 2019 12:15:05 +0100 Subject: [PATCH] Revert "Revert "Revert "linux-hardened: Disable GCC_PLUGIN_RANDSTRUCT""" The issue with out-of-tree modules has been addressed and the feature should now be good to re-enable again. This reverts commit 865f7a14b49786a2ed55c5ecf3e994f6a3099e8c. --- pkgs/os-specific/linux/kernel/hardened-config.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/os-specific/linux/kernel/hardened-config.nix b/pkgs/os-specific/linux/kernel/hardened-config.nix index 4fadd447654..ed540a9e751 100644 --- a/pkgs/os-specific/linux/kernel/hardened-config.nix +++ b/pkgs/os-specific/linux/kernel/hardened-config.nix @@ -125,6 +125,11 @@ ${optionalString (versionAtLeast version "4.20") '' GCC_PLUGIN_STACKLEAK y # A port of the PaX stackleak plugin ''} +${optionalString (versionAtLeast version "4.13") '' + GCC_PLUGIN_RANDSTRUCT y # A port of the PaX randstruct plugin + GCC_PLUGIN_RANDSTRUCT_PERFORMANCE y +''} + # Disable various dangerous settings ACPI_CUSTOM_METHOD n # Allows writing directly to physical memory PROC_KCORE n # Exposes kernel text image layout