π darkone.security.kernel-params
Dynamic kernel configuration: boot parameters and sysctls (R8βR14). (wip)
Rules applicable without recompiling the kernel. Covers memory options (R8), system sysctls (R9), disabling module loading (R10), Yama/ptrace (R11), IPv4 network sysctls (R12), IPv6 disabling (R13), and filesystem sysctls (R14).
Options
Section titled βOptionsβ- enable
boolEnable ANSSI dynamic kernel parameters (R8βR14). - restrictUserns
boolR9: forbid unprivileged user namespaces (user.max_user_namespaces). Breaks Flatpak, bubblewrap and rootless Podman, so it stays opt-in and belongs on servers that run none of them. - disableSmt
boolR8: turn hyperthreading off. Three parameters carry it;falsefalls each back to its SMT-preserving form and leaves the other fourteen alone. Notel1tf=fulldrops SMT even withoutforceβ it only leaves the sysfs knob behind β so the fallback there isflush. - memoryDebug
boolR8: the allocator extras βslub_debug=FZP,page_poison=onandslab_nomerge=yes. None of the three is in the ANSSI R8 list, andpage_poisondisplacesinit_on_alloc/init_on_free, which are: the kernel says so at boot, and honours the debug facility instead. Turning it off restores the specified wipe and gives back 7% of a compile (95s to 88s, ms-a2, SMT on). - disableIpv6
boolR13: disable IPv6 entirely. Off by default β ANSSI itself prefers hardening IPv6 over dropping it, and a public host generally needs it.
darkone.security.kernel-params = { enable = false; restrictUserns = false; disableSmt = true; memoryDebug = true; disableIpv6 = false;};