Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
nixos: allow customizing the kernel RANDSTRUCT seed #53826
Motivation for this change
See #53592. RANDSTRUCT is designed to make kernel exploitation harder through diversification of the builds. Allowing users to set their own RANDSTRUCT seed differentiates their kernel build from the rest of the NixOS hardened users. In a multi-host deployment this can also be used to deploy differently seeded builds on each machine.
I was torn on whether to put this in boot/kernel.nix or create a new module in security/ for the option -- in the end I decided on boot/kernel.nix because it makes the implementation much simpler, but I'm definitely open to the "new module" option too if someone has a strong opinion about this.
Still a NixOS noob, not sure if this is the right way to do things. Let me know!
Nit: Exposing such a specialized feature in the general interface may seem a little ad-hoc.