From a7ecdffc281f847e8addabee216a1b424998b130 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 6 May 2017 19:02:16 +0200 Subject: linux_hardened: move to 4.11 Note that DEBUG_RODATA has been split into STRICT_KERNEL_RWX & STRICT_MODULE_RWX, which are on by default (non-optional). --- pkgs/os-specific/linux/kernel/hardened-config.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'pkgs/os-specific/linux') diff --git a/pkgs/os-specific/linux/kernel/hardened-config.nix b/pkgs/os-specific/linux/kernel/hardened-config.nix index c54ee0e5aff1..78fb1e368be7 100644 --- a/pkgs/os-specific/linux/kernel/hardened-config.nix +++ b/pkgs/os-specific/linux/kernel/hardened-config.nix @@ -2,22 +2,19 @@ # http://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project#Recommended_settings # https://wiki.gentoo.org/wiki/Hardened/Hardened_Kernel_Project # -# The base kernel is assumed to be at least 4.9 or whatever the toplevel -# linux_hardened package expression uses. -# # Dangerous features that can be permanently (for the boot session) disabled at # boot via sysctl or kernel cmdline are left enabled here, for improved # flexibility. -{ stdenv }: +{ stdenv, version }: with stdenv.lib; +assert (versionAtLeast version "4.9"); + '' GCC_PLUGINS y # Enable gcc plugin options -DEBUG_KERNEL y -DEBUG_RODATA y # Make kernel text & rodata read-only DEBUG_WX y # A one-time check for W+X mappings at boot; doesn't do anything beyond printing a warning # Additional validation of commonly targetted structures -- cgit 1.4.1