nixos/security/misc: expose SMT control option

For the hardened profile disable symmetric multi threading.  There seems to be
no *proven* method of exploiting cache sharing between threads on the same CPU
core, so this may be considered quite paranoid, considering the perf cost.
SMT can be controlled at runtime, however.  This is in keeping with OpenBSD
defaults.

TODO: since SMT is left to be controlled at runtime, changing the option
definition should take effect on system activation.  Write to
/sys/devices/system/cpu/smt/control
This commit is contained in:
Joachim Fasting
2018-12-27 15:00:49 +01:00
parent e9761fa327
commit ea4f371627
2 changed files with 32 additions and 0 deletions
+2
View File
@@ -22,6 +22,8 @@ with lib;
security.protectKernelImage = mkDefault true;
security.allowSimultaneousMultithreading = mkDefault false;
security.virtualization.flushL1DataCache = mkDefault "always";
security.apparmor.enable = mkDefault true;