Skip to content

Commit

Permalink
hardened-config: enable the randstruct plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
joachifm committed Sep 15, 2017
1 parent edd0d2f commit 9a763f8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/os-specific/linux/kernel/hardened-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ ${optionalString (versionAtLeast version "4.11") ''
GCC_PLUGIN_STRUCTLEAK y # A port of the PaX structleak 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
Expand Down

1 comment on commit 9a763f8

@joachifm
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arguably only makes sense if you're building the kernel yourself, but that's also the case with KASLR.

Please sign in to comment.